@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 +1136 -644
- package/dist/index.esm.js +1133 -645
- package/dist/pelcro.css +21 -0
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -3434,7 +3434,7 @@ var paymentMethod_fr = {
|
|
|
3434
3434
|
var title$d = "Enter your email to subscribe to our newsletter";
|
|
3435
3435
|
var updateTitle$1 = "Update newsletter selections";
|
|
3436
3436
|
var subtitle$7 = "We may use your email for other marketing communication";
|
|
3437
|
-
var labels$
|
|
3437
|
+
var labels$n = {
|
|
3438
3438
|
submit: "Submit",
|
|
3439
3439
|
firstName: "First name",
|
|
3440
3440
|
lastName: "Last name",
|
|
@@ -3442,7 +3442,7 @@ var labels$l = {
|
|
|
3442
3442
|
postalCode: "Postal code",
|
|
3443
3443
|
required: "required"
|
|
3444
3444
|
};
|
|
3445
|
-
var messages$
|
|
3445
|
+
var messages$r = {
|
|
3446
3446
|
alreadyHaveAccount: "Already have an account?",
|
|
3447
3447
|
success: "Newsletters were successfully updated",
|
|
3448
3448
|
loginHere: "Login here.",
|
|
@@ -3453,14 +3453,14 @@ var newsletter_en = {
|
|
|
3453
3453
|
title: title$d,
|
|
3454
3454
|
updateTitle: updateTitle$1,
|
|
3455
3455
|
subtitle: subtitle$7,
|
|
3456
|
-
labels: labels$
|
|
3457
|
-
messages: messages$
|
|
3456
|
+
labels: labels$n,
|
|
3457
|
+
messages: messages$r
|
|
3458
3458
|
};
|
|
3459
3459
|
|
|
3460
3460
|
var title$c = "Entrez votre adresse courriel pour vous abonner à notre infolettre";
|
|
3461
3461
|
var updateTitle = "Mettre à jour son choix d'infolettres";
|
|
3462
3462
|
var subtitle$6 = "Nous pouvons utiliser votre adresse courriel pour d’autres communications marketing";
|
|
3463
|
-
var labels$
|
|
3463
|
+
var labels$m = {
|
|
3464
3464
|
submit: "Lire l’article !",
|
|
3465
3465
|
firstName: "Prénom",
|
|
3466
3466
|
lastName: "Nom de famille",
|
|
@@ -3468,7 +3468,7 @@ var labels$k = {
|
|
|
3468
3468
|
postalCode: "Code postal",
|
|
3469
3469
|
required: "Champs obligatoires"
|
|
3470
3470
|
};
|
|
3471
|
-
var messages$
|
|
3471
|
+
var messages$q = {
|
|
3472
3472
|
alreadyHaveAccount: "Vous avez déjà un compte ?",
|
|
3473
3473
|
success: "Votre choix d'infolettres à été mis à jour",
|
|
3474
3474
|
loginHere: "Connectez-vous ici",
|
|
@@ -3479,14 +3479,14 @@ var newsletter_fr = {
|
|
|
3479
3479
|
title: title$c,
|
|
3480
3480
|
updateTitle: updateTitle,
|
|
3481
3481
|
subtitle: subtitle$6,
|
|
3482
|
-
labels: labels$
|
|
3483
|
-
messages: messages$
|
|
3482
|
+
labels: labels$m,
|
|
3483
|
+
messages: messages$q
|
|
3484
3484
|
};
|
|
3485
3485
|
|
|
3486
|
-
var labels$
|
|
3486
|
+
var labels$l = {
|
|
3487
3487
|
"continue": "Continue to content"
|
|
3488
3488
|
};
|
|
3489
|
-
var messages$
|
|
3489
|
+
var messages$p = {
|
|
3490
3490
|
yourFreeTrial: "Subscription successful!",
|
|
3491
3491
|
youHaveAccess: "Hope you enjoy the subscription. Please contact us if you have any questions or concerns.",
|
|
3492
3492
|
clickToLearn: {
|
|
@@ -3508,15 +3508,15 @@ var errors$9 = {
|
|
|
3508
3508
|
"": ""
|
|
3509
3509
|
};
|
|
3510
3510
|
var success_en = {
|
|
3511
|
-
labels: labels$
|
|
3512
|
-
messages: messages$
|
|
3511
|
+
labels: labels$l,
|
|
3512
|
+
messages: messages$p,
|
|
3513
3513
|
errors: errors$9
|
|
3514
3514
|
};
|
|
3515
3515
|
|
|
3516
|
-
var labels$
|
|
3516
|
+
var labels$k = {
|
|
3517
3517
|
"continue": "Abonnement réussi !"
|
|
3518
3518
|
};
|
|
3519
|
-
var messages$
|
|
3519
|
+
var messages$o = {
|
|
3520
3520
|
yourFreeTrial: "Votre essai gratuit vient de débuter",
|
|
3521
3521
|
youHaveAccess: "Nous espérons que vous allez apprécier votre abonnement. Veuillez nous contacter si vous avez des questions ou des préoccupations.",
|
|
3522
3522
|
clickToLearn: {
|
|
@@ -3538,12 +3538,12 @@ var errors$8 = {
|
|
|
3538
3538
|
"": ""
|
|
3539
3539
|
};
|
|
3540
3540
|
var success_fr = {
|
|
3541
|
-
labels: labels$
|
|
3542
|
-
messages: messages$
|
|
3541
|
+
labels: labels$k,
|
|
3542
|
+
messages: messages$o,
|
|
3543
3543
|
errors: errors$8
|
|
3544
3544
|
};
|
|
3545
3545
|
|
|
3546
|
-
var messages$
|
|
3546
|
+
var messages$n = {
|
|
3547
3547
|
freeVisits: "Free visits left:",
|
|
3548
3548
|
subscribeNow: "Subscribe",
|
|
3549
3549
|
alreadyHaveAccount: "Already have an account?",
|
|
@@ -3553,11 +3553,11 @@ var errors$7 = {
|
|
|
3553
3553
|
"": ""
|
|
3554
3554
|
};
|
|
3555
3555
|
var meter_en = {
|
|
3556
|
-
messages: messages$
|
|
3556
|
+
messages: messages$n,
|
|
3557
3557
|
errors: errors$7
|
|
3558
3558
|
};
|
|
3559
3559
|
|
|
3560
|
-
var messages$
|
|
3560
|
+
var messages$m = {
|
|
3561
3561
|
freeVisits: "Visites gratuites restantes:",
|
|
3562
3562
|
subscribeNow: "Abonnez-vous maintenant !",
|
|
3563
3563
|
alreadyHaveAccount: "Vous avez déjà un compte ?",
|
|
@@ -3567,15 +3567,15 @@ var errors$6 = {
|
|
|
3567
3567
|
"": ""
|
|
3568
3568
|
};
|
|
3569
3569
|
var meter_fr = {
|
|
3570
|
-
messages: messages$
|
|
3570
|
+
messages: messages$m,
|
|
3571
3571
|
errors: errors$6
|
|
3572
3572
|
};
|
|
3573
3573
|
|
|
3574
|
-
var messages$
|
|
3574
|
+
var messages$l = {
|
|
3575
3575
|
youAreSafe: "You're safe - PCI compliant 128 SSL by",
|
|
3576
3576
|
bankRedirection: "Please hold, redirecting you to your bank."
|
|
3577
3577
|
};
|
|
3578
|
-
var labels$
|
|
3578
|
+
var labels$j = {
|
|
3579
3579
|
card: "Enter card number",
|
|
3580
3580
|
date: "Expiration date",
|
|
3581
3581
|
CVC: "CVC",
|
|
@@ -3590,18 +3590,19 @@ var labels$h = {
|
|
|
3590
3590
|
"for": "for",
|
|
3591
3591
|
interval: "{{count}} {{interval}}",
|
|
3592
3592
|
interval_plural: "{{count}} {{interval}}s",
|
|
3593
|
-
tax: "+ Tax"
|
|
3593
|
+
tax: "+ Tax",
|
|
3594
|
+
removeCoupon: "REMOVE"
|
|
3594
3595
|
};
|
|
3595
3596
|
var checkoutForm_en = {
|
|
3596
|
-
messages: messages$
|
|
3597
|
-
labels: labels$
|
|
3597
|
+
messages: messages$l,
|
|
3598
|
+
labels: labels$j
|
|
3598
3599
|
};
|
|
3599
3600
|
|
|
3600
|
-
var messages$
|
|
3601
|
+
var messages$k = {
|
|
3601
3602
|
youAreSafe: "Vous êtes en sécurité - PCI conforme 128 SSL par",
|
|
3602
3603
|
bankRedirection: "Veuillez patienter, nous vous redirigeons vers votre banque."
|
|
3603
3604
|
};
|
|
3604
|
-
var labels$
|
|
3605
|
+
var labels$i = {
|
|
3605
3606
|
card: "Entrez le numéro de carte",
|
|
3606
3607
|
date: "Date d’expiration",
|
|
3607
3608
|
CVC: "CVC",
|
|
@@ -3616,11 +3617,12 @@ var labels$g = {
|
|
|
3616
3617
|
"for": "pour",
|
|
3617
3618
|
interval: "{{count}} {{interval}}",
|
|
3618
3619
|
interval_plural: "{{count}} {{interval}}s",
|
|
3619
|
-
tax: "+ Taxe"
|
|
3620
|
+
tax: "+ Taxe",
|
|
3621
|
+
removeCoupon: "RETIRER"
|
|
3620
3622
|
};
|
|
3621
3623
|
var checkoutForm_fr = {
|
|
3622
|
-
messages: messages$
|
|
3623
|
-
labels: labels$
|
|
3624
|
+
messages: messages$k,
|
|
3625
|
+
labels: labels$i
|
|
3624
3626
|
};
|
|
3625
3627
|
|
|
3626
3628
|
var youAreSafe$1 = "You're safe - PCI compliant 128 SSL by";
|
|
@@ -3653,7 +3655,7 @@ var messages_fr = {
|
|
|
3653
3655
|
recaptcha: recaptcha
|
|
3654
3656
|
};
|
|
3655
3657
|
|
|
3656
|
-
var labels$
|
|
3658
|
+
var labels$h = {
|
|
3657
3659
|
email: "Enter email",
|
|
3658
3660
|
password: "Enter password",
|
|
3659
3661
|
required: "required",
|
|
@@ -3661,7 +3663,7 @@ var labels$f = {
|
|
|
3661
3663
|
passwordPlaceholder: "Password",
|
|
3662
3664
|
login: "Login"
|
|
3663
3665
|
};
|
|
3664
|
-
var messages$
|
|
3666
|
+
var messages$j = {
|
|
3665
3667
|
loginTo: "Login to your account",
|
|
3666
3668
|
welcome: "Welcome back, sign in with your existing account.",
|
|
3667
3669
|
dontHaveAccount: "Don't have an account yet?",
|
|
@@ -3680,12 +3682,12 @@ var errors$5 = {
|
|
|
3680
3682
|
"": ""
|
|
3681
3683
|
};
|
|
3682
3684
|
var login_en = {
|
|
3683
|
-
labels: labels$
|
|
3684
|
-
messages: messages$
|
|
3685
|
+
labels: labels$h,
|
|
3686
|
+
messages: messages$j,
|
|
3685
3687
|
errors: errors$5
|
|
3686
3688
|
};
|
|
3687
3689
|
|
|
3688
|
-
var labels$
|
|
3690
|
+
var labels$g = {
|
|
3689
3691
|
email: "Entrez votre adresse courriel",
|
|
3690
3692
|
password: "Entrez votre mot de passe",
|
|
3691
3693
|
required: "Champs obligatoires",
|
|
@@ -3693,7 +3695,7 @@ var labels$e = {
|
|
|
3693
3695
|
passwordPlaceholder: "Mot de passe",
|
|
3694
3696
|
login: "Connexion"
|
|
3695
3697
|
};
|
|
3696
|
-
var messages$
|
|
3698
|
+
var messages$i = {
|
|
3697
3699
|
loginTo: "Connectez-vous à votre compte",
|
|
3698
3700
|
welcome: "Bienvenue, connectez-vous avec votre compte existant.",
|
|
3699
3701
|
dontHaveAccount: "Vous n’avez pas encore de compte ?",
|
|
@@ -3712,14 +3714,14 @@ var errors$4 = {
|
|
|
3712
3714
|
"": ""
|
|
3713
3715
|
};
|
|
3714
3716
|
var login_fr = {
|
|
3715
|
-
labels: labels$
|
|
3716
|
-
messages: messages$
|
|
3717
|
+
labels: labels$g,
|
|
3718
|
+
messages: messages$i,
|
|
3717
3719
|
errors: errors$4
|
|
3718
3720
|
};
|
|
3719
3721
|
|
|
3720
3722
|
var title$b = "Create an account";
|
|
3721
3723
|
var subtitle$5 = "Enter your email and password below";
|
|
3722
|
-
var labels$
|
|
3724
|
+
var labels$f = {
|
|
3723
3725
|
signUpFacebook: "Sign up with Facebook",
|
|
3724
3726
|
signUpGoogle: "Sign up with Google",
|
|
3725
3727
|
signUpEmail: "Sign up with Email",
|
|
@@ -3731,7 +3733,7 @@ var labels$d = {
|
|
|
3731
3733
|
firstName: "First name",
|
|
3732
3734
|
lastName: "Last name"
|
|
3733
3735
|
};
|
|
3734
|
-
var messages$
|
|
3736
|
+
var messages$h = {
|
|
3735
3737
|
alreadyHaveAccount: "Already have an account?",
|
|
3736
3738
|
createAccount: "Create account",
|
|
3737
3739
|
loginHere: "login here. ",
|
|
@@ -3764,7 +3766,7 @@ var gift$1 = {
|
|
|
3764
3766
|
lastName: "Last name",
|
|
3765
3767
|
email: "Email",
|
|
3766
3768
|
startDate: "Gift date",
|
|
3767
|
-
giftMessage: "Gift message (
|
|
3769
|
+
giftMessage: "Gift message (200 characters max)",
|
|
3768
3770
|
required: "required",
|
|
3769
3771
|
firstNamePlaceholder: "First name",
|
|
3770
3772
|
lastNamePlaceholder: "Last name",
|
|
@@ -3805,8 +3807,8 @@ var redeem$1 = {
|
|
|
3805
3807
|
var register_en = {
|
|
3806
3808
|
title: title$b,
|
|
3807
3809
|
subtitle: subtitle$5,
|
|
3808
|
-
labels: labels$
|
|
3809
|
-
messages: messages$
|
|
3810
|
+
labels: labels$f,
|
|
3811
|
+
messages: messages$h,
|
|
3810
3812
|
errors: errors$3,
|
|
3811
3813
|
gift: gift$1,
|
|
3812
3814
|
redeem: redeem$1
|
|
@@ -3814,7 +3816,7 @@ var register_en = {
|
|
|
3814
3816
|
|
|
3815
3817
|
var title$a = "Créer un compte";
|
|
3816
3818
|
var subtitle$4 = "Entrez votre courriel et votre mot de passe ci-dessous";
|
|
3817
|
-
var labels$
|
|
3819
|
+
var labels$e = {
|
|
3818
3820
|
signUpFacebook: "Inscrivez-vous avec Facebook",
|
|
3819
3821
|
signUpGoogle: "Inscrivez-vous avec Google",
|
|
3820
3822
|
signUpEmail: "Inscrivez-vous avec votre courriel",
|
|
@@ -3826,7 +3828,7 @@ var labels$c = {
|
|
|
3826
3828
|
firstName: "Prénom",
|
|
3827
3829
|
lastName: "Nom de famille"
|
|
3828
3830
|
};
|
|
3829
|
-
var messages$
|
|
3831
|
+
var messages$g = {
|
|
3830
3832
|
alreadyHaveAccount: "Vous avez déjà un compte?",
|
|
3831
3833
|
createAccount: "Créer un compte",
|
|
3832
3834
|
loginHere: "Connectez-vous ici",
|
|
@@ -3860,7 +3862,7 @@ var gift = {
|
|
|
3860
3862
|
lastName: "Nom de famille",
|
|
3861
3863
|
email: "Adresse courriel",
|
|
3862
3864
|
startDate: "Date de début",
|
|
3863
|
-
giftMessage: "Message du cadeau (
|
|
3865
|
+
giftMessage: "Message du cadeau (200 caractères max)",
|
|
3864
3866
|
required: "Champs obligatoires",
|
|
3865
3867
|
firstNamePlaceholder: "Prénom",
|
|
3866
3868
|
lastNamePlaceholder: "Nom de famille",
|
|
@@ -3901,14 +3903,14 @@ var redeem = {
|
|
|
3901
3903
|
var register_fr = {
|
|
3902
3904
|
title: title$a,
|
|
3903
3905
|
subtitle: subtitle$4,
|
|
3904
|
-
labels: labels$
|
|
3905
|
-
messages: messages$
|
|
3906
|
+
labels: labels$e,
|
|
3907
|
+
messages: messages$g,
|
|
3906
3908
|
errors: errors$2,
|
|
3907
3909
|
gift: gift,
|
|
3908
3910
|
redeem: redeem
|
|
3909
3911
|
};
|
|
3910
3912
|
|
|
3911
|
-
var labels$
|
|
3913
|
+
var labels$d = {
|
|
3912
3914
|
title: "Want to update your profile?",
|
|
3913
3915
|
subtitle: "Enter your information below to update your profile",
|
|
3914
3916
|
email: "Email",
|
|
@@ -3924,17 +3926,17 @@ var labels$b = {
|
|
|
3924
3926
|
removeImage: "Remove current photo",
|
|
3925
3927
|
zoom: "Zoom"
|
|
3926
3928
|
};
|
|
3927
|
-
var messages$
|
|
3929
|
+
var messages$f = {
|
|
3928
3930
|
userUpdated: "Thanks! Your profile was updated successfully.",
|
|
3929
3931
|
pictureRemoved: "Your profile picture was removed successfully.",
|
|
3930
3932
|
pictureUpdated: "Your profile picture was updated successfully."
|
|
3931
3933
|
};
|
|
3932
3934
|
var userEdit_en = {
|
|
3933
|
-
labels: labels$
|
|
3934
|
-
messages: messages$
|
|
3935
|
+
labels: labels$d,
|
|
3936
|
+
messages: messages$f
|
|
3935
3937
|
};
|
|
3936
3938
|
|
|
3937
|
-
var labels$
|
|
3939
|
+
var labels$c = {
|
|
3938
3940
|
title: "Voulez-vous mettre à jour votre profil ?",
|
|
3939
3941
|
subtitle: "Entrez vos informations ci-dessous pour mettre à jour votre profil",
|
|
3940
3942
|
email: "Address courriel",
|
|
@@ -3950,20 +3952,20 @@ var labels$a = {
|
|
|
3950
3952
|
removeImage: "supprimer la photo actuelle",
|
|
3951
3953
|
zoom: "Zoom"
|
|
3952
3954
|
};
|
|
3953
|
-
var messages$
|
|
3955
|
+
var messages$e = {
|
|
3954
3956
|
userUpdated: "Votre profil a été mis à jour avec succès.",
|
|
3955
3957
|
pictureRemoved: "Votre photo de profil a été supprimée avec succès.",
|
|
3956
3958
|
pictureUpdated: "Votre photo de profil a été mise à jour avec succès."
|
|
3957
3959
|
};
|
|
3958
3960
|
var userEdit_fr = {
|
|
3959
|
-
labels: labels$
|
|
3960
|
-
messages: messages$
|
|
3961
|
+
labels: labels$c,
|
|
3962
|
+
messages: messages$e
|
|
3961
3963
|
};
|
|
3962
3964
|
|
|
3963
3965
|
var title$9 = "Enter your shipping address";
|
|
3964
3966
|
var selectAddressTitle$1 = "Please select an address";
|
|
3965
3967
|
var selectAddressSubtitle$1 = "Select one of your saved addresses, or add a new one";
|
|
3966
|
-
var labels$
|
|
3968
|
+
var labels$b = {
|
|
3967
3969
|
address: "Address",
|
|
3968
3970
|
code: "Postal Code/Zip",
|
|
3969
3971
|
city: "City",
|
|
@@ -3978,7 +3980,7 @@ var buttons$5 = {
|
|
|
3978
3980
|
selectAddress: "Select address",
|
|
3979
3981
|
addAddress: "Add new address"
|
|
3980
3982
|
};
|
|
3981
|
-
var messages$
|
|
3983
|
+
var messages$d = {
|
|
3982
3984
|
addressUpdated: "The address was successfully updated!",
|
|
3983
3985
|
subRedeemed: "Your subscription has been redeemed."
|
|
3984
3986
|
};
|
|
@@ -3986,15 +3988,15 @@ var address_en = {
|
|
|
3986
3988
|
title: title$9,
|
|
3987
3989
|
selectAddressTitle: selectAddressTitle$1,
|
|
3988
3990
|
selectAddressSubtitle: selectAddressSubtitle$1,
|
|
3989
|
-
labels: labels$
|
|
3991
|
+
labels: labels$b,
|
|
3990
3992
|
buttons: buttons$5,
|
|
3991
|
-
messages: messages$
|
|
3993
|
+
messages: messages$d
|
|
3992
3994
|
};
|
|
3993
3995
|
|
|
3994
3996
|
var title$8 = "Entrez votre adresse de livraison";
|
|
3995
3997
|
var selectAddressTitle = "Veuillez sélectionner une adresse";
|
|
3996
3998
|
var selectAddressSubtitle = "Choisissez l'une de vos adresses ou créez-en une nouvelle";
|
|
3997
|
-
var labels$
|
|
3999
|
+
var labels$a = {
|
|
3998
4000
|
address: "Adresse",
|
|
3999
4001
|
code: "Code postal / Zip",
|
|
4000
4002
|
city: "Ville",
|
|
@@ -4009,7 +4011,7 @@ var buttons$4 = {
|
|
|
4009
4011
|
selectAddress: "Choisir cette adresse",
|
|
4010
4012
|
addAddress: "Ajouter une nouvelle adresse"
|
|
4011
4013
|
};
|
|
4012
|
-
var messages$
|
|
4014
|
+
var messages$c = {
|
|
4013
4015
|
addressUpdated: "Votre adresse a été mise à jour avec succès",
|
|
4014
4016
|
subRedeemed: "Votre abonnement a bien été activé."
|
|
4015
4017
|
};
|
|
@@ -4017,9 +4019,9 @@ var address_fr = {
|
|
|
4017
4019
|
title: title$8,
|
|
4018
4020
|
selectAddressTitle: selectAddressTitle,
|
|
4019
4021
|
selectAddressSubtitle: selectAddressSubtitle,
|
|
4020
|
-
labels: labels$
|
|
4022
|
+
labels: labels$a,
|
|
4021
4023
|
buttons: buttons$4,
|
|
4022
|
-
messages: messages$
|
|
4024
|
+
messages: messages$c
|
|
4023
4025
|
};
|
|
4024
4026
|
|
|
4025
4027
|
var title$7 = "Reset your password";
|
|
@@ -4066,7 +4068,7 @@ var password$1 = "Password";
|
|
|
4066
4068
|
var submit$3 = "Submit";
|
|
4067
4069
|
var required$3 = "Required";
|
|
4068
4070
|
var passwordResetEmailSent$1 = "Password reset instructions have been sent to your email";
|
|
4069
|
-
var messages$
|
|
4071
|
+
var messages$b = {
|
|
4070
4072
|
alreadyHaveAccount: "Already have an account?",
|
|
4071
4073
|
loginHere: "login here."
|
|
4072
4074
|
};
|
|
@@ -4077,7 +4079,7 @@ var passwordForgot_en = {
|
|
|
4077
4079
|
submit: submit$3,
|
|
4078
4080
|
required: required$3,
|
|
4079
4081
|
passwordResetEmailSent: passwordResetEmailSent$1,
|
|
4080
|
-
messages: messages$
|
|
4082
|
+
messages: messages$b
|
|
4081
4083
|
};
|
|
4082
4084
|
|
|
4083
4085
|
var title$4 = "Mot de passe oublié ?";
|
|
@@ -4086,7 +4088,7 @@ var password = "Mot de passe";
|
|
|
4086
4088
|
var submit$2 = "Soumettre";
|
|
4087
4089
|
var required$2 = "Champs obligatoires";
|
|
4088
4090
|
var passwordResetEmailSent = "Un lien pour réinitialiser votre mot de passe vous a été envoyé. Si vous ne le recevez pas, vérifier votre courrier indésirable.";
|
|
4089
|
-
var messages$
|
|
4091
|
+
var messages$a = {
|
|
4090
4092
|
alreadyHaveAccount: "Vous avez déjà un compte ?",
|
|
4091
4093
|
loginHere: "Connectez-vous ici"
|
|
4092
4094
|
};
|
|
@@ -4097,7 +4099,7 @@ var passwordForgot_fr = {
|
|
|
4097
4099
|
submit: submit$2,
|
|
4098
4100
|
required: required$2,
|
|
4099
4101
|
passwordResetEmailSent: passwordResetEmailSent,
|
|
4100
|
-
messages: messages$
|
|
4102
|
+
messages: messages$a
|
|
4101
4103
|
};
|
|
4102
4104
|
|
|
4103
4105
|
var title$3 = "Change your password";
|
|
@@ -4198,7 +4200,7 @@ var buttons$3 = {
|
|
|
4198
4200
|
purchase: "Purchase",
|
|
4199
4201
|
"continue": "Continue"
|
|
4200
4202
|
};
|
|
4201
|
-
var messages$
|
|
4203
|
+
var messages$9 = {
|
|
4202
4204
|
orderConfirmed: {
|
|
4203
4205
|
title: "Order confirmed!",
|
|
4204
4206
|
body: "Your order has been confirmed and will be shipped within the next few days. You'll shortly receive an email confirmation of this order."
|
|
@@ -4207,14 +4209,14 @@ var messages$7 = {
|
|
|
4207
4209
|
multipleCurrencies: "Your cart currently contains items which are available in different currencies. In order to proceed with the checkout, please make sure that all items have the same currency.",
|
|
4208
4210
|
currencyMismatch: "The selected item(s) do not match your current default currency ({{currency}}). Please choose item(s) only matching this currency."
|
|
4209
4211
|
};
|
|
4210
|
-
var labels$
|
|
4212
|
+
var labels$9 = {
|
|
4211
4213
|
summary: "Order summary",
|
|
4212
4214
|
total: "total"
|
|
4213
4215
|
};
|
|
4214
4216
|
var shop_en = {
|
|
4215
4217
|
buttons: buttons$3,
|
|
4216
|
-
messages: messages$
|
|
4217
|
-
labels: labels$
|
|
4218
|
+
messages: messages$9,
|
|
4219
|
+
labels: labels$9
|
|
4218
4220
|
};
|
|
4219
4221
|
|
|
4220
4222
|
var buttons$2 = {
|
|
@@ -4223,7 +4225,7 @@ var buttons$2 = {
|
|
|
4223
4225
|
purchase: "Acheter",
|
|
4224
4226
|
"continue": "Continuer au contenu"
|
|
4225
4227
|
};
|
|
4226
|
-
var messages$
|
|
4228
|
+
var messages$8 = {
|
|
4227
4229
|
orderConfirmed: {
|
|
4228
4230
|
title: "Votre commande est confirmée !",
|
|
4229
4231
|
body: "Votre commande a été confirmée et vous sera expédiée dans les prochains jours. Vous recevrez un courriel de confirmation sous peu."
|
|
@@ -4232,17 +4234,17 @@ var messages$6 = {
|
|
|
4232
4234
|
multipleCurrencies: "Votre panier contient des articles disponibles dans différentes devises. Avant de passer à la caisse, veuillez vous assurer que tous les articles ont la même devise.",
|
|
4233
4235
|
currencyMismatch: "Les articles sélectionnés ne sont pas compatibles avec la devise associée à votre compte ({{currency}}). Veuillez choisir des articles uniquement offerts dans cette devise."
|
|
4234
4236
|
};
|
|
4235
|
-
var labels$
|
|
4237
|
+
var labels$8 = {
|
|
4236
4238
|
summary: "récapitulatif de commande",
|
|
4237
4239
|
total: "total"
|
|
4238
4240
|
};
|
|
4239
4241
|
var shop_fr = {
|
|
4240
4242
|
buttons: buttons$2,
|
|
4241
|
-
messages: messages$
|
|
4242
|
-
labels: labels$
|
|
4243
|
+
messages: messages$8,
|
|
4244
|
+
labels: labels$8
|
|
4243
4245
|
};
|
|
4244
4246
|
|
|
4245
|
-
var labels$
|
|
4247
|
+
var labels$7 = {
|
|
4246
4248
|
cardNumber: "Numéro de carte",
|
|
4247
4249
|
securityCode: "Code de sécurité",
|
|
4248
4250
|
submit: "Soumettre",
|
|
@@ -4264,7 +4266,7 @@ var labels$5 = {
|
|
|
4264
4266
|
title: "Informations de paiement"
|
|
4265
4267
|
}
|
|
4266
4268
|
};
|
|
4267
|
-
var messages$
|
|
4269
|
+
var messages$7 = {
|
|
4268
4270
|
youAreSafe: "Vous êtes en sécurité - PCI conforme 128 SSL par",
|
|
4269
4271
|
cancel: "Annuler votre abonnement en ligne à tout moment.",
|
|
4270
4272
|
giftSent: "Le cadeau d’abonnement a été envoyé à",
|
|
@@ -4277,12 +4279,12 @@ var errors$1 = {
|
|
|
4277
4279
|
"": ""
|
|
4278
4280
|
};
|
|
4279
4281
|
var payment_fr = {
|
|
4280
|
-
labels: labels$
|
|
4281
|
-
messages: messages$
|
|
4282
|
+
labels: labels$7,
|
|
4283
|
+
messages: messages$7,
|
|
4282
4284
|
errors: errors$1
|
|
4283
4285
|
};
|
|
4284
4286
|
|
|
4285
|
-
var labels$
|
|
4287
|
+
var labels$6 = {
|
|
4286
4288
|
cardNumber: "Card number",
|
|
4287
4289
|
securityCode: "Security Code",
|
|
4288
4290
|
submit: "Submit",
|
|
@@ -4304,7 +4306,7 @@ var labels$4 = {
|
|
|
4304
4306
|
title: "Payment Information"
|
|
4305
4307
|
}
|
|
4306
4308
|
};
|
|
4307
|
-
var messages$
|
|
4309
|
+
var messages$6 = {
|
|
4308
4310
|
youAreSafe: "You're safe - PCI compliant 128 SSL by",
|
|
4309
4311
|
cancel: "Cancel your subscription online at anytime.",
|
|
4310
4312
|
giftSent: "Subscription gift has been sent to",
|
|
@@ -4317,12 +4319,12 @@ var errors = {
|
|
|
4317
4319
|
"": ""
|
|
4318
4320
|
};
|
|
4319
4321
|
var payment_en = {
|
|
4320
|
-
labels: labels$
|
|
4321
|
-
messages: messages$
|
|
4322
|
+
labels: labels$6,
|
|
4323
|
+
messages: messages$6,
|
|
4322
4324
|
errors: errors
|
|
4323
4325
|
};
|
|
4324
4326
|
|
|
4325
|
-
var labels$
|
|
4327
|
+
var labels$5 = {
|
|
4326
4328
|
menu: "Pelcro Menu",
|
|
4327
4329
|
name: "Name",
|
|
4328
4330
|
email: "Email",
|
|
@@ -4346,6 +4348,7 @@ var labels$3 = {
|
|
|
4346
4348
|
account: "Account",
|
|
4347
4349
|
purchases: "Purchases",
|
|
4348
4350
|
subscriptions: "Subscriptions",
|
|
4351
|
+
donations: "Donations",
|
|
4349
4352
|
updatePaymentSource: "Update",
|
|
4350
4353
|
profile: "Profile",
|
|
4351
4354
|
updateProfile: "Edit profile",
|
|
@@ -4361,6 +4364,7 @@ var labels$3 = {
|
|
|
4361
4364
|
actions: "Actions",
|
|
4362
4365
|
expiresOn: "Ends",
|
|
4363
4366
|
startsOn: "Starts",
|
|
4367
|
+
startDate: "Start date",
|
|
4364
4368
|
renewsOn: "Renews",
|
|
4365
4369
|
canceledOn: "Canceled on",
|
|
4366
4370
|
recipient: "Recipient",
|
|
@@ -4387,7 +4391,7 @@ var labels$3 = {
|
|
|
4387
4391
|
goBack: "Go back"
|
|
4388
4392
|
}
|
|
4389
4393
|
};
|
|
4390
|
-
var messages$
|
|
4394
|
+
var messages$5 = {
|
|
4391
4395
|
noCard: "You don't have a card",
|
|
4392
4396
|
subCancellation: {
|
|
4393
4397
|
isSureToCancel: "Are you sure you want to cancel your subscription?",
|
|
@@ -4397,11 +4401,11 @@ var messages$3 = {
|
|
|
4397
4401
|
}
|
|
4398
4402
|
};
|
|
4399
4403
|
var dashboard_en = {
|
|
4400
|
-
labels: labels$
|
|
4401
|
-
messages: messages$
|
|
4404
|
+
labels: labels$5,
|
|
4405
|
+
messages: messages$5
|
|
4402
4406
|
};
|
|
4403
4407
|
|
|
4404
|
-
var labels$
|
|
4408
|
+
var labels$4 = {
|
|
4405
4409
|
menu: "Menu Pelcro",
|
|
4406
4410
|
name: "Nom",
|
|
4407
4411
|
email: "Courriel",
|
|
@@ -4425,6 +4429,7 @@ var labels$2 = {
|
|
|
4425
4429
|
account: "Compte",
|
|
4426
4430
|
purchases: "Achats",
|
|
4427
4431
|
subscriptions: "Abonnements",
|
|
4432
|
+
donations: "Des dons",
|
|
4428
4433
|
updatePaymentSource: "Mettre à jour la source de paiement",
|
|
4429
4434
|
profile: "Profil",
|
|
4430
4435
|
updateProfile: "Mettre à jour le profil",
|
|
@@ -4440,6 +4445,7 @@ var labels$2 = {
|
|
|
4440
4445
|
actions: "Actes",
|
|
4441
4446
|
expiresOn: "Expire le",
|
|
4442
4447
|
startsOn: "Débute le",
|
|
4448
|
+
startDate: "Date de début",
|
|
4443
4449
|
renewsOn: "Renouvelle le",
|
|
4444
4450
|
canceledOn: "Annulé le",
|
|
4445
4451
|
recipient: "Destinataire",
|
|
@@ -4466,7 +4472,7 @@ var labels$2 = {
|
|
|
4466
4472
|
goBack: "Retourner"
|
|
4467
4473
|
}
|
|
4468
4474
|
};
|
|
4469
|
-
var messages$
|
|
4475
|
+
var messages$4 = {
|
|
4470
4476
|
noCard: "Vous n’avez pas une carte",
|
|
4471
4477
|
subCancellation: {
|
|
4472
4478
|
isSureToCancel: "Êtes-vous certain de vouloir annuler votre abonnement?",
|
|
@@ -4476,16 +4482,16 @@ var messages$2 = {
|
|
|
4476
4482
|
}
|
|
4477
4483
|
};
|
|
4478
4484
|
var dashboard_fr = {
|
|
4479
|
-
labels: labels$
|
|
4480
|
-
messages: messages$
|
|
4485
|
+
labels: labels$4,
|
|
4486
|
+
messages: messages$4
|
|
4481
4487
|
};
|
|
4482
4488
|
|
|
4483
|
-
var messages$
|
|
4489
|
+
var messages$3 = {
|
|
4484
4490
|
alreadyHaveAccount: "Already have an account?",
|
|
4485
4491
|
loginHere: "Login here",
|
|
4486
4492
|
checkbox: "Check this box to gift this subscription"
|
|
4487
4493
|
};
|
|
4488
|
-
var labels$
|
|
4494
|
+
var labels$3 = {
|
|
4489
4495
|
plan: {
|
|
4490
4496
|
title: "Subscribe to a plan",
|
|
4491
4497
|
subtitle: "Select one of the plans below and click on next."
|
|
@@ -4496,7 +4502,11 @@ var labels$1 = {
|
|
|
4496
4502
|
},
|
|
4497
4503
|
selectProduct: "Select a product",
|
|
4498
4504
|
selectPlan: "Select a plan",
|
|
4499
|
-
startingAt: "Starting at"
|
|
4505
|
+
startingAt: "Starting at",
|
|
4506
|
+
restrictiveArticles: {
|
|
4507
|
+
subscribeTo: "Subscribe to one of the following options to get access to this page",
|
|
4508
|
+
or: "Or take a look at some of our other options below"
|
|
4509
|
+
}
|
|
4500
4510
|
};
|
|
4501
4511
|
var buttons$1 = {
|
|
4502
4512
|
next: "Next",
|
|
@@ -4504,17 +4514,17 @@ var buttons$1 = {
|
|
|
4504
4514
|
back: "Back"
|
|
4505
4515
|
};
|
|
4506
4516
|
var select_en = {
|
|
4507
|
-
messages: messages$
|
|
4508
|
-
labels: labels$
|
|
4517
|
+
messages: messages$3,
|
|
4518
|
+
labels: labels$3,
|
|
4509
4519
|
buttons: buttons$1
|
|
4510
4520
|
};
|
|
4511
4521
|
|
|
4512
|
-
var messages = {
|
|
4522
|
+
var messages$2 = {
|
|
4513
4523
|
alreadyHaveAccount: "Vous avez déjà un compte ?",
|
|
4514
4524
|
loginHere: "Connectez-vous ici",
|
|
4515
4525
|
checkbox: "Cochez cette case pour offrir cet abonnement"
|
|
4516
4526
|
};
|
|
4517
|
-
var labels = {
|
|
4527
|
+
var labels$2 = {
|
|
4518
4528
|
plan: {
|
|
4519
4529
|
title: "Abonnez-vous à un plan",
|
|
4520
4530
|
subtitle: "Sélectionnez l’un des plans ci-dessous et cliquez sur suivant."
|
|
@@ -4525,7 +4535,11 @@ var labels = {
|
|
|
4525
4535
|
},
|
|
4526
4536
|
selectProduct: "Sélectionnez un produit",
|
|
4527
4537
|
selectPlan: "Sélectionnez un plan",
|
|
4528
|
-
starningAt: "À partir de"
|
|
4538
|
+
starningAt: "À partir de",
|
|
4539
|
+
restrictiveArticles: {
|
|
4540
|
+
subscribeTo: "Abonnez-vous à une des options suivantes pour accéder au contenu de cette page",
|
|
4541
|
+
or: "Sinon, jetez un coup d'oeil à d'autres offres ci-dessous"
|
|
4542
|
+
}
|
|
4529
4543
|
};
|
|
4530
4544
|
var buttons = {
|
|
4531
4545
|
next: "Prochain",
|
|
@@ -4533,8 +4547,8 @@ var buttons = {
|
|
|
4533
4547
|
back: "Retour"
|
|
4534
4548
|
};
|
|
4535
4549
|
var select_fr = {
|
|
4536
|
-
messages: messages,
|
|
4537
|
-
labels: labels,
|
|
4550
|
+
messages: messages$2,
|
|
4551
|
+
labels: labels$2,
|
|
4538
4552
|
buttons: buttons
|
|
4539
4553
|
};
|
|
4540
4554
|
|
|
@@ -4558,6 +4572,34 @@ var notification_fr = {
|
|
|
4558
4572
|
confirm: confirm
|
|
4559
4573
|
};
|
|
4560
4574
|
|
|
4575
|
+
var labels$1 = {
|
|
4576
|
+
title: "Verify your email",
|
|
4577
|
+
instructions: "You're on your way!\nLet's confirm your email address.\nClick on the verification link we've sent to your email:",
|
|
4578
|
+
resend: "Resend email"
|
|
4579
|
+
};
|
|
4580
|
+
var messages$1 = {
|
|
4581
|
+
resent: "Resent successfully",
|
|
4582
|
+
success: "Email verified successfully!"
|
|
4583
|
+
};
|
|
4584
|
+
var verifyEmail_en = {
|
|
4585
|
+
labels: labels$1,
|
|
4586
|
+
messages: messages$1
|
|
4587
|
+
};
|
|
4588
|
+
|
|
4589
|
+
var labels = {
|
|
4590
|
+
title: "Vérifiez votre e-mail",
|
|
4591
|
+
instructions: "Vous êtes en route!\nConfirmons votre adresse e-mail.\nCliquez sur le lien de vérification que nous vous avons envoyé par e-mail:",
|
|
4592
|
+
resend: "Ré-envoyer l'email"
|
|
4593
|
+
};
|
|
4594
|
+
var messages = {
|
|
4595
|
+
resent: "Renvoyé avec succès",
|
|
4596
|
+
success: "Email vérifié avec succès!"
|
|
4597
|
+
};
|
|
4598
|
+
var verifyEmail_fr = {
|
|
4599
|
+
labels: labels,
|
|
4600
|
+
messages: messages
|
|
4601
|
+
};
|
|
4602
|
+
|
|
4561
4603
|
function create$1(createState) {
|
|
4562
4604
|
let state;
|
|
4563
4605
|
const listeners = new Set();
|
|
@@ -5907,12 +5949,23 @@ class PelcroActions {
|
|
|
5907
5949
|
view,
|
|
5908
5950
|
cartItems,
|
|
5909
5951
|
...otherStateFields
|
|
5910
|
-
} = initialState$
|
|
5952
|
+
} = initialState$h;
|
|
5911
5953
|
this.set(otherStateFields);
|
|
5912
5954
|
});
|
|
5913
5955
|
|
|
5914
5956
|
_defineProperty$3(this, "switchView", view => {
|
|
5915
|
-
|
|
5957
|
+
var _window$Pelcro$site$r, _window$Pelcro$site$r2, _window$Pelcro$user$r, _window$Pelcro$user$r2;
|
|
5958
|
+
|
|
5959
|
+
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;
|
|
5960
|
+
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;
|
|
5961
|
+
const userMustVerifyEmail = this.get().isAuthenticated() && isEmailVerificationEnabled && !isUserEmailVerified; // view switching guards
|
|
5962
|
+
|
|
5963
|
+
if (userMustVerifyEmail && !["dashboard", "meter", "login", null].includes(view)) {
|
|
5964
|
+
return this.set({
|
|
5965
|
+
view: "email-verify"
|
|
5966
|
+
});
|
|
5967
|
+
}
|
|
5968
|
+
|
|
5916
5969
|
if (["login", "register"].includes(view) && this.get().isAuthenticated()) {
|
|
5917
5970
|
return this.set({
|
|
5918
5971
|
view: "dashboard"
|
|
@@ -6170,7 +6223,7 @@ class PelcroCallbacks {
|
|
|
6170
6223
|
}
|
|
6171
6224
|
});
|
|
6172
6225
|
|
|
6173
|
-
_defineProperty$3(this, "whenUserReady", callback => {
|
|
6226
|
+
_defineProperty$3(this, "whenUserReady", (callback, listenerOptions) => {
|
|
6174
6227
|
var _window$Pelcro$user$r;
|
|
6175
6228
|
|
|
6176
6229
|
if ((_window$Pelcro$user$r = window.Pelcro.user.read()) !== null && _window$Pelcro$user$r !== void 0 && _window$Pelcro$user$r.id) {
|
|
@@ -6178,7 +6231,7 @@ class PelcroCallbacks {
|
|
|
6178
6231
|
} else {
|
|
6179
6232
|
window.document.addEventListener("PelcroUserLoaded", e => {
|
|
6180
6233
|
callback(window.Pelcro.user.read());
|
|
6181
|
-
});
|
|
6234
|
+
}, listenerOptions);
|
|
6182
6235
|
}
|
|
6183
6236
|
});
|
|
6184
6237
|
|
|
@@ -6197,7 +6250,7 @@ class PelcroCallbacks {
|
|
|
6197
6250
|
|
|
6198
6251
|
}
|
|
6199
6252
|
|
|
6200
|
-
const initialState$
|
|
6253
|
+
const initialState$h = {
|
|
6201
6254
|
// View
|
|
6202
6255
|
view: null,
|
|
6203
6256
|
// Plans
|
|
@@ -6225,7 +6278,7 @@ const createPelcroStore = () => createStore(middleware_3((set, get) => {
|
|
|
6225
6278
|
return {
|
|
6226
6279
|
// Store setter
|
|
6227
6280
|
set,
|
|
6228
|
-
...initialState$
|
|
6281
|
+
...initialState$h,
|
|
6229
6282
|
// State actions
|
|
6230
6283
|
...actions,
|
|
6231
6284
|
// Callbacks
|
|
@@ -6376,7 +6429,7 @@ const calcAndFormatItemsTotal = (items, currency) => {
|
|
|
6376
6429
|
*/
|
|
6377
6430
|
|
|
6378
6431
|
const isValidViewFromURL = viewID => {
|
|
6379
|
-
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()) {
|
|
6432
|
+
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()) {
|
|
6380
6433
|
return true;
|
|
6381
6434
|
}
|
|
6382
6435
|
|
|
@@ -6590,6 +6643,7 @@ const resources = {
|
|
|
6590
6643
|
passwordReset: passwordReset_en,
|
|
6591
6644
|
passwordForgot: passwordForgot_en,
|
|
6592
6645
|
passwordChange: passwordChange_en,
|
|
6646
|
+
verifyEmail: verifyEmail_en,
|
|
6593
6647
|
cart: cart_en,
|
|
6594
6648
|
shop: shop_en,
|
|
6595
6649
|
payment: payment_en,
|
|
@@ -6612,6 +6666,7 @@ const resources = {
|
|
|
6612
6666
|
passwordReset: passwordReset_fr,
|
|
6613
6667
|
passwordForgot: passwordForgot_fr,
|
|
6614
6668
|
passwordChange: passwordChange_fr,
|
|
6669
|
+
verifyEmail: verifyEmail_fr,
|
|
6615
6670
|
cart: cart_fr,
|
|
6616
6671
|
shop: shop_fr,
|
|
6617
6672
|
payment: payment_fr,
|
|
@@ -6770,6 +6825,8 @@ class SaveToMetadataButtonClass {
|
|
|
6770
6825
|
_saveToMetadata.set(this, {
|
|
6771
6826
|
writable: true,
|
|
6772
6827
|
value: event => {
|
|
6828
|
+
var _user$metadata;
|
|
6829
|
+
|
|
6773
6830
|
const button = event.currentTarget;
|
|
6774
6831
|
const user = window.Pelcro.user.read();
|
|
6775
6832
|
const {
|
|
@@ -6785,7 +6842,7 @@ class SaveToMetadataButtonClass {
|
|
|
6785
6842
|
|
|
6786
6843
|
let newMetadataValue = [buttonMetadata]; // if this key already exist in user metadata object, append to it.
|
|
6787
6844
|
|
|
6788
|
-
const oldValue = user.metadata[`metadata_saved_${key}`];
|
|
6845
|
+
const oldValue = (_user$metadata = user.metadata) === null || _user$metadata === void 0 ? void 0 : _user$metadata[`metadata_saved_${key}`];
|
|
6789
6846
|
|
|
6790
6847
|
if (oldValue) {
|
|
6791
6848
|
if (Array.isArray(oldValue)) {
|
|
@@ -6899,8 +6956,8 @@ const saveToMetadataButton = new SaveToMetadataButtonClass();
|
|
|
6899
6956
|
|
|
6900
6957
|
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}}
|
|
6901
6958
|
|
|
6902
|
-
function _extends$
|
|
6903
|
-
_extends$
|
|
6959
|
+
function _extends$y() {
|
|
6960
|
+
_extends$y = Object.assign || function (target) {
|
|
6904
6961
|
for (var i = 1; i < arguments.length; i++) {
|
|
6905
6962
|
var source = arguments[i];
|
|
6906
6963
|
|
|
@@ -6914,7 +6971,7 @@ function _extends$w() {
|
|
|
6914
6971
|
return target;
|
|
6915
6972
|
};
|
|
6916
6973
|
|
|
6917
|
-
return _extends$
|
|
6974
|
+
return _extends$y.apply(this, arguments);
|
|
6918
6975
|
}
|
|
6919
6976
|
|
|
6920
6977
|
function _taggedTemplateLiteralLoose(strings, raw) {
|
|
@@ -7004,7 +7061,7 @@ var clearFromRemoveQueue = function clearFromRemoveQueue(toastId) {
|
|
|
7004
7061
|
var reducer = function reducer(state, action) {
|
|
7005
7062
|
switch (action.type) {
|
|
7006
7063
|
case ActionType.ADD_TOAST:
|
|
7007
|
-
return _extends$
|
|
7064
|
+
return _extends$y({}, state, {
|
|
7008
7065
|
toasts: [action.toast].concat(state.toasts).slice(0, TOAST_LIMIT)
|
|
7009
7066
|
});
|
|
7010
7067
|
|
|
@@ -7014,9 +7071,9 @@ var reducer = function reducer(state, action) {
|
|
|
7014
7071
|
clearFromRemoveQueue(action.toast.id);
|
|
7015
7072
|
}
|
|
7016
7073
|
|
|
7017
|
-
return _extends$
|
|
7074
|
+
return _extends$y({}, state, {
|
|
7018
7075
|
toasts: state.toasts.map(function (t) {
|
|
7019
|
-
return t.id === action.toast.id ? _extends$
|
|
7076
|
+
return t.id === action.toast.id ? _extends$y({}, t, action.toast) : t;
|
|
7020
7077
|
})
|
|
7021
7078
|
});
|
|
7022
7079
|
|
|
@@ -7043,9 +7100,9 @@ var reducer = function reducer(state, action) {
|
|
|
7043
7100
|
});
|
|
7044
7101
|
}
|
|
7045
7102
|
|
|
7046
|
-
return _extends$
|
|
7103
|
+
return _extends$y({}, state, {
|
|
7047
7104
|
toasts: state.toasts.map(function (t) {
|
|
7048
|
-
return t.id === toastId || toastId === undefined ? _extends$
|
|
7105
|
+
return t.id === toastId || toastId === undefined ? _extends$y({}, t, {
|
|
7049
7106
|
visible: false
|
|
7050
7107
|
}) : t;
|
|
7051
7108
|
})
|
|
@@ -7053,28 +7110,28 @@ var reducer = function reducer(state, action) {
|
|
|
7053
7110
|
|
|
7054
7111
|
case ActionType.REMOVE_TOAST:
|
|
7055
7112
|
if (action.toastId === undefined) {
|
|
7056
|
-
return _extends$
|
|
7113
|
+
return _extends$y({}, state, {
|
|
7057
7114
|
toasts: []
|
|
7058
7115
|
});
|
|
7059
7116
|
}
|
|
7060
7117
|
|
|
7061
|
-
return _extends$
|
|
7118
|
+
return _extends$y({}, state, {
|
|
7062
7119
|
toasts: state.toasts.filter(function (t) {
|
|
7063
7120
|
return t.id !== action.toastId;
|
|
7064
7121
|
})
|
|
7065
7122
|
});
|
|
7066
7123
|
|
|
7067
7124
|
case ActionType.START_PAUSE:
|
|
7068
|
-
return _extends$
|
|
7125
|
+
return _extends$y({}, state, {
|
|
7069
7126
|
pausedAt: action.time
|
|
7070
7127
|
});
|
|
7071
7128
|
|
|
7072
7129
|
case ActionType.END_PAUSE:
|
|
7073
7130
|
var diff = action.time - (state.pausedAt || 0);
|
|
7074
|
-
return _extends$
|
|
7131
|
+
return _extends$y({}, state, {
|
|
7075
7132
|
pausedAt: undefined,
|
|
7076
7133
|
toasts: state.toasts.map(function (t) {
|
|
7077
|
-
return _extends$
|
|
7134
|
+
return _extends$y({}, t, {
|
|
7078
7135
|
pauseDuration: t.pauseDuration + diff
|
|
7079
7136
|
});
|
|
7080
7137
|
})
|
|
@@ -7121,12 +7178,12 @@ var useStore = function useStore(toastOptions) {
|
|
|
7121
7178
|
var mergedToasts = state.toasts.map(function (t) {
|
|
7122
7179
|
var _toastOptions$t$type, _toastOptions, _toastOptions$t$type2;
|
|
7123
7180
|
|
|
7124
|
-
return _extends$
|
|
7181
|
+
return _extends$y({}, toastOptions, toastOptions[t.type], t, {
|
|
7125
7182
|
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],
|
|
7126
|
-
style: _extends$
|
|
7183
|
+
style: _extends$y({}, toastOptions.style, (_toastOptions$t$type2 = toastOptions[t.type]) == null ? void 0 : _toastOptions$t$type2.style, t.style)
|
|
7127
7184
|
});
|
|
7128
7185
|
});
|
|
7129
|
-
return _extends$
|
|
7186
|
+
return _extends$y({}, state, {
|
|
7130
7187
|
toasts: mergedToasts
|
|
7131
7188
|
});
|
|
7132
7189
|
};
|
|
@@ -7136,7 +7193,7 @@ var createToast = function createToast(message, type, opts) {
|
|
|
7136
7193
|
type = 'blank';
|
|
7137
7194
|
}
|
|
7138
7195
|
|
|
7139
|
-
return _extends$
|
|
7196
|
+
return _extends$y({
|
|
7140
7197
|
createdAt: Date.now(),
|
|
7141
7198
|
visible: true,
|
|
7142
7199
|
type: type,
|
|
@@ -7186,14 +7243,14 @@ toast.remove = function (toastId) {
|
|
|
7186
7243
|
};
|
|
7187
7244
|
|
|
7188
7245
|
toast.promise = function (promise, msgs, opts) {
|
|
7189
|
-
var id = toast.loading(msgs.loading, _extends$
|
|
7246
|
+
var id = toast.loading(msgs.loading, _extends$y({}, opts, opts == null ? void 0 : opts.loading));
|
|
7190
7247
|
promise.then(function (p) {
|
|
7191
|
-
toast.success(resolveValue(msgs.success, p), _extends$
|
|
7248
|
+
toast.success(resolveValue(msgs.success, p), _extends$y({
|
|
7192
7249
|
id: id
|
|
7193
7250
|
}, opts, opts == null ? void 0 : opts.success));
|
|
7194
7251
|
return p;
|
|
7195
7252
|
})["catch"](function (e) {
|
|
7196
|
-
toast.error(resolveValue(msgs.error, e), _extends$
|
|
7253
|
+
toast.error(resolveValue(msgs.error, e), _extends$y({
|
|
7197
7254
|
id: id
|
|
7198
7255
|
}, opts, opts == null ? void 0 : opts.error));
|
|
7199
7256
|
});
|
|
@@ -7532,7 +7589,7 @@ var ToastBar = /*#__PURE__*/memo(function (_ref2) {
|
|
|
7532
7589
|
var message = createElement(Message, Object.assign({}, toast.ariaProps), resolveValue(toast.message, toast));
|
|
7533
7590
|
return createElement(ToastBarBase, {
|
|
7534
7591
|
className: toast.className,
|
|
7535
|
-
style: _extends$
|
|
7592
|
+
style: _extends$y({}, animationStyle, style, toast.style)
|
|
7536
7593
|
}, typeof children === 'function' ? children({
|
|
7537
7594
|
icon: icon,
|
|
7538
7595
|
message: message
|
|
@@ -7562,7 +7619,7 @@ var getPositionStyle = function getPositionStyle(position, offset) {
|
|
|
7562
7619
|
} : position.includes('right') ? {
|
|
7563
7620
|
justifyContent: 'flex-end'
|
|
7564
7621
|
} : {};
|
|
7565
|
-
return _extends$
|
|
7622
|
+
return _extends$y({
|
|
7566
7623
|
left: 0,
|
|
7567
7624
|
right: 0,
|
|
7568
7625
|
display: 'flex',
|
|
@@ -7589,7 +7646,7 @@ var Toaster = function Toaster(_ref) {
|
|
|
7589
7646
|
handlers = _useToaster.handlers;
|
|
7590
7647
|
|
|
7591
7648
|
return createElement("div", {
|
|
7592
|
-
style: _extends$
|
|
7649
|
+
style: _extends$y({
|
|
7593
7650
|
position: 'fixed',
|
|
7594
7651
|
zIndex: 9999,
|
|
7595
7652
|
top: DEFAULT_OFFSET,
|
|
@@ -7624,87 +7681,87 @@ var Toaster = function Toaster(_ref) {
|
|
|
7624
7681
|
}));
|
|
7625
7682
|
};
|
|
7626
7683
|
|
|
7627
|
-
var _path$
|
|
7684
|
+
var _path$v;
|
|
7628
7685
|
|
|
7629
|
-
function _extends$
|
|
7686
|
+
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); }
|
|
7630
7687
|
|
|
7631
7688
|
function SvgCheckSolid(props) {
|
|
7632
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
7689
|
+
return /*#__PURE__*/React.createElement("svg", _extends$x({
|
|
7633
7690
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7634
7691
|
className: "h-5 w-5",
|
|
7635
7692
|
viewBox: "0 0 20 20",
|
|
7636
7693
|
fill: "currentColor"
|
|
7637
|
-
}, props), _path$
|
|
7694
|
+
}, props), _path$v || (_path$v = /*#__PURE__*/React.createElement("path", {
|
|
7638
7695
|
fillRule: "evenodd",
|
|
7639
7696
|
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",
|
|
7640
7697
|
clipRule: "evenodd"
|
|
7641
7698
|
})));
|
|
7642
7699
|
}
|
|
7643
7700
|
|
|
7644
|
-
var _path$
|
|
7701
|
+
var _path$u;
|
|
7645
7702
|
|
|
7646
|
-
function _extends$
|
|
7703
|
+
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); }
|
|
7647
7704
|
|
|
7648
7705
|
function SvgXIcon(props) {
|
|
7649
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
7706
|
+
return /*#__PURE__*/React.createElement("svg", _extends$w({
|
|
7650
7707
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7651
7708
|
viewBox: "0 0 20 20",
|
|
7652
7709
|
fill: "currentColor"
|
|
7653
|
-
}, props), _path$
|
|
7710
|
+
}, props), _path$u || (_path$u = /*#__PURE__*/React.createElement("path", {
|
|
7654
7711
|
fill: "evenodd",
|
|
7655
7712
|
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",
|
|
7656
7713
|
clipRule: "evenodd"
|
|
7657
7714
|
})));
|
|
7658
7715
|
}
|
|
7659
7716
|
|
|
7660
|
-
var _path$
|
|
7717
|
+
var _path$t;
|
|
7661
7718
|
|
|
7662
|
-
function _extends$
|
|
7719
|
+
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); }
|
|
7663
7720
|
|
|
7664
7721
|
function SvgXIconSolid(props) {
|
|
7665
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
7722
|
+
return /*#__PURE__*/React.createElement("svg", _extends$v({
|
|
7666
7723
|
className: "plc-w-4 plc-h-4",
|
|
7667
7724
|
fill: "currentColor",
|
|
7668
7725
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7669
7726
|
viewBox: "0 0 100 100"
|
|
7670
|
-
}, props), _path$
|
|
7727
|
+
}, props), _path$t || (_path$t = /*#__PURE__*/React.createElement("path", {
|
|
7671
7728
|
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"
|
|
7672
7729
|
})));
|
|
7673
7730
|
}
|
|
7674
7731
|
|
|
7675
|
-
var _path$
|
|
7732
|
+
var _path$s;
|
|
7676
7733
|
|
|
7677
|
-
function _extends$
|
|
7734
|
+
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); }
|
|
7678
7735
|
|
|
7679
7736
|
function SvgExclamation(props) {
|
|
7680
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
7737
|
+
return /*#__PURE__*/React.createElement("svg", _extends$u({
|
|
7681
7738
|
className: "plc-w-4 plc-h-4 plc-mr-1",
|
|
7682
7739
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7683
7740
|
viewBox: "0 0 20 20",
|
|
7684
7741
|
fill: "currentColor"
|
|
7685
|
-
}, props), _path$
|
|
7742
|
+
}, props), _path$s || (_path$s = /*#__PURE__*/React.createElement("path", {
|
|
7686
7743
|
fillRule: "evenodd",
|
|
7687
7744
|
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",
|
|
7688
7745
|
clipRule: "evenodd"
|
|
7689
7746
|
})));
|
|
7690
7747
|
}
|
|
7691
7748
|
|
|
7692
|
-
var _path$
|
|
7749
|
+
var _path$r, _path2$4;
|
|
7693
7750
|
|
|
7694
|
-
function _extends$
|
|
7751
|
+
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); }
|
|
7695
7752
|
|
|
7696
7753
|
function SvgSpinner(props) {
|
|
7697
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
7754
|
+
return /*#__PURE__*/React.createElement("svg", _extends$t({
|
|
7698
7755
|
className: "plc-animate-spin",
|
|
7699
7756
|
viewBox: "0 0 24 24",
|
|
7700
7757
|
fill: "currentColor",
|
|
7701
7758
|
xmlns: "http://www.w3.org/2000/svg"
|
|
7702
|
-
}, props), _path$
|
|
7759
|
+
}, props), _path$r || (_path$r = /*#__PURE__*/React.createElement("path", {
|
|
7703
7760
|
opacity: 0.2,
|
|
7704
7761
|
fill: "evenodd",
|
|
7705
7762
|
clipRule: "evenodd",
|
|
7706
7763
|
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"
|
|
7707
|
-
})), _path2$
|
|
7764
|
+
})), _path2$4 || (_path2$4 = /*#__PURE__*/React.createElement("path", {
|
|
7708
7765
|
d: "M2 12C2 6.477 6.477 2 12 2v3a7 7 0 00-7 7H2z"
|
|
7709
7766
|
})));
|
|
7710
7767
|
}
|
|
@@ -8430,53 +8487,113 @@ var pure = pure$1;
|
|
|
8430
8487
|
var pure_1 = pure.loadStripe;
|
|
8431
8488
|
|
|
8432
8489
|
/**
|
|
8433
|
-
*
|
|
8434
|
-
* @
|
|
8435
|
-
* @
|
|
8436
|
-
* @property {boolean} enableTheme
|
|
8437
|
-
* @property {boolean} enablePaywalls
|
|
8438
|
-
* @property {boolean} enableGoogleAnalytics
|
|
8439
|
-
*/
|
|
8440
|
-
|
|
8441
|
-
/**
|
|
8442
|
-
* Initializes pelcro features based on the options flag object
|
|
8443
|
-
* @param {OptionsType} options
|
|
8444
|
-
* @returns
|
|
8490
|
+
* Extracts error message from the response error object
|
|
8491
|
+
* @param {Object} error Error object
|
|
8492
|
+
* @return {string}
|
|
8445
8493
|
*/
|
|
8494
|
+
const getErrorMessages = error => {
|
|
8495
|
+
var _error$error, _error$response, _error$response$data, _error$response3, _error$response3$data, _error$response3$data2, _error$response5, _error$response5$data;
|
|
8446
8496
|
|
|
8447
|
-
|
|
8448
|
-
|
|
8449
|
-
return;
|
|
8497
|
+
if (error !== null && error !== void 0 && (_error$error = error.error) !== null && _error$error !== void 0 && _error$error.message) {
|
|
8498
|
+
return error.error.message;
|
|
8450
8499
|
}
|
|
8451
8500
|
|
|
8452
|
-
|
|
8453
|
-
|
|
8454
|
-
loadAuth0SDK: loadAuth0SDK,
|
|
8455
|
-
enableURLTriggers: initViewFromURL,
|
|
8456
|
-
enableTheme: applyPelcroTheme,
|
|
8457
|
-
enablePaywalls: initPaywalls,
|
|
8458
|
-
loadSecuritySDK: initSecuritySdk,
|
|
8459
|
-
enableGoogleAnalytics: initGATracking
|
|
8460
|
-
}; // Only execute enabled options
|
|
8501
|
+
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) {
|
|
8502
|
+
var _error$response2, _error$response2$data;
|
|
8461
8503
|
|
|
8462
|
-
|
|
8463
|
-
|
|
8504
|
+
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;
|
|
8505
|
+
}
|
|
8464
8506
|
|
|
8465
|
-
|
|
8466
|
-
|
|
8467
|
-
};
|
|
8468
|
-
const initPaywalls = () => {
|
|
8469
|
-
var _window$Pelcro$site$r;
|
|
8507
|
+
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) {
|
|
8508
|
+
var _error$response4, _error$response4$data, _error$response4$data2;
|
|
8470
8509
|
|
|
8471
|
-
|
|
8472
|
-
|
|
8510
|
+
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;
|
|
8511
|
+
}
|
|
8473
8512
|
|
|
8474
|
-
|
|
8475
|
-
// blur entitlements based content
|
|
8476
|
-
const didBlurContent = init(); // Skip paywall if article is not restricted
|
|
8513
|
+
const errorMessages = []; // enumerable error (ex: validation errors)
|
|
8477
8514
|
|
|
8478
|
-
|
|
8479
|
-
|
|
8515
|
+
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]) => {
|
|
8516
|
+
errorMessages.push(errorMessage);
|
|
8517
|
+
}); // convert to multiline string
|
|
8518
|
+
|
|
8519
|
+
return errorMessages.join("\n");
|
|
8520
|
+
};
|
|
8521
|
+
/**
|
|
8522
|
+
* Executes function after a wait time of inactivity
|
|
8523
|
+
* @param {function} func
|
|
8524
|
+
* @param {number} waitTime
|
|
8525
|
+
*/
|
|
8526
|
+
|
|
8527
|
+
const debounce = (func, waitTime) => {
|
|
8528
|
+
let timeout;
|
|
8529
|
+
return function executedFunction(...args) {
|
|
8530
|
+
// The callback function to be executed after
|
|
8531
|
+
// the debounce time has elapsed
|
|
8532
|
+
const later = () => {
|
|
8533
|
+
// null timeout to indicate the debounce ended
|
|
8534
|
+
timeout = null;
|
|
8535
|
+
func(...args);
|
|
8536
|
+
}; // This will reset the waiting every function execution.
|
|
8537
|
+
// This is the step that prevents the function from
|
|
8538
|
+
// being executed because it will never reach the
|
|
8539
|
+
// inside of the previous setTimeout
|
|
8540
|
+
|
|
8541
|
+
|
|
8542
|
+
clearTimeout(timeout); // Restart the debounce waiting period.
|
|
8543
|
+
// setTimeout returns a truthy value (it differs in web vs Node)
|
|
8544
|
+
|
|
8545
|
+
timeout = setTimeout(later, waitTime);
|
|
8546
|
+
};
|
|
8547
|
+
};
|
|
8548
|
+
|
|
8549
|
+
/**
|
|
8550
|
+
* @typedef {Object} OptionsType
|
|
8551
|
+
* @property {boolean} loadPaymentSDKs
|
|
8552
|
+
* @property {boolean} enableURLTriggers
|
|
8553
|
+
* @property {boolean} enableTheme
|
|
8554
|
+
* @property {boolean} enablePaywalls
|
|
8555
|
+
* @property {boolean} enableGoogleAnalytics
|
|
8556
|
+
*/
|
|
8557
|
+
|
|
8558
|
+
/**
|
|
8559
|
+
* Initializes pelcro features based on the options flag object
|
|
8560
|
+
* @param {OptionsType} options
|
|
8561
|
+
* @returns
|
|
8562
|
+
*/
|
|
8563
|
+
|
|
8564
|
+
const optionsController = options => {
|
|
8565
|
+
if (!options) {
|
|
8566
|
+
return;
|
|
8567
|
+
}
|
|
8568
|
+
|
|
8569
|
+
const optionsMethodsDict = {
|
|
8570
|
+
loadPaymentSDKs: loadPaymentSDKs,
|
|
8571
|
+
loadAuth0SDK: loadAuth0SDK,
|
|
8572
|
+
enableURLTriggers: initViewFromURL,
|
|
8573
|
+
enableTheme: applyPelcroTheme,
|
|
8574
|
+
enablePaywalls: initPaywalls,
|
|
8575
|
+
loadSecuritySDK: initSecuritySdk,
|
|
8576
|
+
enableGoogleAnalytics: initGATracking
|
|
8577
|
+
}; // Only execute enabled options
|
|
8578
|
+
|
|
8579
|
+
Object.entries(options).filter(([_, value]) => value === true).forEach(([key]) => {
|
|
8580
|
+
var _optionsMethodsDict$k;
|
|
8581
|
+
|
|
8582
|
+
return (_optionsMethodsDict$k = optionsMethodsDict[key]) === null || _optionsMethodsDict$k === void 0 ? void 0 : _optionsMethodsDict$k.call(optionsMethodsDict);
|
|
8583
|
+
});
|
|
8584
|
+
};
|
|
8585
|
+
const initPaywalls = () => {
|
|
8586
|
+
var _window$Pelcro$site$r;
|
|
8587
|
+
|
|
8588
|
+
const paywallMethods = window.Pelcro.paywall;
|
|
8589
|
+
const viewFromURL = getStableViewID(window.Pelcro.helpers.getURLParameter("view"));
|
|
8590
|
+
|
|
8591
|
+
if (((_window$Pelcro$site$r = window.Pelcro.site.read()) === null || _window$Pelcro$site$r === void 0 ? void 0 : _window$Pelcro$site$r.settings) === "subscription") {
|
|
8592
|
+
// blur entitlements based content
|
|
8593
|
+
const didBlurContent = init(); // Skip paywall if article is not restricted
|
|
8594
|
+
|
|
8595
|
+
if (isValidViewFromURL(viewFromURL) || !paywallMethods.isArticleRestricted()) {
|
|
8596
|
+
return;
|
|
8480
8597
|
}
|
|
8481
8598
|
|
|
8482
8599
|
const {
|
|
@@ -8669,6 +8786,10 @@ const initViewFromURL = () => {
|
|
|
8669
8786
|
return initCartFromUrl();
|
|
8670
8787
|
}
|
|
8671
8788
|
|
|
8789
|
+
if (view === "email-verify") {
|
|
8790
|
+
return verifyEmailTokenFromUrl();
|
|
8791
|
+
}
|
|
8792
|
+
|
|
8672
8793
|
switchView(view);
|
|
8673
8794
|
});
|
|
8674
8795
|
}
|
|
@@ -8818,6 +8939,33 @@ const initCartFromUrl = () => {
|
|
|
8818
8939
|
});
|
|
8819
8940
|
};
|
|
8820
8941
|
|
|
8942
|
+
const verifyEmailTokenFromUrl = () => {
|
|
8943
|
+
var _window$Pelcro$site$r5, _window$Pelcro$site$r6;
|
|
8944
|
+
|
|
8945
|
+
const {
|
|
8946
|
+
whenSiteReady
|
|
8947
|
+
} = usePelcro.getStore();
|
|
8948
|
+
const translations = i18next.t("verifyEmail:messages", {
|
|
8949
|
+
returnObjects: true
|
|
8950
|
+
});
|
|
8951
|
+
const emailToken = window.Pelcro.helpers.getURLParameter("token");
|
|
8952
|
+
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;
|
|
8953
|
+
if (!emailToken || !isEmailVerificationEnabled) return;
|
|
8954
|
+
whenSiteReady(() => {
|
|
8955
|
+
window.Pelcro.user.verifyEmailToken({
|
|
8956
|
+
token: emailToken
|
|
8957
|
+
}, (err, res) => {
|
|
8958
|
+
if (err) {
|
|
8959
|
+
return notify.error(getErrorMessages(err));
|
|
8960
|
+
}
|
|
8961
|
+
|
|
8962
|
+
return notify.success(translations.success);
|
|
8963
|
+
});
|
|
8964
|
+
}, {
|
|
8965
|
+
once: true
|
|
8966
|
+
});
|
|
8967
|
+
};
|
|
8968
|
+
|
|
8821
8969
|
const defaultOptions = {
|
|
8822
8970
|
loadPaymentSDKs: true,
|
|
8823
8971
|
loadAuth0SDK: true,
|
|
@@ -9100,6 +9248,7 @@ const SUBSCRIBE = "CREATE_SUBSCRIPTION";
|
|
|
9100
9248
|
const HANDLE_PAYPAL_SUBSCRIPTION = "HANDLE_PAYPAL_SUBSCRIPTION";
|
|
9101
9249
|
const DISABLE_COUPON_BUTTON = "DISABLE_COUPON_BUTTON";
|
|
9102
9250
|
const APPLY_COUPON_CODE = "APPLY_COUPON_CODE";
|
|
9251
|
+
const REMOVE_APPLIED_COUPON = "REMOVE_APPLIED_COUPON";
|
|
9103
9252
|
const SET_PERCENT_OFF = "SET_PERCENT_OFF";
|
|
9104
9253
|
const SET_COUPON = "SET_COUPON";
|
|
9105
9254
|
const SET_COUPON_ERROR = "SET_COUPON_ERROR";
|
|
@@ -9156,67 +9305,7 @@ const GET_NEWSLETTERS_FETCH = "GET_NEWSLETTERS_FETCH";
|
|
|
9156
9305
|
const GET_NEWSLETTERS_SUCCESS = "GET_NEWSLETTERS_SUCCESS";
|
|
9157
9306
|
const SWITCH_TO_UPDATE = "SWITCH_TO_UPDATE";
|
|
9158
9307
|
|
|
9159
|
-
|
|
9160
|
-
* Extracts error message from the response error object
|
|
9161
|
-
* @param {Object} error Error object
|
|
9162
|
-
* @return {string}
|
|
9163
|
-
*/
|
|
9164
|
-
const getErrorMessages = error => {
|
|
9165
|
-
var _error$error, _error$response, _error$response$data, _error$response3, _error$response3$data, _error$response3$data2, _error$response5, _error$response5$data;
|
|
9166
|
-
|
|
9167
|
-
if (error !== null && error !== void 0 && (_error$error = error.error) !== null && _error$error !== void 0 && _error$error.message) {
|
|
9168
|
-
return error.error.message;
|
|
9169
|
-
}
|
|
9170
|
-
|
|
9171
|
-
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) {
|
|
9172
|
-
var _error$response2, _error$response2$data;
|
|
9173
|
-
|
|
9174
|
-
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;
|
|
9175
|
-
}
|
|
9176
|
-
|
|
9177
|
-
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) {
|
|
9178
|
-
var _error$response4, _error$response4$data, _error$response4$data2;
|
|
9179
|
-
|
|
9180
|
-
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;
|
|
9181
|
-
}
|
|
9182
|
-
|
|
9183
|
-
const errorMessages = []; // enumerable error (ex: validation errors)
|
|
9184
|
-
|
|
9185
|
-
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]) => {
|
|
9186
|
-
errorMessages.push(errorMessage);
|
|
9187
|
-
}); // convert to multiline string
|
|
9188
|
-
|
|
9189
|
-
return errorMessages.join("\n");
|
|
9190
|
-
};
|
|
9191
|
-
/**
|
|
9192
|
-
* Executes function after a wait time of inactivity
|
|
9193
|
-
* @param {function} func
|
|
9194
|
-
* @param {number} waitTime
|
|
9195
|
-
*/
|
|
9196
|
-
|
|
9197
|
-
const debounce = (func, waitTime) => {
|
|
9198
|
-
let timeout;
|
|
9199
|
-
return function executedFunction(...args) {
|
|
9200
|
-
// The callback function to be executed after
|
|
9201
|
-
// the debounce time has elapsed
|
|
9202
|
-
const later = () => {
|
|
9203
|
-
// null timeout to indicate the debounce ended
|
|
9204
|
-
timeout = null;
|
|
9205
|
-
func(...args);
|
|
9206
|
-
}; // This will reset the waiting every function execution.
|
|
9207
|
-
// This is the step that prevents the function from
|
|
9208
|
-
// being executed because it will never reach the
|
|
9209
|
-
// inside of the previous setTimeout
|
|
9210
|
-
|
|
9211
|
-
|
|
9212
|
-
clearTimeout(timeout); // Restart the debounce waiting period.
|
|
9213
|
-
// setTimeout returns a truthy value (it differs in web vs Node)
|
|
9214
|
-
|
|
9215
|
-
timeout = setTimeout(later, waitTime);
|
|
9216
|
-
};
|
|
9217
|
-
};
|
|
9218
|
-
|
|
9219
|
-
const initialState$f = {
|
|
9308
|
+
const initialState$g = {
|
|
9220
9309
|
email: "",
|
|
9221
9310
|
password: "",
|
|
9222
9311
|
emailError: null,
|
|
@@ -9227,10 +9316,10 @@ const initialState$f = {
|
|
|
9227
9316
|
content: ""
|
|
9228
9317
|
}
|
|
9229
9318
|
};
|
|
9230
|
-
const store$
|
|
9319
|
+
const store$g = /*#__PURE__*/createContext(initialState$g);
|
|
9231
9320
|
const {
|
|
9232
|
-
Provider: Provider$
|
|
9233
|
-
} = store$
|
|
9321
|
+
Provider: Provider$g
|
|
9322
|
+
} = store$g;
|
|
9234
9323
|
|
|
9235
9324
|
const LoginContainer = ({
|
|
9236
9325
|
style,
|
|
@@ -9337,7 +9426,7 @@ const LoginContainer = ({
|
|
|
9337
9426
|
});
|
|
9338
9427
|
|
|
9339
9428
|
case RESET_LOGIN_FORM:
|
|
9340
|
-
return initialState$
|
|
9429
|
+
return initialState$g;
|
|
9341
9430
|
|
|
9342
9431
|
case DISABLE_LOGIN_BUTTON:
|
|
9343
9432
|
return lib_7({ ...state,
|
|
@@ -9355,12 +9444,12 @@ const LoginContainer = ({
|
|
|
9355
9444
|
default:
|
|
9356
9445
|
return state;
|
|
9357
9446
|
}
|
|
9358
|
-
}, initialState$
|
|
9447
|
+
}, initialState$g);
|
|
9359
9448
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
9360
9449
|
style: { ...style
|
|
9361
9450
|
},
|
|
9362
9451
|
className: `pelcro-container pelcro-login-container ${className}`
|
|
9363
|
-
}, /*#__PURE__*/React__default.createElement(Provider$
|
|
9452
|
+
}, /*#__PURE__*/React__default.createElement(Provider$g, {
|
|
9364
9453
|
value: {
|
|
9365
9454
|
state,
|
|
9366
9455
|
dispatch
|
|
@@ -9368,12 +9457,12 @@ const LoginContainer = ({
|
|
|
9368
9457
|
}, children.length ? children.map((child, i) => {
|
|
9369
9458
|
if (child) {
|
|
9370
9459
|
return /*#__PURE__*/React__default.cloneElement(child, {
|
|
9371
|
-
store: store$
|
|
9460
|
+
store: store$g,
|
|
9372
9461
|
key: i
|
|
9373
9462
|
});
|
|
9374
9463
|
}
|
|
9375
9464
|
}) : /*#__PURE__*/React__default.cloneElement(children, {
|
|
9376
|
-
store: store$
|
|
9465
|
+
store: store$g
|
|
9377
9466
|
})));
|
|
9378
9467
|
};
|
|
9379
9468
|
|
|
@@ -9618,7 +9707,7 @@ const LoginButton = ({
|
|
|
9618
9707
|
buttonDisabled
|
|
9619
9708
|
},
|
|
9620
9709
|
dispatch
|
|
9621
|
-
} = useContext(store$
|
|
9710
|
+
} = useContext(store$g);
|
|
9622
9711
|
const {
|
|
9623
9712
|
t
|
|
9624
9713
|
} = useTranslation("login");
|
|
@@ -9639,23 +9728,23 @@ const LoginButton = ({
|
|
|
9639
9728
|
};
|
|
9640
9729
|
|
|
9641
9730
|
const LoginEmail = props => /*#__PURE__*/React__default.createElement(Email, Object.assign({
|
|
9642
|
-
store: store$
|
|
9731
|
+
store: store$g
|
|
9643
9732
|
}, props));
|
|
9644
9733
|
|
|
9645
9734
|
const LoginPassword = props => /*#__PURE__*/React__default.createElement(Password, Object.assign({
|
|
9646
|
-
store: store$
|
|
9735
|
+
store: store$g
|
|
9647
9736
|
}, props));
|
|
9648
9737
|
|
|
9649
|
-
var _path$
|
|
9738
|
+
var _path$q;
|
|
9650
9739
|
|
|
9651
|
-
function _extends$
|
|
9740
|
+
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); }
|
|
9652
9741
|
|
|
9653
9742
|
function SvgCheck(props) {
|
|
9654
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
9743
|
+
return /*#__PURE__*/React.createElement("svg", _extends$s({
|
|
9655
9744
|
xmlns: "http://www.w3.org/2000/svg",
|
|
9656
9745
|
fill: "currentColor",
|
|
9657
9746
|
viewBox: "0 0 20 20"
|
|
9658
|
-
}, props), _path$
|
|
9747
|
+
}, props), _path$q || (_path$q = /*#__PURE__*/React.createElement("path", {
|
|
9659
9748
|
fillRule: "evenodd",
|
|
9660
9749
|
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",
|
|
9661
9750
|
clipRule: "evenodd"
|
|
@@ -9720,7 +9809,7 @@ var facebookLoginRenderProps = createCommonjsModule(function (module, exports) {
|
|
|
9720
9809
|
var FacebookLogin = unwrapExports(facebookLoginRenderProps);
|
|
9721
9810
|
facebookLoginRenderProps.FacebookLogin;
|
|
9722
9811
|
|
|
9723
|
-
const initialState$
|
|
9812
|
+
const initialState$f = {
|
|
9724
9813
|
email: "",
|
|
9725
9814
|
password: "",
|
|
9726
9815
|
emailError: null,
|
|
@@ -9737,10 +9826,10 @@ const initialState$e = {
|
|
|
9737
9826
|
content: ""
|
|
9738
9827
|
}
|
|
9739
9828
|
};
|
|
9740
|
-
const store$
|
|
9829
|
+
const store$f = /*#__PURE__*/createContext(initialState$f);
|
|
9741
9830
|
const {
|
|
9742
|
-
Provider: Provider$
|
|
9743
|
-
} = store$
|
|
9831
|
+
Provider: Provider$f
|
|
9832
|
+
} = store$f;
|
|
9744
9833
|
|
|
9745
9834
|
const RegisterContainer = ({
|
|
9746
9835
|
style,
|
|
@@ -9923,7 +10012,7 @@ const RegisterContainer = ({
|
|
|
9923
10012
|
});
|
|
9924
10013
|
|
|
9925
10014
|
case RESET_LOGIN_FORM:
|
|
9926
|
-
return initialState$
|
|
10015
|
+
return initialState$f;
|
|
9927
10016
|
|
|
9928
10017
|
case DISABLE_REGISTRATION_BUTTON:
|
|
9929
10018
|
return lib_7({ ...state,
|
|
@@ -9941,12 +10030,12 @@ const RegisterContainer = ({
|
|
|
9941
10030
|
default:
|
|
9942
10031
|
return state;
|
|
9943
10032
|
}
|
|
9944
|
-
}, initialState$
|
|
10033
|
+
}, initialState$f);
|
|
9945
10034
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
9946
10035
|
style: { ...style
|
|
9947
10036
|
},
|
|
9948
10037
|
className: `pelcro-container pelcro-register-container ${className}`
|
|
9949
|
-
}, /*#__PURE__*/React__default.createElement(Provider$
|
|
10038
|
+
}, /*#__PURE__*/React__default.createElement(Provider$f, {
|
|
9950
10039
|
value: {
|
|
9951
10040
|
state,
|
|
9952
10041
|
dispatch
|
|
@@ -9954,12 +10043,12 @@ const RegisterContainer = ({
|
|
|
9954
10043
|
}, children.length ? children.map((child, i) => {
|
|
9955
10044
|
if (child) {
|
|
9956
10045
|
return /*#__PURE__*/React__default.cloneElement(child, {
|
|
9957
|
-
store: store$
|
|
10046
|
+
store: store$f,
|
|
9958
10047
|
key: i
|
|
9959
10048
|
});
|
|
9960
10049
|
}
|
|
9961
10050
|
}) : /*#__PURE__*/React__default.cloneElement(children, {
|
|
9962
|
-
store: store$
|
|
10051
|
+
store: store$f
|
|
9963
10052
|
})));
|
|
9964
10053
|
};
|
|
9965
10054
|
/**
|
|
@@ -9968,19 +10057,21 @@ const RegisterContainer = ({
|
|
|
9968
10057
|
*/
|
|
9969
10058
|
|
|
9970
10059
|
function hasSecurityTokenEnabled$1() {
|
|
9971
|
-
|
|
10060
|
+
var _window$Pelcro$site$r2;
|
|
10061
|
+
|
|
10062
|
+
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);
|
|
9972
10063
|
return hasSecuritySdkLoaded;
|
|
9973
10064
|
}
|
|
9974
10065
|
|
|
9975
|
-
var _path$
|
|
10066
|
+
var _path$p;
|
|
9976
10067
|
|
|
9977
|
-
function _extends$
|
|
10068
|
+
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); }
|
|
9978
10069
|
|
|
9979
10070
|
function SvgFacebookLogo(props) {
|
|
9980
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
10071
|
+
return /*#__PURE__*/React.createElement("svg", _extends$r({
|
|
9981
10072
|
xmlns: "http://www.w3.org/2000/svg",
|
|
9982
10073
|
viewBox: "88.428 12.828 107.543 207.085"
|
|
9983
|
-
}, props), _path$
|
|
10074
|
+
}, props), _path$p || (_path$p = /*#__PURE__*/React.createElement("path", {
|
|
9984
10075
|
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",
|
|
9985
10076
|
fill: "#3c5a9a"
|
|
9986
10077
|
})));
|
|
@@ -9997,10 +10088,10 @@ const FacebookLoginButton = ({
|
|
|
9997
10088
|
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;
|
|
9998
10089
|
const {
|
|
9999
10090
|
dispatch: loginDispatch
|
|
10000
|
-
} = useContext(store$
|
|
10091
|
+
} = useContext(store$g);
|
|
10001
10092
|
const {
|
|
10002
10093
|
dispatch: registerDispatch
|
|
10003
|
-
} = useContext(store$
|
|
10094
|
+
} = useContext(store$f);
|
|
10004
10095
|
|
|
10005
10096
|
const onSuccess = facebookUser => {
|
|
10006
10097
|
loginDispatch === null || loginDispatch === void 0 ? void 0 : loginDispatch({
|
|
@@ -10053,18 +10144,18 @@ var googleLogin = createCommonjsModule(function (module, exports) {
|
|
|
10053
10144
|
unwrapExports(googleLogin);
|
|
10054
10145
|
var googleLogin_1 = googleLogin.GoogleLogin;
|
|
10055
10146
|
|
|
10056
|
-
var _path$
|
|
10147
|
+
var _path$o, _path2$3, _path3$1, _path4;
|
|
10057
10148
|
|
|
10058
|
-
function _extends$
|
|
10149
|
+
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); }
|
|
10059
10150
|
|
|
10060
10151
|
function SvgGoogleLogo(props) {
|
|
10061
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
10152
|
+
return /*#__PURE__*/React.createElement("svg", _extends$q({
|
|
10062
10153
|
viewBox: "0 0 24 24",
|
|
10063
10154
|
xmlns: "http://www.w3.org/2000/svg"
|
|
10064
|
-
}, props), _path$
|
|
10155
|
+
}, props), _path$o || (_path$o = /*#__PURE__*/React.createElement("path", {
|
|
10065
10156
|
fill: "#4285F4",
|
|
10066
10157
|
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"
|
|
10067
|
-
})), _path2$
|
|
10158
|
+
})), _path2$3 || (_path2$3 = /*#__PURE__*/React.createElement("path", {
|
|
10068
10159
|
fill: "#34A853",
|
|
10069
10160
|
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"
|
|
10070
10161
|
})), _path3$1 || (_path3$1 = /*#__PURE__*/React.createElement("path", {
|
|
@@ -10087,10 +10178,10 @@ const GoogleLoginButton = ({
|
|
|
10087
10178
|
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;
|
|
10088
10179
|
const {
|
|
10089
10180
|
dispatch: loginDispatch
|
|
10090
|
-
} = useContext(store$
|
|
10181
|
+
} = useContext(store$g);
|
|
10091
10182
|
const {
|
|
10092
10183
|
dispatch: registerDispatch
|
|
10093
|
-
} = useContext(store$
|
|
10184
|
+
} = useContext(store$f);
|
|
10094
10185
|
|
|
10095
10186
|
const onSuccess = response => {
|
|
10096
10187
|
var _response$getAuthResp, _profile$getEmail, _profile$getGivenName, _profile$getFamilyNam, _profile$getEmail2, _profile$getGivenName2, _profile$getFamilyNam2;
|
|
@@ -10138,15 +10229,15 @@ const GoogleLoginButton = ({
|
|
|
10138
10229
|
}) : null;
|
|
10139
10230
|
};
|
|
10140
10231
|
|
|
10141
|
-
var _path$
|
|
10232
|
+
var _path$n;
|
|
10142
10233
|
|
|
10143
|
-
function _extends$
|
|
10234
|
+
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); }
|
|
10144
10235
|
|
|
10145
10236
|
function SvgAuth0Logo(props) {
|
|
10146
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
10237
|
+
return /*#__PURE__*/React.createElement("svg", _extends$p({
|
|
10147
10238
|
viewBox: "0 0 256 285",
|
|
10148
10239
|
xmlns: "http://www.w3.org/2000/svg"
|
|
10149
|
-
}, props), _path$
|
|
10240
|
+
}, props), _path$n || (_path$n = /*#__PURE__*/React.createElement("path", {
|
|
10150
10241
|
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"
|
|
10151
10242
|
})));
|
|
10152
10243
|
}
|
|
@@ -10160,23 +10251,27 @@ const Auth0LoginButton = ({
|
|
|
10160
10251
|
const auth0Enabled = Boolean(window.Pelcro.site.read().auth0_client_id && window.Pelcro.site.read().auth0_base_url);
|
|
10161
10252
|
const auth0InstanceRef = React__default.useRef(null);
|
|
10162
10253
|
React__default.useEffect(() => {
|
|
10163
|
-
if (auth0Enabled) {
|
|
10254
|
+
if (auth0Enabled && window.auth0 && auth0InstanceRef.current === null) {
|
|
10164
10255
|
auth0InstanceRef.current = new window.auth0.WebAuth({
|
|
10165
10256
|
domain: window.Pelcro.site.read().auth0_base_url,
|
|
10166
10257
|
clientID: window.Pelcro.site.read().auth0_client_id
|
|
10167
10258
|
});
|
|
10168
10259
|
}
|
|
10169
|
-
}, []);
|
|
10260
|
+
}, [auth0Enabled, window.auth0]);
|
|
10170
10261
|
const {
|
|
10171
10262
|
dispatch: loginDispatch
|
|
10172
|
-
} = useContext(store$
|
|
10263
|
+
} = useContext(store$g);
|
|
10173
10264
|
const {
|
|
10174
10265
|
dispatch: registerDispatch
|
|
10175
|
-
} = useContext(store$
|
|
10266
|
+
} = useContext(store$f);
|
|
10176
10267
|
|
|
10177
10268
|
function handleClick() {
|
|
10178
10269
|
var _auth0InstanceRef$cur, _auth0InstanceRef$cur2, _auth0InstanceRef$cur3;
|
|
10179
10270
|
|
|
10271
|
+
if (!window.auth0) {
|
|
10272
|
+
return console.error("Auth0 sdk script wasn't loaded, you need to load auth0 sdk before rendering the Auth0LoginButton");
|
|
10273
|
+
}
|
|
10274
|
+
|
|
10180
10275
|
(_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, {
|
|
10181
10276
|
responseType: "token id_token",
|
|
10182
10277
|
owp: true // close popup when finished
|
|
@@ -10301,19 +10396,19 @@ function LoginView(props) {
|
|
|
10301
10396
|
}, /*#__PURE__*/React__default.createElement(GoogleLoginButton, null), /*#__PURE__*/React__default.createElement(FacebookLoginButton, null), /*#__PURE__*/React__default.createElement(Auth0LoginButton, null))))));
|
|
10302
10397
|
}
|
|
10303
10398
|
|
|
10304
|
-
var _path$
|
|
10399
|
+
var _path$m, _path2$2, _path3;
|
|
10305
10400
|
|
|
10306
|
-
function _extends$
|
|
10401
|
+
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); }
|
|
10307
10402
|
|
|
10308
10403
|
function SvgPelcroAuthorship(props) {
|
|
10309
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
10404
|
+
return /*#__PURE__*/React.createElement("svg", _extends$o({
|
|
10310
10405
|
xmlns: "http://www.w3.org/2000/svg",
|
|
10311
10406
|
viewBox: "0 -80.652 497.072 179.991"
|
|
10312
|
-
}, props), _path$
|
|
10407
|
+
}, props), _path$m || (_path$m = /*#__PURE__*/React.createElement("path", {
|
|
10313
10408
|
fill: "none",
|
|
10314
10409
|
stroke: "#4a4a4a",
|
|
10315
10410
|
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"
|
|
10316
|
-
})), _path2$
|
|
10411
|
+
})), _path2$2 || (_path2$2 = /*#__PURE__*/React.createElement("path", {
|
|
10317
10412
|
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",
|
|
10318
10413
|
fill: "#4a4a4a"
|
|
10319
10414
|
})), _path3 || (_path3 = /*#__PURE__*/React.createElement("path", {
|
|
@@ -10456,11 +10551,11 @@ function LoginModal({
|
|
|
10456
10551
|
LoginModal.viewId = "login";
|
|
10457
10552
|
|
|
10458
10553
|
const RegisterEmail = props => /*#__PURE__*/React__default.createElement(Email, Object.assign({
|
|
10459
|
-
store: store$
|
|
10554
|
+
store: store$f
|
|
10460
10555
|
}, props));
|
|
10461
10556
|
|
|
10462
10557
|
const RegisterPassword = props => /*#__PURE__*/React__default.createElement(Password, Object.assign({
|
|
10463
|
-
store: store$
|
|
10558
|
+
store: store$f
|
|
10464
10559
|
}, props));
|
|
10465
10560
|
|
|
10466
10561
|
const RegisterButton = ({
|
|
@@ -10480,7 +10575,7 @@ const RegisterButton = ({
|
|
|
10480
10575
|
buttonDisabled
|
|
10481
10576
|
},
|
|
10482
10577
|
dispatch
|
|
10483
|
-
} = useContext(store$
|
|
10578
|
+
} = useContext(store$f);
|
|
10484
10579
|
const {
|
|
10485
10580
|
t
|
|
10486
10581
|
} = useTranslation("register");
|
|
@@ -10618,7 +10713,7 @@ function FirstName({
|
|
|
10618
10713
|
}
|
|
10619
10714
|
|
|
10620
10715
|
const RegisterFirstName = props => /*#__PURE__*/React__default.createElement(FirstName, Object.assign({
|
|
10621
|
-
store: store$
|
|
10716
|
+
store: store$f
|
|
10622
10717
|
}, props));
|
|
10623
10718
|
|
|
10624
10719
|
function LastName({
|
|
@@ -10649,7 +10744,7 @@ function LastName({
|
|
|
10649
10744
|
}
|
|
10650
10745
|
|
|
10651
10746
|
const RegisterLastName = props => /*#__PURE__*/React__default.createElement(LastName, Object.assign({
|
|
10652
|
-
store: store$
|
|
10747
|
+
store: store$f
|
|
10653
10748
|
}, props));
|
|
10654
10749
|
|
|
10655
10750
|
/**
|
|
@@ -10773,7 +10868,7 @@ function TextInput({
|
|
|
10773
10868
|
|
|
10774
10869
|
const RegisterTextInput = props => {
|
|
10775
10870
|
return /*#__PURE__*/React__default.createElement(TextInput, Object.assign({}, props, {
|
|
10776
|
-
store: store$
|
|
10871
|
+
store: store$f
|
|
10777
10872
|
}));
|
|
10778
10873
|
};
|
|
10779
10874
|
|
|
@@ -11025,42 +11120,80 @@ class SelectModal extends Component {
|
|
|
11025
11120
|
return `${startingPlan.amount_formatted}/${startingPlan.interval}`;
|
|
11026
11121
|
});
|
|
11027
11122
|
|
|
11123
|
+
_defineProperty$3(this, "renderOneProduct", (product, index, options) => {
|
|
11124
|
+
const isPlanMode = Boolean(this.state.mode === "plan");
|
|
11125
|
+
const productButtonLabel = isPlanMode ? this.locale("buttons.back") : this.locale("buttons.select");
|
|
11126
|
+
const productButtonCallback = isPlanMode ? this.goBack : this.selectProduct;
|
|
11127
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
11128
|
+
key: product.id,
|
|
11129
|
+
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"}`
|
|
11130
|
+
}, product.image && /*#__PURE__*/React__default.createElement("img", {
|
|
11131
|
+
alt: `image of ${product.name}`,
|
|
11132
|
+
src: product.image,
|
|
11133
|
+
className: "plc-object-contain plc-w-1/4 pelcro-select-product-image"
|
|
11134
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
11135
|
+
className: `plc-flex plc-flex-wrap ${product.image ? "plc-w-3/4" : "plc-w-full"}`
|
|
11136
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
11137
|
+
className: "plc-w-full pelcro-select-product-header"
|
|
11138
|
+
}, /*#__PURE__*/React__default.createElement("p", {
|
|
11139
|
+
className: "plc-font-bold pelcro-select-product-title"
|
|
11140
|
+
}, product.name), /*#__PURE__*/React__default.createElement("p", {
|
|
11141
|
+
className: "plc-text-xs pelcro-select-product-description"
|
|
11142
|
+
}, product.description)), /*#__PURE__*/React__default.createElement("div", {
|
|
11143
|
+
className: "plc-flex plc-items-end plc-w-full plc-mt-3"
|
|
11144
|
+
}, product.plans && /*#__PURE__*/React__default.createElement("p", {
|
|
11145
|
+
className: "plc-w-1/2 plc-text-xs pelcro-select-product-cost"
|
|
11146
|
+
}, this.locale("labels.startingAt"), " ", this.countStartPrice(product.plans)), /*#__PURE__*/React__default.createElement(Button, Object.assign({
|
|
11147
|
+
onClick: productButtonCallback,
|
|
11148
|
+
"data-key": product.id,
|
|
11149
|
+
id: "pelcro-select-product-back-button",
|
|
11150
|
+
className: `plc-ml-auto plc-text-xs ${options !== null && options !== void 0 && options.emphasize ? "plc-bg-primary-700" : ""}`
|
|
11151
|
+
}, index === 0 && {
|
|
11152
|
+
autoFocus: true
|
|
11153
|
+
}), productButtonLabel))));
|
|
11154
|
+
});
|
|
11155
|
+
|
|
11028
11156
|
_defineProperty$3(this, "renderProducts", () => {
|
|
11029
11157
|
const userDidSelectProduct = Boolean(this.state.mode === "plan");
|
|
11030
11158
|
const productsToShow = userDidSelectProduct ? [this.state.product] : this.state.productList;
|
|
11031
|
-
|
|
11032
|
-
|
|
11033
|
-
return productsToShow.map((product, i) => {
|
|
11034
|
-
return /*#__PURE__*/React__default.createElement("div", {
|
|
11035
|
-
key: product.id,
|
|
11036
|
-
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"
|
|
11037
|
-
}, product.image && /*#__PURE__*/React__default.createElement("img", {
|
|
11038
|
-
alt: `image of ${product.name}`,
|
|
11039
|
-
src: product.image,
|
|
11040
|
-
className: "plc-object-contain plc-w-1/4 pelcro-select-product-image"
|
|
11041
|
-
}), /*#__PURE__*/React__default.createElement("div", {
|
|
11042
|
-
className: `plc-flex plc-flex-wrap ${product.image ? "plc-w-3/4" : "plc-w-full"}`
|
|
11043
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
11044
|
-
className: "plc-w-full pelcro-select-product-header"
|
|
11045
|
-
}, /*#__PURE__*/React__default.createElement("p", {
|
|
11046
|
-
className: "plc-font-bold pelcro-select-product-title"
|
|
11047
|
-
}, product.name), /*#__PURE__*/React__default.createElement("p", {
|
|
11048
|
-
className: "plc-text-xs pelcro-select-product-description"
|
|
11049
|
-
}, product.description)), /*#__PURE__*/React__default.createElement("div", {
|
|
11050
|
-
className: "plc-flex plc-items-end plc-w-full plc-mt-3"
|
|
11051
|
-
}, product.plans && /*#__PURE__*/React__default.createElement("p", {
|
|
11052
|
-
className: "plc-w-1/2 plc-text-xs pelcro-select-product-cost"
|
|
11053
|
-
}, this.locale("labels.startingAt"), " ", this.countStartPrice(product.plans)), /*#__PURE__*/React__default.createElement(Button, Object.assign({
|
|
11054
|
-
onClick: productButtonCallback,
|
|
11055
|
-
"data-key": product.id,
|
|
11056
|
-
id: "pelcro-select-product-back-button",
|
|
11057
|
-
className: "plc-ml-auto plc-text-xs"
|
|
11058
|
-
}, i === 0 && {
|
|
11059
|
-
autoFocus: true
|
|
11060
|
-
}), productButtonLabel))));
|
|
11159
|
+
return productsToShow.map((product, index) => {
|
|
11160
|
+
return this.renderOneProduct(product, index);
|
|
11061
11161
|
});
|
|
11062
11162
|
});
|
|
11063
11163
|
|
|
11164
|
+
_defineProperty$3(this, "renderMatchingProductsFirst", () => {
|
|
11165
|
+
const isPlanMode = Boolean(this.state.mode === "plan");
|
|
11166
|
+
|
|
11167
|
+
if (isPlanMode) {
|
|
11168
|
+
return this.renderOneProduct(this.state.product);
|
|
11169
|
+
}
|
|
11170
|
+
|
|
11171
|
+
const [productsThatMatchArticleTag, allProductsMinusMatched] = productsWithMatchedTaggedFirst(); // Render normal products if there are no available matching products
|
|
11172
|
+
|
|
11173
|
+
if (!(productsThatMatchArticleTag !== null && productsThatMatchArticleTag !== void 0 && productsThatMatchArticleTag.length)) {
|
|
11174
|
+
return this.renderProducts();
|
|
11175
|
+
}
|
|
11176
|
+
|
|
11177
|
+
return /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("h3", {
|
|
11178
|
+
className: "plc-text-sm plc-font-semibold"
|
|
11179
|
+
}, this.locale("labels.restrictiveArticles.subscribeTo")), productsThatMatchArticleTag.map((product, index) => this.renderOneProduct(product, index, {
|
|
11180
|
+
emphasize: true
|
|
11181
|
+
})), (allProductsMinusMatched === null || allProductsMinusMatched === void 0 ? void 0 : allProductsMinusMatched.length) > 0 && /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("hr", {
|
|
11182
|
+
className: "plc-my-4"
|
|
11183
|
+
}), /*#__PURE__*/React__default.createElement("h3", {
|
|
11184
|
+
className: "plc-text-sm plc-font-semibold"
|
|
11185
|
+
}, this.locale("labels.restrictiveArticles.or")), allProductsMinusMatched.map((product, index) => this.renderOneProduct(product, index))));
|
|
11186
|
+
|
|
11187
|
+
function productsWithMatchedTaggedFirst() {
|
|
11188
|
+
var _window$Pelcro$produc;
|
|
11189
|
+
|
|
11190
|
+
const allProducts = (_window$Pelcro$produc = window.Pelcro.product.list()) !== null && _window$Pelcro$produc !== void 0 ? _window$Pelcro$produc : [];
|
|
11191
|
+
const productsThatMatchArticleTag = window.Pelcro.product.getByMatchingPageTags();
|
|
11192
|
+
const allProductsMinusMatched = allProducts.filter(product => !productsThatMatchArticleTag.some(matchedProduct => matchedProduct.id === product.id));
|
|
11193
|
+
return [productsThatMatchArticleTag, allProductsMinusMatched];
|
|
11194
|
+
}
|
|
11195
|
+
});
|
|
11196
|
+
|
|
11064
11197
|
_defineProperty$3(this, "renderPlans", () => {
|
|
11065
11198
|
return this.state.planList.map(plan => {
|
|
11066
11199
|
const isChecked = this.state.plan.id === plan.id ? true : false;
|
|
@@ -11187,7 +11320,7 @@ class SelectModal extends Component {
|
|
|
11187
11320
|
}
|
|
11188
11321
|
|
|
11189
11322
|
render() {
|
|
11190
|
-
var _window$Pelcro$
|
|
11323
|
+
var _window$Pelcro$produc2, _window$Pelcro$produc3, _window$Pelcro$site$r;
|
|
11191
11324
|
|
|
11192
11325
|
const {
|
|
11193
11326
|
disableGifting
|
|
@@ -11221,9 +11354,9 @@ class SelectModal extends Component {
|
|
|
11221
11354
|
className: "plc-mb-6 plc-text-center plc-text-gray-900 pelcro-title-wrapper"
|
|
11222
11355
|
}, /*#__PURE__*/React__default.createElement("h4", {
|
|
11223
11356
|
className: "plc-text-2xl plc-font-semibold"
|
|
11224
|
-
}, this.product && this.product.paywall.select_title || ((_window$Pelcro$
|
|
11357
|
+
}, this.product && this.product.paywall.select_title || ((_window$Pelcro$produc2 = window.Pelcro.product.list()[0]) === null || _window$Pelcro$produc2 === void 0 ? void 0 : _window$Pelcro$produc2.paywall.select_title)), /*#__PURE__*/React__default.createElement("p", null, this.product && this.product.paywall.select_subtitle || ((_window$Pelcro$produc3 = window.Pelcro.product.list()[0]) === null || _window$Pelcro$produc3 === void 0 ? void 0 : _window$Pelcro$produc3.paywall.select_subtitle))), /*#__PURE__*/React__default.createElement("div", {
|
|
11225
11358
|
className: "pelcro-select-products-wrapper"
|
|
11226
|
-
}, this.renderProducts()), this.state.mode === "plan" && /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
|
|
11359
|
+
}, (_window$Pelcro$site$r = window.Pelcro.site.read()) !== null && _window$Pelcro$site$r !== void 0 && _window$Pelcro$site$r.restrictive_paywall_metatags_enabled ? this.renderMatchingProductsFirst() : this.renderProducts()), this.state.mode === "plan" && /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
|
|
11227
11360
|
className: "plc-overflow-y-scroll plc-max-h-72 pelcro-select-plans-wrapper"
|
|
11228
11361
|
}, this.renderPlans()), !disableGifting && /*#__PURE__*/React__default.createElement("div", {
|
|
11229
11362
|
className: "plc-flex plc-justify-center plc-mt-2"
|
|
@@ -12745,7 +12878,7 @@ class PaypalGateWay {
|
|
|
12745
12878
|
|
|
12746
12879
|
/** @type {PaymentStateType} */
|
|
12747
12880
|
|
|
12748
|
-
const initialState$
|
|
12881
|
+
const initialState$e = {
|
|
12749
12882
|
disableSubmit: false,
|
|
12750
12883
|
isLoading: false,
|
|
12751
12884
|
disableCouponButton: false,
|
|
@@ -12764,10 +12897,10 @@ const initialState$d = {
|
|
|
12764
12897
|
content: ""
|
|
12765
12898
|
}
|
|
12766
12899
|
};
|
|
12767
|
-
const store$
|
|
12900
|
+
const store$e = /*#__PURE__*/createContext(initialState$e);
|
|
12768
12901
|
const {
|
|
12769
|
-
Provider: Provider$
|
|
12770
|
-
} = store$
|
|
12902
|
+
Provider: Provider$e
|
|
12903
|
+
} = store$e;
|
|
12771
12904
|
|
|
12772
12905
|
const PaymentMethodContainerWithoutStripe = ({
|
|
12773
12906
|
style,
|
|
@@ -12929,15 +13062,50 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
12929
13062
|
});
|
|
12930
13063
|
|
|
12931
13064
|
if (err) {
|
|
13065
|
+
onFailure(err);
|
|
13066
|
+
dispatch({
|
|
13067
|
+
type: SET_COUPON_ERROR,
|
|
13068
|
+
payload: getErrorMessages(err)
|
|
13069
|
+
}); // remove current coupon
|
|
13070
|
+
|
|
13071
|
+
dispatch({
|
|
13072
|
+
type: SET_COUPON,
|
|
13073
|
+
payload: null
|
|
13074
|
+
});
|
|
12932
13075
|
dispatch({
|
|
12933
13076
|
type: SET_PERCENT_OFF,
|
|
12934
13077
|
payload: ""
|
|
12935
13078
|
});
|
|
12936
|
-
|
|
12937
|
-
|
|
12938
|
-
|
|
12939
|
-
|
|
13079
|
+
dispatch({
|
|
13080
|
+
type: SET_UPDATED_PRICE,
|
|
13081
|
+
payload: null
|
|
13082
|
+
});
|
|
13083
|
+
dispatch({
|
|
13084
|
+
type: SET_TAX_AMOUNT,
|
|
13085
|
+
payload: null
|
|
12940
13086
|
});
|
|
13087
|
+
const {
|
|
13088
|
+
currentPlan
|
|
13089
|
+
} = state;
|
|
13090
|
+
|
|
13091
|
+
if (currentPlan) {
|
|
13092
|
+
var _currentPlan$quantity;
|
|
13093
|
+
|
|
13094
|
+
const quantity = (_currentPlan$quantity = currentPlan.quantity) !== null && _currentPlan$quantity !== void 0 ? _currentPlan$quantity : 1;
|
|
13095
|
+
const price = currentPlan.amount;
|
|
13096
|
+
dispatch({
|
|
13097
|
+
type: SET_UPDATED_PRICE,
|
|
13098
|
+
// set original plan price
|
|
13099
|
+
payload: price * quantity
|
|
13100
|
+
});
|
|
13101
|
+
dispatch({
|
|
13102
|
+
type: UPDATE_PAYMENT_REQUEST
|
|
13103
|
+
}); // update the new amount with taxes if site has taxes enabled
|
|
13104
|
+
|
|
13105
|
+
updateTotalAmountWithTax();
|
|
13106
|
+
}
|
|
13107
|
+
|
|
13108
|
+
return;
|
|
12941
13109
|
}
|
|
12942
13110
|
|
|
12943
13111
|
dispatch({
|
|
@@ -13027,6 +13195,54 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
13027
13195
|
|
|
13028
13196
|
const debouncedApplyCouponCode = useRef(debounce(onApplyCouponCode, 1000)).current;
|
|
13029
13197
|
|
|
13198
|
+
const removeAppliedCoupon = state => {
|
|
13199
|
+
state.couponCode = "";
|
|
13200
|
+
dispatch({
|
|
13201
|
+
type: SET_COUPON_ERROR,
|
|
13202
|
+
payload: ""
|
|
13203
|
+
});
|
|
13204
|
+
dispatch({
|
|
13205
|
+
type: SHOW_COUPON_FIELD,
|
|
13206
|
+
payload: false
|
|
13207
|
+
});
|
|
13208
|
+
dispatch({
|
|
13209
|
+
type: SET_COUPON,
|
|
13210
|
+
payload: null
|
|
13211
|
+
});
|
|
13212
|
+
dispatch({
|
|
13213
|
+
type: SET_PERCENT_OFF,
|
|
13214
|
+
payload: ""
|
|
13215
|
+
});
|
|
13216
|
+
dispatch({
|
|
13217
|
+
type: SET_UPDATED_PRICE,
|
|
13218
|
+
payload: null
|
|
13219
|
+
});
|
|
13220
|
+
dispatch({
|
|
13221
|
+
type: SET_TAX_AMOUNT,
|
|
13222
|
+
payload: null
|
|
13223
|
+
});
|
|
13224
|
+
const {
|
|
13225
|
+
currentPlan
|
|
13226
|
+
} = state;
|
|
13227
|
+
|
|
13228
|
+
if (currentPlan) {
|
|
13229
|
+
var _currentPlan$quantity2;
|
|
13230
|
+
|
|
13231
|
+
const quantity = (_currentPlan$quantity2 = currentPlan.quantity) !== null && _currentPlan$quantity2 !== void 0 ? _currentPlan$quantity2 : 1;
|
|
13232
|
+
const price = currentPlan.amount;
|
|
13233
|
+
dispatch({
|
|
13234
|
+
type: SET_UPDATED_PRICE,
|
|
13235
|
+
// set original plan price
|
|
13236
|
+
payload: price * quantity
|
|
13237
|
+
});
|
|
13238
|
+
dispatch({
|
|
13239
|
+
type: UPDATE_PAYMENT_REQUEST
|
|
13240
|
+
}); // update the new amount with taxes if site has taxes enabled
|
|
13241
|
+
|
|
13242
|
+
updateTotalAmountWithTax();
|
|
13243
|
+
}
|
|
13244
|
+
};
|
|
13245
|
+
|
|
13030
13246
|
const subscribe = (stripeSource, state, dispatch) => {
|
|
13031
13247
|
const {
|
|
13032
13248
|
couponCode
|
|
@@ -13644,6 +13860,9 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
13644
13860
|
disableCouponButton: true
|
|
13645
13861
|
}, (state, dispatch) => onApplyCouponCode(state, dispatch));
|
|
13646
13862
|
|
|
13863
|
+
case REMOVE_APPLIED_COUPON:
|
|
13864
|
+
return lib_5(state, () => removeAppliedCoupon(state));
|
|
13865
|
+
|
|
13647
13866
|
case SET_COUPON:
|
|
13648
13867
|
return lib_7({ ...state,
|
|
13649
13868
|
couponObject: action.payload
|
|
@@ -13672,21 +13891,21 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
13672
13891
|
default:
|
|
13673
13892
|
return state;
|
|
13674
13893
|
}
|
|
13675
|
-
}, initialState$
|
|
13894
|
+
}, initialState$e);
|
|
13676
13895
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
13677
13896
|
style: { ...style
|
|
13678
13897
|
},
|
|
13679
13898
|
className: `pelcro-container pelcro-payment-container ${className}`
|
|
13680
|
-
}, /*#__PURE__*/React__default.createElement(Provider$
|
|
13899
|
+
}, /*#__PURE__*/React__default.createElement(Provider$e, {
|
|
13681
13900
|
value: {
|
|
13682
13901
|
state,
|
|
13683
13902
|
dispatch
|
|
13684
13903
|
}
|
|
13685
13904
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
|
|
13686
|
-
store: store$
|
|
13905
|
+
store: store$e,
|
|
13687
13906
|
key: i
|
|
13688
13907
|
})) : /*#__PURE__*/React__default.cloneElement(children, {
|
|
13689
|
-
store: store$
|
|
13908
|
+
store: store$e
|
|
13690
13909
|
})));
|
|
13691
13910
|
};
|
|
13692
13911
|
|
|
@@ -13708,7 +13927,7 @@ const PaymentMethodContainer = props => {
|
|
|
13708
13927
|
stripeAccount: window.Pelcro.site.read().account_id,
|
|
13709
13928
|
locale: getPageOrDefaultLanguage()
|
|
13710
13929
|
}, /*#__PURE__*/React__default.createElement(es_11, null, /*#__PURE__*/React__default.createElement(UnwrappedForm, Object.assign({
|
|
13711
|
-
store: store$
|
|
13930
|
+
store: store$e
|
|
13712
13931
|
}, props))));
|
|
13713
13932
|
}
|
|
13714
13933
|
|
|
@@ -13761,7 +13980,7 @@ const PelcroPaymentRequestButton = props => {
|
|
|
13761
13980
|
currentPlan,
|
|
13762
13981
|
updatedPrice
|
|
13763
13982
|
}
|
|
13764
|
-
} = useContext(store$
|
|
13983
|
+
} = useContext(store$e);
|
|
13765
13984
|
|
|
13766
13985
|
const updatePaymentRequest = () => {
|
|
13767
13986
|
// Make sure payment request is up to date, eg. user added a coupon code.
|
|
@@ -13812,12 +14031,16 @@ const DiscountedPrice = props => {
|
|
|
13812
14031
|
var _order$currency, _order$, _plan$quantity;
|
|
13813
14032
|
|
|
13814
14033
|
const {
|
|
14034
|
+
t
|
|
14035
|
+
} = useTranslation("checkoutForm");
|
|
14036
|
+
const {
|
|
14037
|
+
dispatch,
|
|
13815
14038
|
state: {
|
|
13816
14039
|
updatedPrice,
|
|
13817
14040
|
taxAmount,
|
|
13818
14041
|
percentOff
|
|
13819
14042
|
}
|
|
13820
|
-
} = useContext(store$
|
|
14043
|
+
} = useContext(store$e);
|
|
13821
14044
|
const {
|
|
13822
14045
|
order,
|
|
13823
14046
|
plan
|
|
@@ -13827,12 +14050,22 @@ const DiscountedPrice = props => {
|
|
|
13827
14050
|
const discountedPriceWithoutTax = updatedPrice - taxAmount;
|
|
13828
14051
|
const priceFormatted = getFormattedPriceByLocal(order ? updatedPrice : discountedPriceWithoutTax * planQuantity, ecommOrderCurrency !== null && ecommOrderCurrency !== void 0 ? ecommOrderCurrency : plan === null || plan === void 0 ? void 0 : plan.currency, getPageOrDefaultLanguage());
|
|
13829
14052
|
|
|
14053
|
+
const onCouponRemove = () => {
|
|
14054
|
+
dispatch({
|
|
14055
|
+
type: REMOVE_APPLIED_COUPON
|
|
14056
|
+
});
|
|
14057
|
+
};
|
|
14058
|
+
|
|
13830
14059
|
if (percentOff) {
|
|
13831
14060
|
return /*#__PURE__*/React__default.createElement("div", Object.assign({
|
|
13832
|
-
className: "plc-flex plc-justify-center plc-mt-2 pelcro-discount"
|
|
13833
|
-
}, props), "(-", percentOff, ")",
|
|
13834
|
-
className: "plc-font-bold pelcro-discounted-price"
|
|
13835
|
-
}, priceFormatted)
|
|
14061
|
+
className: "plc-flex plc-items-center plc-justify-center plc-mt-2 pelcro-discount"
|
|
14062
|
+
}, props), "(-", percentOff, ")", /*#__PURE__*/React__default.createElement("span", {
|
|
14063
|
+
className: "plc-ml-1 plc-font-bold pelcro-discounted-price"
|
|
14064
|
+
}, priceFormatted), /*#__PURE__*/React__default.createElement(Button, {
|
|
14065
|
+
variant: "ghost",
|
|
14066
|
+
className: "plc-ml-2 plc-text-red-500 focus:plc-ring-red-500 pelcro-dashboard-sub-cancel-button",
|
|
14067
|
+
onClick: onCouponRemove
|
|
14068
|
+
}, "\u2715 ", t("labels.removeCoupon")));
|
|
13836
14069
|
}
|
|
13837
14070
|
|
|
13838
14071
|
return "";
|
|
@@ -13857,7 +14090,7 @@ const SubmitPaymentMethod = ({
|
|
|
13857
14090
|
isLoading,
|
|
13858
14091
|
updatedPrice
|
|
13859
14092
|
}
|
|
13860
|
-
} = useContext(store$
|
|
14093
|
+
} = useContext(store$e);
|
|
13861
14094
|
const planQuantity = (_plan$quantity = plan === null || plan === void 0 ? void 0 : plan.quantity) !== null && _plan$quantity !== void 0 ? _plan$quantity : 1;
|
|
13862
14095
|
const price = updatedPrice !== null && updatedPrice !== void 0 ? updatedPrice : plan === null || plan === void 0 ? void 0 : plan.amount;
|
|
13863
14096
|
const priceFormatted = getFormattedPriceByLocal(price * planQuantity, plan === null || plan === void 0 ? void 0 : plan.currency, getPageOrDefaultLanguage());
|
|
@@ -13878,17 +14111,17 @@ const SubmitPaymentMethod = ({
|
|
|
13878
14111
|
}, t("labels.pay"), " ", priceFormatted && priceFormatted) : t("labels.submit"));
|
|
13879
14112
|
};
|
|
13880
14113
|
|
|
13881
|
-
var _path$
|
|
14114
|
+
var _path$l;
|
|
13882
14115
|
|
|
13883
|
-
function _extends$
|
|
14116
|
+
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); }
|
|
13884
14117
|
|
|
13885
14118
|
function SvgArrowLeft(props) {
|
|
13886
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
14119
|
+
return /*#__PURE__*/React.createElement("svg", _extends$n({
|
|
13887
14120
|
xmlns: "http://www.w3.org/2000/svg",
|
|
13888
14121
|
fill: "none",
|
|
13889
14122
|
viewBox: "0 0 24 24",
|
|
13890
14123
|
stroke: "currentColor"
|
|
13891
|
-
}, props), _path$
|
|
14124
|
+
}, props), _path$l || (_path$l = /*#__PURE__*/React.createElement("path", {
|
|
13892
14125
|
strokeLinecap: "round",
|
|
13893
14126
|
strokeLinejoin: "round",
|
|
13894
14127
|
strokeWidth: 2,
|
|
@@ -13907,7 +14140,7 @@ const ApplyCouponButton = ({
|
|
|
13907
14140
|
disableCouponButton
|
|
13908
14141
|
},
|
|
13909
14142
|
dispatch
|
|
13910
|
-
} = useContext(store$
|
|
14143
|
+
} = useContext(store$e);
|
|
13911
14144
|
const {
|
|
13912
14145
|
t
|
|
13913
14146
|
} = useTranslation("checkoutForm");
|
|
@@ -13941,7 +14174,7 @@ const CouponCodeField = props => {
|
|
|
13941
14174
|
couponCode,
|
|
13942
14175
|
couponError
|
|
13943
14176
|
}
|
|
13944
|
-
} = useContext(store$
|
|
14177
|
+
} = useContext(store$e);
|
|
13945
14178
|
|
|
13946
14179
|
const onCouponCodeChange = e => {
|
|
13947
14180
|
dispatch({
|
|
@@ -13970,17 +14203,17 @@ const CouponCodeField = props => {
|
|
|
13970
14203
|
}, props));
|
|
13971
14204
|
};
|
|
13972
14205
|
|
|
13973
|
-
var _path$
|
|
14206
|
+
var _path$k;
|
|
13974
14207
|
|
|
13975
|
-
function _extends$
|
|
14208
|
+
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); }
|
|
13976
14209
|
|
|
13977
14210
|
function SvgTicket(props) {
|
|
13978
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
14211
|
+
return /*#__PURE__*/React.createElement("svg", _extends$m({
|
|
13979
14212
|
xmlns: "http://www.w3.org/2000/svg",
|
|
13980
14213
|
fill: "none",
|
|
13981
14214
|
viewBox: "0 0 24 24",
|
|
13982
14215
|
stroke: "currentColor"
|
|
13983
|
-
}, props), _path$
|
|
14216
|
+
}, props), _path$k || (_path$k = /*#__PURE__*/React.createElement("path", {
|
|
13984
14217
|
strokeLinecap: "round",
|
|
13985
14218
|
strokeLinejoin: "round",
|
|
13986
14219
|
strokeWidth: 2,
|
|
@@ -13997,7 +14230,7 @@ const CouponCode = ({
|
|
|
13997
14230
|
state: {
|
|
13998
14231
|
enableCouponField
|
|
13999
14232
|
}
|
|
14000
|
-
} = useContext(store$
|
|
14233
|
+
} = useContext(store$e);
|
|
14001
14234
|
const {
|
|
14002
14235
|
t
|
|
14003
14236
|
} = useTranslation("checkoutForm");
|
|
@@ -14254,7 +14487,7 @@ const PaypalSubscribeButton = props => {
|
|
|
14254
14487
|
const {
|
|
14255
14488
|
dispatch,
|
|
14256
14489
|
state
|
|
14257
|
-
} = useContext(store$
|
|
14490
|
+
} = useContext(store$e);
|
|
14258
14491
|
const {
|
|
14259
14492
|
product,
|
|
14260
14493
|
plan,
|
|
@@ -14339,16 +14572,16 @@ const BankRedirection = () => {
|
|
|
14339
14572
|
}));
|
|
14340
14573
|
};
|
|
14341
14574
|
|
|
14342
|
-
var _path$
|
|
14575
|
+
var _path$j;
|
|
14343
14576
|
|
|
14344
|
-
function _extends$
|
|
14577
|
+
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); }
|
|
14345
14578
|
|
|
14346
14579
|
function SvgLock(props) {
|
|
14347
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
14580
|
+
return /*#__PURE__*/React.createElement("svg", _extends$l({
|
|
14348
14581
|
xmlns: "http://www.w3.org/2000/svg",
|
|
14349
14582
|
viewBox: "0 0 20 20",
|
|
14350
14583
|
fill: "currentColor"
|
|
14351
|
-
}, props), _path$
|
|
14584
|
+
}, props), _path$j || (_path$j = /*#__PURE__*/React.createElement("path", {
|
|
14352
14585
|
fillRule: "evenodd",
|
|
14353
14586
|
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",
|
|
14354
14587
|
clipRule: "evenodd"
|
|
@@ -14365,7 +14598,7 @@ const SelectedPaymentMethod = () => {
|
|
|
14365
14598
|
state: {
|
|
14366
14599
|
isLoading
|
|
14367
14600
|
}
|
|
14368
|
-
} = useContext(store$
|
|
14601
|
+
} = useContext(store$e);
|
|
14369
14602
|
const {
|
|
14370
14603
|
switchView,
|
|
14371
14604
|
selectedPaymentMethodId
|
|
@@ -14407,7 +14640,7 @@ const TaxAmount = () => {
|
|
|
14407
14640
|
state: {
|
|
14408
14641
|
taxAmount
|
|
14409
14642
|
}
|
|
14410
|
-
} = useContext(store$
|
|
14643
|
+
} = useContext(store$e);
|
|
14411
14644
|
const {
|
|
14412
14645
|
plan
|
|
14413
14646
|
} = usePelcro();
|
|
@@ -14570,12 +14803,12 @@ function SubscriptionRenewModal({
|
|
|
14570
14803
|
}
|
|
14571
14804
|
SubscriptionRenewModal.viewId = "subscription-renew";
|
|
14572
14805
|
|
|
14573
|
-
var _path$
|
|
14806
|
+
var _path$i;
|
|
14574
14807
|
|
|
14575
|
-
function _extends$
|
|
14808
|
+
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); }
|
|
14576
14809
|
|
|
14577
14810
|
function SvgGift(props) {
|
|
14578
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
14811
|
+
return /*#__PURE__*/React.createElement("svg", _extends$k({
|
|
14579
14812
|
className: "plc-w-6 plc-h-6 plc-mr-2",
|
|
14580
14813
|
fill: "none",
|
|
14581
14814
|
stroke: "currentColor",
|
|
@@ -14584,7 +14817,7 @@ function SvgGift(props) {
|
|
|
14584
14817
|
strokeWidth: 2,
|
|
14585
14818
|
viewBox: "0 0 24 24",
|
|
14586
14819
|
xmlns: "http://www.w3.org/2000/svg"
|
|
14587
|
-
}, props), _path$
|
|
14820
|
+
}, props), _path$i || (_path$i = /*#__PURE__*/React.createElement("path", {
|
|
14588
14821
|
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"
|
|
14589
14822
|
})));
|
|
14590
14823
|
}
|
|
@@ -14915,7 +15148,7 @@ class DefaultNewsLetter extends Component {
|
|
|
14915
15148
|
|
|
14916
15149
|
const NewsLetter = withTranslation("newsletter")(DefaultNewsLetter);
|
|
14917
15150
|
|
|
14918
|
-
const initialState$
|
|
15151
|
+
const initialState$d = {
|
|
14919
15152
|
didSubToNewslettersBefore: false,
|
|
14920
15153
|
newsletters: [],
|
|
14921
15154
|
isListLoading: true,
|
|
@@ -14925,10 +15158,10 @@ const initialState$c = {
|
|
|
14925
15158
|
content: ""
|
|
14926
15159
|
}
|
|
14927
15160
|
};
|
|
14928
|
-
const store$
|
|
15161
|
+
const store$d = /*#__PURE__*/createContext(initialState$d);
|
|
14929
15162
|
const {
|
|
14930
|
-
Provider: Provider$
|
|
14931
|
-
} = store$
|
|
15163
|
+
Provider: Provider$d
|
|
15164
|
+
} = store$d;
|
|
14932
15165
|
|
|
14933
15166
|
const NewsletterUpdateContainer = ({
|
|
14934
15167
|
style,
|
|
@@ -15041,7 +15274,7 @@ const NewsletterUpdateContainer = ({
|
|
|
15041
15274
|
default:
|
|
15042
15275
|
return state;
|
|
15043
15276
|
}
|
|
15044
|
-
}, initialState$
|
|
15277
|
+
}, initialState$d);
|
|
15045
15278
|
useEffect(() => {
|
|
15046
15279
|
const getUserNewsletters = () => {
|
|
15047
15280
|
var _window$Pelcro$user$r3, _window$Pelcro$user$r4;
|
|
@@ -15085,7 +15318,7 @@ const NewsletterUpdateContainer = ({
|
|
|
15085
15318
|
style: { ...style
|
|
15086
15319
|
},
|
|
15087
15320
|
className: `pelcro-container pelcro-newsletter-update-container ${className}`
|
|
15088
|
-
}, /*#__PURE__*/React__default.createElement(Provider$
|
|
15321
|
+
}, /*#__PURE__*/React__default.createElement(Provider$d, {
|
|
15089
15322
|
value: {
|
|
15090
15323
|
state,
|
|
15091
15324
|
dispatch
|
|
@@ -15093,12 +15326,12 @@ const NewsletterUpdateContainer = ({
|
|
|
15093
15326
|
}, children.length ? children.map((child, i) => {
|
|
15094
15327
|
if (child) {
|
|
15095
15328
|
return /*#__PURE__*/React__default.cloneElement(child, {
|
|
15096
|
-
store: store$
|
|
15329
|
+
store: store$d,
|
|
15097
15330
|
key: i
|
|
15098
15331
|
});
|
|
15099
15332
|
}
|
|
15100
15333
|
}) : /*#__PURE__*/React__default.cloneElement(children, {
|
|
15101
|
-
store: store$
|
|
15334
|
+
store: store$d
|
|
15102
15335
|
})));
|
|
15103
15336
|
};
|
|
15104
15337
|
|
|
@@ -15113,7 +15346,7 @@ const NewsletterUpdateButton = ({
|
|
|
15113
15346
|
isSubmitting,
|
|
15114
15347
|
isListLoading
|
|
15115
15348
|
}
|
|
15116
|
-
} = useContext(store$
|
|
15349
|
+
} = useContext(store$d);
|
|
15117
15350
|
const {
|
|
15118
15351
|
t
|
|
15119
15352
|
} = useTranslation("newsletter");
|
|
@@ -15143,7 +15376,7 @@ const NewsletterUpdateList = () => {
|
|
|
15143
15376
|
newsletters,
|
|
15144
15377
|
isListLoading
|
|
15145
15378
|
}
|
|
15146
|
-
} = useContext(store$
|
|
15379
|
+
} = useContext(store$d);
|
|
15147
15380
|
|
|
15148
15381
|
if (isListLoading) {
|
|
15149
15382
|
return /*#__PURE__*/React__default.createElement(Loader, {
|
|
@@ -15347,7 +15580,7 @@ function SubscriptionCreateModal({
|
|
|
15347
15580
|
SubscriptionCreateModal.viewId = "subscription-create";
|
|
15348
15581
|
|
|
15349
15582
|
var _window$Pelcro$user$r, _window$Pelcro$user$r2, _window$Pelcro$user$r3, _window$Pelcro$user$r4, _window$Pelcro$user$r5;
|
|
15350
|
-
const initialState$
|
|
15583
|
+
const initialState$c = {
|
|
15351
15584
|
email: (_window$Pelcro$user$r = window.Pelcro.user.read()) === null || _window$Pelcro$user$r === void 0 ? void 0 : _window$Pelcro$user$r.email,
|
|
15352
15585
|
firstName: (_window$Pelcro$user$r2 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r2 === void 0 ? void 0 : _window$Pelcro$user$r2.first_name,
|
|
15353
15586
|
lastName: (_window$Pelcro$user$r3 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r3 === void 0 ? void 0 : _window$Pelcro$user$r3.last_name,
|
|
@@ -15360,10 +15593,10 @@ const initialState$b = {
|
|
|
15360
15593
|
content: ""
|
|
15361
15594
|
}
|
|
15362
15595
|
};
|
|
15363
|
-
const store$
|
|
15596
|
+
const store$c = /*#__PURE__*/createContext(initialState$c);
|
|
15364
15597
|
const {
|
|
15365
|
-
Provider: Provider$
|
|
15366
|
-
} = store$
|
|
15598
|
+
Provider: Provider$c
|
|
15599
|
+
} = store$c;
|
|
15367
15600
|
|
|
15368
15601
|
const UserUpdateContainer = ({
|
|
15369
15602
|
style,
|
|
@@ -15495,27 +15728,27 @@ const UserUpdateContainer = ({
|
|
|
15495
15728
|
default:
|
|
15496
15729
|
return state;
|
|
15497
15730
|
}
|
|
15498
|
-
}, initialState$
|
|
15731
|
+
}, initialState$c);
|
|
15499
15732
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
15500
15733
|
style: { ...style
|
|
15501
15734
|
},
|
|
15502
15735
|
className: `pelcro-container pelcro-user-update-container ${className}`
|
|
15503
|
-
}, /*#__PURE__*/React__default.createElement(Provider$
|
|
15736
|
+
}, /*#__PURE__*/React__default.createElement(Provider$c, {
|
|
15504
15737
|
value: {
|
|
15505
15738
|
state,
|
|
15506
15739
|
dispatch
|
|
15507
15740
|
}
|
|
15508
15741
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
|
|
15509
|
-
store: store$
|
|
15742
|
+
store: store$c,
|
|
15510
15743
|
key: i
|
|
15511
15744
|
})) : /*#__PURE__*/React__default.cloneElement(children, {
|
|
15512
|
-
store: store$
|
|
15745
|
+
store: store$c
|
|
15513
15746
|
})));
|
|
15514
15747
|
};
|
|
15515
15748
|
|
|
15516
15749
|
const UserUpdateEmail = props => /*#__PURE__*/React__default.createElement(Email, Object.assign({
|
|
15517
15750
|
disabled: true,
|
|
15518
|
-
store: store$
|
|
15751
|
+
store: store$c
|
|
15519
15752
|
}, props));
|
|
15520
15753
|
|
|
15521
15754
|
const UserUpdateButton = ({
|
|
@@ -15528,7 +15761,7 @@ const UserUpdateButton = ({
|
|
|
15528
15761
|
buttonDisabled
|
|
15529
15762
|
},
|
|
15530
15763
|
dispatch
|
|
15531
|
-
} = useContext(store$
|
|
15764
|
+
} = useContext(store$c);
|
|
15532
15765
|
const {
|
|
15533
15766
|
t
|
|
15534
15767
|
} = useTranslation("userEdit");
|
|
@@ -15545,11 +15778,11 @@ const UserUpdateButton = ({
|
|
|
15545
15778
|
};
|
|
15546
15779
|
|
|
15547
15780
|
const UserUpdateFirstName = props => /*#__PURE__*/React__default.createElement(FirstName, Object.assign({
|
|
15548
|
-
store: store$
|
|
15781
|
+
store: store$c
|
|
15549
15782
|
}, props));
|
|
15550
15783
|
|
|
15551
15784
|
const UserUpdateLastName = props => /*#__PURE__*/React__default.createElement(LastName, Object.assign({
|
|
15552
|
-
store: store$
|
|
15785
|
+
store: store$c
|
|
15553
15786
|
}, props));
|
|
15554
15787
|
|
|
15555
15788
|
function Phone({
|
|
@@ -15578,22 +15811,22 @@ function Phone({
|
|
|
15578
15811
|
}
|
|
15579
15812
|
|
|
15580
15813
|
const UserUpdatePhone = props => /*#__PURE__*/React__default.createElement(Phone, Object.assign({
|
|
15581
|
-
store: store$
|
|
15814
|
+
store: store$c
|
|
15582
15815
|
}, props));
|
|
15583
15816
|
|
|
15584
15817
|
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";
|
|
15585
15818
|
|
|
15586
|
-
var _path$
|
|
15819
|
+
var _path$h;
|
|
15587
15820
|
|
|
15588
|
-
function _extends$
|
|
15821
|
+
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); }
|
|
15589
15822
|
|
|
15590
15823
|
function SvgEdit(props) {
|
|
15591
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
15824
|
+
return /*#__PURE__*/React.createElement("svg", _extends$j({
|
|
15592
15825
|
className: "plc-w-6 plc-h-6",
|
|
15593
15826
|
xmlns: "http://www.w3.org/2000/svg",
|
|
15594
15827
|
viewBox: "0 0 20 20",
|
|
15595
15828
|
fill: "currentColor"
|
|
15596
|
-
}, props), _path$
|
|
15829
|
+
}, props), _path$h || (_path$h = /*#__PURE__*/React.createElement("path", {
|
|
15597
15830
|
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"
|
|
15598
15831
|
})));
|
|
15599
15832
|
}
|
|
@@ -15725,16 +15958,16 @@ function DisplayName({
|
|
|
15725
15958
|
}
|
|
15726
15959
|
|
|
15727
15960
|
const UserUpdateDisplayName = props => /*#__PURE__*/React__default.createElement(DisplayName, Object.assign({
|
|
15728
|
-
store: store$
|
|
15961
|
+
store: store$c
|
|
15729
15962
|
}, props));
|
|
15730
15963
|
|
|
15731
15964
|
const UserUpdateTextInput = props => {
|
|
15732
15965
|
return /*#__PURE__*/React__default.createElement(TextInput, Object.assign({}, props, {
|
|
15733
|
-
store: store$
|
|
15966
|
+
store: store$c
|
|
15734
15967
|
}));
|
|
15735
15968
|
};
|
|
15736
15969
|
|
|
15737
|
-
const initialState$
|
|
15970
|
+
const initialState$b = {
|
|
15738
15971
|
isSubmitting: false,
|
|
15739
15972
|
firstName: "",
|
|
15740
15973
|
firstNameError: "",
|
|
@@ -15759,10 +15992,10 @@ const initialState$a = {
|
|
|
15759
15992
|
content: ""
|
|
15760
15993
|
}
|
|
15761
15994
|
};
|
|
15762
|
-
const store$
|
|
15995
|
+
const store$b = /*#__PURE__*/createContext(initialState$b);
|
|
15763
15996
|
const {
|
|
15764
|
-
Provider: Provider$
|
|
15765
|
-
} = store$
|
|
15997
|
+
Provider: Provider$b
|
|
15998
|
+
} = store$b;
|
|
15766
15999
|
|
|
15767
16000
|
const getNewlyCreatedAddress = addresses => addresses[addresses.length - 1];
|
|
15768
16001
|
|
|
@@ -15969,7 +16202,7 @@ const AddressCreateContainer = ({
|
|
|
15969
16202
|
default:
|
|
15970
16203
|
return state;
|
|
15971
16204
|
}
|
|
15972
|
-
}, initialState$
|
|
16205
|
+
}, initialState$b);
|
|
15973
16206
|
useEffect(() => {
|
|
15974
16207
|
const getStates = () => {
|
|
15975
16208
|
dispatch({
|
|
@@ -16001,16 +16234,16 @@ const AddressCreateContainer = ({
|
|
|
16001
16234
|
style: { ...style
|
|
16002
16235
|
},
|
|
16003
16236
|
className: `pelcro-container pelcro-address-create-container ${className}`
|
|
16004
|
-
}, /*#__PURE__*/React__default.createElement(Provider$
|
|
16237
|
+
}, /*#__PURE__*/React__default.createElement(Provider$b, {
|
|
16005
16238
|
value: {
|
|
16006
16239
|
state,
|
|
16007
16240
|
dispatch
|
|
16008
16241
|
}
|
|
16009
16242
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
|
|
16010
|
-
store: store$
|
|
16243
|
+
store: store$b,
|
|
16011
16244
|
key: i
|
|
16012
16245
|
})) : /*#__PURE__*/React__default.cloneElement(children, {
|
|
16013
|
-
store: store$
|
|
16246
|
+
store: store$b
|
|
16014
16247
|
})));
|
|
16015
16248
|
};
|
|
16016
16249
|
|
|
@@ -16021,7 +16254,7 @@ function AddressCreateFirstName(props) {
|
|
|
16021
16254
|
firstName,
|
|
16022
16255
|
firstNameError
|
|
16023
16256
|
}
|
|
16024
|
-
} = useContext(store$
|
|
16257
|
+
} = useContext(store$b);
|
|
16025
16258
|
|
|
16026
16259
|
const handleBlur = () => {
|
|
16027
16260
|
return dispatch({
|
|
@@ -16064,7 +16297,7 @@ function AddressCreateLastName(props) {
|
|
|
16064
16297
|
lastName,
|
|
16065
16298
|
lastNameError
|
|
16066
16299
|
}
|
|
16067
|
-
} = useContext(store$
|
|
16300
|
+
} = useContext(store$b);
|
|
16068
16301
|
|
|
16069
16302
|
const handleBlur = () => {
|
|
16070
16303
|
return dispatch({
|
|
@@ -16107,7 +16340,7 @@ function AddressCreateLine1(props) {
|
|
|
16107
16340
|
line1,
|
|
16108
16341
|
line1Error
|
|
16109
16342
|
}
|
|
16110
|
-
} = useContext(store$
|
|
16343
|
+
} = useContext(store$b);
|
|
16111
16344
|
|
|
16112
16345
|
const handleBlur = () => {
|
|
16113
16346
|
return dispatch({
|
|
@@ -16150,7 +16383,7 @@ function AddressCreateCity(props) {
|
|
|
16150
16383
|
city,
|
|
16151
16384
|
cityError
|
|
16152
16385
|
}
|
|
16153
|
-
} = useContext(store$
|
|
16386
|
+
} = useContext(store$b);
|
|
16154
16387
|
|
|
16155
16388
|
const handleBlur = () => {
|
|
16156
16389
|
return dispatch({
|
|
@@ -16193,7 +16426,7 @@ function AddressCreatePostalCode(props) {
|
|
|
16193
16426
|
postalCode,
|
|
16194
16427
|
postalCodeError
|
|
16195
16428
|
}
|
|
16196
|
-
} = useContext(store$
|
|
16429
|
+
} = useContext(store$b);
|
|
16197
16430
|
|
|
16198
16431
|
const handleBlur = () => {
|
|
16199
16432
|
return dispatch({
|
|
@@ -16239,7 +16472,7 @@ const AddressCreateSubmit = ({
|
|
|
16239
16472
|
state: {
|
|
16240
16473
|
isSubmitting
|
|
16241
16474
|
}
|
|
16242
|
-
} = useContext(store$
|
|
16475
|
+
} = useContext(store$b);
|
|
16243
16476
|
const {
|
|
16244
16477
|
t
|
|
16245
16478
|
} = useTranslation("address");
|
|
@@ -16350,7 +16583,7 @@ function CountrySelect({
|
|
|
16350
16583
|
}
|
|
16351
16584
|
|
|
16352
16585
|
const AddressCreateCountrySelect = props => /*#__PURE__*/React__default.createElement(CountrySelect, Object.assign({
|
|
16353
|
-
store: store$
|
|
16586
|
+
store: store$b
|
|
16354
16587
|
}, props));
|
|
16355
16588
|
|
|
16356
16589
|
function StateSelect({
|
|
@@ -16438,7 +16671,7 @@ function StateSelect({
|
|
|
16438
16671
|
}
|
|
16439
16672
|
|
|
16440
16673
|
const AddressCreateStateSelect = props => /*#__PURE__*/React__default.createElement(StateSelect, Object.assign({
|
|
16441
|
-
store: store$
|
|
16674
|
+
store: store$b
|
|
16442
16675
|
}, props));
|
|
16443
16676
|
|
|
16444
16677
|
const AddressCreateView = props => {
|
|
@@ -16543,18 +16776,18 @@ AddressCreateModal.viewId = "address-create";
|
|
|
16543
16776
|
|
|
16544
16777
|
const AddressCreateTextInput = props => {
|
|
16545
16778
|
return /*#__PURE__*/React__default.createElement(TextInput, Object.assign({}, props, {
|
|
16546
|
-
store: store$
|
|
16779
|
+
store: store$b
|
|
16547
16780
|
}));
|
|
16548
16781
|
};
|
|
16549
16782
|
|
|
16550
16783
|
const AddressCreateLine2 = props => {
|
|
16551
16784
|
return /*#__PURE__*/React__default.createElement(TextInput, Object.assign({
|
|
16552
16785
|
fieldName: "line2",
|
|
16553
|
-
store: store$
|
|
16786
|
+
store: store$b
|
|
16554
16787
|
}, props));
|
|
16555
16788
|
};
|
|
16556
16789
|
|
|
16557
|
-
const initialState$
|
|
16790
|
+
const initialState$a = {
|
|
16558
16791
|
isSubmitting: false,
|
|
16559
16792
|
firstName: "",
|
|
16560
16793
|
firstNameError: "",
|
|
@@ -16579,10 +16812,10 @@ const initialState$9 = {
|
|
|
16579
16812
|
content: ""
|
|
16580
16813
|
}
|
|
16581
16814
|
};
|
|
16582
|
-
const store$
|
|
16815
|
+
const store$a = /*#__PURE__*/createContext(initialState$a);
|
|
16583
16816
|
const {
|
|
16584
|
-
Provider: Provider$
|
|
16585
|
-
} = store$
|
|
16817
|
+
Provider: Provider$a
|
|
16818
|
+
} = store$a;
|
|
16586
16819
|
|
|
16587
16820
|
const AddressUpdateContainer = ({
|
|
16588
16821
|
style,
|
|
@@ -16634,7 +16867,7 @@ const AddressUpdateContainer = ({
|
|
|
16634
16867
|
const thisAddress = addresses[address];
|
|
16635
16868
|
|
|
16636
16869
|
if (+thisAddress.id === +addressId) {
|
|
16637
|
-
const newState = { ...initialState$
|
|
16870
|
+
const newState = { ...initialState$a,
|
|
16638
16871
|
firstName: thisAddress.first_name,
|
|
16639
16872
|
lastName: thisAddress.last_name,
|
|
16640
16873
|
line1: thisAddress.line1,
|
|
@@ -16767,7 +17000,7 @@ const AddressUpdateContainer = ({
|
|
|
16767
17000
|
default:
|
|
16768
17001
|
return state;
|
|
16769
17002
|
}
|
|
16770
|
-
}, initialState$
|
|
17003
|
+
}, initialState$a);
|
|
16771
17004
|
useEffect(() => {
|
|
16772
17005
|
const getStates = () => {
|
|
16773
17006
|
dispatch({
|
|
@@ -16799,21 +17032,21 @@ const AddressUpdateContainer = ({
|
|
|
16799
17032
|
style: { ...style
|
|
16800
17033
|
},
|
|
16801
17034
|
className: `pelcro-container pelcro-address-update-container ${className}`
|
|
16802
|
-
}, /*#__PURE__*/React__default.createElement(Provider$
|
|
17035
|
+
}, /*#__PURE__*/React__default.createElement(Provider$a, {
|
|
16803
17036
|
value: {
|
|
16804
17037
|
state,
|
|
16805
17038
|
dispatch
|
|
16806
17039
|
}
|
|
16807
17040
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
|
|
16808
|
-
store: store$
|
|
17041
|
+
store: store$a,
|
|
16809
17042
|
key: i
|
|
16810
17043
|
})) : /*#__PURE__*/React__default.cloneElement(children, {
|
|
16811
|
-
store: store$
|
|
17044
|
+
store: store$a
|
|
16812
17045
|
})));
|
|
16813
17046
|
};
|
|
16814
17047
|
|
|
16815
17048
|
const AddressUpdateCountrySelect = props => /*#__PURE__*/React__default.createElement(CountrySelect, Object.assign({
|
|
16816
|
-
store: store$
|
|
17049
|
+
store: store$a
|
|
16817
17050
|
}, props));
|
|
16818
17051
|
|
|
16819
17052
|
function AddressUpdateFirstName(props) {
|
|
@@ -16823,7 +17056,7 @@ function AddressUpdateFirstName(props) {
|
|
|
16823
17056
|
firstName,
|
|
16824
17057
|
firstNameError
|
|
16825
17058
|
}
|
|
16826
|
-
} = useContext(store$
|
|
17059
|
+
} = useContext(store$a);
|
|
16827
17060
|
|
|
16828
17061
|
const handleBlur = () => {
|
|
16829
17062
|
return dispatch({
|
|
@@ -16866,7 +17099,7 @@ function AddressUpdateLastName(props) {
|
|
|
16866
17099
|
lastName,
|
|
16867
17100
|
lastNameError
|
|
16868
17101
|
}
|
|
16869
|
-
} = useContext(store$
|
|
17102
|
+
} = useContext(store$a);
|
|
16870
17103
|
|
|
16871
17104
|
const handleBlur = () => {
|
|
16872
17105
|
return dispatch({
|
|
@@ -16909,7 +17142,7 @@ function AddressUpdateLine1(props) {
|
|
|
16909
17142
|
line1,
|
|
16910
17143
|
line1Error
|
|
16911
17144
|
}
|
|
16912
|
-
} = useContext(store$
|
|
17145
|
+
} = useContext(store$a);
|
|
16913
17146
|
|
|
16914
17147
|
const handleBlur = () => {
|
|
16915
17148
|
return dispatch({
|
|
@@ -16949,7 +17182,7 @@ const AddressUpdateLine2 = props => {
|
|
|
16949
17182
|
return /*#__PURE__*/React__default.createElement(TextInput, Object.assign({
|
|
16950
17183
|
fieldName: "line2"
|
|
16951
17184
|
}, props, {
|
|
16952
|
-
store: store$
|
|
17185
|
+
store: store$a
|
|
16953
17186
|
}));
|
|
16954
17187
|
};
|
|
16955
17188
|
|
|
@@ -16960,7 +17193,7 @@ function AddressUpdateCity(props) {
|
|
|
16960
17193
|
city,
|
|
16961
17194
|
cityError
|
|
16962
17195
|
}
|
|
16963
|
-
} = useContext(store$
|
|
17196
|
+
} = useContext(store$a);
|
|
16964
17197
|
|
|
16965
17198
|
const handleBlur = () => {
|
|
16966
17199
|
return dispatch({
|
|
@@ -17003,7 +17236,7 @@ function AddressUpdatePostalCode(props) {
|
|
|
17003
17236
|
postalCode,
|
|
17004
17237
|
postalCodeError
|
|
17005
17238
|
}
|
|
17006
|
-
} = useContext(store$
|
|
17239
|
+
} = useContext(store$a);
|
|
17007
17240
|
|
|
17008
17241
|
const handleBlur = () => {
|
|
17009
17242
|
return dispatch({
|
|
@@ -17049,7 +17282,7 @@ const AddressUpdateSubmit = ({
|
|
|
17049
17282
|
state: {
|
|
17050
17283
|
isSubmitting
|
|
17051
17284
|
}
|
|
17052
|
-
} = useContext(store$
|
|
17285
|
+
} = useContext(store$a);
|
|
17053
17286
|
const {
|
|
17054
17287
|
t
|
|
17055
17288
|
} = useTranslation("address");
|
|
@@ -17065,7 +17298,7 @@ const AddressUpdateSubmit = ({
|
|
|
17065
17298
|
};
|
|
17066
17299
|
|
|
17067
17300
|
const AddressUpdateStateSelect = props => /*#__PURE__*/React__default.createElement(StateSelect, Object.assign({
|
|
17068
|
-
store: store$
|
|
17301
|
+
store: store$a
|
|
17069
17302
|
}, props));
|
|
17070
17303
|
|
|
17071
17304
|
const AddressUpdateView = props => {
|
|
@@ -17148,7 +17381,7 @@ AddressUpdateModal.viewId = "address-edit";
|
|
|
17148
17381
|
|
|
17149
17382
|
const AddressUpdateTextInput = props => {
|
|
17150
17383
|
return /*#__PURE__*/React__default.createElement(TextInput, Object.assign({}, props, {
|
|
17151
|
-
store: store$
|
|
17384
|
+
store: store$a
|
|
17152
17385
|
}));
|
|
17153
17386
|
};
|
|
17154
17387
|
|
|
@@ -17231,7 +17464,7 @@ const PaymentMethodUpdateModal = props => {
|
|
|
17231
17464
|
};
|
|
17232
17465
|
PaymentMethodUpdateModal.viewId = "payment-method-update";
|
|
17233
17466
|
|
|
17234
|
-
const initialState$
|
|
17467
|
+
const initialState$9 = {
|
|
17235
17468
|
email: "",
|
|
17236
17469
|
password: "",
|
|
17237
17470
|
passwordError: null,
|
|
@@ -17244,10 +17477,10 @@ const initialState$8 = {
|
|
|
17244
17477
|
content: ""
|
|
17245
17478
|
}
|
|
17246
17479
|
};
|
|
17247
|
-
const store$
|
|
17480
|
+
const store$9 = /*#__PURE__*/createContext(initialState$9);
|
|
17248
17481
|
const {
|
|
17249
|
-
Provider: Provider$
|
|
17250
|
-
} = store$
|
|
17482
|
+
Provider: Provider$9
|
|
17483
|
+
} = store$9;
|
|
17251
17484
|
|
|
17252
17485
|
const PasswordResetContainer = ({
|
|
17253
17486
|
style,
|
|
@@ -17304,7 +17537,7 @@ const PasswordResetContainer = ({
|
|
|
17304
17537
|
type: SET_EMAIL,
|
|
17305
17538
|
payload: window.Pelcro.helpers.getURLParameter("email")
|
|
17306
17539
|
});
|
|
17307
|
-
initialState$
|
|
17540
|
+
initialState$9.email = window.Pelcro.helpers.getURLParameter("email");
|
|
17308
17541
|
dispatch({
|
|
17309
17542
|
type: SET_TOKEN,
|
|
17310
17543
|
payload: window.Pelcro.helpers.getURLParameter("token")
|
|
@@ -17364,26 +17597,26 @@ const PasswordResetContainer = ({
|
|
|
17364
17597
|
default:
|
|
17365
17598
|
return state;
|
|
17366
17599
|
}
|
|
17367
|
-
}, initialState$
|
|
17600
|
+
}, initialState$9);
|
|
17368
17601
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
17369
17602
|
style: { ...style
|
|
17370
17603
|
},
|
|
17371
17604
|
className: `pelcro-container pelcro-password-reset-container ${className}`
|
|
17372
|
-
}, /*#__PURE__*/React__default.createElement(Provider$
|
|
17605
|
+
}, /*#__PURE__*/React__default.createElement(Provider$9, {
|
|
17373
17606
|
value: {
|
|
17374
17607
|
state,
|
|
17375
17608
|
dispatch
|
|
17376
17609
|
}
|
|
17377
17610
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
|
|
17378
|
-
store: store$
|
|
17611
|
+
store: store$9,
|
|
17379
17612
|
key: i
|
|
17380
17613
|
})) : /*#__PURE__*/React__default.cloneElement(children, {
|
|
17381
|
-
store: store$
|
|
17614
|
+
store: store$9
|
|
17382
17615
|
})));
|
|
17383
17616
|
};
|
|
17384
17617
|
|
|
17385
17618
|
const PasswordResetPassword = props => /*#__PURE__*/React__default.createElement(Password, Object.assign({
|
|
17386
|
-
store: store$
|
|
17619
|
+
store: store$9
|
|
17387
17620
|
}, props));
|
|
17388
17621
|
|
|
17389
17622
|
const PasswordResetButton = ({
|
|
@@ -17396,7 +17629,7 @@ const PasswordResetButton = ({
|
|
|
17396
17629
|
buttonDisabled
|
|
17397
17630
|
},
|
|
17398
17631
|
dispatch
|
|
17399
|
-
} = useContext(store$
|
|
17632
|
+
} = useContext(store$9);
|
|
17400
17633
|
const {
|
|
17401
17634
|
t
|
|
17402
17635
|
} = useTranslation("passwordReset");
|
|
@@ -17413,14 +17646,14 @@ const PasswordResetButton = ({
|
|
|
17413
17646
|
};
|
|
17414
17647
|
|
|
17415
17648
|
const PasswordResetEmail = props => /*#__PURE__*/React__default.createElement(Email, Object.assign({
|
|
17416
|
-
store: store$
|
|
17649
|
+
store: store$9
|
|
17417
17650
|
}, props, {
|
|
17418
17651
|
value: window.Pelcro.helpers.getURLParameter("email"),
|
|
17419
17652
|
disabled: true
|
|
17420
17653
|
}));
|
|
17421
17654
|
|
|
17422
17655
|
const PasswordResetConfirmPassword = props => /*#__PURE__*/React__default.createElement(ConfirmPassword, Object.assign({
|
|
17423
|
-
store: store$
|
|
17656
|
+
store: store$9
|
|
17424
17657
|
}, props));
|
|
17425
17658
|
|
|
17426
17659
|
const PasswordResetView = props => {
|
|
@@ -17472,7 +17705,7 @@ const PasswordResetModal = ({
|
|
|
17472
17705
|
};
|
|
17473
17706
|
PasswordResetModal.viewId = "password-reset";
|
|
17474
17707
|
|
|
17475
|
-
const initialState$
|
|
17708
|
+
const initialState$8 = {
|
|
17476
17709
|
email: "",
|
|
17477
17710
|
emailError: null,
|
|
17478
17711
|
buttonDisabled: false,
|
|
@@ -17481,10 +17714,10 @@ const initialState$7 = {
|
|
|
17481
17714
|
content: ""
|
|
17482
17715
|
}
|
|
17483
17716
|
};
|
|
17484
|
-
const store$
|
|
17717
|
+
const store$8 = /*#__PURE__*/createContext(initialState$8);
|
|
17485
17718
|
const {
|
|
17486
|
-
Provider: Provider$
|
|
17487
|
-
} = store$
|
|
17719
|
+
Provider: Provider$8
|
|
17720
|
+
} = store$8;
|
|
17488
17721
|
|
|
17489
17722
|
const PasswordForgotContainer = ({
|
|
17490
17723
|
style,
|
|
@@ -17562,21 +17795,21 @@ const PasswordForgotContainer = ({
|
|
|
17562
17795
|
default:
|
|
17563
17796
|
return state;
|
|
17564
17797
|
}
|
|
17565
|
-
}, initialState$
|
|
17798
|
+
}, initialState$8);
|
|
17566
17799
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
17567
17800
|
style: { ...style
|
|
17568
17801
|
},
|
|
17569
17802
|
className: `pelcro-container pelcro-password-forgot-container ${className}`
|
|
17570
|
-
}, /*#__PURE__*/React__default.createElement(Provider$
|
|
17803
|
+
}, /*#__PURE__*/React__default.createElement(Provider$8, {
|
|
17571
17804
|
value: {
|
|
17572
17805
|
state,
|
|
17573
17806
|
dispatch
|
|
17574
17807
|
}
|
|
17575
17808
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
|
|
17576
|
-
store: store$
|
|
17809
|
+
store: store$8,
|
|
17577
17810
|
key: i
|
|
17578
17811
|
})) : /*#__PURE__*/React__default.cloneElement(children, {
|
|
17579
|
-
store: store$
|
|
17812
|
+
store: store$8
|
|
17580
17813
|
})));
|
|
17581
17814
|
};
|
|
17582
17815
|
|
|
@@ -17592,7 +17825,7 @@ const PasswordForgotButton = ({
|
|
|
17592
17825
|
emailError
|
|
17593
17826
|
},
|
|
17594
17827
|
dispatch
|
|
17595
|
-
} = useContext(store$
|
|
17828
|
+
} = useContext(store$8);
|
|
17596
17829
|
const {
|
|
17597
17830
|
t
|
|
17598
17831
|
} = useTranslation("passwordForgot");
|
|
@@ -17613,7 +17846,7 @@ const PasswordForgotButton = ({
|
|
|
17613
17846
|
};
|
|
17614
17847
|
|
|
17615
17848
|
const PasswordForgotEmail = props => /*#__PURE__*/React__default.createElement(Email, Object.assign({
|
|
17616
|
-
store: store$
|
|
17849
|
+
store: store$8
|
|
17617
17850
|
}, props));
|
|
17618
17851
|
|
|
17619
17852
|
const PasswordForgotView = props => {
|
|
@@ -17663,7 +17896,7 @@ const PasswordForgotModal = ({
|
|
|
17663
17896
|
};
|
|
17664
17897
|
PasswordForgotModal.viewId = "password-forgot";
|
|
17665
17898
|
|
|
17666
|
-
const initialState$
|
|
17899
|
+
const initialState$7 = {
|
|
17667
17900
|
currentPassword: "",
|
|
17668
17901
|
newPassword: "",
|
|
17669
17902
|
confirmNewPassword: "",
|
|
@@ -17677,10 +17910,10 @@ const initialState$6 = {
|
|
|
17677
17910
|
content: ""
|
|
17678
17911
|
}
|
|
17679
17912
|
};
|
|
17680
|
-
const store$
|
|
17913
|
+
const store$7 = /*#__PURE__*/createContext(initialState$7);
|
|
17681
17914
|
const {
|
|
17682
|
-
Provider: Provider$
|
|
17683
|
-
} = store$
|
|
17915
|
+
Provider: Provider$7
|
|
17916
|
+
} = store$7;
|
|
17684
17917
|
const PasswordChangeContainer = ({
|
|
17685
17918
|
style,
|
|
17686
17919
|
className = "",
|
|
@@ -17832,21 +18065,21 @@ const PasswordChangeContainer = ({
|
|
|
17832
18065
|
default:
|
|
17833
18066
|
return state;
|
|
17834
18067
|
}
|
|
17835
|
-
}, initialState$
|
|
18068
|
+
}, initialState$7);
|
|
17836
18069
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
17837
18070
|
style: { ...style
|
|
17838
18071
|
},
|
|
17839
18072
|
className: `pelcro-container pelcro-password-change-container ${className}`
|
|
17840
|
-
}, /*#__PURE__*/React__default.createElement(Provider$
|
|
18073
|
+
}, /*#__PURE__*/React__default.createElement(Provider$7, {
|
|
17841
18074
|
value: {
|
|
17842
18075
|
state,
|
|
17843
18076
|
dispatch
|
|
17844
18077
|
}
|
|
17845
18078
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
|
|
17846
|
-
store: store$
|
|
18079
|
+
store: store$7,
|
|
17847
18080
|
key: i
|
|
17848
18081
|
})) : /*#__PURE__*/React__default.cloneElement(children, {
|
|
17849
|
-
store: store$
|
|
18082
|
+
store: store$7
|
|
17850
18083
|
})));
|
|
17851
18084
|
};
|
|
17852
18085
|
|
|
@@ -17857,7 +18090,7 @@ function PasswordChangeCurrentPassword(props) {
|
|
|
17857
18090
|
currentPassword,
|
|
17858
18091
|
currentPasswordError
|
|
17859
18092
|
}
|
|
17860
|
-
} = useContext(store$
|
|
18093
|
+
} = useContext(store$7);
|
|
17861
18094
|
const handleBlur = useCallback(() => {
|
|
17862
18095
|
return dispatch({
|
|
17863
18096
|
type: VALIDATE_PASSWORD
|
|
@@ -17891,7 +18124,7 @@ function PasswordChangeNewPassword(props) {
|
|
|
17891
18124
|
newPassword,
|
|
17892
18125
|
newPasswordError
|
|
17893
18126
|
}
|
|
17894
|
-
} = useContext(store$
|
|
18127
|
+
} = useContext(store$7);
|
|
17895
18128
|
const handleBlur = useCallback(() => {
|
|
17896
18129
|
return dispatch({
|
|
17897
18130
|
type: VALIDATE_NEW_PASSWORD
|
|
@@ -17925,7 +18158,7 @@ function PasswordChangeConfirmNewPassword(props) {
|
|
|
17925
18158
|
confirmNewPassword,
|
|
17926
18159
|
confirmNewPasswordError
|
|
17927
18160
|
}
|
|
17928
|
-
} = useContext(store$
|
|
18161
|
+
} = useContext(store$7);
|
|
17929
18162
|
const handleBlur = useCallback(() => {
|
|
17930
18163
|
return dispatch({
|
|
17931
18164
|
type: VALIDATE_CONFIRM_NEW_PASSWORD
|
|
@@ -17966,7 +18199,7 @@ const PasswordChangeButton = ({
|
|
|
17966
18199
|
confirmNewPasswordError
|
|
17967
18200
|
},
|
|
17968
18201
|
dispatch
|
|
17969
|
-
} = useContext(store$
|
|
18202
|
+
} = useContext(store$7);
|
|
17970
18203
|
const {
|
|
17971
18204
|
t
|
|
17972
18205
|
} = useTranslation("passwordChange");
|
|
@@ -18032,17 +18265,17 @@ const PasswordChangeModal = ({
|
|
|
18032
18265
|
};
|
|
18033
18266
|
PasswordChangeModal.viewId = "password-change";
|
|
18034
18267
|
|
|
18035
|
-
const initialState$
|
|
18268
|
+
const initialState$6 = {
|
|
18036
18269
|
buttonDisabled: false,
|
|
18037
18270
|
alert: {
|
|
18038
18271
|
type: "error",
|
|
18039
18272
|
content: ""
|
|
18040
18273
|
}
|
|
18041
18274
|
};
|
|
18042
|
-
const store$
|
|
18275
|
+
const store$6 = /*#__PURE__*/createContext(initialState$6);
|
|
18043
18276
|
const {
|
|
18044
|
-
Provider: Provider$
|
|
18045
|
-
} = store$
|
|
18277
|
+
Provider: Provider$6
|
|
18278
|
+
} = store$6;
|
|
18046
18279
|
|
|
18047
18280
|
const CartContainer = ({
|
|
18048
18281
|
style,
|
|
@@ -18133,21 +18366,21 @@ const CartContainer = ({
|
|
|
18133
18366
|
default:
|
|
18134
18367
|
return state;
|
|
18135
18368
|
}
|
|
18136
|
-
}, initialState$
|
|
18369
|
+
}, initialState$6);
|
|
18137
18370
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
18138
18371
|
style: { ...style
|
|
18139
18372
|
},
|
|
18140
18373
|
className: `pelcro-container pelcro-cart-container ${className}`
|
|
18141
|
-
}, /*#__PURE__*/React__default.createElement(Provider$
|
|
18374
|
+
}, /*#__PURE__*/React__default.createElement(Provider$6, {
|
|
18142
18375
|
value: {
|
|
18143
18376
|
state,
|
|
18144
18377
|
dispatch
|
|
18145
18378
|
}
|
|
18146
18379
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
|
|
18147
|
-
store: store$
|
|
18380
|
+
store: store$6,
|
|
18148
18381
|
key: i
|
|
18149
18382
|
})) : /*#__PURE__*/React__default.cloneElement(children, {
|
|
18150
|
-
store: store$
|
|
18383
|
+
store: store$6
|
|
18151
18384
|
})));
|
|
18152
18385
|
};
|
|
18153
18386
|
|
|
@@ -18184,7 +18417,7 @@ const CartSubmit = ({
|
|
|
18184
18417
|
buttonDisabled
|
|
18185
18418
|
},
|
|
18186
18419
|
dispatch
|
|
18187
|
-
} = useContext(store$
|
|
18420
|
+
} = useContext(store$6);
|
|
18188
18421
|
const {
|
|
18189
18422
|
t
|
|
18190
18423
|
} = useTranslation("cart");
|
|
@@ -18215,7 +18448,7 @@ const CartTotalPrice = () => {
|
|
|
18215
18448
|
state: {
|
|
18216
18449
|
alert
|
|
18217
18450
|
}
|
|
18218
|
-
} = useContext(store$
|
|
18451
|
+
} = useContext(store$6);
|
|
18219
18452
|
const {
|
|
18220
18453
|
cartItems
|
|
18221
18454
|
} = usePelcro();
|
|
@@ -18528,7 +18761,7 @@ const OrderConfirmModal = props => {
|
|
|
18528
18761
|
};
|
|
18529
18762
|
OrderConfirmModal.viewId = "order-confirm";
|
|
18530
18763
|
|
|
18531
|
-
const initialState$
|
|
18764
|
+
const initialState$5 = {
|
|
18532
18765
|
email: "",
|
|
18533
18766
|
firstName: "",
|
|
18534
18767
|
lastName: "",
|
|
@@ -18540,10 +18773,10 @@ const initialState$4 = {
|
|
|
18540
18773
|
content: ""
|
|
18541
18774
|
}
|
|
18542
18775
|
};
|
|
18543
|
-
const store$
|
|
18776
|
+
const store$5 = /*#__PURE__*/createContext(initialState$5);
|
|
18544
18777
|
const {
|
|
18545
|
-
Provider: Provider$
|
|
18546
|
-
} = store$
|
|
18778
|
+
Provider: Provider$5
|
|
18779
|
+
} = store$5;
|
|
18547
18780
|
|
|
18548
18781
|
const GiftCreateContainer = ({
|
|
18549
18782
|
style,
|
|
@@ -18647,21 +18880,21 @@ const GiftCreateContainer = ({
|
|
|
18647
18880
|
default:
|
|
18648
18881
|
return state;
|
|
18649
18882
|
}
|
|
18650
|
-
}, initialState$
|
|
18883
|
+
}, initialState$5);
|
|
18651
18884
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
18652
18885
|
style: { ...style
|
|
18653
18886
|
},
|
|
18654
18887
|
className: `pelcro-container pelcro-gift-create-container ${className}`
|
|
18655
|
-
}, /*#__PURE__*/React__default.createElement(Provider$
|
|
18888
|
+
}, /*#__PURE__*/React__default.createElement(Provider$5, {
|
|
18656
18889
|
value: {
|
|
18657
18890
|
state,
|
|
18658
18891
|
dispatch
|
|
18659
18892
|
}
|
|
18660
18893
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
|
|
18661
|
-
store: store$
|
|
18894
|
+
store: store$5,
|
|
18662
18895
|
key: i
|
|
18663
18896
|
})) : /*#__PURE__*/React__default.cloneElement(children, {
|
|
18664
|
-
store: store$
|
|
18897
|
+
store: store$5
|
|
18665
18898
|
})));
|
|
18666
18899
|
};
|
|
18667
18900
|
|
|
@@ -18675,7 +18908,7 @@ const GiftCreateSubmitButton = ({
|
|
|
18675
18908
|
state: {
|
|
18676
18909
|
disableSubmit
|
|
18677
18910
|
}
|
|
18678
|
-
} = useContext(store$
|
|
18911
|
+
} = useContext(store$5);
|
|
18679
18912
|
const {
|
|
18680
18913
|
t
|
|
18681
18914
|
} = useTranslation("register");
|
|
@@ -18692,29 +18925,29 @@ const GiftCreateSubmitButton = ({
|
|
|
18692
18925
|
|
|
18693
18926
|
const GiftCreateEmail = props => /*#__PURE__*/React__default.createElement(Email, Object.assign({
|
|
18694
18927
|
initWithUserEmail: false,
|
|
18695
|
-
store: store$
|
|
18928
|
+
store: store$5
|
|
18696
18929
|
}, props));
|
|
18697
18930
|
|
|
18698
18931
|
const GiftCreateFirstName = props => /*#__PURE__*/React__default.createElement(FirstName, Object.assign({
|
|
18699
|
-
store: store$
|
|
18932
|
+
store: store$5
|
|
18700
18933
|
}, props));
|
|
18701
18934
|
|
|
18702
18935
|
const GiftCreateLastName = props => /*#__PURE__*/React__default.createElement(LastName, Object.assign({
|
|
18703
|
-
store: store$
|
|
18936
|
+
store: store$5
|
|
18704
18937
|
}, props));
|
|
18705
18938
|
|
|
18706
|
-
var _path$
|
|
18939
|
+
var _path$g;
|
|
18707
18940
|
|
|
18708
|
-
function _extends$
|
|
18941
|
+
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); }
|
|
18709
18942
|
|
|
18710
18943
|
function SvgInfoCircle(props) {
|
|
18711
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
18944
|
+
return /*#__PURE__*/React.createElement("svg", _extends$i({
|
|
18712
18945
|
xmlns: "http://www.w3.org/2000/svg",
|
|
18713
18946
|
className: "plc-w-5 plc-h-5",
|
|
18714
18947
|
fill: "none",
|
|
18715
18948
|
viewBox: "0 0 24 24",
|
|
18716
18949
|
stroke: "currentColor"
|
|
18717
|
-
}, props), _path$
|
|
18950
|
+
}, props), _path$g || (_path$g = /*#__PURE__*/React.createElement("path", {
|
|
18718
18951
|
strokeLinecap: "round",
|
|
18719
18952
|
strokeLinejoin: "round",
|
|
18720
18953
|
strokeWidth: 2,
|
|
@@ -18785,7 +19018,7 @@ const GiftCreateStartDate = props => {
|
|
|
18785
19018
|
const {
|
|
18786
19019
|
dispatch,
|
|
18787
19020
|
state
|
|
18788
|
-
} = useContext(store$
|
|
19021
|
+
} = useContext(store$5);
|
|
18789
19022
|
|
|
18790
19023
|
const handleInputChange = value => {
|
|
18791
19024
|
dispatch({
|
|
@@ -18856,7 +19089,7 @@ function GiftCreateMessage(props) {
|
|
|
18856
19089
|
const {
|
|
18857
19090
|
dispatch,
|
|
18858
19091
|
state
|
|
18859
|
-
} = useContext(store$
|
|
19092
|
+
} = useContext(store$5);
|
|
18860
19093
|
|
|
18861
19094
|
const handleInputChange = value => {
|
|
18862
19095
|
dispatch({
|
|
@@ -18872,7 +19105,7 @@ function GiftCreateMessage(props) {
|
|
|
18872
19105
|
return /*#__PURE__*/React__default.createElement(TextArea, Object.assign({
|
|
18873
19106
|
onChange: e => handleInputChange(e.target.value),
|
|
18874
19107
|
value: state.giftMessage,
|
|
18875
|
-
maxLength: "
|
|
19108
|
+
maxLength: "200",
|
|
18876
19109
|
rows: 3,
|
|
18877
19110
|
tooltipText: t("gift.messages.giftMessageInfo")
|
|
18878
19111
|
}, props));
|
|
@@ -18976,7 +19209,7 @@ const GiftCreateModal = ({
|
|
|
18976
19209
|
};
|
|
18977
19210
|
GiftCreateModal.viewId = "gift-create";
|
|
18978
19211
|
|
|
18979
|
-
const initialState$
|
|
19212
|
+
const initialState$4 = {
|
|
18980
19213
|
giftCode: "",
|
|
18981
19214
|
buttonDisabled: true,
|
|
18982
19215
|
alert: {
|
|
@@ -18984,10 +19217,10 @@ const initialState$3 = {
|
|
|
18984
19217
|
content: ""
|
|
18985
19218
|
}
|
|
18986
19219
|
};
|
|
18987
|
-
const store$
|
|
19220
|
+
const store$4 = /*#__PURE__*/createContext(initialState$4);
|
|
18988
19221
|
const {
|
|
18989
|
-
Provider: Provider$
|
|
18990
|
-
} = store$
|
|
19222
|
+
Provider: Provider$4
|
|
19223
|
+
} = store$4;
|
|
18991
19224
|
|
|
18992
19225
|
const GiftRedeemContainer = ({
|
|
18993
19226
|
style,
|
|
@@ -19052,21 +19285,21 @@ const GiftRedeemContainer = ({
|
|
|
19052
19285
|
default:
|
|
19053
19286
|
return state;
|
|
19054
19287
|
}
|
|
19055
|
-
}, initialState$
|
|
19288
|
+
}, initialState$4);
|
|
19056
19289
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
19057
19290
|
style: { ...style
|
|
19058
19291
|
},
|
|
19059
19292
|
className: `pelcro-container pelcro-gift-redeem-container ${className}`
|
|
19060
|
-
}, /*#__PURE__*/React__default.createElement(Provider$
|
|
19293
|
+
}, /*#__PURE__*/React__default.createElement(Provider$4, {
|
|
19061
19294
|
value: {
|
|
19062
19295
|
state,
|
|
19063
19296
|
dispatch
|
|
19064
19297
|
}
|
|
19065
19298
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
|
|
19066
|
-
store: store$
|
|
19299
|
+
store: store$4,
|
|
19067
19300
|
key: i
|
|
19068
19301
|
})) : /*#__PURE__*/React__default.cloneElement(children, {
|
|
19069
|
-
store: store$
|
|
19302
|
+
store: store$4
|
|
19070
19303
|
})));
|
|
19071
19304
|
};
|
|
19072
19305
|
|
|
@@ -19103,7 +19336,7 @@ function GiftCode({
|
|
|
19103
19336
|
}
|
|
19104
19337
|
|
|
19105
19338
|
const GiftRedeemCode = props => /*#__PURE__*/React__default.createElement(GiftCode, Object.assign({
|
|
19106
|
-
store: store$
|
|
19339
|
+
store: store$4
|
|
19107
19340
|
}, props));
|
|
19108
19341
|
|
|
19109
19342
|
const GiftRedeemSubmitButton = ({
|
|
@@ -19116,7 +19349,7 @@ const GiftRedeemSubmitButton = ({
|
|
|
19116
19349
|
state: {
|
|
19117
19350
|
disableSubmit
|
|
19118
19351
|
}
|
|
19119
|
-
} = useContext(store$
|
|
19352
|
+
} = useContext(store$4);
|
|
19120
19353
|
const {
|
|
19121
19354
|
t
|
|
19122
19355
|
} = useTranslation("register");
|
|
@@ -19209,7 +19442,7 @@ const moveDefaultAddressToStart = addresses => {
|
|
|
19209
19442
|
return [defaultAddress, ...addressesWithoutDefault];
|
|
19210
19443
|
};
|
|
19211
19444
|
|
|
19212
|
-
const initialState$
|
|
19445
|
+
const initialState$3 = {
|
|
19213
19446
|
addresses: [],
|
|
19214
19447
|
selectedAddressId: null,
|
|
19215
19448
|
isSubmitting: false,
|
|
@@ -19218,10 +19451,10 @@ const initialState$2 = {
|
|
|
19218
19451
|
content: ""
|
|
19219
19452
|
}
|
|
19220
19453
|
};
|
|
19221
|
-
const store$
|
|
19454
|
+
const store$3 = /*#__PURE__*/createContext(initialState$3);
|
|
19222
19455
|
const {
|
|
19223
|
-
Provider: Provider$
|
|
19224
|
-
} = store$
|
|
19456
|
+
Provider: Provider$3
|
|
19457
|
+
} = store$3;
|
|
19225
19458
|
|
|
19226
19459
|
const AddressSelectContainer = ({
|
|
19227
19460
|
style,
|
|
@@ -19316,7 +19549,7 @@ const AddressSelectContainer = ({
|
|
|
19316
19549
|
default:
|
|
19317
19550
|
return state;
|
|
19318
19551
|
}
|
|
19319
|
-
}, initialState$
|
|
19552
|
+
}, initialState$3);
|
|
19320
19553
|
useEffect(() => {
|
|
19321
19554
|
var _window$Pelcro$user$r;
|
|
19322
19555
|
|
|
@@ -19329,16 +19562,16 @@ const AddressSelectContainer = ({
|
|
|
19329
19562
|
style: { ...style
|
|
19330
19563
|
},
|
|
19331
19564
|
className: `pelcro-container pelcro-address-select-container ${className}`
|
|
19332
|
-
}, /*#__PURE__*/React__default.createElement(Provider$
|
|
19565
|
+
}, /*#__PURE__*/React__default.createElement(Provider$3, {
|
|
19333
19566
|
value: {
|
|
19334
19567
|
state,
|
|
19335
19568
|
dispatch
|
|
19336
19569
|
}
|
|
19337
19570
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
|
|
19338
|
-
store: store$
|
|
19571
|
+
store: store$3,
|
|
19339
19572
|
key: i
|
|
19340
19573
|
})) : /*#__PURE__*/React__default.cloneElement(children, {
|
|
19341
|
-
store: store$
|
|
19574
|
+
store: store$3
|
|
19342
19575
|
})));
|
|
19343
19576
|
};
|
|
19344
19577
|
|
|
@@ -19349,7 +19582,7 @@ const AddressSelectList = () => {
|
|
|
19349
19582
|
addresses,
|
|
19350
19583
|
selectedAddressId
|
|
19351
19584
|
}
|
|
19352
|
-
} = useContext(store$
|
|
19585
|
+
} = useContext(store$3);
|
|
19353
19586
|
|
|
19354
19587
|
const handleAddressSelect = event => {
|
|
19355
19588
|
dispatch({
|
|
@@ -19393,7 +19626,7 @@ const AddressSelectSubmit = ({
|
|
|
19393
19626
|
selectedAddressId,
|
|
19394
19627
|
isSubmitting
|
|
19395
19628
|
}
|
|
19396
|
-
} = useContext(store$
|
|
19629
|
+
} = useContext(store$3);
|
|
19397
19630
|
const {
|
|
19398
19631
|
t
|
|
19399
19632
|
} = useTranslation("address");
|
|
@@ -19484,7 +19717,7 @@ const moveDefaultPaymentMethodToStart = paymentMethods => {
|
|
|
19484
19717
|
return [defaultPaymentMethod, ...paymentMethodsWithoutDefault];
|
|
19485
19718
|
};
|
|
19486
19719
|
|
|
19487
|
-
const initialState$
|
|
19720
|
+
const initialState$2 = {
|
|
19488
19721
|
paymentMethods: [],
|
|
19489
19722
|
selectedPaymentMethodId: null,
|
|
19490
19723
|
isSubmitting: false,
|
|
@@ -19493,10 +19726,10 @@ const initialState$1 = {
|
|
|
19493
19726
|
content: ""
|
|
19494
19727
|
}
|
|
19495
19728
|
};
|
|
19496
|
-
const store$
|
|
19729
|
+
const store$2 = /*#__PURE__*/createContext(initialState$2);
|
|
19497
19730
|
const {
|
|
19498
|
-
Provider: Provider$
|
|
19499
|
-
} = store$
|
|
19731
|
+
Provider: Provider$2
|
|
19732
|
+
} = store$2;
|
|
19500
19733
|
|
|
19501
19734
|
const PaymentMethodSelectContainer = ({
|
|
19502
19735
|
style,
|
|
@@ -19541,7 +19774,7 @@ const PaymentMethodSelectContainer = ({
|
|
|
19541
19774
|
default:
|
|
19542
19775
|
return state;
|
|
19543
19776
|
}
|
|
19544
|
-
}, initialState$
|
|
19777
|
+
}, initialState$2);
|
|
19545
19778
|
useEffect(() => {
|
|
19546
19779
|
var _window$Pelcro$user$r4;
|
|
19547
19780
|
|
|
@@ -19554,16 +19787,16 @@ const PaymentMethodSelectContainer = ({
|
|
|
19554
19787
|
style: { ...style
|
|
19555
19788
|
},
|
|
19556
19789
|
className: `pelcro-container pelcro-payment-select-container ${className}`
|
|
19557
|
-
}, /*#__PURE__*/React__default.createElement(Provider$
|
|
19790
|
+
}, /*#__PURE__*/React__default.createElement(Provider$2, {
|
|
19558
19791
|
value: {
|
|
19559
19792
|
state,
|
|
19560
19793
|
dispatch
|
|
19561
19794
|
}
|
|
19562
19795
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
|
|
19563
|
-
store: store$
|
|
19796
|
+
store: store$2,
|
|
19564
19797
|
key: i
|
|
19565
19798
|
})) : /*#__PURE__*/React__default.cloneElement(children, {
|
|
19566
|
-
store: store$
|
|
19799
|
+
store: store$2
|
|
19567
19800
|
})));
|
|
19568
19801
|
};
|
|
19569
19802
|
|
|
@@ -19577,7 +19810,7 @@ const PaymentMethodSelectList = () => {
|
|
|
19577
19810
|
paymentMethods,
|
|
19578
19811
|
selectedPaymentMethodId
|
|
19579
19812
|
}
|
|
19580
|
-
} = useContext(store$
|
|
19813
|
+
} = useContext(store$2);
|
|
19581
19814
|
|
|
19582
19815
|
const handlePaymentMethodSelect = event => {
|
|
19583
19816
|
dispatch({
|
|
@@ -19627,7 +19860,7 @@ const PaymentMethodSelectSubmit = ({
|
|
|
19627
19860
|
selectedPaymentMethodId,
|
|
19628
19861
|
isSubmitting
|
|
19629
19862
|
}
|
|
19630
|
-
} = useContext(store$
|
|
19863
|
+
} = useContext(store$2);
|
|
19631
19864
|
return /*#__PURE__*/React__default.createElement(Button, Object.assign({
|
|
19632
19865
|
onClick: () => {
|
|
19633
19866
|
dispatch({
|
|
@@ -19701,8 +19934,8 @@ const PaymentMethodSelectModal = ({
|
|
|
19701
19934
|
};
|
|
19702
19935
|
PaymentMethodSelectModal.viewId = "payment-method-select";
|
|
19703
19936
|
|
|
19704
|
-
function _extends$
|
|
19705
|
-
_extends$
|
|
19937
|
+
function _extends$h() {
|
|
19938
|
+
_extends$h = Object.assign || function (target) {
|
|
19706
19939
|
for (var i = 1; i < arguments.length; i++) {
|
|
19707
19940
|
var source = arguments[i];
|
|
19708
19941
|
|
|
@@ -19716,7 +19949,7 @@ function _extends$f() {
|
|
|
19716
19949
|
return target;
|
|
19717
19950
|
};
|
|
19718
19951
|
|
|
19719
|
-
return _extends$
|
|
19952
|
+
return _extends$h.apply(this, arguments);
|
|
19720
19953
|
}
|
|
19721
19954
|
|
|
19722
19955
|
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
@@ -19900,7 +20133,7 @@ function render(props, propsBag, defaultTag, features, visible) {
|
|
|
19900
20133
|
return match(strategy, (_match = {}, _match[RenderStrategy.Unmount] = function () {
|
|
19901
20134
|
return null;
|
|
19902
20135
|
}, _match[RenderStrategy.Hidden] = function () {
|
|
19903
|
-
return _render(_extends$
|
|
20136
|
+
return _render(_extends$h({}, _rest, {
|
|
19904
20137
|
hidden: true,
|
|
19905
20138
|
style: {
|
|
19906
20139
|
display: 'none'
|
|
@@ -20428,7 +20661,7 @@ function TransitionChild(props) {
|
|
|
20428
20661
|
var passthroughProps = rest;
|
|
20429
20662
|
return React__default.createElement(NestingContext.Provider, {
|
|
20430
20663
|
value: nesting
|
|
20431
|
-
}, render(_extends$
|
|
20664
|
+
}, render(_extends$h({}, passthroughProps, propsWeControl), propsBag, DEFAULT_TRANSITION_CHILD_TAG, TransitionChildRenderFeatures, state === TreeStates.Visible));
|
|
20432
20665
|
}
|
|
20433
20666
|
|
|
20434
20667
|
function Transition(props) {
|
|
@@ -20472,7 +20705,7 @@ function Transition(props) {
|
|
|
20472
20705
|
value: nestingBag
|
|
20473
20706
|
}, React__default.createElement(TransitionContext.Provider, {
|
|
20474
20707
|
value: transitionBag
|
|
20475
|
-
}, render(_extends$
|
|
20708
|
+
}, render(_extends$h({}, sharedProps, {
|
|
20476
20709
|
as: Fragment,
|
|
20477
20710
|
children: React__default.createElement(TransitionChild, Object.assign({}, sharedProps, passthroughProps))
|
|
20478
20711
|
}), propsBag, Fragment, TransitionChildRenderFeatures, state === TreeStates.Visible)));
|
|
@@ -20599,12 +20832,12 @@ var ActionTypes;
|
|
|
20599
20832
|
})(ActionTypes || (ActionTypes = {}));
|
|
20600
20833
|
|
|
20601
20834
|
(_reducers = {}, _reducers[ActionTypes.CloseMenu] = function (state) {
|
|
20602
|
-
return _extends$
|
|
20835
|
+
return _extends$h({}, state, {
|
|
20603
20836
|
activeItemIndex: null,
|
|
20604
20837
|
menuState: MenuStates.Closed
|
|
20605
20838
|
});
|
|
20606
20839
|
}, _reducers[ActionTypes.OpenMenu] = function (state) {
|
|
20607
|
-
return _extends$
|
|
20840
|
+
return _extends$h({}, state, {
|
|
20608
20841
|
menuState: MenuStates.Open
|
|
20609
20842
|
});
|
|
20610
20843
|
}, _reducers[ActionTypes.GoToItem] = function (state, action) {
|
|
@@ -20623,7 +20856,7 @@ var ActionTypes;
|
|
|
20623
20856
|
}
|
|
20624
20857
|
});
|
|
20625
20858
|
if (state.searchQuery === '' && state.activeItemIndex === activeItemIndex) return state;
|
|
20626
|
-
return _extends$
|
|
20859
|
+
return _extends$h({}, state, {
|
|
20627
20860
|
searchQuery: '',
|
|
20628
20861
|
activeItemIndex: activeItemIndex
|
|
20629
20862
|
});
|
|
@@ -20634,19 +20867,19 @@ var ActionTypes;
|
|
|
20634
20867
|
|
|
20635
20868
|
return ((_item$dataRef$current = item.dataRef.current.textValue) == null ? void 0 : _item$dataRef$current.startsWith(searchQuery)) && !item.dataRef.current.disabled;
|
|
20636
20869
|
});
|
|
20637
|
-
if (match === -1 || match === state.activeItemIndex) return _extends$
|
|
20870
|
+
if (match === -1 || match === state.activeItemIndex) return _extends$h({}, state, {
|
|
20638
20871
|
searchQuery: searchQuery
|
|
20639
20872
|
});
|
|
20640
|
-
return _extends$
|
|
20873
|
+
return _extends$h({}, state, {
|
|
20641
20874
|
searchQuery: searchQuery,
|
|
20642
20875
|
activeItemIndex: match
|
|
20643
20876
|
});
|
|
20644
20877
|
}, _reducers[ActionTypes.ClearSearch] = function (state) {
|
|
20645
|
-
return _extends$
|
|
20878
|
+
return _extends$h({}, state, {
|
|
20646
20879
|
searchQuery: ''
|
|
20647
20880
|
});
|
|
20648
20881
|
}, _reducers[ActionTypes.RegisterItem] = function (state, action) {
|
|
20649
|
-
return _extends$
|
|
20882
|
+
return _extends$h({}, state, {
|
|
20650
20883
|
items: [].concat(state.items, [{
|
|
20651
20884
|
id: action.id,
|
|
20652
20885
|
dataRef: action.dataRef
|
|
@@ -20659,7 +20892,7 @@ var ActionTypes;
|
|
|
20659
20892
|
return a.id === action.id;
|
|
20660
20893
|
});
|
|
20661
20894
|
if (idx !== -1) nextItems.splice(idx, 1);
|
|
20662
|
-
return _extends$
|
|
20895
|
+
return _extends$h({}, state, {
|
|
20663
20896
|
items: nextItems,
|
|
20664
20897
|
activeItemIndex: function () {
|
|
20665
20898
|
if (idx === state.activeItemIndex) return null;
|
|
@@ -20698,19 +20931,19 @@ var ActionTypes$1;
|
|
|
20698
20931
|
(_reducers$1 = {}, _reducers$1[ActionTypes$1.CloseListbox] = function (state) {
|
|
20699
20932
|
if (state.disabled) return state;
|
|
20700
20933
|
if (state.listboxState === ListboxStates.Closed) return state;
|
|
20701
|
-
return _extends$
|
|
20934
|
+
return _extends$h({}, state, {
|
|
20702
20935
|
activeOptionIndex: null,
|
|
20703
20936
|
listboxState: ListboxStates.Closed
|
|
20704
20937
|
});
|
|
20705
20938
|
}, _reducers$1[ActionTypes$1.OpenListbox] = function (state) {
|
|
20706
20939
|
if (state.disabled) return state;
|
|
20707
20940
|
if (state.listboxState === ListboxStates.Open) return state;
|
|
20708
|
-
return _extends$
|
|
20941
|
+
return _extends$h({}, state, {
|
|
20709
20942
|
listboxState: ListboxStates.Open
|
|
20710
20943
|
});
|
|
20711
20944
|
}, _reducers$1[ActionTypes$1.SetDisabled] = function (state, action) {
|
|
20712
20945
|
if (state.disabled === action.disabled) return state;
|
|
20713
|
-
return _extends$
|
|
20946
|
+
return _extends$h({}, state, {
|
|
20714
20947
|
disabled: action.disabled
|
|
20715
20948
|
});
|
|
20716
20949
|
}, _reducers$1[ActionTypes$1.GoToOption] = function (state, action) {
|
|
@@ -20731,7 +20964,7 @@ var ActionTypes$1;
|
|
|
20731
20964
|
}
|
|
20732
20965
|
});
|
|
20733
20966
|
if (state.searchQuery === '' && state.activeOptionIndex === activeOptionIndex) return state;
|
|
20734
|
-
return _extends$
|
|
20967
|
+
return _extends$h({}, state, {
|
|
20735
20968
|
searchQuery: '',
|
|
20736
20969
|
activeOptionIndex: activeOptionIndex
|
|
20737
20970
|
});
|
|
@@ -20744,10 +20977,10 @@ var ActionTypes$1;
|
|
|
20744
20977
|
|
|
20745
20978
|
return !option.dataRef.current.disabled && ((_option$dataRef$curre = option.dataRef.current.textValue) == null ? void 0 : _option$dataRef$curre.startsWith(searchQuery));
|
|
20746
20979
|
});
|
|
20747
|
-
if (match === -1 || match === state.activeOptionIndex) return _extends$
|
|
20980
|
+
if (match === -1 || match === state.activeOptionIndex) return _extends$h({}, state, {
|
|
20748
20981
|
searchQuery: searchQuery
|
|
20749
20982
|
});
|
|
20750
|
-
return _extends$
|
|
20983
|
+
return _extends$h({}, state, {
|
|
20751
20984
|
searchQuery: searchQuery,
|
|
20752
20985
|
activeOptionIndex: match
|
|
20753
20986
|
});
|
|
@@ -20755,11 +20988,11 @@ var ActionTypes$1;
|
|
|
20755
20988
|
if (state.disabled) return state;
|
|
20756
20989
|
if (state.listboxState === ListboxStates.Closed) return state;
|
|
20757
20990
|
if (state.searchQuery === '') return state;
|
|
20758
|
-
return _extends$
|
|
20991
|
+
return _extends$h({}, state, {
|
|
20759
20992
|
searchQuery: ''
|
|
20760
20993
|
});
|
|
20761
20994
|
}, _reducers$1[ActionTypes$1.RegisterOption] = function (state, action) {
|
|
20762
|
-
return _extends$
|
|
20995
|
+
return _extends$h({}, state, {
|
|
20763
20996
|
options: [].concat(state.options, [{
|
|
20764
20997
|
id: action.id,
|
|
20765
20998
|
dataRef: action.dataRef
|
|
@@ -20772,7 +21005,7 @@ var ActionTypes$1;
|
|
|
20772
21005
|
return a.id === action.id;
|
|
20773
21006
|
});
|
|
20774
21007
|
if (idx !== -1) nextOptions.splice(idx, 1);
|
|
20775
|
-
return _extends$
|
|
21008
|
+
return _extends$h({}, state, {
|
|
20776
21009
|
options: nextOptions,
|
|
20777
21010
|
activeOptionIndex: function () {
|
|
20778
21011
|
if (idx === state.activeOptionIndex) return null;
|
|
@@ -20833,18 +21066,18 @@ const getPaymentCardIcon = name => {
|
|
|
20833
21066
|
}));
|
|
20834
21067
|
};
|
|
20835
21068
|
|
|
20836
|
-
var _path$
|
|
21069
|
+
var _path$f;
|
|
20837
21070
|
|
|
20838
|
-
function _extends$
|
|
21071
|
+
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); }
|
|
20839
21072
|
|
|
20840
21073
|
function SvgChevronRight(props) {
|
|
20841
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
21074
|
+
return /*#__PURE__*/React.createElement("svg", _extends$g({
|
|
20842
21075
|
className: "plc-w-6 plc-h-6",
|
|
20843
21076
|
xmlns: "http://www.w3.org/2000/svg",
|
|
20844
21077
|
fill: "none",
|
|
20845
21078
|
viewBox: "0 0 24 24",
|
|
20846
21079
|
stroke: "currentColor"
|
|
20847
|
-
}, props), _path$
|
|
21080
|
+
}, props), _path$f || (_path$f = /*#__PURE__*/React.createElement("path", {
|
|
20848
21081
|
strokeLinecap: "round",
|
|
20849
21082
|
strokeLinejoin: "round",
|
|
20850
21083
|
strokeWidth: 2,
|
|
@@ -21060,18 +21293,18 @@ const SavedItems = ({
|
|
|
21060
21293
|
});
|
|
21061
21294
|
};
|
|
21062
21295
|
|
|
21063
|
-
var _path$
|
|
21296
|
+
var _path$e;
|
|
21064
21297
|
|
|
21065
|
-
function _extends$
|
|
21298
|
+
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); }
|
|
21066
21299
|
|
|
21067
21300
|
function SvgRefresh(props) {
|
|
21068
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
21301
|
+
return /*#__PURE__*/React.createElement("svg", _extends$f({
|
|
21069
21302
|
className: "plc-w-4 plc-h-4 plc-mr-1",
|
|
21070
21303
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21071
21304
|
fill: "none",
|
|
21072
21305
|
viewBox: "0 0 24 24",
|
|
21073
21306
|
stroke: "currentColor"
|
|
21074
|
-
}, props), _path$
|
|
21307
|
+
}, props), _path$e || (_path$e = /*#__PURE__*/React.createElement("path", {
|
|
21075
21308
|
strokeLinecap: "round",
|
|
21076
21309
|
strokeLinejoin: "round",
|
|
21077
21310
|
strokeWidth: 2,
|
|
@@ -21079,35 +21312,35 @@ function SvgRefresh(props) {
|
|
|
21079
21312
|
})));
|
|
21080
21313
|
}
|
|
21081
21314
|
|
|
21082
|
-
var _path$
|
|
21315
|
+
var _path$d;
|
|
21083
21316
|
|
|
21084
|
-
function _extends$
|
|
21317
|
+
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); }
|
|
21085
21318
|
|
|
21086
21319
|
function SvgCalendar(props) {
|
|
21087
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
21320
|
+
return /*#__PURE__*/React.createElement("svg", _extends$e({
|
|
21088
21321
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21089
21322
|
className: "plc-h-4 plc-w-4 plc-mr-1",
|
|
21090
21323
|
viewBox: "0 0 20 20",
|
|
21091
21324
|
fill: "currentColor"
|
|
21092
|
-
}, props), _path$
|
|
21325
|
+
}, props), _path$d || (_path$d = /*#__PURE__*/React.createElement("path", {
|
|
21093
21326
|
fillRule: "evenodd",
|
|
21094
21327
|
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",
|
|
21095
21328
|
clipRule: "evenodd"
|
|
21096
21329
|
})));
|
|
21097
21330
|
}
|
|
21098
21331
|
|
|
21099
|
-
var _path$
|
|
21332
|
+
var _path$c;
|
|
21100
21333
|
|
|
21101
|
-
function _extends$
|
|
21334
|
+
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); }
|
|
21102
21335
|
|
|
21103
21336
|
function SvgPlus(props) {
|
|
21104
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
21337
|
+
return /*#__PURE__*/React.createElement("svg", _extends$d({
|
|
21105
21338
|
className: "plc-w-5 plc-h-5",
|
|
21106
21339
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21107
21340
|
fill: "none",
|
|
21108
21341
|
viewBox: "0 0 24 24",
|
|
21109
21342
|
stroke: "currentColor"
|
|
21110
|
-
}, props), _path$
|
|
21343
|
+
}, props), _path$c || (_path$c = /*#__PURE__*/React.createElement("path", {
|
|
21111
21344
|
strokeLinecap: "round",
|
|
21112
21345
|
strokeLinejoin: "round",
|
|
21113
21346
|
strokeWidth: 2,
|
|
@@ -21115,17 +21348,17 @@ function SvgPlus(props) {
|
|
|
21115
21348
|
})));
|
|
21116
21349
|
}
|
|
21117
21350
|
|
|
21118
|
-
var _path$
|
|
21351
|
+
var _path$b;
|
|
21119
21352
|
|
|
21120
|
-
function _extends$
|
|
21353
|
+
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); }
|
|
21121
21354
|
|
|
21122
21355
|
function SvgCheckMark(props) {
|
|
21123
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
21356
|
+
return /*#__PURE__*/React.createElement("svg", _extends$c({
|
|
21124
21357
|
className: "plc-w-4 plc-h-4 plc-mr-1",
|
|
21125
21358
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21126
21359
|
viewBox: "0 0 20 20",
|
|
21127
21360
|
fill: "currentColor"
|
|
21128
|
-
}, props), _path$
|
|
21361
|
+
}, props), _path$b || (_path$b = /*#__PURE__*/React.createElement("path", {
|
|
21129
21362
|
fillRule: "evenodd",
|
|
21130
21363
|
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",
|
|
21131
21364
|
clipRule: "evenodd"
|
|
@@ -21187,9 +21420,9 @@ const SubscriptionsItems = ({
|
|
|
21187
21420
|
const {
|
|
21188
21421
|
t
|
|
21189
21422
|
} = useTranslation("dashboard");
|
|
21190
|
-
const subs =
|
|
21191
|
-
if (
|
|
21192
|
-
return
|
|
21423
|
+
const subs = getNonDonationSubs();
|
|
21424
|
+
if (subs.length === 0) return null;
|
|
21425
|
+
return subs.sort((a, b) => a.expires_at - b.expires_at).sort((a, b) => a.renews_at - b.renews_at).map(sub => {
|
|
21193
21426
|
const isActive = activeMenu === sub.id; // Cancel button click handlers
|
|
21194
21427
|
|
|
21195
21428
|
const onCancelClick = () => {
|
|
@@ -21320,6 +21553,12 @@ const SubscriptionsItems = ({
|
|
|
21320
21553
|
});
|
|
21321
21554
|
};
|
|
21322
21555
|
|
|
21556
|
+
function getNonDonationSubs() {
|
|
21557
|
+
var _window$Pelcro$subscr, _window$Pelcro$subscr2, _window$Pelcro$subscr3;
|
|
21558
|
+
|
|
21559
|
+
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 : [];
|
|
21560
|
+
}
|
|
21561
|
+
|
|
21323
21562
|
/**
|
|
21324
21563
|
* @typedef {Object} AccordionPropsType
|
|
21325
21564
|
* @property {string} initialActiveMenu the initial active menu
|
|
@@ -21402,18 +21641,18 @@ Accordion.item = function AccordionItem({
|
|
|
21402
21641
|
}, content)) : null;
|
|
21403
21642
|
};
|
|
21404
21643
|
|
|
21405
|
-
var _path$
|
|
21644
|
+
var _path$a;
|
|
21406
21645
|
|
|
21407
|
-
function _extends$
|
|
21646
|
+
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); }
|
|
21408
21647
|
|
|
21409
21648
|
function SvgExit(props) {
|
|
21410
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
21649
|
+
return /*#__PURE__*/React.createElement("svg", _extends$b({
|
|
21411
21650
|
className: "plc-w-6 plc-h-6",
|
|
21412
21651
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21413
21652
|
fill: "none",
|
|
21414
21653
|
viewBox: "0 0 24 24",
|
|
21415
21654
|
stroke: "currentColor"
|
|
21416
|
-
}, props), _path$
|
|
21655
|
+
}, props), _path$a || (_path$a = /*#__PURE__*/React.createElement("path", {
|
|
21417
21656
|
strokeLinecap: "round",
|
|
21418
21657
|
strokeLinejoin: "round",
|
|
21419
21658
|
strokeWidth: 2,
|
|
@@ -21421,17 +21660,17 @@ function SvgExit(props) {
|
|
|
21421
21660
|
})));
|
|
21422
21661
|
}
|
|
21423
21662
|
|
|
21424
|
-
var _path$
|
|
21663
|
+
var _path$9;
|
|
21425
21664
|
|
|
21426
|
-
function _extends$
|
|
21665
|
+
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); }
|
|
21427
21666
|
|
|
21428
21667
|
function SvgUser(props) {
|
|
21429
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
21668
|
+
return /*#__PURE__*/React.createElement("svg", _extends$a({
|
|
21430
21669
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21431
21670
|
fill: "none",
|
|
21432
21671
|
viewBox: "0 0 24 24",
|
|
21433
21672
|
stroke: "currentColor"
|
|
21434
|
-
}, props), _path$
|
|
21673
|
+
}, props), _path$9 || (_path$9 = /*#__PURE__*/React.createElement("path", {
|
|
21435
21674
|
strokeLinecap: "round",
|
|
21436
21675
|
strokeLinejoin: "round",
|
|
21437
21676
|
strokeWidth: 2,
|
|
@@ -21439,18 +21678,18 @@ function SvgUser(props) {
|
|
|
21439
21678
|
})));
|
|
21440
21679
|
}
|
|
21441
21680
|
|
|
21442
|
-
var _path$
|
|
21681
|
+
var _path$8;
|
|
21443
21682
|
|
|
21444
|
-
function _extends$
|
|
21683
|
+
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); }
|
|
21445
21684
|
|
|
21446
21685
|
function SvgNewsletter(props) {
|
|
21447
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
21686
|
+
return /*#__PURE__*/React.createElement("svg", _extends$9({
|
|
21448
21687
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21449
21688
|
className: "plc-h-5 plc-w-5",
|
|
21450
21689
|
fill: "none",
|
|
21451
21690
|
viewBox: "0 0 24 24",
|
|
21452
21691
|
stroke: "currentColor"
|
|
21453
|
-
}, props), _path$
|
|
21692
|
+
}, props), _path$8 || (_path$8 = /*#__PURE__*/React.createElement("path", {
|
|
21454
21693
|
strokeLinecap: "round",
|
|
21455
21694
|
strokeLinejoin: "round",
|
|
21456
21695
|
strokeWidth: 2,
|
|
@@ -21458,18 +21697,18 @@ function SvgNewsletter(props) {
|
|
|
21458
21697
|
})));
|
|
21459
21698
|
}
|
|
21460
21699
|
|
|
21461
|
-
var _path$
|
|
21700
|
+
var _path$7;
|
|
21462
21701
|
|
|
21463
|
-
function _extends$
|
|
21702
|
+
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); }
|
|
21464
21703
|
|
|
21465
21704
|
function SvgPaymentCard(props) {
|
|
21466
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
21705
|
+
return /*#__PURE__*/React.createElement("svg", _extends$8({
|
|
21467
21706
|
className: "plc-w-6 plc-h-6 plc-mr-2",
|
|
21468
21707
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21469
21708
|
fill: "none",
|
|
21470
21709
|
viewBox: "0 0 24 24",
|
|
21471
21710
|
stroke: "currentColor"
|
|
21472
|
-
}, props), _path$
|
|
21711
|
+
}, props), _path$7 || (_path$7 = /*#__PURE__*/React.createElement("path", {
|
|
21473
21712
|
strokeLinecap: "round",
|
|
21474
21713
|
strokeLinejoin: "round",
|
|
21475
21714
|
strokeWidth: 2,
|
|
@@ -21477,23 +21716,23 @@ function SvgPaymentCard(props) {
|
|
|
21477
21716
|
})));
|
|
21478
21717
|
}
|
|
21479
21718
|
|
|
21480
|
-
var _path$
|
|
21719
|
+
var _path$6, _path2$1;
|
|
21481
21720
|
|
|
21482
|
-
function _extends$
|
|
21721
|
+
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); }
|
|
21483
21722
|
|
|
21484
21723
|
function SvgLocationPin(props) {
|
|
21485
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
21724
|
+
return /*#__PURE__*/React.createElement("svg", _extends$7({
|
|
21486
21725
|
className: "plc-w-6 plc-h-6 plc-mr-2",
|
|
21487
21726
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21488
21727
|
fill: "none",
|
|
21489
21728
|
viewBox: "0 0 24 24",
|
|
21490
21729
|
stroke: "currentColor"
|
|
21491
|
-
}, props), _path$
|
|
21730
|
+
}, props), _path$6 || (_path$6 = /*#__PURE__*/React.createElement("path", {
|
|
21492
21731
|
strokeLinecap: "round",
|
|
21493
21732
|
strokeLinejoin: "round",
|
|
21494
21733
|
strokeWidth: 2,
|
|
21495
21734
|
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"
|
|
21496
|
-
})), _path2 || (_path2 = /*#__PURE__*/React.createElement("path", {
|
|
21735
|
+
})), _path2$1 || (_path2$1 = /*#__PURE__*/React.createElement("path", {
|
|
21497
21736
|
strokeLinecap: "round",
|
|
21498
21737
|
strokeLinejoin: "round",
|
|
21499
21738
|
strokeWidth: 2,
|
|
@@ -21503,10 +21742,10 @@ function SvgLocationPin(props) {
|
|
|
21503
21742
|
|
|
21504
21743
|
var _switch;
|
|
21505
21744
|
|
|
21506
|
-
function _extends$
|
|
21745
|
+
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); }
|
|
21507
21746
|
|
|
21508
21747
|
function SvgSubscription(props) {
|
|
21509
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
21748
|
+
return /*#__PURE__*/React.createElement("svg", _extends$6({
|
|
21510
21749
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21511
21750
|
viewBox: "0 0 100 125",
|
|
21512
21751
|
fill: "currentColor"
|
|
@@ -21521,18 +21760,18 @@ function SvgSubscription(props) {
|
|
|
21521
21760
|
}))))));
|
|
21522
21761
|
}
|
|
21523
21762
|
|
|
21524
|
-
var _path$
|
|
21763
|
+
var _path$5;
|
|
21525
21764
|
|
|
21526
|
-
function _extends$
|
|
21765
|
+
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); }
|
|
21527
21766
|
|
|
21528
21767
|
function SvgShopping(props) {
|
|
21529
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
21768
|
+
return /*#__PURE__*/React.createElement("svg", _extends$5({
|
|
21530
21769
|
className: "plc-w-6 plc-h-6 plc-mr-2",
|
|
21531
21770
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21532
21771
|
fill: "none",
|
|
21533
21772
|
viewBox: "0 0 24 24",
|
|
21534
21773
|
stroke: "currentColor"
|
|
21535
|
-
}, props), _path$
|
|
21774
|
+
}, props), _path$5 || (_path$5 = /*#__PURE__*/React.createElement("path", {
|
|
21536
21775
|
strokeLinecap: "round",
|
|
21537
21776
|
strokeLinejoin: "round",
|
|
21538
21777
|
strokeWidth: 2,
|
|
@@ -21540,18 +21779,18 @@ function SvgShopping(props) {
|
|
|
21540
21779
|
})));
|
|
21541
21780
|
}
|
|
21542
21781
|
|
|
21543
|
-
var _path$
|
|
21782
|
+
var _path$4;
|
|
21544
21783
|
|
|
21545
|
-
function _extends$
|
|
21784
|
+
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); }
|
|
21546
21785
|
|
|
21547
21786
|
function SvgBookmark(props) {
|
|
21548
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
21787
|
+
return /*#__PURE__*/React.createElement("svg", _extends$4({
|
|
21549
21788
|
className: "plc-w-6 plc-h-6 plc-mr-2",
|
|
21550
21789
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21551
21790
|
fill: "none",
|
|
21552
21791
|
viewBox: "0 0 24 24",
|
|
21553
21792
|
stroke: "currentColor"
|
|
21554
|
-
}, props), _path$
|
|
21793
|
+
}, props), _path$4 || (_path$4 = /*#__PURE__*/React.createElement("path", {
|
|
21555
21794
|
strokeLinecap: "round",
|
|
21556
21795
|
strokeLinejoin: "round",
|
|
21557
21796
|
strokeWidth: 2,
|
|
@@ -21559,25 +21798,83 @@ function SvgBookmark(props) {
|
|
|
21559
21798
|
})));
|
|
21560
21799
|
}
|
|
21561
21800
|
|
|
21562
|
-
var _path$
|
|
21801
|
+
var _path$3;
|
|
21563
21802
|
|
|
21564
|
-
function _extends$
|
|
21803
|
+
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); }
|
|
21565
21804
|
|
|
21566
21805
|
function SvgKey(props) {
|
|
21567
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
21806
|
+
return /*#__PURE__*/React.createElement("svg", _extends$3({
|
|
21568
21807
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21569
21808
|
viewBox: "0 0 20 20",
|
|
21570
21809
|
fill: "currentColor"
|
|
21571
|
-
}, props), _path$
|
|
21810
|
+
}, props), _path$3 || (_path$3 = /*#__PURE__*/React.createElement("path", {
|
|
21572
21811
|
fillRule: "evenodd",
|
|
21573
21812
|
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",
|
|
21574
21813
|
clipRule: "evenodd"
|
|
21575
21814
|
})));
|
|
21576
21815
|
}
|
|
21577
21816
|
|
|
21817
|
+
var _path$2;
|
|
21818
|
+
|
|
21819
|
+
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); }
|
|
21820
|
+
|
|
21821
|
+
function SvgDonate(props) {
|
|
21822
|
+
return /*#__PURE__*/React.createElement("svg", _extends$2({
|
|
21823
|
+
width: 24,
|
|
21824
|
+
height: 24,
|
|
21825
|
+
fill: "currentColor",
|
|
21826
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
21827
|
+
}, props), _path$2 || (_path$2 = /*#__PURE__*/React.createElement("path", {
|
|
21828
|
+
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"
|
|
21829
|
+
})));
|
|
21830
|
+
}
|
|
21831
|
+
|
|
21832
|
+
const DonationsMenu = () => {
|
|
21833
|
+
const {
|
|
21834
|
+
t
|
|
21835
|
+
} = useTranslation("dashboard");
|
|
21836
|
+
const subscriptions = getDonationSubs().sort((a, b) => a.expires_at - b.expires_at).sort((a, b) => a.renews_at - b.renews_at).map(sub => {
|
|
21837
|
+
return /*#__PURE__*/React__default.createElement("tr", {
|
|
21838
|
+
key: sub.id,
|
|
21839
|
+
className: "plc-w-full plc-align-top pelcro-donation-row"
|
|
21840
|
+
}, /*#__PURE__*/React__default.createElement("td", {
|
|
21841
|
+
className: "plc-truncate"
|
|
21842
|
+
}, sub.plan.nickname && /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("span", {
|
|
21843
|
+
className: "plc-font-semibold plc-text-gray-500 pelcro-donation-plan"
|
|
21844
|
+
}, sub.plan.nickname), /*#__PURE__*/React__default.createElement("br", null), /*#__PURE__*/React__default.createElement("span", {
|
|
21845
|
+
className: "plc-text-xs plc-text-gray-400 pelcro-donation-price"
|
|
21846
|
+
}, getFormattedPriceByLocal(sub.plan.amount * sub.quantity, sub.plan.currency, getPageOrDefaultLanguage())))), /*#__PURE__*/React__default.createElement("td", null, /*#__PURE__*/React__default.createElement("div", {
|
|
21847
|
+
className: "plc-mb-4 plc-text-gray-500 pelcro-donation-date"
|
|
21848
|
+
}, sub.status && /*#__PURE__*/React__default.createElement("span", null, formatStartDate(sub.start)))));
|
|
21849
|
+
});
|
|
21850
|
+
return /*#__PURE__*/React__default.createElement("table", {
|
|
21851
|
+
className: "plc-w-full plc-table-fixed pelcro-donations-table"
|
|
21852
|
+
}, /*#__PURE__*/React__default.createElement("thead", {
|
|
21853
|
+
className: "plc-text-xs plc-font-semibold plc-tracking-wider plc-text-gray-400 plc-uppercase "
|
|
21854
|
+
}, /*#__PURE__*/React__default.createElement("tr", null, /*#__PURE__*/React__default.createElement("th", {
|
|
21855
|
+
className: "plc-w-6/12 "
|
|
21856
|
+
}, t("labels.plan")), /*#__PURE__*/React__default.createElement("th", {
|
|
21857
|
+
className: "plc-w-6/12 "
|
|
21858
|
+
}, t("labels.startDate")))), /*#__PURE__*/React__default.createElement("tbody", null, /*#__PURE__*/React__default.createElement("tr", {
|
|
21859
|
+
className: "plc-h-4"
|
|
21860
|
+
}), subscriptions));
|
|
21861
|
+
};
|
|
21862
|
+
|
|
21863
|
+
function getDonationSubs() {
|
|
21864
|
+
var _window$Pelcro$subscr, _window$Pelcro$subscr2, _window$Pelcro$subscr3;
|
|
21865
|
+
|
|
21866
|
+
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 : [];
|
|
21867
|
+
}
|
|
21868
|
+
|
|
21869
|
+
function formatStartDate(date) {
|
|
21870
|
+
const startDate = new Date(date);
|
|
21871
|
+
return new Intl.DateTimeFormat("en-CA").format(startDate);
|
|
21872
|
+
}
|
|
21873
|
+
|
|
21578
21874
|
const SUB_MENUS = {
|
|
21579
21875
|
PROFILE: "profile",
|
|
21580
21876
|
SUBSCRIPTIONS: "subscriptions",
|
|
21877
|
+
DONATIONS: "donations",
|
|
21581
21878
|
PAYMENT_CARDS: "payment-cards",
|
|
21582
21879
|
ADDRESSES: "addresses",
|
|
21583
21880
|
GIFTS: "gifts",
|
|
@@ -22105,6 +22402,14 @@ class Dashboard extends Component {
|
|
|
22105
22402
|
displayProductSelect: this.displayProductSelect,
|
|
22106
22403
|
displayRedeem: this.displayRedeem
|
|
22107
22404
|
})
|
|
22405
|
+
}), /*#__PURE__*/React__default.createElement(Accordion.item, {
|
|
22406
|
+
show: hasDonationSubs(),
|
|
22407
|
+
name: SUB_MENUS.DONATIONS,
|
|
22408
|
+
icon: /*#__PURE__*/React__default.createElement(SvgDonate, {
|
|
22409
|
+
className: "plc-transform plc-scale-120 plc-w-7 plc-h-8 plc-mr-1 plc-pt-1"
|
|
22410
|
+
}),
|
|
22411
|
+
title: this.locale("labels.donations"),
|
|
22412
|
+
content: /*#__PURE__*/React__default.createElement(DonationsMenu, null)
|
|
22108
22413
|
}), /*#__PURE__*/React__default.createElement(Accordion.item, {
|
|
22109
22414
|
name: SUB_MENUS.GIFTS,
|
|
22110
22415
|
icon: /*#__PURE__*/React__default.createElement(SvgGift, null),
|
|
@@ -22131,6 +22436,13 @@ class Dashboard extends Component {
|
|
|
22131
22436
|
|
|
22132
22437
|
}
|
|
22133
22438
|
|
|
22439
|
+
function hasDonationSubs() {
|
|
22440
|
+
var _window$Pelcro$subscr, _window$Pelcro$subscr2, _window$Pelcro$subscr3;
|
|
22441
|
+
|
|
22442
|
+
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 : [];
|
|
22443
|
+
return donations.length > 0;
|
|
22444
|
+
}
|
|
22445
|
+
|
|
22134
22446
|
const DashboardWithTrans = withTranslation("dashboard")(Dashboard);
|
|
22135
22447
|
|
|
22136
22448
|
// The button in the lower right that shows the dashboard.
|
|
@@ -22158,7 +22470,7 @@ const DashboardOpenButton = () => {
|
|
|
22158
22470
|
};
|
|
22159
22471
|
DashboardOpenButton.viewId = "dashboard-open";
|
|
22160
22472
|
|
|
22161
|
-
const initialState = {
|
|
22473
|
+
const initialState$1 = {
|
|
22162
22474
|
imageSrc: null,
|
|
22163
22475
|
crop: {
|
|
22164
22476
|
x: 0,
|
|
@@ -22172,10 +22484,10 @@ const initialState = {
|
|
|
22172
22484
|
content: ""
|
|
22173
22485
|
}
|
|
22174
22486
|
};
|
|
22175
|
-
const store = /*#__PURE__*/createContext(initialState);
|
|
22487
|
+
const store$1 = /*#__PURE__*/createContext(initialState$1);
|
|
22176
22488
|
const {
|
|
22177
|
-
Provider
|
|
22178
|
-
} = store;
|
|
22489
|
+
Provider: Provider$1
|
|
22490
|
+
} = store$1;
|
|
22179
22491
|
|
|
22180
22492
|
const ProfilePicChangeContainer = ({
|
|
22181
22493
|
style,
|
|
@@ -22309,21 +22621,21 @@ const ProfilePicChangeContainer = ({
|
|
|
22309
22621
|
default:
|
|
22310
22622
|
return state;
|
|
22311
22623
|
}
|
|
22312
|
-
}, initialState);
|
|
22624
|
+
}, initialState$1);
|
|
22313
22625
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
22314
22626
|
style: { ...style
|
|
22315
22627
|
},
|
|
22316
22628
|
className: `pelcro-container pelcro-profile-picture-container ${className}`
|
|
22317
|
-
}, /*#__PURE__*/React__default.createElement(Provider, {
|
|
22629
|
+
}, /*#__PURE__*/React__default.createElement(Provider$1, {
|
|
22318
22630
|
value: {
|
|
22319
22631
|
state,
|
|
22320
22632
|
dispatch
|
|
22321
22633
|
}
|
|
22322
22634
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
|
|
22323
|
-
store,
|
|
22635
|
+
store: store$1,
|
|
22324
22636
|
key: i
|
|
22325
22637
|
})) : /*#__PURE__*/React__default.cloneElement(children, {
|
|
22326
|
-
store
|
|
22638
|
+
store: store$1
|
|
22327
22639
|
})));
|
|
22328
22640
|
};
|
|
22329
22641
|
/**
|
|
@@ -22385,7 +22697,7 @@ const ProfilePicChangeButton = ({
|
|
|
22385
22697
|
isSubmitting
|
|
22386
22698
|
},
|
|
22387
22699
|
dispatch
|
|
22388
|
-
} = useContext(store);
|
|
22700
|
+
} = useContext(store$1);
|
|
22389
22701
|
const {
|
|
22390
22702
|
t
|
|
22391
22703
|
} = useTranslation("userEdit");
|
|
@@ -23753,7 +24065,7 @@ const ProfilePicChangeCropper = ({
|
|
|
23753
24065
|
zoom
|
|
23754
24066
|
},
|
|
23755
24067
|
dispatch
|
|
23756
|
-
} = useContext(store);
|
|
24068
|
+
} = useContext(store$1);
|
|
23757
24069
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
23758
24070
|
className: `plc-relative plc-w-full plc-h-52 sm:plc-h-96 ${className}`
|
|
23759
24071
|
}, /*#__PURE__*/React__default.createElement(Cropper, Object.assign({
|
|
@@ -23795,7 +24107,7 @@ const ProfilePicChangeZoom = ({
|
|
|
23795
24107
|
zoom
|
|
23796
24108
|
},
|
|
23797
24109
|
dispatch
|
|
23798
|
-
} = useContext(store);
|
|
24110
|
+
} = useContext(store$1);
|
|
23799
24111
|
const {
|
|
23800
24112
|
t
|
|
23801
24113
|
} = useTranslation("userEdit");
|
|
@@ -23818,18 +24130,18 @@ const ProfilePicChangeZoom = ({
|
|
|
23818
24130
|
}, otherProps)));
|
|
23819
24131
|
};
|
|
23820
24132
|
|
|
23821
|
-
var _path;
|
|
24133
|
+
var _path$1;
|
|
23822
24134
|
|
|
23823
|
-
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); }
|
|
24135
|
+
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); }
|
|
23824
24136
|
|
|
23825
24137
|
function SvgPhotograph(props) {
|
|
23826
|
-
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
24138
|
+
return /*#__PURE__*/React.createElement("svg", _extends$1({
|
|
23827
24139
|
xmlns: "http://www.w3.org/2000/svg",
|
|
23828
24140
|
className: "plc-h-6 plc-w-6",
|
|
23829
24141
|
fill: "none",
|
|
23830
24142
|
viewBox: "0 0 24 24",
|
|
23831
24143
|
stroke: "currentColor"
|
|
23832
|
-
}, props), _path || (_path = /*#__PURE__*/React.createElement("path", {
|
|
24144
|
+
}, props), _path$1 || (_path$1 = /*#__PURE__*/React.createElement("path", {
|
|
23833
24145
|
strokeLinecap: "round",
|
|
23834
24146
|
strokeLinejoin: "round",
|
|
23835
24147
|
strokeWidth: 2,
|
|
@@ -23847,7 +24159,7 @@ const ProfilePicChangeSelectButton = ({
|
|
|
23847
24159
|
state: {
|
|
23848
24160
|
isSubmitting
|
|
23849
24161
|
}
|
|
23850
|
-
} = useContext(store);
|
|
24162
|
+
} = useContext(store$1);
|
|
23851
24163
|
const {
|
|
23852
24164
|
t
|
|
23853
24165
|
} = useTranslation("userEdit");
|
|
@@ -23889,7 +24201,7 @@ const ProfilePicChangeRemoveButton = ({
|
|
|
23889
24201
|
state: {
|
|
23890
24202
|
isSubmitting
|
|
23891
24203
|
}
|
|
23892
|
-
} = useContext(store);
|
|
24204
|
+
} = useContext(store$1);
|
|
23893
24205
|
const {
|
|
23894
24206
|
t
|
|
23895
24207
|
} = useTranslation("userEdit");
|
|
@@ -23912,7 +24224,7 @@ const ProfilePicChangeWrapper = () => {
|
|
|
23912
24224
|
state: {
|
|
23913
24225
|
imageSrc
|
|
23914
24226
|
}
|
|
23915
|
-
} = useContext(store);
|
|
24227
|
+
} = useContext(store$1);
|
|
23916
24228
|
const {
|
|
23917
24229
|
t
|
|
23918
24230
|
} = useTranslation("userEdit");
|
|
@@ -23974,4 +24286,180 @@ function ProfilePicChangeModal({
|
|
|
23974
24286
|
}
|
|
23975
24287
|
ProfilePicChangeModal.viewId = "profile-picture";
|
|
23976
24288
|
|
|
23977
|
-
|
|
24289
|
+
const initialState = {
|
|
24290
|
+
isSubmitting: false,
|
|
24291
|
+
alert: {
|
|
24292
|
+
type: "error",
|
|
24293
|
+
content: ""
|
|
24294
|
+
}
|
|
24295
|
+
};
|
|
24296
|
+
const store = /*#__PURE__*/createContext(initialState);
|
|
24297
|
+
const {
|
|
24298
|
+
Provider
|
|
24299
|
+
} = store;
|
|
24300
|
+
|
|
24301
|
+
const EmailVerifyContainer = ({
|
|
24302
|
+
style,
|
|
24303
|
+
className = "",
|
|
24304
|
+
onSuccess = () => {},
|
|
24305
|
+
onFailure = () => {},
|
|
24306
|
+
children,
|
|
24307
|
+
...props
|
|
24308
|
+
}) => {
|
|
24309
|
+
const {
|
|
24310
|
+
t
|
|
24311
|
+
} = useTranslation("verifyEmail");
|
|
24312
|
+
|
|
24313
|
+
const submit = () => {
|
|
24314
|
+
window.Pelcro.user.resendEmailVerification((err, res) => {
|
|
24315
|
+
dispatch({
|
|
24316
|
+
type: LOADING,
|
|
24317
|
+
payload: false
|
|
24318
|
+
});
|
|
24319
|
+
|
|
24320
|
+
if (err) {
|
|
24321
|
+
dispatch({
|
|
24322
|
+
type: SHOW_ALERT,
|
|
24323
|
+
payload: {
|
|
24324
|
+
type: "error",
|
|
24325
|
+
content: getErrorMessages(err)
|
|
24326
|
+
}
|
|
24327
|
+
});
|
|
24328
|
+
return onFailure(err);
|
|
24329
|
+
}
|
|
24330
|
+
|
|
24331
|
+
dispatch({
|
|
24332
|
+
type: SHOW_ALERT,
|
|
24333
|
+
payload: {
|
|
24334
|
+
type: "success",
|
|
24335
|
+
content: t("messages.resent")
|
|
24336
|
+
}
|
|
24337
|
+
});
|
|
24338
|
+
return onSuccess(res);
|
|
24339
|
+
});
|
|
24340
|
+
};
|
|
24341
|
+
|
|
24342
|
+
const [state, dispatch] = useReducerWithSideEffects((state, action) => {
|
|
24343
|
+
switch (action.type) {
|
|
24344
|
+
case SHOW_ALERT:
|
|
24345
|
+
return lib_7({ ...state,
|
|
24346
|
+
alert: action.payload
|
|
24347
|
+
});
|
|
24348
|
+
|
|
24349
|
+
case LOADING:
|
|
24350
|
+
return lib_7({ ...state,
|
|
24351
|
+
isSubmitting: action.payload
|
|
24352
|
+
});
|
|
24353
|
+
|
|
24354
|
+
case HANDLE_SUBMIT:
|
|
24355
|
+
return lib_5({ ...state,
|
|
24356
|
+
isSubmitting: true
|
|
24357
|
+
}, (state, dispatch) => submit());
|
|
24358
|
+
|
|
24359
|
+
default:
|
|
24360
|
+
return state;
|
|
24361
|
+
}
|
|
24362
|
+
}, initialState);
|
|
24363
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
24364
|
+
style: { ...style
|
|
24365
|
+
},
|
|
24366
|
+
className: `pelcro-container pelcro-email-verify-container ${className}`
|
|
24367
|
+
}, /*#__PURE__*/React__default.createElement(Provider, {
|
|
24368
|
+
value: {
|
|
24369
|
+
state,
|
|
24370
|
+
dispatch
|
|
24371
|
+
}
|
|
24372
|
+
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
|
|
24373
|
+
store,
|
|
24374
|
+
key: i
|
|
24375
|
+
})) : /*#__PURE__*/React__default.cloneElement(children, {
|
|
24376
|
+
store
|
|
24377
|
+
})));
|
|
24378
|
+
};
|
|
24379
|
+
|
|
24380
|
+
const EmailVerifyResendButton = ({
|
|
24381
|
+
name,
|
|
24382
|
+
onClick,
|
|
24383
|
+
...otherProps
|
|
24384
|
+
}) => {
|
|
24385
|
+
const {
|
|
24386
|
+
dispatch,
|
|
24387
|
+
state: {
|
|
24388
|
+
isSubmitting
|
|
24389
|
+
}
|
|
24390
|
+
} = useContext(store);
|
|
24391
|
+
const {
|
|
24392
|
+
t
|
|
24393
|
+
} = useTranslation("verifyEmail");
|
|
24394
|
+
return /*#__PURE__*/React__default.createElement(Button, Object.assign({
|
|
24395
|
+
onClick: () => {
|
|
24396
|
+
dispatch({
|
|
24397
|
+
type: HANDLE_SUBMIT
|
|
24398
|
+
});
|
|
24399
|
+
onClick === null || onClick === void 0 ? void 0 : onClick();
|
|
24400
|
+
},
|
|
24401
|
+
isLoading: isSubmitting
|
|
24402
|
+
}, otherProps), name !== null && name !== void 0 ? name : t("labels.resend"));
|
|
24403
|
+
};
|
|
24404
|
+
|
|
24405
|
+
var _path, _path2;
|
|
24406
|
+
|
|
24407
|
+
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); }
|
|
24408
|
+
|
|
24409
|
+
function SvgEmailVerify(props) {
|
|
24410
|
+
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
24411
|
+
className: "plc-w-6 plc-h-6",
|
|
24412
|
+
viewBox: "0 0 700 700",
|
|
24413
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
24414
|
+
}, props), _path || (_path = /*#__PURE__*/React.createElement("path", {
|
|
24415
|
+
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"
|
|
24416
|
+
})), _path2 || (_path2 = /*#__PURE__*/React.createElement("path", {
|
|
24417
|
+
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"
|
|
24418
|
+
})));
|
|
24419
|
+
}
|
|
24420
|
+
|
|
24421
|
+
const EmailVerifyView = props => {
|
|
24422
|
+
var _window$Pelcro$user$r;
|
|
24423
|
+
|
|
24424
|
+
const {
|
|
24425
|
+
t
|
|
24426
|
+
} = useTranslation("verifyEmail");
|
|
24427
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
24428
|
+
id: "pelcro-email-verify-view"
|
|
24429
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
24430
|
+
className: "plc-mb-6 plc-text-center plc-text-gray-900 pelcro-title-wrapper"
|
|
24431
|
+
}, /*#__PURE__*/React__default.createElement("h4", {
|
|
24432
|
+
className: "plc-text-2xl plc-font-semibold"
|
|
24433
|
+
}, t("labels.title"))), /*#__PURE__*/React__default.createElement("form", {
|
|
24434
|
+
action: "javascript:void(0);",
|
|
24435
|
+
className: "plc-mt-2 pelcro-form"
|
|
24436
|
+
}, /*#__PURE__*/React__default.createElement(EmailVerifyContainer, props, /*#__PURE__*/React__default.createElement(AlertWithContext, null), /*#__PURE__*/React__default.createElement("div", {
|
|
24437
|
+
className: "plc-flex plc-flex-col plc-items-center plc-justify-center plc-mt-4"
|
|
24438
|
+
}, /*#__PURE__*/React__default.createElement(SvgEmailVerify, {
|
|
24439
|
+
className: "plc-w-32 plc-h-32"
|
|
24440
|
+
}), /*#__PURE__*/React__default.createElement("p", {
|
|
24441
|
+
className: "plc-mb-1 plc-text-gray-900 plc-text-center plc-whitespace-pre-line"
|
|
24442
|
+
}, t("labels.instructions"), " ", /*#__PURE__*/React__default.createElement("span", {
|
|
24443
|
+
className: "plc-font-bold"
|
|
24444
|
+
}, (_window$Pelcro$user$r = window.Pelcro.user.read()) === null || _window$Pelcro$user$r === void 0 ? void 0 : _window$Pelcro$user$r.email))), /*#__PURE__*/React__default.createElement(EmailVerifyResendButton, {
|
|
24445
|
+
role: "submit",
|
|
24446
|
+
className: "plc-mt-4 plc-w-full",
|
|
24447
|
+
name: t("labels.resend"),
|
|
24448
|
+
id: "pelcro-submit"
|
|
24449
|
+
}))));
|
|
24450
|
+
};
|
|
24451
|
+
|
|
24452
|
+
const EmailVerifyModal = ({
|
|
24453
|
+
onDisplay,
|
|
24454
|
+
onClose,
|
|
24455
|
+
...otherProps
|
|
24456
|
+
}) => {
|
|
24457
|
+
return /*#__PURE__*/React__default.createElement(Modal, {
|
|
24458
|
+
onDisplay: onDisplay,
|
|
24459
|
+
onClose: onClose,
|
|
24460
|
+
id: "pelcro-email-verify-modal"
|
|
24461
|
+
}, /*#__PURE__*/React__default.createElement(ModalBody, null, /*#__PURE__*/React__default.createElement(EmailVerifyView, otherProps)), /*#__PURE__*/React__default.createElement(ModalFooter, null, /*#__PURE__*/React__default.createElement(Authorship, null)));
|
|
24462
|
+
};
|
|
24463
|
+
EmailVerifyModal.viewId = "email-verify";
|
|
24464
|
+
|
|
24465
|
+
export { AddressCreateCity, AddressCreateContainer, AddressCreateCountrySelect, AddressCreateFirstName, AddressCreateLastName, AddressCreateLine1, AddressCreateLine2, AddressCreateModal, AddressCreatePostalCode, AddressCreateStateSelect, AddressCreateSubmit, AddressCreateTextInput, AddressCreateView, AddressSelectContainer, AddressSelectList, AddressSelectModal, AddressSelectSubmit, AddressSelectView, AddressUpdateCity, AddressUpdateContainer, AddressUpdateCountrySelect, AddressUpdateFirstName, AddressUpdateLastName, AddressUpdateLine1, AddressUpdateLine2, AddressUpdateModal, AddressUpdatePostalCode, AddressUpdateStateSelect, AddressUpdateSubmit, AddressUpdateTextInput, AddressUpdateView, AlertWithContext as Alert, Alert as AlertElement, ApplyCouponButton, Auth0LoginButton, Badge, BankRedirection, Button, CartContainer, CartModal, CartRemoveItemButton, CartSubmit, CartTotalPrice, CartView, Checkbox, CheckoutForm, ConfirmPassword, CouponCode, CouponCodeField, DashboardWithHook as Dashboard, DashboardOpenButton, DatePicker, DiscountedPrice, Email, EmailVerifyContainer, EmailVerifyModal, EmailVerifyResendButton, EmailVerifyView, FacebookLoginButton, GiftCreateContainer, GiftCreateEmail, GiftCreateFirstName, GiftCreateLastName, GiftCreateMessage, GiftCreateModal, GiftCreateStartDate, GiftCreateSubmitButton, GiftCreateView, GiftRedeemCode, GiftRedeemContainer, GiftRedeemModal, GiftRedeemSubmitButton, GiftRedeemView, GoogleLoginButton, Input, Link, LoginButton, LoginContainer, LoginEmail, LoginModal, LoginPassword, LoginView, Logout, MeterModal, MeterView, Modal, ModalBody, ModalFooter, NewsletterWithHook as NewsLetter, NewsletterUpdateButton, NewsletterUpdateContainer, NewsletterUpdateList, NewsletterUpdateModal, NewsletterUpdateView, Notification, OrderConfirmModal, OrderCreateContainer, OrderCreateModal, OrderCreateSubmitButton, OrderCreateView, Password, PasswordChangeButton, PasswordChangeConfirmNewPassword, PasswordChangeContainer, PasswordChangeCurrentPassword, PasswordChangeModal, PasswordChangeNewPassword, PasswordChangeView, PasswordForgotButton, PasswordForgotContainer, PasswordForgotEmail, PasswordForgotModal, PasswordForgotView, PasswordResetButton, PasswordResetConfirmPassword, PasswordResetContainer, PasswordResetEmail, PasswordResetModal, PasswordResetPassword, PasswordResetView, PaymentCreateContainer, PaymentCreateView, PaymentMethodContainer, PaymentMethodSelectContainer, PaymentMethodSelectList, PaymentMethodSelectModal, PaymentMethodSelectSubmit, PaymentMethodSelectView, PaymentMethodUpdateContainer, PaymentMethodUpdateModal, PaymentMethodUpdateView, PaymentMethodView, PaymentSuccessModal, PaymentSuccessView, PaypalSubscribeButton, PelcroCardCVC, PelcroCardExpiry, PelcroCardNumber, PelcroModalController, PelcroPaymentRequestButton, ProfilePicChangeButton, ProfilePicChangeContainer, ProfilePicChangeCropper, ProfilePicChangeModal, ProfilePicChangeRemoveButton, ProfilePicChangeSelectButton, ProfilePicChangeView, ProfilePicChangeZoom, Radio, RegisterButton, RegisterCompany, RegisterContainer, RegisterEmail, RegisterFirstName, RegisterJobTitle, RegisterLastName, RegisterModal, RegisterPassword, RegisterView, Select, SelectModalWithHook as SelectModal, SelectedPaymentMethod, ShopPurchaseButton, ShopSelectProductButton, ShopView, SubmitPaymentMethod, SubscriptionCreateContainer, SubscriptionCreateModal, SubscriptionCreateView, SubscriptionRenewContainer, SubscriptionRenewModal, SubscriptionRenewView, TaxAmount, TextArea, Tooltip, UserUpdateButton, UserUpdateContainer, UserUpdateDisplayName, UserUpdateEmail, UserUpdateFirstName, UserUpdateLastName, UserUpdateModal, UserUpdatePhone, UserUpdateProfilePic, UserUpdateTextInput, UserUpdateView, authenticatedButtons, i18next as i18n, init$1 as initButtons, init as initContentEntitlement, notify, unauthenticatedButtons, usePelcro };
|