@pelcro/react-pelcro-js 3.25.1 → 3.26.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.esm.js CHANGED
@@ -3223,7 +3223,7 @@ var validation$3 = {
3223
3223
  enterLastName: "Last name is required.",
3224
3224
  enterPhone: "Phone number is required."
3225
3225
  };
3226
- var buttons$j = {
3226
+ var buttons$n = {
3227
3227
  account: "My account",
3228
3228
  login: "Login",
3229
3229
  subscribe: "Subscribe"
@@ -3301,7 +3301,7 @@ var confirm$b = {
3301
3301
  };
3302
3302
  var common_en = {
3303
3303
  validation: validation$3,
3304
- buttons: buttons$j,
3304
+ buttons: buttons$n,
3305
3305
  dashboard: dashboard$4,
3306
3306
  select: select$7,
3307
3307
  confirm: confirm$b
@@ -3332,7 +3332,7 @@ var paymentMethod_en = {
3332
3332
  var title$z = "Enter your email to subscribe to our newsletter";
3333
3333
  var updateTitle$3 = "Update newsletter selections";
3334
3334
  var subtitle$f = "We may use your email for other marketing communication";
3335
- var labels$12 = {
3335
+ var labels$17 = {
3336
3336
  submit: "Submit",
3337
3337
  firstName: "First name",
3338
3338
  lastName: "Last name",
@@ -3340,7 +3340,7 @@ var labels$12 = {
3340
3340
  postalCode: "Postal code",
3341
3341
  required: "required"
3342
3342
  };
3343
- var messages$17 = {
3343
+ var messages$1b = {
3344
3344
  alreadyHaveAccount: "Already have an account?",
3345
3345
  success: "Newsletters were successfully updated",
3346
3346
  loginHere: "Login here.",
@@ -3351,14 +3351,14 @@ var newsletter_en = {
3351
3351
  title: title$z,
3352
3352
  updateTitle: updateTitle$3,
3353
3353
  subtitle: subtitle$f,
3354
- labels: labels$12,
3355
- messages: messages$17
3354
+ labels: labels$17,
3355
+ messages: messages$1b
3356
3356
  };
3357
3357
 
3358
- var labels$11 = {
3358
+ var labels$16 = {
3359
3359
  "continue": "Continue to content"
3360
3360
  };
3361
- var messages$16 = {
3361
+ var messages$1a = {
3362
3362
  yourFreeTrial: "Subscription successful!",
3363
3363
  youHaveAccess: "Hope you enjoy the subscription. Please contact us if you have any questions or concerns.",
3364
3364
  clickToLearn: {
@@ -3384,12 +3384,12 @@ var errors$j = {
3384
3384
  "": ""
3385
3385
  };
3386
3386
  var success_en = {
3387
- labels: labels$11,
3388
- messages: messages$16,
3387
+ labels: labels$16,
3388
+ messages: messages$1a,
3389
3389
  errors: errors$j
3390
3390
  };
3391
3391
 
3392
- var messages$15 = {
3392
+ var messages$19 = {
3393
3393
  freeVisits: "Free visits left:",
3394
3394
  subscribeNow: "Subscribe",
3395
3395
  alreadyHaveAccount: "Already have an account?",
@@ -3399,16 +3399,16 @@ var errors$i = {
3399
3399
  "": ""
3400
3400
  };
3401
3401
  var meter_en = {
3402
- messages: messages$15,
3402
+ messages: messages$19,
3403
3403
  errors: errors$i
3404
3404
  };
3405
3405
 
3406
- var messages$14 = {
3406
+ var messages$18 = {
3407
3407
  youAreSafe: "You're safe - PCI compliant 128 SSL by",
3408
3408
  bankRedirection: "Please hold, redirecting you to your bank.",
3409
3409
  bankAuthenticationSuccess: "Please wait while we process your request."
3410
3410
  };
3411
- var labels$10 = {
3411
+ var labels$15 = {
3412
3412
  card: "Enter card number",
3413
3413
  date: "Expiration date",
3414
3414
  CVC: "CVC",
@@ -3428,11 +3428,13 @@ var labels$10 = {
3428
3428
  firstName: "First name",
3429
3429
  lastName: "Last name",
3430
3430
  phone: "Phone",
3431
- freeItems: "Free Items"
3431
+ freeItems: "Free Items",
3432
+ email: "Email",
3433
+ password: "Password"
3432
3434
  };
3433
3435
  var checkoutForm_en = {
3434
- messages: messages$14,
3435
- labels: labels$10
3436
+ messages: messages$18,
3437
+ labels: labels$15
3436
3438
  };
3437
3439
 
3438
3440
  var youAreSafe$3 = "You're safe - PCI compliant 128 SSL by";
@@ -3456,7 +3458,7 @@ var messages_en = {
3456
3458
  zeroTotalInvoice: zeroTotalInvoice$3
3457
3459
  };
3458
3460
 
3459
- var labels$$ = {
3461
+ var labels$14 = {
3460
3462
  email: "Enter email",
3461
3463
  username: "Enter username",
3462
3464
  password: "Enter password",
@@ -3465,7 +3467,7 @@ var labels$$ = {
3465
3467
  passwordPlaceholder: "Password",
3466
3468
  login: "Login"
3467
3469
  };
3468
- var messages$13 = {
3470
+ var messages$17 = {
3469
3471
  loginTo: "Login to your account",
3470
3472
  welcome: "Welcome back, sign in with your existing account.",
3471
3473
  dontHaveAccount: "Don't have an account yet?",
@@ -3484,28 +3486,28 @@ var errors$h = {
3484
3486
  "": ""
3485
3487
  };
3486
3488
  var login_en = {
3487
- labels: labels$$,
3488
- messages: messages$13,
3489
+ labels: labels$14,
3490
+ messages: messages$17,
3489
3491
  errors: errors$h
3490
3492
  };
3491
3493
 
3492
- var labels$_ = {
3494
+ var labels$13 = {
3493
3495
  title: "Verifying Passwordless Link",
3494
3496
  instructions: "You're on your way!\nLet's confirm your email address.\nClick on the verification link we've sent to your email:",
3495
3497
  resend: "Resend email"
3496
3498
  };
3497
- var messages$12 = {
3499
+ var messages$16 = {
3498
3500
  resent: "Resent successfully",
3499
3501
  success: "You have logged in successfully"
3500
3502
  };
3501
3503
  var verifyLinkToken_en = {
3502
- labels: labels$_,
3503
- messages: messages$12
3504
+ labels: labels$13,
3505
+ messages: messages$16
3504
3506
  };
3505
3507
 
3506
3508
  var title$y = "Create an account";
3507
3509
  var subtitle$e = "Enter your email and password below";
3508
- var labels$Z = {
3510
+ var labels$12 = {
3509
3511
  signUpFacebook: "Sign up with Facebook",
3510
3512
  signUpGoogle: "Sign up with Google",
3511
3513
  signUpEmail: "Sign up with Email",
@@ -3518,7 +3520,7 @@ var labels$Z = {
3518
3520
  lastName: "Last name",
3519
3521
  phone: "Phone"
3520
3522
  };
3521
- var messages$11 = {
3523
+ var messages$15 = {
3522
3524
  alreadyHaveAccount: "Already have an account?",
3523
3525
  createAccount: "Create account",
3524
3526
  loginHere: "login here. ",
@@ -3592,14 +3594,14 @@ var redeem$3 = {
3592
3594
  var register_en = {
3593
3595
  title: title$y,
3594
3596
  subtitle: subtitle$e,
3595
- labels: labels$Z,
3596
- messages: messages$11,
3597
+ labels: labels$12,
3598
+ messages: messages$15,
3597
3599
  errors: errors$g,
3598
3600
  gift: gift$3,
3599
3601
  redeem: redeem$3
3600
3602
  };
3601
3603
 
3602
- var labels$Y = {
3604
+ var labels$11 = {
3603
3605
  title: "Want to update your profile?",
3604
3606
  subtitle: "Enter your information below to update your profile",
3605
3607
  email: "Email",
@@ -3618,21 +3620,21 @@ var labels$Y = {
3618
3620
  zoom: "Zoom",
3619
3621
  tin: "Tax Identification Number"
3620
3622
  };
3621
- var messages$10 = {
3623
+ var messages$14 = {
3622
3624
  userUpdated: "Thanks! Your profile was updated successfully.",
3623
3625
  pictureRemoved: "Your profile picture was removed successfully.",
3624
3626
  pictureUpdated: "Your profile picture was updated successfully."
3625
3627
  };
3626
3628
  var userEdit_en = {
3627
- labels: labels$Y,
3628
- messages: messages$10
3629
+ labels: labels$11,
3630
+ messages: messages$14
3629
3631
  };
3630
3632
 
3631
3633
  var title$x = "Enter your shipping address";
3632
3634
  var titleGifting$3 = "Enter your address";
3633
3635
  var selectAddressTitle$3 = "Please select an address";
3634
3636
  var selectAddressSubtitle$3 = "Select one of your saved addresses, or add a new one";
3635
- var labels$X = {
3637
+ var labels$10 = {
3636
3638
  address: "Address",
3637
3639
  code: "Postal Code/Zip",
3638
3640
  city: "City",
@@ -3643,12 +3645,12 @@ var labels$X = {
3643
3645
  required: "required",
3644
3646
  isDefault: "Set as default"
3645
3647
  };
3646
- var buttons$i = {
3648
+ var buttons$m = {
3647
3649
  submit: "Submit",
3648
3650
  selectAddress: "Select address",
3649
3651
  addAddress: "Add new address"
3650
3652
  };
3651
- var messages$$ = {
3653
+ var messages$13 = {
3652
3654
  addressUpdated: "The address was successfully updated!",
3653
3655
  subRedeemed: "Your subscription has been redeemed."
3654
3656
  };
@@ -3657,9 +3659,9 @@ var address_en = {
3657
3659
  titleGifting: titleGifting$3,
3658
3660
  selectAddressTitle: selectAddressTitle$3,
3659
3661
  selectAddressSubtitle: selectAddressSubtitle$3,
3660
- labels: labels$X,
3661
- buttons: buttons$i,
3662
- messages: messages$$
3662
+ labels: labels$10,
3663
+ buttons: buttons$m,
3664
+ messages: messages$13
3663
3665
  };
3664
3666
 
3665
3667
  var title$w = "Reset your password";
@@ -3687,7 +3689,7 @@ var password$6 = "Password";
3687
3689
  var submit$e = "Submit";
3688
3690
  var required$e = "Required";
3689
3691
  var passwordResetEmailSent$3 = "Password reset instructions have been sent to your email";
3690
- var messages$_ = {
3692
+ var messages$12 = {
3691
3693
  alreadyHaveAccount: "Already have an account?",
3692
3694
  loginHere: "login here."
3693
3695
  };
@@ -3698,7 +3700,7 @@ var passwordForgot_en = {
3698
3700
  submit: submit$e,
3699
3701
  required: required$e,
3700
3702
  passwordResetEmailSent: passwordResetEmailSent$3,
3701
- messages: messages$_
3703
+ messages: messages$12
3702
3704
  };
3703
3705
 
3704
3706
  var title$u = "Change your password";
@@ -3726,7 +3728,7 @@ var title$t = "Passwordless Login";
3726
3728
  var email$9 = "Enter email";
3727
3729
  var submit$c = "Submit";
3728
3730
  var required$c = "Required";
3729
- var messages$Z = {
3731
+ var messages$11 = {
3730
3732
  PasswordlessLoginSuccess: "Please check your email and follow the instructions there"
3731
3733
  };
3732
3734
  var passwordlessRequest_en = {
@@ -3734,7 +3736,7 @@ var passwordlessRequest_en = {
3734
3736
  email: email$9,
3735
3737
  submit: submit$c,
3736
3738
  required: required$c,
3737
- messages: messages$Z
3739
+ messages: messages$11
3738
3740
  };
3739
3741
 
3740
3742
  var title$s = "Your shopping cart";
@@ -3762,13 +3764,13 @@ var cart_en = {
3762
3764
  removeAll: removeAll$3
3763
3765
  };
3764
3766
 
3765
- var buttons$h = {
3767
+ var buttons$l = {
3766
3768
  select: "Select",
3767
3769
  added: "Added to cart",
3768
3770
  purchase: "Purchase",
3769
3771
  "continue": "Continue"
3770
3772
  };
3771
- var messages$Y = {
3773
+ var messages$10 = {
3772
3774
  orderConfirmed: {
3773
3775
  title: "Order confirmed!",
3774
3776
  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."
@@ -3777,17 +3779,17 @@ var messages$Y = {
3777
3779
  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.",
3778
3780
  currencyMismatch: "The selected item(s) do not match your current default currency ({{currency}}). Please choose item(s) only matching this currency."
3779
3781
  };
3780
- var labels$W = {
3782
+ var labels$$ = {
3781
3783
  summary: "Order summary",
3782
3784
  total: "total"
3783
3785
  };
3784
3786
  var shop_en = {
3785
- buttons: buttons$h,
3786
- messages: messages$Y,
3787
- labels: labels$W
3787
+ buttons: buttons$l,
3788
+ messages: messages$10,
3789
+ labels: labels$$
3788
3790
  };
3789
3791
 
3790
- var labels$V = {
3792
+ var labels$_ = {
3791
3793
  cardNumber: "Card number",
3792
3794
  securityCode: "Security Code",
3793
3795
  submit: "Submit",
@@ -3809,7 +3811,7 @@ var labels$V = {
3809
3811
  title: "Payment Information"
3810
3812
  }
3811
3813
  };
3812
- var messages$X = {
3814
+ var messages$$ = {
3813
3815
  youAreSafe: "You're safe - PCI compliant 128 SSL by",
3814
3816
  cancel: "Cancel your subscription online at anytime.",
3815
3817
  giftSent: "Subscription gift has been sent to",
@@ -3823,12 +3825,12 @@ var errors$f = {
3823
3825
  "": ""
3824
3826
  };
3825
3827
  var payment_en = {
3826
- labels: labels$V,
3827
- messages: messages$X,
3828
+ labels: labels$_,
3829
+ messages: messages$$,
3828
3830
  errors: errors$f
3829
3831
  };
3830
3832
 
3831
- var labels$U = {
3833
+ var labels$Z = {
3832
3834
  menu: "Pelcro Menu",
3833
3835
  name: "Name",
3834
3836
  email: "Email",
@@ -3914,9 +3916,12 @@ var labels$U = {
3914
3916
  },
3915
3917
  subCancellation: {
3916
3918
  goBack: "Go back"
3919
+ },
3920
+ donationCancellation: {
3921
+ goBack: "Go back"
3917
3922
  }
3918
3923
  };
3919
- var messages$W = {
3924
+ var messages$_ = {
3920
3925
  noCard: "You don't have a card",
3921
3926
  subCancellation: {
3922
3927
  isSureToCancel: "Are you sure you want to cancel your subscription?",
@@ -3933,19 +3938,35 @@ var messages$W = {
3933
3938
  loading: "Unsuspending your subscription",
3934
3939
  success: "Subscription is successfully unsuspended",
3935
3940
  error: "Error while unsuspending your subscription"
3941
+ },
3942
+ donationCancellation: {
3943
+ isSureToCancel: "Are you sure you want to cancel your donation?",
3944
+ loading: "Cancelling your donation",
3945
+ success: "Donation is successfully cancelled",
3946
+ error: "Error while cancelling your donation"
3947
+ },
3948
+ donationReactivation: {
3949
+ success: "Donation is successfully reactivated",
3950
+ error: "Error while reactivating your donation"
3951
+ },
3952
+ donationUnSuspend: {
3953
+ isSureToUnSuspend: "Are you sure you want to unsuspend your donation?",
3954
+ loading: "Unsuspending your donation",
3955
+ success: "Donation is successfully unsuspended",
3956
+ error: "Error while unsuspending your donation"
3936
3957
  }
3937
3958
  };
3938
3959
  var dashboard_en = {
3939
- labels: labels$U,
3940
- messages: messages$W
3960
+ labels: labels$Z,
3961
+ messages: messages$_
3941
3962
  };
3942
3963
 
3943
- var messages$V = {
3964
+ var messages$Z = {
3944
3965
  alreadyHaveAccount: "Already have an account?",
3945
3966
  loginHere: "Login here",
3946
3967
  checkbox: "Check this box to gift this subscription"
3947
3968
  };
3948
- var labels$T = {
3969
+ var labels$Y = {
3949
3970
  plan: {
3950
3971
  title: "Subscribe to a plan",
3951
3972
  subtitle: "Select one of the plans below and click on next."
@@ -3962,15 +3983,49 @@ var labels$T = {
3962
3983
  or: "Or take a look at some of our other options below"
3963
3984
  }
3964
3985
  };
3965
- var buttons$g = {
3986
+ var buttons$k = {
3966
3987
  next: "Next",
3967
3988
  select: "Select",
3968
3989
  back: "Back"
3969
3990
  };
3970
3991
  var select_en = {
3971
- messages: messages$V,
3972
- labels: labels$T,
3973
- buttons: buttons$g
3992
+ messages: messages$Z,
3993
+ labels: labels$Y,
3994
+ buttons: buttons$k
3995
+ };
3996
+
3997
+ var messages$Y = {
3998
+ alreadyHaveAccount: "Already have an account?",
3999
+ loginHere: "Login here",
4000
+ checkbox: "Check this box to gift this subscription"
4001
+ };
4002
+ var labels$X = {
4003
+ plan: {
4004
+ title: "Subscribe to a plan",
4005
+ subtitle: "Select one of the plans below and click on next."
4006
+ },
4007
+ product: {
4008
+ title: "Subscribe to a product",
4009
+ subtitle: "Select one of the products below and click on next."
4010
+ },
4011
+ selectProduct: "Select a product",
4012
+ selectPlan: "Select a plan",
4013
+ startingAt: "Starting at",
4014
+ restrictiveArticles: {
4015
+ subscribeTo: "Subscribe to one of the following options to get access to this page",
4016
+ or: "Or take a look at some of our other options below"
4017
+ }
4018
+ };
4019
+ var buttons$j = {
4020
+ signupAndDonate: "Sign up & donate",
4021
+ donate: "Donate",
4022
+ select: "Select",
4023
+ back: "Back"
4024
+ };
4025
+ var donation_en = {
4026
+ messages: messages$Y,
4027
+ labels: labels$X,
4028
+ buttons: buttons$j
3974
4029
  };
3975
4030
 
3976
4031
  var confirm$9 = {
@@ -3983,46 +4038,46 @@ var notification_en = {
3983
4038
  confirm: confirm$9
3984
4039
  };
3985
4040
 
3986
- var labels$S = {
4041
+ var labels$W = {
3987
4042
  title: "Verify your email",
3988
4043
  instructions: "You're on your way!\nLet's confirm your email address.\nClick on the verification link we've sent to your email:",
3989
4044
  resend: "Resend email"
3990
4045
  };
3991
- var messages$U = {
4046
+ var messages$X = {
3992
4047
  resent: "Resent successfully",
3993
4048
  success: "Email verified successfully!"
3994
4049
  };
3995
4050
  var verifyEmail_en = {
3996
- labels: labels$S,
3997
- messages: messages$U
4051
+ labels: labels$W,
4052
+ messages: messages$X
3998
4053
  };
3999
4054
 
4000
4055
  var title$r = "Invoice details";
4001
- var labels$R = {
4056
+ var labels$V = {
4002
4057
  summary: "Summary",
4003
4058
  total: "Total",
4004
4059
  amountPaid: "Amount paid",
4005
4060
  amountDue: "Amount due",
4006
4061
  creationDate: "Created on:"
4007
4062
  };
4008
- var buttons$f = {
4063
+ var buttons$i = {
4009
4064
  download: "Download",
4010
4065
  pay: "Pay now"
4011
4066
  };
4012
4067
  var invoiceDetails_en = {
4013
4068
  title: title$r,
4014
- labels: labels$R,
4015
- buttons: buttons$f
4069
+ labels: labels$V,
4070
+ buttons: buttons$i
4016
4071
  };
4017
4072
 
4018
- var labels$Q = {
4073
+ var labels$U = {
4019
4074
  title: "Cancel subscription",
4020
4075
  cancelReason: "Cancellation reason",
4021
4076
  subCancellation: {
4022
4077
  goBack: "Go back"
4023
4078
  }
4024
4079
  };
4025
- var messages$T = {
4080
+ var messages$W = {
4026
4081
  subscriptionEnd: "This subscription is set to expire on",
4027
4082
  cancelNow: "Cancel Subscription Now",
4028
4083
  cancelLater: "Cancel at Period End",
@@ -4035,59 +4090,11 @@ var messages$T = {
4035
4090
  }
4036
4091
  };
4037
4092
  var subscriptionCancel_en = {
4038
- labels: labels$Q,
4039
- messages: messages$T
4040
- };
4041
-
4042
- var labels$P = {
4043
- title: "Annuler l'abonnement",
4044
- cancelReason: "Motif d'annulation",
4045
- subCancellation: {
4046
- goBack: "Retourner"
4047
- }
4048
- };
4049
- var messages$S = {
4050
- subscriptionEnd: "Cet abonnement doit expirer le",
4051
- cancelNow: "Cancel Subscription Now",
4052
- cancelLater: "Annuler l'abonnement maintenant",
4053
- subCancellation: {
4054
- isSureToCancelNow: "Êtes-vous sûr de vouloir résilier votre abonnement immédiatement?",
4055
- isSureToCancel: "Êtes-vous sûr de vouloir résilier votre abonnement?",
4056
- loading: "Annulation de votre abonnement",
4057
- success: "L'abonnement a été annulé avec succès",
4058
- error: "Erreur lors de l'annulation de votre abonnement"
4059
- }
4060
- };
4061
- var subscriptionCancel_fr = {
4062
- labels: labels$P,
4063
- messages: messages$S
4064
- };
4065
-
4066
- var labels$O = {
4067
- title: "구독 취소",
4068
- cancelReason: "취소 사유",
4069
- subCancellation: {
4070
- goBack: "돌아가기"
4071
- }
4072
- };
4073
- var messages$R = {
4074
- subscriptionEnd: "이 구독은 다음 날짜에 만료되도록 설정되었습니다.",
4075
- cancelNow: "지금 구독 취소",
4076
- cancelLater: "기간 종료 시 취소",
4077
- subCancellation: {
4078
- isSureToCancelNow: "구독을 즉시 취소하시겠습니까?",
4079
- isSureToCancel: "구독을 취소하시겠습니까?",
4080
- loading: "구독 취소",
4081
- success: "구독이 성공적으로 취소되었습니다.",
4082
- error: "구독 취소 중 오류 발생"
4083
- }
4084
- };
4085
- var subscriptionCancel_ko = {
4086
- labels: labels$O,
4087
- messages: messages$R
4093
+ labels: labels$U,
4094
+ messages: messages$W
4088
4095
  };
4089
4096
 
4090
- var labels$N = {
4097
+ var labels$T = {
4091
4098
  inviteMembers: "Invite Members",
4092
4099
  listOfMembers: "List of members",
4093
4100
  invite: "Invite",
@@ -4095,48 +4102,21 @@ var labels$N = {
4095
4102
  emails: "Enter emails",
4096
4103
  status: "Status",
4097
4104
  actions: "Actions",
4098
- email: "Email"
4105
+ email: "Email",
4106
+ listNote: "Comma-separated list e.g."
4099
4107
  };
4100
4108
  var subscriptionManageMembers_en = {
4101
- labels: labels$N
4102
- };
4103
-
4104
- var labels$M = {
4105
- inviteMembers: "Inviter des membres",
4106
- listOfMembers: "Liste des membres",
4107
- invite: "Inviter",
4108
- remove: "Retirer",
4109
- emails: "Saisir les e-mails",
4110
- status: "Statut",
4111
- actions: "Actions",
4112
- email: "E-mail"
4113
- };
4114
- var subscriptionManageMembers_fr = {
4115
- labels: labels$M
4116
- };
4117
-
4118
- var labels$L = {
4119
- inviteMembers: "회원 초대",
4120
- listOfMembers: "구성원 목록",
4121
- invite: "초대",
4122
- remove: "제거하다",
4123
- emails: "이메일 입력",
4124
- status: "상태",
4125
- actions: "행위",
4126
- email: "이메일"
4127
- };
4128
- var subscriptionManageMembers_ko = {
4129
- labels: labels$L
4109
+ labels: labels$T
4130
4110
  };
4131
4111
 
4132
- var labels$K = {
4112
+ var labels$S = {
4133
4113
  title: "Suspend subscription",
4134
4114
  suspensionDate: "Suspension date",
4135
4115
  subCancellation: {
4136
4116
  goBack: "Go back"
4137
4117
  }
4138
4118
  };
4139
- var messages$Q = {
4119
+ var messages$V = {
4140
4120
  suspensionEnd: "The suspension is set to expire on",
4141
4121
  suspendNow: "Suspend Subscription Now",
4142
4122
  suspendLater: "Suspend at Period End",
@@ -4149,8 +4129,8 @@ var messages$Q = {
4149
4129
  }
4150
4130
  };
4151
4131
  var subscriptionSuspend_en = {
4152
- labels: labels$K,
4153
- messages: messages$Q
4132
+ labels: labels$S,
4133
+ messages: messages$V
4154
4134
  };
4155
4135
 
4156
4136
  var validation$2 = {
@@ -4165,7 +4145,7 @@ var validation$2 = {
4165
4145
  enterLastName: "Le nom de famille est requis.",
4166
4146
  enterPhone: "Le numéro de téléphone est requis."
4167
4147
  };
4168
- var buttons$e = {
4148
+ var buttons$h = {
4169
4149
  account: "Accès abonné(e)s",
4170
4150
  login: "Se connecter",
4171
4151
  subscribe: "S'abonner"
@@ -4243,7 +4223,7 @@ var confirm$8 = {
4243
4223
  };
4244
4224
  var common_fr = {
4245
4225
  validation: validation$2,
4246
- buttons: buttons$e,
4226
+ buttons: buttons$h,
4247
4227
  dashboard: dashboard$3,
4248
4228
  select: select$5,
4249
4229
  confirm: confirm$8
@@ -4274,7 +4254,7 @@ var paymentMethod_fr = {
4274
4254
  var title$q = "Entrez votre adresse courriel pour vous abonner à notre infolettre";
4275
4255
  var updateTitle$2 = "Mettre à jour son choix d'infolettres";
4276
4256
  var subtitle$b = "Nous pouvons utiliser votre adresse courriel pour d’autres communications marketing";
4277
- var labels$J = {
4257
+ var labels$R = {
4278
4258
  submit: "Lire l’article !",
4279
4259
  firstName: "Prénom",
4280
4260
  lastName: "Nom de famille",
@@ -4282,7 +4262,7 @@ var labels$J = {
4282
4262
  postalCode: "Code postal",
4283
4263
  required: "Champs obligatoires"
4284
4264
  };
4285
- var messages$P = {
4265
+ var messages$U = {
4286
4266
  alreadyHaveAccount: "Vous avez déjà un compte ?",
4287
4267
  success: "Votre choix d'infolettres à été mis à jour",
4288
4268
  loginHere: "Connectez-vous ici",
@@ -4293,14 +4273,14 @@ var newsletter_fr = {
4293
4273
  title: title$q,
4294
4274
  updateTitle: updateTitle$2,
4295
4275
  subtitle: subtitle$b,
4296
- labels: labels$J,
4297
- messages: messages$P
4276
+ labels: labels$R,
4277
+ messages: messages$U
4298
4278
  };
4299
4279
 
4300
- var labels$I = {
4280
+ var labels$Q = {
4301
4281
  "continue": "Abonnement réussi !"
4302
4282
  };
4303
- var messages$O = {
4283
+ var messages$T = {
4304
4284
  yourFreeTrial: "Votre essai gratuit vient de débuter",
4305
4285
  youHaveAccess: "Nous espérons que vous allez apprécier votre abonnement. Veuillez nous contacter si vous avez des questions ou des préoccupations.",
4306
4286
  clickToLearn: {
@@ -4326,12 +4306,12 @@ var errors$e = {
4326
4306
  "": ""
4327
4307
  };
4328
4308
  var success_fr = {
4329
- labels: labels$I,
4330
- messages: messages$O,
4309
+ labels: labels$Q,
4310
+ messages: messages$T,
4331
4311
  errors: errors$e
4332
4312
  };
4333
4313
 
4334
- var messages$N = {
4314
+ var messages$S = {
4335
4315
  freeVisits: "Visites gratuites restantes:",
4336
4316
  subscribeNow: "Abonnez-vous maintenant !",
4337
4317
  alreadyHaveAccount: "Vous avez déjà un compte ?",
@@ -4341,16 +4321,16 @@ var errors$d = {
4341
4321
  "": ""
4342
4322
  };
4343
4323
  var meter_fr = {
4344
- messages: messages$N,
4324
+ messages: messages$S,
4345
4325
  errors: errors$d
4346
4326
  };
4347
4327
 
4348
- var messages$M = {
4328
+ var messages$R = {
4349
4329
  youAreSafe: "Vous êtes en sécurité - PCI conforme 128 SSL par",
4350
4330
  bankRedirection: "Veuillez patienter, nous vous redirigeons vers votre banque.",
4351
4331
  bankAuthenticationSuccess: "Veuillez patienter pendant que nous accédons à votre requête."
4352
4332
  };
4353
- var labels$H = {
4333
+ var labels$P = {
4354
4334
  card: "Entrez le numéro de carte",
4355
4335
  date: "Date d’expiration",
4356
4336
  CVC: "CVC",
@@ -4370,11 +4350,13 @@ var labels$H = {
4370
4350
  firstName: "Prénom",
4371
4351
  lastName: "Nom de famille",
4372
4352
  phone: "Téléphoner",
4373
- freeItems: "Articles gratuits"
4353
+ freeItems: "Articles gratuits",
4354
+ email: "Courriel",
4355
+ password: "Créer un mot de passe"
4374
4356
  };
4375
4357
  var checkoutForm_fr = {
4376
- messages: messages$M,
4377
- labels: labels$H
4358
+ messages: messages$R,
4359
+ labels: labels$P
4378
4360
  };
4379
4361
 
4380
4362
  var youAreSafe$2 = "Vous êtes en sécurité - PCI conforme 128 SSL par";
@@ -4398,7 +4380,7 @@ var messages_fr = {
4398
4380
  zeroTotalInvoice: zeroTotalInvoice$2
4399
4381
  };
4400
4382
 
4401
- var labels$G = {
4383
+ var labels$O = {
4402
4384
  email: "Entrez votre adresse courriel",
4403
4385
  username: "Saisissez votre nom d'utilisateur",
4404
4386
  password: "Entrez votre mot de passe",
@@ -4407,7 +4389,7 @@ var labels$G = {
4407
4389
  passwordPlaceholder: "Mot de passe",
4408
4390
  login: "Connexion"
4409
4391
  };
4410
- var messages$L = {
4392
+ var messages$Q = {
4411
4393
  loginTo: "Connectez-vous à votre compte",
4412
4394
  welcome: "Bienvenue, connectez-vous avec votre compte existant.",
4413
4395
  dontHaveAccount: "Vous n’avez pas encore de compte ?",
@@ -4426,28 +4408,28 @@ var errors$c = {
4426
4408
  "": ""
4427
4409
  };
4428
4410
  var login_fr = {
4429
- labels: labels$G,
4430
- messages: messages$L,
4411
+ labels: labels$O,
4412
+ messages: messages$Q,
4431
4413
  errors: errors$c
4432
4414
  };
4433
4415
 
4434
- var labels$F = {
4416
+ var labels$N = {
4435
4417
  title: "Confirmez votre courriel",
4436
4418
  instructions: "Confirmez votre courriel.\nVeuillez cliquer sur le lien de vérification, qui vous a été envoyé à:",
4437
4419
  resend: "Renvoyer le courriel"
4438
4420
  };
4439
- var messages$K = {
4421
+ var messages$P = {
4440
4422
  resent: "Renvoyé avec succès",
4441
4423
  success: "Vous vous êtes connecté avec succès"
4442
4424
  };
4443
4425
  var verifyLinkToken_fr = {
4444
- labels: labels$F,
4445
- messages: messages$K
4426
+ labels: labels$N,
4427
+ messages: messages$P
4446
4428
  };
4447
4429
 
4448
4430
  var title$p = "Créer un compte";
4449
4431
  var subtitle$a = "Entrez votre courriel et votre mot de passe ci-dessous";
4450
- var labels$E = {
4432
+ var labels$M = {
4451
4433
  signUpFacebook: "Inscrivez-vous avec Facebook",
4452
4434
  signUpGoogle: "Inscrivez-vous avec Google",
4453
4435
  signUpEmail: "Inscrivez-vous avec votre courriel",
@@ -4460,7 +4442,7 @@ var labels$E = {
4460
4442
  lastName: "Nom de famille",
4461
4443
  phone: "Téléphoner"
4462
4444
  };
4463
- var messages$J = {
4445
+ var messages$O = {
4464
4446
  alreadyHaveAccount: "Vous avez déjà un compte?",
4465
4447
  createAccount: "Créer un compte",
4466
4448
  loginHere: "Connectez-vous ici",
@@ -4535,14 +4517,14 @@ var redeem$2 = {
4535
4517
  var register_fr = {
4536
4518
  title: title$p,
4537
4519
  subtitle: subtitle$a,
4538
- labels: labels$E,
4539
- messages: messages$J,
4520
+ labels: labels$M,
4521
+ messages: messages$O,
4540
4522
  errors: errors$b,
4541
4523
  gift: gift$2,
4542
4524
  redeem: redeem$2
4543
4525
  };
4544
4526
 
4545
- var labels$D = {
4527
+ var labels$L = {
4546
4528
  title: "Voulez-vous mettre à jour votre profil ?",
4547
4529
  subtitle: "Entrez vos informations ci-dessous pour mettre à jour votre profil",
4548
4530
  email: "Address courriel",
@@ -4561,21 +4543,21 @@ var labels$D = {
4561
4543
  zoom: "Zoom",
4562
4544
  tin: "Numéro d'identification fiscale"
4563
4545
  };
4564
- var messages$I = {
4546
+ var messages$N = {
4565
4547
  userUpdated: "Votre profil a été mis à jour avec succès.",
4566
4548
  pictureRemoved: "Votre photo de profil a été supprimée avec succès.",
4567
4549
  pictureUpdated: "Votre photo de profil a été mise à jour avec succès."
4568
4550
  };
4569
4551
  var userEdit_fr = {
4570
- labels: labels$D,
4571
- messages: messages$I
4552
+ labels: labels$L,
4553
+ messages: messages$N
4572
4554
  };
4573
4555
 
4574
4556
  var title$o = "Entrez votre adresse de livraison";
4575
4557
  var titleGifting$2 = "Entrez votre adresse";
4576
4558
  var selectAddressTitle$2 = "Veuillez sélectionner une adresse";
4577
4559
  var selectAddressSubtitle$2 = "Choisissez l'une de vos adresses ou créez-en une nouvelle";
4578
- var labels$C = {
4560
+ var labels$K = {
4579
4561
  address: "Adresse",
4580
4562
  code: "Code postal / Zip",
4581
4563
  city: "Ville",
@@ -4586,12 +4568,12 @@ var labels$C = {
4586
4568
  required: "Champs obligatoires",
4587
4569
  isDefault: "Définir par défaut"
4588
4570
  };
4589
- var buttons$d = {
4571
+ var buttons$g = {
4590
4572
  submit: "Valider",
4591
4573
  selectAddress: "Choisir cette adresse",
4592
4574
  addAddress: "Ajouter une nouvelle adresse"
4593
4575
  };
4594
- var messages$H = {
4576
+ var messages$M = {
4595
4577
  addressUpdated: "Votre adresse a été mise à jour avec succès",
4596
4578
  subRedeemed: "Votre abonnement a bien été activé."
4597
4579
  };
@@ -4600,9 +4582,9 @@ var address_fr = {
4600
4582
  titleGifting: titleGifting$2,
4601
4583
  selectAddressTitle: selectAddressTitle$2,
4602
4584
  selectAddressSubtitle: selectAddressSubtitle$2,
4603
- labels: labels$C,
4604
- buttons: buttons$d,
4605
- messages: messages$H
4585
+ labels: labels$K,
4586
+ buttons: buttons$g,
4587
+ messages: messages$M
4606
4588
  };
4607
4589
 
4608
4590
  var title$n = "Réinitialiser votre mot de passe";
@@ -4630,7 +4612,7 @@ var password$4 = "Mot de passe";
4630
4612
  var submit$a = "Soumettre";
4631
4613
  var required$a = "Champs obligatoires";
4632
4614
  var passwordResetEmailSent$2 = "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.";
4633
- var messages$G = {
4615
+ var messages$L = {
4634
4616
  alreadyHaveAccount: "Vous avez déjà un compte ?",
4635
4617
  loginHere: "Connectez-vous ici"
4636
4618
  };
@@ -4641,7 +4623,7 @@ var passwordForgot_fr = {
4641
4623
  submit: submit$a,
4642
4624
  required: required$a,
4643
4625
  passwordResetEmailSent: passwordResetEmailSent$2,
4644
- messages: messages$G
4626
+ messages: messages$L
4645
4627
  };
4646
4628
 
4647
4629
  var title$l = "Changez votre mot de passe";
@@ -4669,7 +4651,7 @@ var title$k = "Connexion sans mot de passe";
4669
4651
  var email$6 = "Entrez votre adresse courriel";
4670
4652
  var submit$8 = "Soumettre";
4671
4653
  var required$8 = "Champs obligatoires";
4672
- var messages$F = {
4654
+ var messages$K = {
4673
4655
  PasswordlessLoginSuccess: "Vous avez été authentifié avec succès avec la connexion sans mot de passe"
4674
4656
  };
4675
4657
  var passwordlessRequest_fr = {
@@ -4677,7 +4659,7 @@ var passwordlessRequest_fr = {
4677
4659
  email: email$6,
4678
4660
  submit: submit$8,
4679
4661
  required: required$8,
4680
- messages: messages$F
4662
+ messages: messages$K
4681
4663
  };
4682
4664
 
4683
4665
  var title$j = "Votre panier";
@@ -4705,13 +4687,13 @@ var cart_fr = {
4705
4687
  removeAll: removeAll$2
4706
4688
  };
4707
4689
 
4708
- var buttons$c = {
4690
+ var buttons$f = {
4709
4691
  select: "Choisir",
4710
4692
  added: "Ajouté au panier",
4711
4693
  purchase: "Acheter",
4712
4694
  "continue": "Continuer au contenu"
4713
4695
  };
4714
- var messages$E = {
4696
+ var messages$J = {
4715
4697
  orderConfirmed: {
4716
4698
  title: "Votre commande est confirmée !",
4717
4699
  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."
@@ -4720,17 +4702,17 @@ var messages$E = {
4720
4702
  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.",
4721
4703
  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."
4722
4704
  };
4723
- var labels$B = {
4705
+ var labels$J = {
4724
4706
  summary: "récapitulatif de commande",
4725
4707
  total: "total"
4726
4708
  };
4727
4709
  var shop_fr = {
4728
- buttons: buttons$c,
4729
- messages: messages$E,
4730
- labels: labels$B
4710
+ buttons: buttons$f,
4711
+ messages: messages$J,
4712
+ labels: labels$J
4731
4713
  };
4732
4714
 
4733
- var labels$A = {
4715
+ var labels$I = {
4734
4716
  cardNumber: "Numéro de carte",
4735
4717
  securityCode: "Code de sécurité",
4736
4718
  submit: "Soumettre",
@@ -4752,7 +4734,7 @@ var labels$A = {
4752
4734
  title: "Informations de paiement"
4753
4735
  }
4754
4736
  };
4755
- var messages$D = {
4737
+ var messages$I = {
4756
4738
  youAreSafe: "Vous êtes en sécurité - PCI conforme 128 SSL par",
4757
4739
  cancel: "Annuler votre abonnement en ligne à tout moment.",
4758
4740
  giftSent: "Le cadeau d’abonnement a été envoyé à",
@@ -4766,12 +4748,12 @@ var errors$a = {
4766
4748
  "": ""
4767
4749
  };
4768
4750
  var payment_fr = {
4769
- labels: labels$A,
4770
- messages: messages$D,
4751
+ labels: labels$I,
4752
+ messages: messages$I,
4771
4753
  errors: errors$a
4772
4754
  };
4773
4755
 
4774
- var labels$z = {
4756
+ var labels$H = {
4775
4757
  menu: "Menu Pelcro",
4776
4758
  name: "Nom",
4777
4759
  email: "Courriel",
@@ -4857,9 +4839,12 @@ var labels$z = {
4857
4839
  },
4858
4840
  subCancellation: {
4859
4841
  goBack: "Retourner"
4842
+ },
4843
+ donationCancellation: {
4844
+ goBack: "Go back"
4860
4845
  }
4861
4846
  };
4862
- var messages$C = {
4847
+ var messages$H = {
4863
4848
  noCard: "Vous n’avez pas une carte",
4864
4849
  subCancellation: {
4865
4850
  isSureToCancel: "Êtes-vous certain de vouloir annuler votre abonnement?",
@@ -4876,19 +4861,35 @@ var messages$C = {
4876
4861
  loading: "Annulation de la suspension de votre abonnement",
4877
4862
  success: "L'abonnement a été suspendu avec succès",
4878
4863
  error: "Erreur lors de l'annulation de la suspension de votre abonnement"
4864
+ },
4865
+ donationCancellation: {
4866
+ isSureToCancel: "Êtes-vous certain de vouloir annuler votre don?",
4867
+ loading: "Annulation de l'don",
4868
+ success: "L'don a été annulé avec succès",
4869
+ error: "Une erreur s'est produite lors de l'annulation de l'don"
4870
+ },
4871
+ donationReactivation: {
4872
+ success: "L'don a été réactivé avec succès",
4873
+ error: "Erreur lors de la réactivation de votre don"
4874
+ },
4875
+ donationUnSuspend: {
4876
+ isSureToUnSuspend: "Êtes-vous sûr de vouloir annuler la suspension de votre don ?",
4877
+ loading: "Annulation de la suspension de votre don",
4878
+ success: "L'don a été suspendu avec succès",
4879
+ error: "Erreur lors de l'annulation de la suspension de votre don"
4879
4880
  }
4880
4881
  };
4881
4882
  var dashboard_fr = {
4882
- labels: labels$z,
4883
- messages: messages$C
4883
+ labels: labels$H,
4884
+ messages: messages$H
4884
4885
  };
4885
4886
 
4886
- var messages$B = {
4887
+ var messages$G = {
4887
4888
  alreadyHaveAccount: "Vous avez déjà un compte ?",
4888
4889
  loginHere: "Connectez-vous ici",
4889
4890
  checkbox: "Cochez cette case pour offrir cet abonnement"
4890
4891
  };
4891
- var labels$y = {
4892
+ var labels$G = {
4892
4893
  plan: {
4893
4894
  title: "Abonnez-vous à un plan",
4894
4895
  subtitle: "Sélectionnez l’un des plans ci-dessous et cliquez sur suivant."
@@ -4905,15 +4906,48 @@ var labels$y = {
4905
4906
  or: "Sinon, jetez un coup d'oeil à d'autres offres ci-dessous"
4906
4907
  }
4907
4908
  };
4908
- var buttons$b = {
4909
+ var buttons$e = {
4909
4910
  next: "Prochain",
4910
4911
  select: "Choisir",
4911
4912
  back: "Retour"
4912
4913
  };
4913
4914
  var select_fr = {
4914
- messages: messages$B,
4915
- labels: labels$y,
4916
- buttons: buttons$b
4915
+ messages: messages$G,
4916
+ labels: labels$G,
4917
+ buttons: buttons$e
4918
+ };
4919
+
4920
+ var messages$F = {
4921
+ alreadyHaveAccount: "Vous avez déjà un compte ?",
4922
+ loginHere: "Connectez-vous ici",
4923
+ checkbox: "Cochez cette case pour offrir cet abonnement"
4924
+ };
4925
+ var labels$F = {
4926
+ plan: {
4927
+ title: "Abonnez-vous à un plan",
4928
+ subtitle: "Sélectionnez l’un des plans ci-dessous et cliquez sur suivant."
4929
+ },
4930
+ product: {
4931
+ title: "Abonnez-vous à un produit",
4932
+ subtitle: "Sélectionnez l’un des produits ci-dessous et cliquez sur suivant."
4933
+ },
4934
+ selectProduct: "Sélectionnez un produit",
4935
+ selectPlan: "Sélectionnez un plan",
4936
+ starningAt: "À partir de",
4937
+ restrictiveArticles: {
4938
+ subscribeTo: "Abonnez-vous à une des options suivantes pour accéder au contenu de cette page",
4939
+ or: "Sinon, jetez un coup d'oeil à d'autres offres ci-dessous"
4940
+ }
4941
+ };
4942
+ var buttons$d = {
4943
+ next: "Prochain",
4944
+ select: "Choisir",
4945
+ back: "Retour"
4946
+ };
4947
+ var donation_fr = {
4948
+ messages: messages$F,
4949
+ labels: labels$F,
4950
+ buttons: buttons$d
4917
4951
  };
4918
4952
 
4919
4953
  var confirm$6 = {
@@ -4926,46 +4960,85 @@ var notification_fr = {
4926
4960
  confirm: confirm$6
4927
4961
  };
4928
4962
 
4929
- var labels$x = {
4963
+ var labels$E = {
4930
4964
  title: "Confirmez votre courriel",
4931
4965
  instructions: "Confirmez votre courriel.\nVeuillez cliquer sur le lien de vérification, qui vous a été envoyé à:",
4932
4966
  resend: "Renvoyer le courriel"
4933
4967
  };
4934
- var messages$A = {
4968
+ var messages$E = {
4935
4969
  resent: "Renvoyé avec succès",
4936
4970
  success: "Adresse courriel vérifiée avec succès"
4937
4971
  };
4938
4972
  var verifyEmail_fr = {
4939
- labels: labels$x,
4940
- messages: messages$A
4973
+ labels: labels$E,
4974
+ messages: messages$E
4941
4975
  };
4942
4976
 
4943
4977
  var title$i = "Détails de la facture";
4944
- var labels$w = {
4978
+ var labels$D = {
4945
4979
  summary: "Résumé",
4946
4980
  total: "Total",
4947
4981
  amountPaid: "Montant payé",
4948
4982
  amountDue: "Montant dû",
4949
4983
  creationDate: "Créé le:"
4950
4984
  };
4951
- var buttons$a = {
4985
+ var buttons$c = {
4952
4986
  download: "Télécharger",
4953
4987
  pay: "Payer"
4954
4988
  };
4955
4989
  var invoiceDetails_fr = {
4956
4990
  title: title$i,
4957
- labels: labels$w,
4958
- buttons: buttons$a
4991
+ labels: labels$D,
4992
+ buttons: buttons$c
4959
4993
  };
4960
4994
 
4961
- var labels$v = {
4995
+ var labels$C = {
4996
+ title: "Annuler l'abonnement",
4997
+ cancelReason: "Motif d'annulation",
4998
+ subCancellation: {
4999
+ goBack: "Retourner"
5000
+ }
5001
+ };
5002
+ var messages$D = {
5003
+ subscriptionEnd: "Cet abonnement doit expirer le",
5004
+ cancelNow: "Cancel Subscription Now",
5005
+ cancelLater: "Annuler l'abonnement maintenant",
5006
+ subCancellation: {
5007
+ isSureToCancelNow: "Êtes-vous sûr de vouloir résilier votre abonnement immédiatement?",
5008
+ isSureToCancel: "Êtes-vous sûr de vouloir résilier votre abonnement?",
5009
+ loading: "Annulation de votre abonnement",
5010
+ success: "L'abonnement a été annulé avec succès",
5011
+ error: "Erreur lors de l'annulation de votre abonnement"
5012
+ }
5013
+ };
5014
+ var subscriptionCancel_fr = {
5015
+ labels: labels$C,
5016
+ messages: messages$D
5017
+ };
5018
+
5019
+ var labels$B = {
5020
+ inviteMembers: "Inviter des membres",
5021
+ listOfMembers: "Liste des membres",
5022
+ invite: "Inviter",
5023
+ remove: "Retirer",
5024
+ emails: "Saisir les e-mails",
5025
+ status: "Statut",
5026
+ actions: "Actions",
5027
+ email: "E-mail",
5028
+ listNote: "Liste séparée par des virgules, par ex."
5029
+ };
5030
+ var subscriptionManageMembers_fr = {
5031
+ labels: labels$B
5032
+ };
5033
+
5034
+ var labels$A = {
4962
5035
  title: "Suspendre l'abonnement",
4963
5036
  suspensionDate: "Date de suspension",
4964
5037
  subCancellation: {
4965
5038
  goBack: "Revenir en arrière"
4966
5039
  }
4967
5040
  };
4968
- var messages$z = {
5041
+ var messages$C = {
4969
5042
  suspensionEnd: "La suspension doit expirer le",
4970
5043
  suspendNow: "Suspendre l'abonnement maintenant",
4971
5044
  suspendLater: "Suspendre à la fin de la période",
@@ -4978,8 +5051,8 @@ var messages$z = {
4978
5051
  }
4979
5052
  };
4980
5053
  var subscriptionSuspend_fr = {
4981
- labels: labels$v,
4982
- messages: messages$z
5054
+ labels: labels$A,
5055
+ messages: messages$C
4983
5056
  };
4984
5057
 
4985
5058
  var validation$1 = {
@@ -4993,7 +5066,7 @@ var validation$1 = {
4993
5066
  enterLastName: "성은 필수 항목입니다.",
4994
5067
  enterPhone: "전화번호는 필수 항목입니다."
4995
5068
  };
4996
- var buttons$9 = {
5069
+ var buttons$b = {
4997
5070
  account: "내 계정",
4998
5071
  login: "로그인",
4999
5072
  subscribe: "구독하다"
@@ -5071,7 +5144,7 @@ var confirm$5 = {
5071
5144
  };
5072
5145
  var common_ko = {
5073
5146
  validation: validation$1,
5074
- buttons: buttons$9,
5147
+ buttons: buttons$b,
5075
5148
  dashboard: dashboard$2,
5076
5149
  select: select$3,
5077
5150
  confirm: confirm$5
@@ -5102,7 +5175,7 @@ var paymentMethod_ko = {
5102
5175
  var title$h = "Frieze 뉴스레터를 구독하려면 이메일을 입력하세요.";
5103
5176
  var updateTitle$1 = "뉴스레터 선택 업데이트";
5104
5177
  var subtitle$7 = "귀하의 이메일은 다른 마케팅 용도로도 사용됩니다.";
5105
- var labels$u = {
5178
+ var labels$z = {
5106
5179
  submit: "제출",
5107
5180
  firstName: "이름",
5108
5181
  lastName: "성",
@@ -5110,7 +5183,7 @@ var labels$u = {
5110
5183
  postalCode: "우편번호",
5111
5184
  required: "필수 항목"
5112
5185
  };
5113
- var messages$y = {
5186
+ var messages$B = {
5114
5187
  alreadyHaveAccount: "이미 계정이 있습니까?",
5115
5188
  success: "뉴스레터가 성공적으로 업데이트되었습니다.",
5116
5189
  loginHere: "여기에서 로그인하세요.",
@@ -5121,14 +5194,14 @@ var newsletter_ko = {
5121
5194
  title: title$h,
5122
5195
  updateTitle: updateTitle$1,
5123
5196
  subtitle: subtitle$7,
5124
- labels: labels$u,
5125
- messages: messages$y
5197
+ labels: labels$z,
5198
+ messages: messages$B
5126
5199
  };
5127
5200
 
5128
- var labels$t = {
5201
+ var labels$y = {
5129
5202
  "continue": "콘텐츠로 돌아가기"
5130
5203
  };
5131
- var messages$x = {
5204
+ var messages$A = {
5132
5205
  yourFreeTrial: "유료 멤버십에 가입하셨습니다!",
5133
5206
  youHaveAccess: "멤버십 혜택을 즐기시기를 바라며, 질문이나 문의 사항이 있으면 저희에게 연락주십시오.",
5134
5207
  clickToLearn: {
@@ -5154,12 +5227,12 @@ var errors$9 = {
5154
5227
  "": ""
5155
5228
  };
5156
5229
  var success_ko = {
5157
- labels: labels$t,
5158
- messages: messages$x,
5230
+ labels: labels$y,
5231
+ messages: messages$A,
5159
5232
  errors: errors$9
5160
5233
  };
5161
5234
 
5162
- var messages$w = {
5235
+ var messages$z = {
5163
5236
  freeVisits: "남은 무료 방문 기간:",
5164
5237
  subscribeNow: "멤버십 가입",
5165
5238
  alreadyHaveAccount: "이미 계정이 있습니까?",
@@ -5169,16 +5242,16 @@ var errors$8 = {
5169
5242
  "": ""
5170
5243
  };
5171
5244
  var meter_ko = {
5172
- messages: messages$w,
5245
+ messages: messages$z,
5173
5246
  errors: errors$8
5174
5247
  };
5175
5248
 
5176
- var messages$v = {
5249
+ var messages$y = {
5177
5250
  youAreSafe: "PCI 준수 128비트 SSL 인증서로 보호됩니다. 제공: ",
5178
5251
  bankRedirection: "잠시만 기다려 주십시오. 결제 은행으로 연결 중입니다.",
5179
5252
  bankAuthenticationSuccess: "요청을 처리하는 동안 기다려 주십시오."
5180
5253
  };
5181
- var labels$s = {
5254
+ var labels$x = {
5182
5255
  card: "카드 번호 입력",
5183
5256
  date: "만료일",
5184
5257
  CVC: "CVC",
@@ -5198,11 +5271,13 @@ var labels$s = {
5198
5271
  firstName: "이름",
5199
5272
  lastName: "성",
5200
5273
  phone: "핸드폰",
5201
- freeItems: "무료 아이템"
5274
+ freeItems: "무료 아이템",
5275
+ email: "이메일",
5276
+ password: "비밀번호"
5202
5277
  };
5203
5278
  var checkoutForm_ko = {
5204
- messages: messages$v,
5205
- labels: labels$s
5279
+ messages: messages$y,
5280
+ labels: labels$x
5206
5281
  };
5207
5282
 
5208
5283
  var youAreSafe$1 = "PCI 준수 128비트 SSL 인증서로 보호됩니다. 제공: ";
@@ -5226,7 +5301,7 @@ var messages_ko = {
5226
5301
  zeroTotalInvoice: zeroTotalInvoice$1
5227
5302
  };
5228
5303
 
5229
- var labels$r = {
5304
+ var labels$w = {
5230
5305
  email: "이메일 입력",
5231
5306
  username: "사용자 이름 입력",
5232
5307
  password: "비밀번호 입력",
@@ -5235,7 +5310,7 @@ var labels$r = {
5235
5310
  passwordPlaceholder: "비밀번호",
5236
5311
  login: "로그인"
5237
5312
  };
5238
- var messages$u = {
5313
+ var messages$x = {
5239
5314
  loginTo: "귀하의 계정에 로그인",
5240
5315
  welcome: "반갑습니다. 귀하의 기존 계정으로 로그인하세요.",
5241
5316
  dontHaveAccount: "아직 계정이 없으신가요?",
@@ -5254,28 +5329,28 @@ var errors$7 = {
5254
5329
  "": ""
5255
5330
  };
5256
5331
  var login_ko = {
5257
- labels: labels$r,
5258
- messages: messages$u,
5332
+ labels: labels$w,
5333
+ messages: messages$x,
5259
5334
  errors: errors$7
5260
5335
  };
5261
5336
 
5262
- var labels$q = {
5337
+ var labels$v = {
5263
5338
  title: "비밀번호 없는 링크 확인",
5264
5339
  instructions: "가는 중입니다!\n이메일 주소를 확인하겠습니다.\n이메일로 전송된 확인 링크를 클릭하세요.",
5265
5340
  resend: "이메일 재전송"
5266
5341
  };
5267
- var messages$t = {
5342
+ var messages$w = {
5268
5343
  resent: "성공적으로 재전송",
5269
5344
  success: "성공적으로 로그인했습니다"
5270
5345
  };
5271
5346
  var verifyLinkToken_ko = {
5272
- labels: labels$q,
5273
- messages: messages$t
5347
+ labels: labels$v,
5348
+ messages: messages$w
5274
5349
  };
5275
5350
 
5276
5351
  var title$g = "계정 만들기";
5277
5352
  var subtitle$6 = "아래에 이메일과 비밀번호를 입력하세요.";
5278
- var labels$p = {
5353
+ var labels$u = {
5279
5354
  signUpFacebook: "Facebook으로 가입하기",
5280
5355
  signUpGoogle: "Google로 가입하기",
5281
5356
  signUpEmail: "이메일로 가입하기",
@@ -5288,7 +5363,7 @@ var labels$p = {
5288
5363
  lastName: "성",
5289
5364
  phone: "핸드폰"
5290
5365
  };
5291
- var messages$s = {
5366
+ var messages$v = {
5292
5367
  alreadyHaveAccount: "이미 계정이 있습니까?",
5293
5368
  createAccount: "계정 만들기",
5294
5369
  loginHere: "여기에서 로그인하세요.",
@@ -5362,14 +5437,14 @@ var redeem$1 = {
5362
5437
  var register_ko = {
5363
5438
  title: title$g,
5364
5439
  subtitle: subtitle$6,
5365
- labels: labels$p,
5366
- messages: messages$s,
5440
+ labels: labels$u,
5441
+ messages: messages$v,
5367
5442
  errors: errors$6,
5368
5443
  gift: gift$1,
5369
5444
  redeem: redeem$1
5370
5445
  };
5371
5446
 
5372
- var labels$o = {
5447
+ var labels$t = {
5373
5448
  title: "프로파일을 업데이트하시겠습니까?",
5374
5449
  subtitle: "프로필을 업데이트하려면 아래 정보를 입력하세요.",
5375
5450
  email: "이메일",
@@ -5388,21 +5463,21 @@ var labels$o = {
5388
5463
  zoom: "확대",
5389
5464
  tin: "세금 식별 번호"
5390
5465
  };
5391
- var messages$r = {
5466
+ var messages$u = {
5392
5467
  userUpdated: "감사합니다! 프로필이 성공적으로 업데이트되었습니다.",
5393
5468
  pictureRemoved: "귀하의 프로필 사진이 제거되었습니다.",
5394
5469
  pictureUpdated: "귀하의 프로필 사진이 업데이트되었습니다."
5395
5470
  };
5396
5471
  var userEdit_ko = {
5397
- labels: labels$o,
5398
- messages: messages$r
5472
+ labels: labels$t,
5473
+ messages: messages$u
5399
5474
  };
5400
5475
 
5401
5476
  var title$f = "배송 주소를 입력하십시오.";
5402
5477
  var titleGifting$1 = "주소를 입력하세요";
5403
5478
  var selectAddressTitle$1 = "주소를 선택하십시오.";
5404
5479
  var selectAddressSubtitle$1 = "저장된 주소에서 선택하거나 새 주소를 추가하십시오.";
5405
- var labels$n = {
5480
+ var labels$s = {
5406
5481
  address: "주소",
5407
5482
  code: "우편번호",
5408
5483
  city: "도시",
@@ -5413,12 +5488,12 @@ var labels$n = {
5413
5488
  required: "필수 항목",
5414
5489
  isDefault: "기본값으로 설정"
5415
5490
  };
5416
- var buttons$8 = {
5491
+ var buttons$a = {
5417
5492
  submit: "제출",
5418
5493
  selectAddress: "주소 선택",
5419
5494
  addAddress: "새 주소 추가"
5420
5495
  };
5421
- var messages$q = {
5496
+ var messages$t = {
5422
5497
  addressUpdated: "주소가 성공적으로 업데이트되었습니다!",
5423
5498
  subRedeemed: "귀하의 유료 멤버십이 사용되었습니다."
5424
5499
  };
@@ -5427,9 +5502,9 @@ var address_ko = {
5427
5502
  titleGifting: titleGifting$1,
5428
5503
  selectAddressTitle: selectAddressTitle$1,
5429
5504
  selectAddressSubtitle: selectAddressSubtitle$1,
5430
- labels: labels$n,
5431
- buttons: buttons$8,
5432
- messages: messages$q
5505
+ labels: labels$s,
5506
+ buttons: buttons$a,
5507
+ messages: messages$t
5433
5508
  };
5434
5509
 
5435
5510
  var title$e = "비밀번호 재설정";
@@ -5457,7 +5532,7 @@ var password$2 = "비밀번호";
5457
5532
  var submit$6 = "제출";
5458
5533
  var required$6 = "필수 항목";
5459
5534
  var passwordResetEmailSent$1 = "비밀번호 재설정 안내가 귀하의 이메일로 발송되었습니다.";
5460
- var messages$p = {
5535
+ var messages$s = {
5461
5536
  alreadyHaveAccount: "이미 계정이 있습니까?",
5462
5537
  loginHere: "여기에서 로그인하세요."
5463
5538
  };
@@ -5468,7 +5543,7 @@ var passwordForgot_ko = {
5468
5543
  submit: submit$6,
5469
5544
  required: required$6,
5470
5545
  passwordResetEmailSent: passwordResetEmailSent$1,
5471
- messages: messages$p
5546
+ messages: messages$s
5472
5547
  };
5473
5548
 
5474
5549
  var title$c = "비밀번호를 변경합니다.";
@@ -5496,7 +5571,7 @@ var title$b = "비밀번호 없는 로그인";
5496
5571
  var email$3 = "이메일 입력";
5497
5572
  var submit$4 = "제출";
5498
5573
  var required$4 = "필수 항목";
5499
- var messages$o = {
5574
+ var messages$r = {
5500
5575
  PasswordlessLoginSuccess: "비밀번호 없는 로그인으로 성공적으로 인증되었습니다."
5501
5576
  };
5502
5577
  var passwordlessRequest_ko = {
@@ -5504,7 +5579,7 @@ var passwordlessRequest_ko = {
5504
5579
  email: email$3,
5505
5580
  submit: submit$4,
5506
5581
  required: required$4,
5507
- messages: messages$o
5582
+ messages: messages$r
5508
5583
  };
5509
5584
 
5510
5585
  var title$a = "귀하의 장바구니";
@@ -5532,13 +5607,13 @@ var cart_ko = {
5532
5607
  removeAll: removeAll$1
5533
5608
  };
5534
5609
 
5535
- var buttons$7 = {
5610
+ var buttons$9 = {
5536
5611
  select: "선택",
5537
5612
  added: "장바구니에 추가",
5538
5613
  purchase: "구매",
5539
5614
  "continue": "계속"
5540
5615
  };
5541
- var messages$n = {
5616
+ var messages$q = {
5542
5617
  orderConfirmed: {
5543
5618
  title: "주문이 확인되었습니다!",
5544
5619
  body: "귀하의 주문이 확인되었으며 며칠 안에 배송될 예정입니다. 이 주문의 확인 이메일이 귀하에게 전송됩니다."
@@ -5547,17 +5622,17 @@ var messages$n = {
5547
5622
  multipleCurrencies: "장바구니에 다른 통화로만 결제가 가능한 아이템이 있습니다. 결제를 계속 진행하려면 모든 아이템의 결제 통화가 동일한지 확인하십시오.",
5548
5623
  currencyMismatch: "선택하신 아이템(들)이 귀하가 설정한 기본 통화({{currency}})와 일치하지 않습니다. 기본 통화와 일치하는 아이템(들)만 선택하십시오."
5549
5624
  };
5550
- var labels$m = {
5625
+ var labels$r = {
5551
5626
  summary: "주문 요약",
5552
5627
  total: "총계"
5553
5628
  };
5554
5629
  var shop_ko = {
5555
- buttons: buttons$7,
5556
- messages: messages$n,
5557
- labels: labels$m
5630
+ buttons: buttons$9,
5631
+ messages: messages$q,
5632
+ labels: labels$r
5558
5633
  };
5559
5634
 
5560
- var labels$l = {
5635
+ var labels$q = {
5561
5636
  cardNumber: "카드 번호",
5562
5637
  securityCode: "보안 코드",
5563
5638
  submit: "제출",
@@ -5579,7 +5654,7 @@ var labels$l = {
5579
5654
  title: "결제 정보"
5580
5655
  }
5581
5656
  };
5582
- var messages$m = {
5657
+ var messages$p = {
5583
5658
  youAreSafe: "PCI 준수 128비트 SSL 인증서로 보호됩니다. 제공: ",
5584
5659
  cancel: "유료 멤버십은 언제든 온라인으로 취소가 가능합니다.",
5585
5660
  giftSent: "유료 멤버십 선물이 ",
@@ -5593,12 +5668,12 @@ var errors$5 = {
5593
5668
  "": ""
5594
5669
  };
5595
5670
  var payment_ko = {
5596
- labels: labels$l,
5597
- messages: messages$m,
5671
+ labels: labels$q,
5672
+ messages: messages$p,
5598
5673
  errors: errors$5
5599
5674
  };
5600
5675
 
5601
- var labels$k = {
5676
+ var labels$p = {
5602
5677
  menu: "Pelcro 메뉴",
5603
5678
  name: "이름",
5604
5679
  email: "이메일",
@@ -5746,7 +5821,10 @@ var savedItems = {
5746
5821
  var subCancellation = {
5747
5822
  goBack: "뒤로 가기"
5748
5823
  };
5749
- var messages$l = {
5824
+ var donationCancellation = {
5825
+ goBack: "뒤로 가기"
5826
+ };
5827
+ var messages$o = {
5750
5828
  noCard: "등록된 카드가 없습니다.",
5751
5829
  subCancellation: {
5752
5830
  isSureToCancel: "정말로 유료 멤버십을 취소하시겠습니까?",
@@ -5763,10 +5841,26 @@ var messages$l = {
5763
5841
  loading: "구독 일시 중단 해제",
5764
5842
  success: "구독이 성공적으로 일시 중단 해제되었습니다",
5765
5843
  error: "구독 일시 중단을 해제하는 동안 오류가 발생했습니다."
5844
+ },
5845
+ donationCancellation: {
5846
+ isSureToCancel: "정말로 유료 멤버십을 취소하시겠습니까?",
5847
+ loading: "귀하의 유료 멤버십을 취소합니다.",
5848
+ success: "유료 멤버십이 성공적으로 취소되었습니다.",
5849
+ error: "유료 멤버십 취소 과정에서 오류가 발생했습니다."
5850
+ },
5851
+ donationReactivation: {
5852
+ success: "구독이 성공적으로 재활성화되었습니다.",
5853
+ error: "구독을 재활성화하는 동안 오류가 발생했습니다."
5854
+ },
5855
+ donationUnSuspend: {
5856
+ isSureToUnSuspend: "구독 일시 중단을 해제하시겠습니까?",
5857
+ loading: "구독 일시 중단 해제",
5858
+ success: "구독이 성공적으로 일시 중단 해제되었습니다",
5859
+ error: "구독 일시 중단을 해제하는 동안 오류가 발생했습니다."
5766
5860
  }
5767
5861
  };
5768
5862
  var dashboard_ko = {
5769
- labels: labels$k,
5863
+ labels: labels$p,
5770
5864
  shipments: shipments,
5771
5865
  logout: logout,
5772
5866
  dashboard: dashboard$1,
@@ -5815,15 +5909,16 @@ var dashboard_ko = {
5815
5909
  orders: orders,
5816
5910
  savedItems: savedItems,
5817
5911
  subCancellation: subCancellation,
5818
- messages: messages$l
5912
+ donationCancellation: donationCancellation,
5913
+ messages: messages$o
5819
5914
  };
5820
5915
 
5821
- var messages$k = {
5916
+ var messages$n = {
5822
5917
  alreadyHaveAccount: "이미 계정이 있습니까?",
5823
5918
  loginHere: "여기에서 로그인하세요.",
5824
5919
  checkbox: "이 유료 멤버십을 선물하려면 체크하세요."
5825
5920
  };
5826
- var labels$j = {
5921
+ var labels$o = {
5827
5922
  plan: {
5828
5923
  title: "요금제 가입하기",
5829
5924
  subtitle: "아래 요금제 중 하나를 선택하고 다음을 클릭하세요."
@@ -5840,67 +5935,139 @@ var labels$j = {
5840
5935
  or: "아래에서 다른 상품을 선택해주시기 바랍니다."
5841
5936
  }
5842
5937
  };
5843
- var buttons$6 = {
5938
+ var buttons$8 = {
5844
5939
  next: "다음",
5845
5940
  select: "선택",
5846
5941
  back: "뒤로"
5847
5942
  };
5848
5943
  var select_ko = {
5849
- messages: messages$k,
5850
- labels: labels$j,
5851
- buttons: buttons$6
5944
+ messages: messages$n,
5945
+ labels: labels$o,
5946
+ buttons: buttons$8
5852
5947
  };
5853
5948
 
5854
- var confirm$3 = {
5855
- labels: {
5856
- confirm: "확인",
5857
- close: "닫기"
5858
- }
5859
- };
5860
- var notification_ko = {
5861
- confirm: confirm$3
5949
+ var messages$m = {
5950
+ alreadyHaveAccount: "이미 계정이 있습니까?",
5951
+ loginHere: "여기에서 로그인하세요.",
5952
+ checkbox: "이 유료 멤버십을 선물하려면 체크하세요."
5862
5953
  };
5863
-
5864
- var labels$i = {
5865
- title: "이메일 주소를 인증하세요.",
5954
+ var labels$n = {
5955
+ plan: {
5956
+ title: "요금제 가입하기",
5957
+ subtitle: "아래 요금제 중 하나를 선택하고 다음을 클릭하세요."
5958
+ },
5959
+ product: {
5960
+ title: "상품 가입하기",
5961
+ subtitle: "아래 상품 중 하나를 선택하고 다음을 클릭하세요."
5962
+ },
5963
+ selectProduct: "상품 선택",
5964
+ selectPlan: "요금제 선택",
5965
+ startingAt: "시작일:",
5966
+ restrictiveArticles: {
5967
+ subscribeTo: "이 페이지에 액세스하려면 다음 요금제 중 하나에 가입하거나",
5968
+ or: "아래에서 다른 상품을 선택해주시기 바랍니다."
5969
+ }
5970
+ };
5971
+ var buttons$7 = {
5972
+ next: "다음",
5973
+ select: "선택",
5974
+ back: "뒤로"
5975
+ };
5976
+ var donation_ko = {
5977
+ messages: messages$m,
5978
+ labels: labels$n,
5979
+ buttons: buttons$7
5980
+ };
5981
+
5982
+ var confirm$3 = {
5983
+ labels: {
5984
+ confirm: "확인",
5985
+ close: "닫기"
5986
+ }
5987
+ };
5988
+ var notification_ko = {
5989
+ confirm: confirm$3
5990
+ };
5991
+
5992
+ var labels$m = {
5993
+ title: "이메일 주소를 인증하세요.",
5866
5994
  instructions: "거의 완료되었습니다!\n이메일 주소만 인증하면 됩니다.\n다음 이메일 주소로 전송된 인증 링크를 클릭해 주십시오:",
5867
5995
  resend: "이메일 재전송"
5868
5996
  };
5869
- var messages$j = {
5997
+ var messages$l = {
5870
5998
  resent: "재전송 완료",
5871
5999
  success: "이메일 주소가 인증되었습니다!"
5872
6000
  };
5873
6001
  var verifyEmail_ko = {
5874
- labels: labels$i,
5875
- messages: messages$j
6002
+ labels: labels$m,
6003
+ messages: messages$l
5876
6004
  };
5877
6005
 
5878
6006
  var title$9 = "인보이스 세부 정보";
5879
- var labels$h = {
6007
+ var labels$l = {
5880
6008
  summary: "요약",
5881
6009
  total: "총계",
5882
6010
  amountPaid: "지불된 금액",
5883
6011
  amountDue: "지불액",
5884
6012
  creationDate: "생성일:"
5885
6013
  };
5886
- var buttons$5 = {
6014
+ var buttons$6 = {
5887
6015
  download: "다운로드",
5888
6016
  pay: "지금 지불"
5889
6017
  };
5890
6018
  var invoiceDetails_ko = {
5891
6019
  title: title$9,
5892
- labels: labels$h,
5893
- buttons: buttons$5
6020
+ labels: labels$l,
6021
+ buttons: buttons$6
5894
6022
  };
5895
6023
 
5896
- var labels$g = {
6024
+ var labels$k = {
6025
+ title: "구독 취소",
6026
+ cancelReason: "취소 사유",
6027
+ subCancellation: {
6028
+ goBack: "돌아가기"
6029
+ }
6030
+ };
6031
+ var messages$k = {
6032
+ subscriptionEnd: "이 구독은 다음 날짜에 만료되도록 설정되었습니다.",
6033
+ cancelNow: "지금 구독 취소",
6034
+ cancelLater: "기간 종료 시 취소",
6035
+ subCancellation: {
6036
+ isSureToCancelNow: "구독을 즉시 취소하시겠습니까?",
6037
+ isSureToCancel: "구독을 취소하시겠습니까?",
6038
+ loading: "구독 취소",
6039
+ success: "구독이 성공적으로 취소되었습니다.",
6040
+ error: "구독 취소 중 오류 발생"
6041
+ }
6042
+ };
6043
+ var subscriptionCancel_ko = {
6044
+ labels: labels$k,
6045
+ messages: messages$k
6046
+ };
6047
+
6048
+ var labels$j = {
6049
+ inviteMembers: "회원 초대",
6050
+ listOfMembers: "구성원 목록",
6051
+ invite: "초대",
6052
+ remove: "제거하다",
6053
+ emails: "이메일 입력",
6054
+ status: "상태",
6055
+ actions: "행위",
6056
+ email: "이메일",
6057
+ listNote: "쉼표로 구분된 목록입니다."
6058
+ };
6059
+ var subscriptionManageMembers_ko = {
6060
+ labels: labels$j
6061
+ };
6062
+
6063
+ var labels$i = {
5897
6064
  title: "구독 중단",
5898
6065
  suspensionDate: "중단 날짜",
5899
6066
  subCancellation: {
5900
6067
  goBack: "돌아가기"
5901
6068
  }
5902
6069
  };
5903
- var messages$i = {
6070
+ var messages$j = {
5904
6071
  suspensionEnd: "일시 중지가 만료되도록 설정되었습니다.",
5905
6072
  suspendNow: "지금 구독 일시 중단",
5906
6073
  suspendLater: "기간 종료 시 일시 중단",
@@ -5913,8 +6080,8 @@ var messages$i = {
5913
6080
  }
5914
6081
  };
5915
6082
  var subscriptionSuspend_ko = {
5916
- labels: labels$g,
5917
- messages: messages$i
6083
+ labels: labels$i,
6084
+ messages: messages$j
5918
6085
  };
5919
6086
 
5920
6087
  var validation = {
@@ -5926,7 +6093,7 @@ var validation = {
5926
6093
  enterLastName: "El apellido es obligatorio.",
5927
6094
  enterPhone: "El número de teléfono es obligatorio."
5928
6095
  };
5929
- var buttons$4 = {
6096
+ var buttons$5 = {
5930
6097
  account: "Mi cuenta",
5931
6098
  login: "Iniciar Sesión"
5932
6099
  };
@@ -6003,7 +6170,7 @@ var confirm$2 = {
6003
6170
  };
6004
6171
  var common_es = {
6005
6172
  validation: validation,
6006
- buttons: buttons$4,
6173
+ buttons: buttons$5,
6007
6174
  dashboard: dashboard,
6008
6175
  select: select$1,
6009
6176
  confirm: confirm$2
@@ -6034,7 +6201,7 @@ var paymentMethod_es = {
6034
6201
  var title$8 = "Ingresa tu correo para suscribirte a nuestro boletín";
6035
6202
  var updateTitle = "Actualizar selecciones del boletín";
6036
6203
  var subtitle$3 = "Podríamos usar tu dirección de correo para otras comunicaciones de marketing";
6037
- var labels$f = {
6204
+ var labels$h = {
6038
6205
  submit: "Enviar",
6039
6206
  firstName: "Nombre",
6040
6207
  lastName: "Apellido",
@@ -6042,7 +6209,7 @@ var labels$f = {
6042
6209
  postalCode: "Código postal",
6043
6210
  required: "obligatorio"
6044
6211
  };
6045
- var messages$h = {
6212
+ var messages$i = {
6046
6213
  alreadyHaveAccount: "¿Ya tienes una cuenta?",
6047
6214
  success: "El boletín se actualizó con éxito",
6048
6215
  loginHere: "Inicia sesión aquí.",
@@ -6053,14 +6220,14 @@ var newsletter_es = {
6053
6220
  title: title$8,
6054
6221
  updateTitle: updateTitle,
6055
6222
  subtitle: subtitle$3,
6056
- labels: labels$f,
6057
- messages: messages$h
6223
+ labels: labels$h,
6224
+ messages: messages$i
6058
6225
  };
6059
6226
 
6060
- var labels$e = {
6227
+ var labels$g = {
6061
6228
  "continue": "Continuar al contenido"
6062
6229
  };
6063
- var messages$g = {
6230
+ var messages$h = {
6064
6231
  yourFreeTrial: "¡Suscripción exitosa!",
6065
6232
  youHaveAccess: "Esperamos que disfrutes de tu suscripción. Por favor, contáctanos si tienes alguna pregunta o inquietud.",
6066
6233
  clickToLearn: {
@@ -6086,12 +6253,12 @@ var errors$4 = {
6086
6253
  "": ""
6087
6254
  };
6088
6255
  var success_es = {
6089
- labels: labels$e,
6090
- messages: messages$g,
6256
+ labels: labels$g,
6257
+ messages: messages$h,
6091
6258
  errors: errors$4
6092
6259
  };
6093
6260
 
6094
- var messages$f = {
6261
+ var messages$g = {
6095
6262
  freeVisits: "Visitas gratuitas restantes:",
6096
6263
  subscribeNow: "Suscribir",
6097
6264
  alreadyHaveAccount: "¿Ya tienes una cuenta?",
@@ -6101,16 +6268,16 @@ var errors$3 = {
6101
6268
  "": ""
6102
6269
  };
6103
6270
  var meter_es = {
6104
- messages: messages$f,
6271
+ messages: messages$g,
6105
6272
  errors: errors$3
6106
6273
  };
6107
6274
 
6108
- var messages$e = {
6275
+ var messages$f = {
6109
6276
  youAreSafe: "Estás seguro - PCI compliance 128 SSL por",
6110
6277
  bankRedirection: "Por favor, espera, estamos redireccionando a tu banco.",
6111
6278
  bankAuthenticationSuccess: "Por favor, espera un momento mientras procesamos tu solicitud."
6112
6279
  };
6113
- var labels$d = {
6280
+ var labels$f = {
6114
6281
  card: "Ingresar número de tarjeta",
6115
6282
  date: "Vencimiento",
6116
6283
  CVC: "CVC",
@@ -6130,11 +6297,13 @@ var labels$d = {
6130
6297
  firstName: "Nombre",
6131
6298
  lastName: "Apellido",
6132
6299
  phone: "Teléfono",
6133
- freeItems: "Artículos gratis"
6300
+ freeItems: "Artículos gratis",
6301
+ email: "Correo",
6302
+ password: "Contraseña"
6134
6303
  };
6135
6304
  var checkoutForm_es = {
6136
- messages: messages$e,
6137
- labels: labels$d
6305
+ messages: messages$f,
6306
+ labels: labels$f
6138
6307
  };
6139
6308
 
6140
6309
  var youAreSafe = "Estás seguro - PCI compliance 128 SSL por";
@@ -6156,7 +6325,7 @@ var messages_es = {
6156
6325
  zeroTotalInvoice: zeroTotalInvoice
6157
6326
  };
6158
6327
 
6159
- var labels$c = {
6328
+ var labels$e = {
6160
6329
  email: "Ingresar correo",
6161
6330
  password: "Ingresar contraseña",
6162
6331
  required: "obligatorio",
@@ -6164,7 +6333,7 @@ var labels$c = {
6164
6333
  passwordPlaceholder: "Contraseña",
6165
6334
  login: "Iniciar Sesión"
6166
6335
  };
6167
- var messages$d = {
6336
+ var messages$e = {
6168
6337
  loginTo: "Inicia sesión en tu cuenta",
6169
6338
  welcome: "Bienvenido de vuelta, inicia sesión con tu cuenta existente.",
6170
6339
  dontHaveAccount: "¿Aún no tienes una cuenta?",
@@ -6183,28 +6352,28 @@ var errors$2 = {
6183
6352
  "": ""
6184
6353
  };
6185
6354
  var login_es = {
6186
- labels: labels$c,
6187
- messages: messages$d,
6355
+ labels: labels$e,
6356
+ messages: messages$e,
6188
6357
  errors: errors$2
6189
6358
  };
6190
6359
 
6191
- var labels$b = {
6360
+ var labels$d = {
6192
6361
  title: "Verificando Enlace Sin Contraseña",
6193
6362
  instructions: "¡Ya casi terminas!\nVamos a confirmar tu dirección de correo.\nPulsa el enlace de verificación que hemos enviado a tu correo:",
6194
6363
  resend: "Reenviar correo"
6195
6364
  };
6196
- var messages$c = {
6365
+ var messages$d = {
6197
6366
  resent: "Reenvío exitoso",
6198
6367
  success: "Inicio de sesión exitoso"
6199
6368
  };
6200
6369
  var verifyLinkToken_es = {
6201
- labels: labels$b,
6202
- messages: messages$c
6370
+ labels: labels$d,
6371
+ messages: messages$d
6203
6372
  };
6204
6373
 
6205
6374
  var title$7 = "Crear una cuenta";
6206
6375
  var subtitle$2 = "Ingresa tu correo y contraseña a continuación";
6207
- var labels$a = {
6376
+ var labels$c = {
6208
6377
  signUpFacebook: "Regístrate con Facebook",
6209
6378
  signUpGoogle: "Regístrate con Google",
6210
6379
  signUpEmail: "Regístrate con Correo",
@@ -6217,7 +6386,7 @@ var labels$a = {
6217
6386
  lastName: "Apellido",
6218
6387
  phone: "Teléfono"
6219
6388
  };
6220
- var messages$b = {
6389
+ var messages$c = {
6221
6390
  alreadyHaveAccount: " ¿Ya tienes una cuenta?",
6222
6391
  createAccount: "Crear cuenta",
6223
6392
  loginHere: "inicia sesión aquí",
@@ -6291,14 +6460,14 @@ var redeem = {
6291
6460
  var register_es = {
6292
6461
  title: title$7,
6293
6462
  subtitle: subtitle$2,
6294
- labels: labels$a,
6295
- messages: messages$b,
6463
+ labels: labels$c,
6464
+ messages: messages$c,
6296
6465
  errors: errors$1,
6297
6466
  gift: gift,
6298
6467
  redeem: redeem
6299
6468
  };
6300
6469
 
6301
- var labels$9 = {
6470
+ var labels$b = {
6302
6471
  title: "¿Quieres actualizar tu perfil?",
6303
6472
  subtitle: "Ingresa tu información a continuación para actualizar tu perfil",
6304
6473
  email: "Correo",
@@ -6317,21 +6486,21 @@ var labels$9 = {
6317
6486
  zoom: "Acercar",
6318
6487
  tin: "Número de Identificación Fiscal"
6319
6488
  };
6320
- var messages$a = {
6489
+ var messages$b = {
6321
6490
  userUpdated: "¡Gracias! Tu perfil se actualizó con éxito.",
6322
6491
  pictureRemoved: "Tu foto de perfil se eliminó con éxito.",
6323
6492
  pictureUpdated: "Tu foto de perfil se actualizó con éxito."
6324
6493
  };
6325
6494
  var userEdit_es = {
6326
- labels: labels$9,
6327
- messages: messages$a
6495
+ labels: labels$b,
6496
+ messages: messages$b
6328
6497
  };
6329
6498
 
6330
6499
  var title$6 = "Ingresa tu dirección de envío";
6331
6500
  var titleGifting = "Introduce tu dirección";
6332
6501
  var selectAddressTitle = "Por favor, selecciona una dirección";
6333
6502
  var selectAddressSubtitle = "Selecciona una de tus direcciones guardadas o añade una nueva";
6334
- var labels$8 = {
6503
+ var labels$a = {
6335
6504
  address: "Dirección",
6336
6505
  code: "Código Postal/Área",
6337
6506
  city: "Ciudad",
@@ -6342,12 +6511,12 @@ var labels$8 = {
6342
6511
  required: "obligatorio",
6343
6512
  isDefault: "Configurar como dirección Principal"
6344
6513
  };
6345
- var buttons$3 = {
6514
+ var buttons$4 = {
6346
6515
  submit: "Enviar",
6347
6516
  selectAddress: "Seleccionar dirección",
6348
6517
  addAddress: "Añadir nueva dirección"
6349
6518
  };
6350
- var messages$9 = {
6519
+ var messages$a = {
6351
6520
  addressUpdated: "¡La dirección se actualizó con éxito!",
6352
6521
  subRedeemed: "Tu suscripción ha sido redimida."
6353
6522
  };
@@ -6356,9 +6525,9 @@ var address_es = {
6356
6525
  titleGifting: titleGifting,
6357
6526
  selectAddressTitle: selectAddressTitle,
6358
6527
  selectAddressSubtitle: selectAddressSubtitle,
6359
- labels: labels$8,
6360
- buttons: buttons$3,
6361
- messages: messages$9
6528
+ labels: labels$a,
6529
+ buttons: buttons$4,
6530
+ messages: messages$a
6362
6531
  };
6363
6532
 
6364
6533
  var title$5 = "Restablecer tu contraseña";
@@ -6386,7 +6555,7 @@ var password = "Contraseña";
6386
6555
  var submit$2 = "Enviar";
6387
6556
  var required$2 = "Obligatorio";
6388
6557
  var passwordResetEmailSent = "Las instrucciones de restablecimiento de la contraseña se han enviado a tu correo";
6389
- var messages$8 = {
6558
+ var messages$9 = {
6390
6559
  alreadyHaveAccount: "¿Ya tienes una cuenta?",
6391
6560
  loginHere: "Inicia sesión aquí."
6392
6561
  };
@@ -6397,7 +6566,7 @@ var passwordForgot_es = {
6397
6566
  submit: submit$2,
6398
6567
  required: required$2,
6399
6568
  passwordResetEmailSent: passwordResetEmailSent,
6400
- messages: messages$8
6569
+ messages: messages$9
6401
6570
  };
6402
6571
 
6403
6572
  var title$3 = "Cambiar tu contraseña";
@@ -6425,7 +6594,7 @@ var title$2 = "Acceso sin contraseña";
6425
6594
  var email = "Ingresar correo";
6426
6595
  var submit = "Enviar";
6427
6596
  var required = "obligatorio";
6428
- var messages$7 = {
6597
+ var messages$8 = {
6429
6598
  PasswordlessLoginSuccess: "Por favor, revisa tu correo y sigue las instrucciones que se indican"
6430
6599
  };
6431
6600
  var passwordlessRequest_es = {
@@ -6433,7 +6602,7 @@ var passwordlessRequest_es = {
6433
6602
  email: email,
6434
6603
  submit: submit,
6435
6604
  required: required,
6436
- messages: messages$7
6605
+ messages: messages$8
6437
6606
  };
6438
6607
 
6439
6608
  var title$1 = "Tu carrito de compras";
@@ -6461,13 +6630,13 @@ var cart_es = {
6461
6630
  removeAll: removeAll
6462
6631
  };
6463
6632
 
6464
- var buttons$2 = {
6633
+ var buttons$3 = {
6465
6634
  select: "Seleccionar",
6466
6635
  added: "Añadido al carrito",
6467
6636
  purchase: "Compra",
6468
6637
  "continue": "Continuar"
6469
6638
  };
6470
- var messages$6 = {
6639
+ var messages$7 = {
6471
6640
  orderConfirmed: {
6472
6641
  title: "¡Orden confirmada!",
6473
6642
  body: "Tu orden ha sido confirmada y será enviada en los próximos días. En breve recibirás un correo electrónico de confirmación de esta orden."
@@ -6476,17 +6645,17 @@ var messages$6 = {
6476
6645
  multipleCurrencies: "Tu carrito actualmente contiene artículos que están disponibles en diferentes divisas. Para proceder a la compra, asegúrate de que todos los artículos tengan la misma divisa.",
6477
6646
  currencyMismatch: "El siguiente artículo(s) no coincide con tu divisa predeterminada actual ({{currency}}). Por favor, solo elige artículos que coincidan con esta divisa."
6478
6647
  };
6479
- var labels$7 = {
6648
+ var labels$9 = {
6480
6649
  summary: "Resumen de la orden",
6481
6650
  total: "total"
6482
6651
  };
6483
6652
  var shop_es = {
6484
- buttons: buttons$2,
6485
- messages: messages$6,
6486
- labels: labels$7
6653
+ buttons: buttons$3,
6654
+ messages: messages$7,
6655
+ labels: labels$9
6487
6656
  };
6488
6657
 
6489
- var labels$6 = {
6658
+ var labels$8 = {
6490
6659
  cardNumber: "Número de Tarjeta",
6491
6660
  securityCode: "Código de Seguridad",
6492
6661
  submit: "Enviar",
@@ -6508,7 +6677,7 @@ var labels$6 = {
6508
6677
  title: "Información de Pago"
6509
6678
  }
6510
6679
  };
6511
- var messages$5 = {
6680
+ var messages$6 = {
6512
6681
  youAreSafe: "Estás seguro - PCI compliance 128 SSL por",
6513
6682
  cancel: "Cancela tu suscripción en línea en cualquier momento.",
6514
6683
  giftSent: "La suscripción de regalo se ha enviado a",
@@ -6522,12 +6691,12 @@ var errors = {
6522
6691
  "": ""
6523
6692
  };
6524
6693
  var payment_es = {
6525
- labels: labels$6,
6526
- messages: messages$5,
6694
+ labels: labels$8,
6695
+ messages: messages$6,
6527
6696
  errors: errors
6528
6697
  };
6529
6698
 
6530
- var labels$5 = {
6699
+ var labels$7 = {
6531
6700
  menu: "Menú de Pelcro",
6532
6701
  name: "Nombre",
6533
6702
  email: "Correo",
@@ -6542,6 +6711,7 @@ var labels$5 = {
6542
6711
  scheduled: "Programada",
6543
6712
  incomplete: "Incompleta"
6544
6713
  },
6714
+ manageMembers: "Administrar miembros",
6545
6715
  shipments: "Envíos restantes",
6546
6716
  logout: "Cerrar sesión",
6547
6717
  dashboard: "Panel",
@@ -6612,9 +6782,12 @@ var labels$5 = {
6612
6782
  },
6613
6783
  subCancellation: {
6614
6784
  goBack: "Volver"
6785
+ },
6786
+ donationCancellation: {
6787
+ goBack: "Go back"
6615
6788
  }
6616
6789
  };
6617
- var messages$4 = {
6790
+ var messages$5 = {
6618
6791
  noCard: "No tienes una tarjeta",
6619
6792
  subCancellation: {
6620
6793
  isSureToCancel: "¿Estás seguro de que quieres cancelar tu suscripción?",
@@ -6631,11 +6804,60 @@ var messages$4 = {
6631
6804
  loading: "Reanudando tu suscripción",
6632
6805
  success: "La suscripción se reanudó con éxito",
6633
6806
  error: "Error al reanudar tu suscripción"
6807
+ },
6808
+ donationCancellation: {
6809
+ isSureToCancel: "¿Estás seguro de que quieres cancelar tu donación?",
6810
+ loading: "Cancelando tu donación",
6811
+ success: "La donación se canceló con éxito",
6812
+ error: "Error al cancelar tu donación"
6813
+ },
6814
+ donationReactivation: {
6815
+ success: "La donación se reactivó con éxito",
6816
+ error: "Error al reactivar su donación"
6817
+ },
6818
+ donationUnSuspend: {
6819
+ isSureToUnSuspend: "¿Estás seguro de que quieres reanudar tu donación?",
6820
+ loading: "Reanudando tu donación",
6821
+ success: "La donación se reanudó con éxito",
6822
+ error: "Error al reanudar tu donación"
6634
6823
  }
6635
6824
  };
6636
6825
  var dashboard_es = {
6637
- labels: labels$5,
6638
- messages: messages$4
6826
+ labels: labels$7,
6827
+ messages: messages$5
6828
+ };
6829
+
6830
+ var messages$4 = {
6831
+ alreadyHaveAccount: "¿Ya tienes una cuenta?",
6832
+ loginHere: "Inicia sesión aquí",
6833
+ checkbox: "Marca esta casilla para regalar esta suscripción"
6834
+ };
6835
+ var labels$6 = {
6836
+ plan: {
6837
+ title: "Suscribirse a un plan",
6838
+ subtitle: "Selecciona uno de los planes a continuación y pulsa en siguiente."
6839
+ },
6840
+ product: {
6841
+ title: "Suscribirse a un producto",
6842
+ subtitle: "Selecciona uno de los productos a continuación y pulsa en siguiente."
6843
+ },
6844
+ selectProduct: "Selecciona un producto",
6845
+ selectPlan: "Selecciona un plan",
6846
+ startingAt: "Inicia el",
6847
+ restrictiveArticles: {
6848
+ subscribeTo: "Suscríbete a una de las siguientes opciones para obtener acceso a esta página",
6849
+ or: "O revisa algunas de nuestras otras opciones a continuación"
6850
+ }
6851
+ };
6852
+ var buttons$2 = {
6853
+ next: "Siguiente",
6854
+ select: "Seleccionar",
6855
+ back: "Volver"
6856
+ };
6857
+ var select_es = {
6858
+ messages: messages$4,
6859
+ labels: labels$6,
6860
+ buttons: buttons$2
6639
6861
  };
6640
6862
 
6641
6863
  var messages$3 = {
@@ -6643,7 +6865,7 @@ var messages$3 = {
6643
6865
  loginHere: "Inicia sesión aquí",
6644
6866
  checkbox: "Marca esta casilla para regalar esta suscripción"
6645
6867
  };
6646
- var labels$4 = {
6868
+ var labels$5 = {
6647
6869
  plan: {
6648
6870
  title: "Suscribirse a un plan",
6649
6871
  subtitle: "Selecciona uno de los planes a continuación y pulsa en siguiente."
@@ -6665,9 +6887,9 @@ var buttons$1 = {
6665
6887
  select: "Seleccionar",
6666
6888
  back: "Volver"
6667
6889
  };
6668
- var select_es = {
6890
+ var donation_es = {
6669
6891
  messages: messages$3,
6670
- labels: labels$4,
6892
+ labels: labels$5,
6671
6893
  buttons: buttons$1
6672
6894
  };
6673
6895
 
@@ -6681,7 +6903,7 @@ var notification_es = {
6681
6903
  confirm: confirm
6682
6904
  };
6683
6905
 
6684
- var labels$3 = {
6906
+ var labels$4 = {
6685
6907
  title: "Verifica tu correo",
6686
6908
  instructions: "¡Ya casi terminas!\nVamos a confirmar tu dirección de correo.\nPulsa el enlace de verificación que hemos enviado a tu correo:",
6687
6909
  resend: "Reenviar correo"
@@ -6691,12 +6913,12 @@ var messages$2 = {
6691
6913
  success: "¡El correo se verificó con éxito!"
6692
6914
  };
6693
6915
  var verifyEmail_es = {
6694
- labels: labels$3,
6916
+ labels: labels$4,
6695
6917
  messages: messages$2
6696
6918
  };
6697
6919
 
6698
6920
  var title = "Detalles del comprobante de pago";
6699
- var labels$2 = {
6921
+ var labels$3 = {
6700
6922
  summary: "Resumen",
6701
6923
  total: "Total",
6702
6924
  amountPaid: "Monto pagado",
@@ -6709,11 +6931,11 @@ var buttons = {
6709
6931
  };
6710
6932
  var invoiceDetails_es = {
6711
6933
  title: title,
6712
- labels: labels$2,
6934
+ labels: labels$3,
6713
6935
  buttons: buttons
6714
6936
  };
6715
6937
 
6716
- var labels$1 = {
6938
+ var labels$2 = {
6717
6939
  title: "Cancelar suscripción",
6718
6940
  cancelReason: "Razón de la cancelación",
6719
6941
  subCancellation: {
@@ -6733,10 +6955,25 @@ var messages$1 = {
6733
6955
  }
6734
6956
  };
6735
6957
  var subscriptionCancel_es = {
6736
- labels: labels$1,
6958
+ labels: labels$2,
6737
6959
  messages: messages$1
6738
6960
  };
6739
6961
 
6962
+ var labels$1 = {
6963
+ inviteMembers: "Invitar miembros",
6964
+ listOfMembers: "Lista de miembros",
6965
+ invite: "Invitar",
6966
+ remove: "quitar",
6967
+ emails: "Ingresar correo electrónico",
6968
+ status: "Estado",
6969
+ actions: "Acciones",
6970
+ email: "Correo electrónico",
6971
+ listNote: "Lista separada por comas, por ejemplo"
6972
+ };
6973
+ var subscriptionManageMembers_es = {
6974
+ labels: labels$1
6975
+ };
6976
+
6740
6977
  var labels = {
6741
6978
  title: "Suspender suscripción",
6742
6979
  suspensionDate: "Fecha de suspensión",
@@ -9046,6 +9283,9 @@ const initialState$n = {
9046
9283
  giftCode: "",
9047
9284
  subscriptionIdToRenew: null,
9048
9285
  subscriptionToManageMembers: null,
9286
+ isDonation: false,
9287
+ selectedDonationAmount: null,
9288
+ customDonationAmount: null,
9049
9289
  // E-commerce
9050
9290
  cartItems: [],
9051
9291
  order: null,
@@ -9235,7 +9475,7 @@ const calcAndFormatItemsTotal = (items, currency) => {
9235
9475
  * @return {boolean}
9236
9476
  */
9237
9477
  const isValidViewFromURL = viewID => {
9238
- if (["login", "register", "plan-select", "gift-redeem", "password-forgot", "password-reset", "password-change", "passwordless-request", "passwordless-login", "payment-method-update", "user-edit", "newsletter", "address-create", "order-create", "cart", "email-verify", "invoice-details", "manage-members"].includes(viewID) || hasValidNewsletterUpdateUrl()) {
9478
+ if (["login", "register", "plan-select", "donation-select", "gift-redeem", "password-forgot", "password-reset", "password-change", "passwordless-request", "passwordless-login", "payment-method-update", "user-edit", "newsletter", "address-create", "order-create", "cart", "email-verify", "invoice-details", "manage-members"].includes(viewID) || hasValidNewsletterUpdateUrl()) {
9239
9479
  return true;
9240
9480
  }
9241
9481
  return false;
@@ -9442,6 +9682,17 @@ function notifyBugsnag(callback, startOptions) {
9442
9682
  callback();
9443
9683
  }
9444
9684
 
9685
+ //create a safe and strong password string with special characters
9686
+ function generatePassword() {
9687
+ const length = 16;
9688
+ const charset = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()_+{}|:<>?`~";
9689
+ let retVal = "";
9690
+ for (let i = 0, n = charset.length; i < length; ++i) {
9691
+ retVal += charset.charAt(Math.floor(Math.random() * n));
9692
+ }
9693
+ return retVal;
9694
+ }
9695
+
9445
9696
  const resources = {
9446
9697
  en: {
9447
9698
  common: common_en,
@@ -9466,6 +9717,7 @@ const resources = {
9466
9717
  payment: payment_en,
9467
9718
  dashboard: dashboard_en,
9468
9719
  select: select_en,
9720
+ donation: donation_en,
9469
9721
  notification: notification_en,
9470
9722
  invoiceDetails: invoiceDetails_en,
9471
9723
  subscriptionCancel: subscriptionCancel_en,
@@ -9495,6 +9747,7 @@ const resources = {
9495
9747
  payment: payment_fr,
9496
9748
  dashboard: dashboard_fr,
9497
9749
  select: select_fr,
9750
+ donation: donation_fr,
9498
9751
  notification: notification_fr,
9499
9752
  invoiceDetails: invoiceDetails_fr,
9500
9753
  subscriptionCancel: subscriptionCancel_fr,
@@ -9524,6 +9777,7 @@ const resources = {
9524
9777
  payment: payment_ko,
9525
9778
  dashboard: dashboard_ko,
9526
9779
  select: select_ko,
9780
+ donation: donation_ko,
9527
9781
  notification: notification_ko,
9528
9782
  invoiceDetails: invoiceDetails_ko,
9529
9783
  subscriptionCancel: subscriptionCancel_ko,
@@ -9553,10 +9807,12 @@ const resources = {
9553
9807
  payment: payment_es,
9554
9808
  dashboard: dashboard_es,
9555
9809
  select: select_es,
9810
+ donation: donation_es,
9556
9811
  notification: notification_es,
9557
9812
  invoiceDetails: invoiceDetails_es,
9558
9813
  subscriptionCancel: subscriptionCancel_es,
9559
- subscriptionSuspend: subscriptionSuspend_es
9814
+ subscriptionSuspend: subscriptionSuspend_es,
9815
+ subscriptionManageMembers: subscriptionManageMembers_es
9560
9816
  }
9561
9817
  };
9562
9818
 
@@ -9588,16 +9844,185 @@ pageLanguageObserver.observe(document.documentElement, {
9588
9844
  attributes: true
9589
9845
  });
9590
9846
 
9591
- function _classPrivateFieldGet(receiver, privateMap) {
9592
- var descriptor = privateMap.get(receiver);
9847
+ var pure$1 = createCommonjsModule(function (module, exports) {
9593
9848
 
9594
- if (!descriptor) {
9595
- throw new TypeError("attempted to get private field on non-instance");
9596
- }
9849
+ Object.defineProperty(exports, '__esModule', { value: true });
9597
9850
 
9598
- if (descriptor.get) {
9599
- return descriptor.get.call(receiver);
9600
- }
9851
+ function _typeof(obj) {
9852
+ "@babel/helpers - typeof";
9853
+
9854
+ if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
9855
+ _typeof = function (obj) {
9856
+ return typeof obj;
9857
+ };
9858
+ } else {
9859
+ _typeof = function (obj) {
9860
+ return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
9861
+ };
9862
+ }
9863
+
9864
+ return _typeof(obj);
9865
+ }
9866
+
9867
+ var V3_URL = 'https://js.stripe.com/v3';
9868
+ var V3_URL_REGEX = /^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/;
9869
+ var EXISTING_SCRIPT_MESSAGE = 'loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used';
9870
+ var findScript = function findScript() {
9871
+ var scripts = document.querySelectorAll("script[src^=\"".concat(V3_URL, "\"]"));
9872
+
9873
+ for (var i = 0; i < scripts.length; i++) {
9874
+ var script = scripts[i];
9875
+
9876
+ if (!V3_URL_REGEX.test(script.src)) {
9877
+ continue;
9878
+ }
9879
+
9880
+ return script;
9881
+ }
9882
+
9883
+ return null;
9884
+ };
9885
+
9886
+ var injectScript = function injectScript(params) {
9887
+ var queryString = params && !params.advancedFraudSignals ? '?advancedFraudSignals=false' : '';
9888
+ var script = document.createElement('script');
9889
+ script.src = "".concat(V3_URL).concat(queryString);
9890
+ var headOrBody = document.head || document.body;
9891
+
9892
+ if (!headOrBody) {
9893
+ throw new Error('Expected document.body not to be null. Stripe.js requires a <body> element.');
9894
+ }
9895
+
9896
+ headOrBody.appendChild(script);
9897
+ return script;
9898
+ };
9899
+
9900
+ var registerWrapper = function registerWrapper(stripe, startTime) {
9901
+ if (!stripe || !stripe._registerWrapper) {
9902
+ return;
9903
+ }
9904
+
9905
+ stripe._registerWrapper({
9906
+ name: 'stripe-js',
9907
+ version: "1.21.1",
9908
+ startTime: startTime
9909
+ });
9910
+ };
9911
+
9912
+ var stripePromise = null;
9913
+ var loadScript = function loadScript(params) {
9914
+ // Ensure that we only attempt to load Stripe.js at most once
9915
+ if (stripePromise !== null) {
9916
+ return stripePromise;
9917
+ }
9918
+
9919
+ stripePromise = new Promise(function (resolve, reject) {
9920
+ if (typeof window === 'undefined') {
9921
+ // Resolve to null when imported server side. This makes the module
9922
+ // safe to import in an isomorphic code base.
9923
+ resolve(null);
9924
+ return;
9925
+ }
9926
+
9927
+ if (window.Stripe && params) {
9928
+ console.warn(EXISTING_SCRIPT_MESSAGE);
9929
+ }
9930
+
9931
+ if (window.Stripe) {
9932
+ resolve(window.Stripe);
9933
+ return;
9934
+ }
9935
+
9936
+ try {
9937
+ var script = findScript();
9938
+
9939
+ if (script && params) {
9940
+ console.warn(EXISTING_SCRIPT_MESSAGE);
9941
+ } else if (!script) {
9942
+ script = injectScript(params);
9943
+ }
9944
+
9945
+ script.addEventListener('load', function () {
9946
+ if (window.Stripe) {
9947
+ resolve(window.Stripe);
9948
+ } else {
9949
+ reject(new Error('Stripe.js not available'));
9950
+ }
9951
+ });
9952
+ script.addEventListener('error', function () {
9953
+ reject(new Error('Failed to load Stripe.js'));
9954
+ });
9955
+ } catch (error) {
9956
+ reject(error);
9957
+ return;
9958
+ }
9959
+ });
9960
+ return stripePromise;
9961
+ };
9962
+ var initStripe = function initStripe(maybeStripe, args, startTime) {
9963
+ if (maybeStripe === null) {
9964
+ return null;
9965
+ }
9966
+
9967
+ var stripe = maybeStripe.apply(undefined, args);
9968
+ registerWrapper(stripe, startTime);
9969
+ return stripe;
9970
+ };
9971
+ var validateLoadParams = function validateLoadParams(params) {
9972
+ var errorMessage = "invalid load parameters; expected object of shape\n\n {advancedFraudSignals: boolean}\n\nbut received\n\n ".concat(JSON.stringify(params), "\n");
9973
+
9974
+ if (params === null || _typeof(params) !== 'object') {
9975
+ throw new Error(errorMessage);
9976
+ }
9977
+
9978
+ if (Object.keys(params).length === 1 && typeof params.advancedFraudSignals === 'boolean') {
9979
+ return params;
9980
+ }
9981
+
9982
+ throw new Error(errorMessage);
9983
+ };
9984
+
9985
+ var loadParams;
9986
+ var loadStripeCalled = false;
9987
+ var loadStripe = function loadStripe() {
9988
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
9989
+ args[_key] = arguments[_key];
9990
+ }
9991
+
9992
+ loadStripeCalled = true;
9993
+ var startTime = Date.now();
9994
+ return loadScript(loadParams).then(function (maybeStripe) {
9995
+ return initStripe(maybeStripe, args, startTime);
9996
+ });
9997
+ };
9998
+
9999
+ loadStripe.setLoadParameters = function (params) {
10000
+ if (loadStripeCalled) {
10001
+ throw new Error('You cannot change load parameters after calling loadStripe');
10002
+ }
10003
+
10004
+ loadParams = validateLoadParams(params);
10005
+ };
10006
+
10007
+ exports.loadStripe = loadStripe;
10008
+ });
10009
+
10010
+ unwrapExports(pure$1);
10011
+ pure$1.loadStripe;
10012
+
10013
+ var pure = pure$1;
10014
+ var pure_1 = pure.loadStripe;
10015
+
10016
+ function _classPrivateFieldGet(receiver, privateMap) {
10017
+ var descriptor = privateMap.get(receiver);
10018
+
10019
+ if (!descriptor) {
10020
+ throw new TypeError("attempted to get private field on non-instance");
10021
+ }
10022
+
10023
+ if (descriptor.get) {
10024
+ return descriptor.get.call(receiver);
10025
+ }
9601
10026
 
9602
10027
  return descriptor.value;
9603
10028
  }
@@ -10765,7 +11190,7 @@ toast.confirm = function (onConfirm, _ref3) {
10765
11190
  ...options
10766
11191
  });
10767
11192
  setTimeout(() => {
10768
- notify$1.dismiss(id);
11193
+ notify.dismiss(id);
10769
11194
  }, 3000);
10770
11195
  };
10771
11196
  const onFailure = errorValue => {
@@ -10774,11 +11199,11 @@ toast.confirm = function (onConfirm, _ref3) {
10774
11199
  ...options
10775
11200
  });
10776
11201
  setTimeout(() => {
10777
- notify$1.dismiss(id);
11202
+ notify.dismiss(id);
10778
11203
  }, 3000);
10779
11204
  };
10780
11205
  };
10781
- const notify$1 = toast;
11206
+ const notify = toast;
10782
11207
 
10783
11208
  const translations = i18next.t("common:buttons", {
10784
11209
  returnObjects: true
@@ -10839,7 +11264,7 @@ const init$1 = () => {
10839
11264
  const errorMessage = i18next.t("messages:invalidSubscription", {
10840
11265
  returnObjects: true
10841
11266
  });
10842
- return notify$1.error(errorMessage);
11267
+ return notify.error(errorMessage);
10843
11268
  }
10844
11269
  switchView("manage-members");
10845
11270
  });
@@ -10847,7 +11272,7 @@ const init$1 = () => {
10847
11272
  const errorMessage = i18next.t("messages:invalidSubscription", {
10848
11273
  returnObjects: true
10849
11274
  });
10850
- return notify$1.error(errorMessage);
11275
+ return notify.error(errorMessage);
10851
11276
  }
10852
11277
  }
10853
11278
  }
@@ -10905,6 +11330,57 @@ const init$1 = () => {
10905
11330
  }
10906
11331
  }
10907
11332
  }
11333
+ const pelcroDonateButtonsByClass = document.getElementsByClassName("pelcro-donate-button");
11334
+ if (pelcroDonateButtonsByClass.length !== 0) {
11335
+ for (let j = 0; j < pelcroDonateButtonsByClass.length; j++) {
11336
+ if (pelcroDonateButtonsByClass[j].dataset && "productId" in pelcroDonateButtonsByClass[j].dataset) {
11337
+ pelcroDonateButtonsByClass[j].addEventListener("click", e => {
11338
+ var _selectedProduct$plan2;
11339
+ set({
11340
+ isDonation: true
11341
+ });
11342
+ const productsList = window.Pelcro.product.list();
11343
+ if (!(productsList !== null && productsList !== void 0 && productsList.length)) return;
11344
+ const [productId, planId, isGift] = [e.target.dataset.productId, e.target.dataset.planId, e.target.dataset.isGift];
11345
+ const selectedProduct = productsList.find(product => product.id === Number(productId));
11346
+ const selectedPlan = selectedProduct === null || selectedProduct === void 0 ? void 0 : (_selectedProduct$plan2 = selectedProduct.plans) === null || _selectedProduct$plan2 === void 0 ? void 0 : _selectedProduct$plan2.find(plan => plan.id === Number(planId));
11347
+ set({
11348
+ product: selectedProduct,
11349
+ plan: selectedPlan,
11350
+ isGift: Boolean(isGift)
11351
+ });
11352
+ if (!selectedProduct || !selectedPlan) {
11353
+ return switchView("plan-select");
11354
+ }
11355
+
11356
+ // if (!isAuthenticated()) {
11357
+ // return switchView("register");
11358
+ // }
11359
+
11360
+ if (isGift) {
11361
+ return switchView("gift-create");
11362
+ }
11363
+
11364
+ // const requiresAddress = Boolean(
11365
+ // selectedProduct.address_required
11366
+ // );
11367
+
11368
+ // if (requiresAddress) {
11369
+ // return switchToAddressView();
11370
+ // }
11371
+
11372
+ return switchToPaymentView();
11373
+ });
11374
+ } else {
11375
+ pelcroDonateButtonsByClass[j].addEventListener("click", () => {
11376
+ set({
11377
+ isDonation: true
11378
+ });
11379
+ switchView("donation-select");
11380
+ });
11381
+ }
11382
+ }
11383
+ }
10908
11384
  const pelcroOfflineSubButtonsByClass = document.getElementsByClassName("pelcro-offline-subscribe-button");
10909
11385
  if (pelcroOfflineSubButtonsByClass.length !== 0) {
10910
11386
  for (let j = 0; j < pelcroOfflineSubButtonsByClass.length; j++) {
@@ -10984,7 +11460,7 @@ const init$1 = () => {
10984
11460
  const errorMsg = i18next.t("shop:messages.currencyMismatch", {
10985
11461
  currency: userCurrency
10986
11462
  });
10987
- notify$1.error(errorMsg);
11463
+ notify.error(errorMsg);
10988
11464
  }
10989
11465
  });
10990
11466
  }
@@ -11077,7 +11553,7 @@ const init = () => {
11077
11553
  unblurElemWhenUserLogsIn(elemDeepClone, entitlements);
11078
11554
  unblurElemWhenUserLogsOut(elemDeepClone, entitlements);
11079
11555
  const NOTIFICATION_ID = "entitlement";
11080
- notify$1( /*#__PURE__*/React__default.createElement("p", null, /*#__PURE__*/React__default.createElement(Trans, {
11556
+ notify( /*#__PURE__*/React__default.createElement("p", null, /*#__PURE__*/React__default.createElement(Trans, {
11081
11557
  i18nKey: "messages:entitlement"
11082
11558
  }, "Some of the content on this page is available with one or more of our plans.", /*#__PURE__*/React__default.createElement(Link, {
11083
11559
  onClick: () => {
@@ -11092,7 +11568,7 @@ const init = () => {
11092
11568
  plan: selectedPlan
11093
11569
  });
11094
11570
  }
11095
- notify$1.dismiss(NOTIFICATION_ID);
11571
+ notify.dismiss(NOTIFICATION_ID);
11096
11572
  switchView("_plan-select-entitlements");
11097
11573
  }
11098
11574
  }, "Subscribe"), "now to get full page access.")), {
@@ -11157,210 +11633,41 @@ function shouldBlurContent(entitlements) {
11157
11633
  return entitlements.every(entitlement => !window.Pelcro.user.isEntitledTo(entitlement));
11158
11634
  }
11159
11635
 
11160
- var pure$1 = createCommonjsModule(function (module, exports) {
11161
-
11162
- Object.defineProperty(exports, '__esModule', { value: true });
11636
+ /**
11637
+ * Extracts error message from the response error object
11638
+ * @param {Object} error Error object
11639
+ * @return {string}
11640
+ */
11641
+ const getErrorMessages = error => {
11642
+ var _error$error, _error$response, _error$response$data, _error$response3, _error$response3$data, _error$response3$data2, _error$response5, _error$response5$data;
11643
+ if (error !== null && error !== void 0 && (_error$error = error.error) !== null && _error$error !== void 0 && _error$error.message) {
11644
+ return error.error.message;
11645
+ }
11646
+ 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) {
11647
+ var _error$response2, _error$response2$data;
11648
+ 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;
11649
+ }
11650
+ 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) {
11651
+ var _error$response4, _error$response4$data, _error$response4$data2;
11652
+ 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;
11653
+ }
11654
+ if (error !== null && error !== void 0 && (_error$response5 = error.response) !== null && _error$response5 !== void 0 && (_error$response5$data = _error$response5.data) !== null && _error$response5$data !== void 0 && _error$response5$data.errors) {
11655
+ var _error$response6, _error$response6$data;
11656
+ const errorMessages = [];
11163
11657
 
11164
- function _typeof(obj) {
11165
- "@babel/helpers - typeof";
11658
+ // enumerable error (ex: validation errors)
11659
+ Object.values(error === null || error === void 0 ? void 0 : (_error$response6 = error.response) === null || _error$response6 === void 0 ? void 0 : (_error$response6$data = _error$response6.data) === null || _error$response6$data === void 0 ? void 0 : _error$response6$data.errors).forEach(_ref => {
11660
+ let [errorMessage] = _ref;
11661
+ errorMessages.push(errorMessage);
11662
+ });
11166
11663
 
11167
- if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
11168
- _typeof = function (obj) {
11169
- return typeof obj;
11170
- };
11171
- } else {
11172
- _typeof = function (obj) {
11173
- return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
11174
- };
11664
+ // convert to multiline string
11665
+ return errorMessages.join("\n");
11175
11666
  }
11176
-
11177
- return _typeof(obj);
11178
- }
11179
-
11180
- var V3_URL = 'https://js.stripe.com/v3';
11181
- var V3_URL_REGEX = /^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/;
11182
- var EXISTING_SCRIPT_MESSAGE = 'loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used';
11183
- var findScript = function findScript() {
11184
- var scripts = document.querySelectorAll("script[src^=\"".concat(V3_URL, "\"]"));
11185
-
11186
- for (var i = 0; i < scripts.length; i++) {
11187
- var script = scripts[i];
11188
-
11189
- if (!V3_URL_REGEX.test(script.src)) {
11190
- continue;
11191
- }
11192
-
11193
- return script;
11194
- }
11195
-
11196
- return null;
11197
- };
11198
-
11199
- var injectScript = function injectScript(params) {
11200
- var queryString = params && !params.advancedFraudSignals ? '?advancedFraudSignals=false' : '';
11201
- var script = document.createElement('script');
11202
- script.src = "".concat(V3_URL).concat(queryString);
11203
- var headOrBody = document.head || document.body;
11204
-
11205
- if (!headOrBody) {
11206
- throw new Error('Expected document.body not to be null. Stripe.js requires a <body> element.');
11207
- }
11208
-
11209
- headOrBody.appendChild(script);
11210
- return script;
11211
- };
11212
-
11213
- var registerWrapper = function registerWrapper(stripe, startTime) {
11214
- if (!stripe || !stripe._registerWrapper) {
11215
- return;
11216
- }
11217
-
11218
- stripe._registerWrapper({
11219
- name: 'stripe-js',
11220
- version: "1.21.1",
11221
- startTime: startTime
11222
- });
11223
- };
11224
-
11225
- var stripePromise = null;
11226
- var loadScript = function loadScript(params) {
11227
- // Ensure that we only attempt to load Stripe.js at most once
11228
- if (stripePromise !== null) {
11229
- return stripePromise;
11230
- }
11231
-
11232
- stripePromise = new Promise(function (resolve, reject) {
11233
- if (typeof window === 'undefined') {
11234
- // Resolve to null when imported server side. This makes the module
11235
- // safe to import in an isomorphic code base.
11236
- resolve(null);
11237
- return;
11238
- }
11239
-
11240
- if (window.Stripe && params) {
11241
- console.warn(EXISTING_SCRIPT_MESSAGE);
11242
- }
11243
-
11244
- if (window.Stripe) {
11245
- resolve(window.Stripe);
11246
- return;
11247
- }
11248
-
11249
- try {
11250
- var script = findScript();
11251
-
11252
- if (script && params) {
11253
- console.warn(EXISTING_SCRIPT_MESSAGE);
11254
- } else if (!script) {
11255
- script = injectScript(params);
11256
- }
11257
-
11258
- script.addEventListener('load', function () {
11259
- if (window.Stripe) {
11260
- resolve(window.Stripe);
11261
- } else {
11262
- reject(new Error('Stripe.js not available'));
11263
- }
11264
- });
11265
- script.addEventListener('error', function () {
11266
- reject(new Error('Failed to load Stripe.js'));
11267
- });
11268
- } catch (error) {
11269
- reject(error);
11270
- return;
11271
- }
11272
- });
11273
- return stripePromise;
11274
- };
11275
- var initStripe = function initStripe(maybeStripe, args, startTime) {
11276
- if (maybeStripe === null) {
11277
- return null;
11278
- }
11279
-
11280
- var stripe = maybeStripe.apply(undefined, args);
11281
- registerWrapper(stripe, startTime);
11282
- return stripe;
11283
- };
11284
- var validateLoadParams = function validateLoadParams(params) {
11285
- var errorMessage = "invalid load parameters; expected object of shape\n\n {advancedFraudSignals: boolean}\n\nbut received\n\n ".concat(JSON.stringify(params), "\n");
11286
-
11287
- if (params === null || _typeof(params) !== 'object') {
11288
- throw new Error(errorMessage);
11289
- }
11290
-
11291
- if (Object.keys(params).length === 1 && typeof params.advancedFraudSignals === 'boolean') {
11292
- return params;
11293
- }
11294
-
11295
- throw new Error(errorMessage);
11296
- };
11297
-
11298
- var loadParams;
11299
- var loadStripeCalled = false;
11300
- var loadStripe = function loadStripe() {
11301
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
11302
- args[_key] = arguments[_key];
11303
- }
11304
-
11305
- loadStripeCalled = true;
11306
- var startTime = Date.now();
11307
- return loadScript(loadParams).then(function (maybeStripe) {
11308
- return initStripe(maybeStripe, args, startTime);
11309
- });
11310
- };
11311
-
11312
- loadStripe.setLoadParameters = function (params) {
11313
- if (loadStripeCalled) {
11314
- throw new Error('You cannot change load parameters after calling loadStripe');
11315
- }
11316
-
11317
- loadParams = validateLoadParams(params);
11318
- };
11319
-
11320
- exports.loadStripe = loadStripe;
11321
- });
11322
-
11323
- unwrapExports(pure$1);
11324
- pure$1.loadStripe;
11325
-
11326
- var pure = pure$1;
11327
- var pure_1 = pure.loadStripe;
11328
-
11329
- /**
11330
- * Extracts error message from the response error object
11331
- * @param {Object} error Error object
11332
- * @return {string}
11333
- */
11334
- const getErrorMessages = error => {
11335
- var _error$error, _error$response, _error$response$data, _error$response3, _error$response3$data, _error$response3$data2, _error$response5, _error$response5$data;
11336
- if (error !== null && error !== void 0 && (_error$error = error.error) !== null && _error$error !== void 0 && _error$error.message) {
11337
- return error.error.message;
11338
- }
11339
- 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) {
11340
- var _error$response2, _error$response2$data;
11341
- 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;
11342
- }
11343
- 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) {
11344
- var _error$response4, _error$response4$data, _error$response4$data2;
11345
- 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;
11346
- }
11347
- if (error !== null && error !== void 0 && (_error$response5 = error.response) !== null && _error$response5 !== void 0 && (_error$response5$data = _error$response5.data) !== null && _error$response5$data !== void 0 && _error$response5$data.errors) {
11348
- var _error$response6, _error$response6$data;
11349
- const errorMessages = [];
11350
-
11351
- // enumerable error (ex: validation errors)
11352
- Object.values(error === null || error === void 0 ? void 0 : (_error$response6 = error.response) === null || _error$response6 === void 0 ? void 0 : (_error$response6$data = _error$response6.data) === null || _error$response6$data === void 0 ? void 0 : _error$response6$data.errors).forEach(_ref => {
11353
- let [errorMessage] = _ref;
11354
- errorMessages.push(errorMessage);
11355
- });
11356
-
11357
- // convert to multiline string
11358
- return errorMessages.join("\n");
11359
- }
11360
- if (error !== null && error !== void 0 && error.message) {
11361
- return error.message;
11362
- }
11363
- };
11667
+ if (error !== null && error !== void 0 && error.message) {
11668
+ return error.message;
11669
+ }
11670
+ };
11364
11671
 
11365
11672
  /**
11366
11673
  * Executes function after a wait time of inactivity
@@ -11479,16 +11786,12 @@ const initPaywalls = () => {
11479
11786
  };
11480
11787
  const loadPaymentSDKs = () => {
11481
11788
  // Lazy load stripe's SDK
11482
- const {
11483
- whenUserReady
11484
- } = usePelcro.getStore();
11789
+ usePelcro.getStore();
11485
11790
  const supportsVantiv = Boolean(window.Pelcro.site.read().vantiv_gateway_settings);
11486
11791
  const supportsTap = Boolean(window.Pelcro.site.read().tap_gateway_settings);
11487
- whenUserReady(() => {
11488
- if (!window.Stripe && !supportsVantiv && !supportsTap) {
11489
- pure_1(window.Pelcro.environment.stripe);
11490
- }
11491
- });
11792
+ if (!window.Stripe && !supportsVantiv && !supportsTap) {
11793
+ pure_1(window.Pelcro.environment.stripe);
11794
+ }
11492
11795
 
11493
11796
  // Load PayPal SDKs
11494
11797
  const supportsPaypal = Boolean(window.Pelcro.site.read().braintree_tokenization);
@@ -11639,6 +11942,9 @@ const initViewFromURL = () => {
11639
11942
  if (view === "plan-select") {
11640
11943
  return initSubscriptionFromURL();
11641
11944
  }
11945
+ if (view === "donation-select") {
11946
+ return initDonationFromURL();
11947
+ }
11642
11948
  if (view === "register") {
11643
11949
  const offlinePlanId = window.Pelcro.helpers.getURLParameter("plan_id");
11644
11950
  if (offlinePlanId) {
@@ -11721,6 +12027,61 @@ const initSubscriptionFromURL = () => {
11721
12027
  });
11722
12028
  };
11723
12029
 
12030
+ /**
12031
+ * Initializes the donation flow if 'product_id' & 'plan_id' params exist
12032
+ * with valid IDs. Otherwise, switches to the donation selection flow
12033
+ */
12034
+ const initDonationFromURL = () => {
12035
+ const {
12036
+ switchView,
12037
+ whenSiteReady,
12038
+ set
12039
+ } = usePelcro.getStore();
12040
+ whenSiteReady(() => {
12041
+ var _selectedProduct$plan2;
12042
+ const productsList = window.Pelcro.product.list();
12043
+ if (!(productsList !== null && productsList !== void 0 && productsList.length)) {
12044
+ return;
12045
+ }
12046
+ const [productId, planId, isGiftParam] = [window.Pelcro.helpers.getURLParameter("product_id"), window.Pelcro.helpers.getURLParameter("plan_id"), window.Pelcro.helpers.getURLParameter("is_gift")];
12047
+ const isGift = (isGiftParam === null || isGiftParam === void 0 ? void 0 : isGiftParam.toLowerCase()) === "true";
12048
+ const selectedProduct = productsList.find(product => product.id === Number(productId));
12049
+ const selectedPlan = selectedProduct === null || selectedProduct === void 0 ? void 0 : (_selectedProduct$plan2 = selectedProduct.plans) === null || _selectedProduct$plan2 === void 0 ? void 0 : _selectedProduct$plan2.find(plan => plan.id === Number(planId));
12050
+ set({
12051
+ product: selectedProduct,
12052
+ plan: selectedPlan,
12053
+ isGift
12054
+ });
12055
+ if (!selectedProduct || !selectedPlan) {
12056
+ set({
12057
+ isDonation: true
12058
+ });
12059
+ return switchView("donation-select");
12060
+ }
12061
+ const {
12062
+ isAuthenticated,
12063
+ switchToAddressView,
12064
+ switchToPaymentView
12065
+ } = usePelcro.getStore();
12066
+
12067
+ // if (!isAuthenticated()) {
12068
+ // return switchView("register");
12069
+ // }
12070
+
12071
+ // if (isGift) {
12072
+ // return switchView("gift-create");
12073
+ // }
12074
+
12075
+ // const requiresAddress = Boolean(selectedProduct.address_required);
12076
+ //
12077
+ // if (requiresAddress) {
12078
+ // return switchToAddressView();
12079
+ // }
12080
+
12081
+ return switchToPaymentView();
12082
+ });
12083
+ };
12084
+
11724
12085
  /**
11725
12086
  * Initializes offline subscription flow if 'plan_id' params exist
11726
12087
  * with valid IDs, Otherwise, ignore the param
@@ -11820,9 +12181,9 @@ const verifyEmailTokenFromUrl = () => {
11820
12181
  token: emailToken
11821
12182
  }, (err, res) => {
11822
12183
  if (err) {
11823
- return notify$1.error(getErrorMessages(err));
12184
+ return notify.error(getErrorMessages(err));
11824
12185
  }
11825
- return notify$1.success(translations.success);
12186
+ return notify.success(translations.success);
11826
12187
  });
11827
12188
  }, {
11828
12189
  once: true
@@ -11846,7 +12207,7 @@ const verifyLinkTokenFromUrl = () => {
11846
12207
  token: loginToken
11847
12208
  }, (err, res) => {
11848
12209
  if (err) {
11849
- return notify$1.error(getErrorMessages(err));
12210
+ return notify.error(getErrorMessages(err));
11850
12211
  }
11851
12212
  const {
11852
12213
  auth_token
@@ -11855,10 +12216,10 @@ const verifyLinkTokenFromUrl = () => {
11855
12216
  auth_token
11856
12217
  }, (err, res) => {
11857
12218
  if (err) {
11858
- return notify$1.error(getErrorMessages(err));
12219
+ return notify.error(getErrorMessages(err));
11859
12220
  }
11860
12221
  resetView();
11861
- return notify$1.success(translations.success);
12222
+ return notify.success(translations.success);
11862
12223
  });
11863
12224
  });
11864
12225
  }, {
@@ -11933,7 +12294,7 @@ const showInvoiceDetailsFromUrl = () => {
11933
12294
  const errorMessage = i18next.t("messages:invalidInvoice", {
11934
12295
  returnObjects: true
11935
12296
  });
11936
- return notify$1.error(errorMessage);
12297
+ return notify.error(errorMessage);
11937
12298
  }
11938
12299
  const {
11939
12300
  invoice
@@ -11942,7 +12303,7 @@ const showInvoiceDetailsFromUrl = () => {
11942
12303
  const errorMessage = i18next.t("messages:zeroTotalInvoice", {
11943
12304
  returnObjects: true
11944
12305
  });
11945
- return notify$1.error(errorMessage);
12306
+ return notify.error(errorMessage);
11946
12307
  }
11947
12308
  return switchView("invoice-details");
11948
12309
  });
@@ -11967,7 +12328,7 @@ const showSubscriptionManageMembersFromUrl = () => {
11967
12328
  const errorMessage = i18next.t("messages:invalidSubscription", {
11968
12329
  returnObjects: true
11969
12330
  });
11970
- return notify$1.error(errorMessage);
12331
+ return notify.error(errorMessage);
11971
12332
  }
11972
12333
  return switchView("manage-members");
11973
12334
  });
@@ -11992,8 +12353,18 @@ const PelcroModalController = _ref => {
11992
12353
  const {
11993
12354
  view,
11994
12355
  isAuthenticated,
11995
- whenSiteReady
12356
+ whenSiteReady,
12357
+ isDonation
11996
12358
  } = usePelcro();
12359
+ const supportsVantiv = Boolean(window.Pelcro.site.read().vantiv_gateway_settings);
12360
+ const supportsTap = Boolean(window.Pelcro.site.read().tap_gateway_settings);
12361
+ React__default.useEffect(() => {
12362
+ if (isDonation) {
12363
+ if (!window.Stripe && !supportsVantiv && !supportsTap) {
12364
+ pure_1(window.Pelcro.environment.stripe);
12365
+ }
12366
+ }
12367
+ }, [isDonation]);
11997
12368
  React__default.useEffect(() => {
11998
12369
  init$1();
11999
12370
  renderShopView(React__default.Children.map(children, child => child).find(_ref2 => {
@@ -14517,10 +14888,405 @@ function SelectModalWithHook(props) {
14517
14888
  (_props$onClose = props.onClose) === null || _props$onClose === void 0 ? void 0 : _props$onClose.call(props);
14518
14889
  resetView();
14519
14890
  },
14520
- setProductAndPlan: (product, plan, isGift) => set({
14891
+ setProductAndPlan: (product, plan, isGift) => set({
14892
+ product,
14893
+ plan,
14894
+ isGift
14895
+ }),
14896
+ setView: switchView,
14897
+ matchingEntitlements: view === "_plan-select-entitlements" ? entitlements : null
14898
+ });
14899
+ }
14900
+ function productsWithMatchedTaggedFirst$1() {
14901
+ var _window$Pelcro$produc;
14902
+ const allProducts = (_window$Pelcro$produc = window.Pelcro.product.list()) !== null && _window$Pelcro$produc !== void 0 ? _window$Pelcro$produc : [];
14903
+ const productsThatMatchArticleTag = window.Pelcro.product.getByMatchingPageTags();
14904
+ const allProductsMinusMatched = allProducts.filter(product => !productsThatMatchArticleTag.some(matchedProduct => matchedProduct.id === product.id));
14905
+ return [productsThatMatchArticleTag, allProductsMinusMatched];
14906
+ }
14907
+ function productMatchPageLanguage(product) {
14908
+ if (!product) {
14909
+ return false;
14910
+ }
14911
+ if (product.language === null) {
14912
+ return true;
14913
+ }
14914
+ const siteLanguage = window.Pelcro.helpers.getHtmlLanguageAttribute();
14915
+ return product.language === siteLanguage;
14916
+ }
14917
+ SelectModalWithHook.viewId = "plan-select";
14918
+ class SelectModal extends Component {
14919
+ constructor(props) {
14920
+ super(props);
14921
+ _defineProperty$3(this, "componentDidMount", () => {
14922
+ if (this.props.product) {
14923
+ const {
14924
+ product
14925
+ } = this.props;
14926
+ const planList = product.plans;
14927
+ this.setState({
14928
+ product,
14929
+ planList,
14930
+ mode: "plan"
14931
+ });
14932
+ }
14933
+ if (this.props.plan) {
14934
+ const {
14935
+ plan
14936
+ } = this.props;
14937
+ this.setState({
14938
+ plan,
14939
+ disabled: false
14940
+ });
14941
+ }
14942
+ if (this.state.productList.length === 1) {
14943
+ this.setState({
14944
+ product: this.state.productList[0],
14945
+ planList: this.state.productList[0].plans,
14946
+ mode: "plan"
14947
+ });
14948
+ }
14949
+ if (this.state.productList.length === 0 && !window.Pelcro.user.isAuthenticated()) {
14950
+ this.props.setView("register");
14951
+ }
14952
+ document.addEventListener("keydown", this.handleSubmit);
14953
+ if (!document.querySelector("#pelcro-selection-view") || !document.querySelector(".pelcro-select-product-wrapper")) {
14954
+ var _window$Pelcro2, _window$Pelcro2$user, _window$Pelcro3, _window$Pelcro3$user, _window$Pelcro4, _window$Pelcro4$user, _window$Pelcro5, _window$Pelcro5$site;
14955
+ const userCurrency = (_window$Pelcro2 = window.Pelcro) === null || _window$Pelcro2 === void 0 ? void 0 : (_window$Pelcro2$user = _window$Pelcro2.user) === null || _window$Pelcro2$user === void 0 ? void 0 : _window$Pelcro2$user.read().currency;
14956
+ const userCountry = (_window$Pelcro3 = window.Pelcro) === null || _window$Pelcro3 === void 0 ? void 0 : (_window$Pelcro3$user = _window$Pelcro3.user) === null || _window$Pelcro3$user === void 0 ? void 0 : _window$Pelcro3$user.location.countryCode;
14957
+ const userLanguage = (_window$Pelcro4 = window.Pelcro) === null || _window$Pelcro4 === void 0 ? void 0 : (_window$Pelcro4$user = _window$Pelcro4.user) === null || _window$Pelcro4$user === void 0 ? void 0 : _window$Pelcro4$user.read().language;
14958
+ const productsMatchingUserCurrency = (_window$Pelcro5 = window.Pelcro) === null || _window$Pelcro5 === void 0 ? void 0 : (_window$Pelcro5$site = _window$Pelcro5.site) === null || _window$Pelcro5$site === void 0 ? void 0 : _window$Pelcro5$site.read().products.filter(product => {
14959
+ const filteredPlans = product.plans.filter(plan => plan.currency === userCurrency || !userCurrency);
14960
+ if (filteredPlans.length) return filteredPlans;
14961
+ });
14962
+ const productsMatchingUserCountry = productsMatchingUserCurrency.filter(product => {
14963
+ const filteredPlans = product.plans.filter(plan => {
14964
+ var _plan$countries;
14965
+ return plan.countries && ((_plan$countries = plan.countries) === null || _plan$countries === void 0 ? void 0 : _plan$countries.includes(userCountry)) || !plan.countries || !plan.countries.length;
14966
+ });
14967
+ if (filteredPlans.length) return filteredPlans;
14968
+ });
14969
+ notifyBugsnag(() => {
14970
+ Bugsnag.notify("SelectModal - No data viewed", event => {
14971
+ var _window$Pelcro6, _window$Pelcro6$site, _window$Pelcro7, _window$Pelcro7$user, _window$Pelcro8, _window$Pelcro8$uiSet, _window$Pelcro9, _this$props, _window$Pelcro10, _window$Pelcro10$help, _window$Pelcro11, _window$Pelcro11$site;
14972
+ event.addMetadata("MetaData", {
14973
+ site: (_window$Pelcro6 = window.Pelcro) === null || _window$Pelcro6 === void 0 ? void 0 : (_window$Pelcro6$site = _window$Pelcro6.site) === null || _window$Pelcro6$site === void 0 ? void 0 : _window$Pelcro6$site.read(),
14974
+ user: (_window$Pelcro7 = window.Pelcro) === null || _window$Pelcro7 === void 0 ? void 0 : (_window$Pelcro7$user = _window$Pelcro7.user) === null || _window$Pelcro7$user === void 0 ? void 0 : _window$Pelcro7$user.read(),
14975
+ uiVersion: (_window$Pelcro8 = window.Pelcro) === null || _window$Pelcro8 === void 0 ? void 0 : (_window$Pelcro8$uiSet = _window$Pelcro8.uiSettings) === null || _window$Pelcro8$uiSet === void 0 ? void 0 : _window$Pelcro8$uiSet.uiVersion,
14976
+ environment: (_window$Pelcro9 = window.Pelcro) === null || _window$Pelcro9 === void 0 ? void 0 : _window$Pelcro9.environment,
14977
+ matchingEntitlementsProps: (_this$props = this.props) === null || _this$props === void 0 ? void 0 : _this$props.matchingEntitlements,
14978
+ productListState: this.state.productList,
14979
+ methods: {
14980
+ productsWithMatchedTaggedFirst: productsWithMatchedTaggedFirst$1(),
14981
+ pelcroSDKProductsListMethod: window.Pelcro.product.list(),
14982
+ pelcroSDKGetByEntitlements: this.props.matchingEntitlements ? window.Pelcro.product.getByEntitlements(this.props.matchingEntitlements) : null
14983
+ },
14984
+ userCurrency: userCurrency,
14985
+ userCountry: userCountry,
14986
+ userLanguage: userLanguage,
14987
+ siteLanguage: (_window$Pelcro10 = window.Pelcro) === null || _window$Pelcro10 === void 0 ? void 0 : (_window$Pelcro10$help = _window$Pelcro10.helpers) === null || _window$Pelcro10$help === void 0 ? void 0 : _window$Pelcro10$help.getHtmlLanguageAttribute(),
14988
+ products: (_window$Pelcro11 = window.Pelcro) === null || _window$Pelcro11 === void 0 ? void 0 : (_window$Pelcro11$site = _window$Pelcro11.site) === null || _window$Pelcro11$site === void 0 ? void 0 : _window$Pelcro11$site.read().products.length,
14989
+ currency_matching_filter: `${productsMatchingUserCurrency.length} Products Passed`,
14990
+ country_matching_filter: `${productsMatchingUserCountry.length} Products Passed`,
14991
+ language_matching_filter: `${productsMatchingUserCountry.filter(productMatchPageLanguage).length} Products Passed`
14992
+ });
14993
+ });
14994
+ });
14995
+ }
14996
+ });
14997
+ _defineProperty$3(this, "componentWillUnmount", () => {
14998
+ document.removeEventListener("keydown", this.handleSubmit);
14999
+ });
15000
+ _defineProperty$3(this, "handleSubmit", e => {
15001
+ if (e.key === "Enter" && !this.state.disabled) this.submitOption();
15002
+ });
15003
+ _defineProperty$3(this, "onProductChange", e => {
15004
+ const product = window.Pelcro.product.list()[e.target.selectedIndex];
15005
+ this.setState({
15006
+ product: product,
15007
+ plan: product.plans[0]
15008
+ });
15009
+ });
15010
+ _defineProperty$3(this, "onPlanChange", e => {
15011
+ this.setState({
15012
+ plan: this.state.product.plans[e.target.selectedIndex]
15013
+ });
15014
+ });
15015
+ _defineProperty$3(this, "onIsGiftChange", e => {
15016
+ this.setState({
15017
+ isGift: e.target.checked
15018
+ });
15019
+ });
15020
+ _defineProperty$3(this, "countStartPrice", arr => {
15021
+ let startingPlan = arr[0];
15022
+ for (const plan of arr) {
15023
+ if (plan.amount < startingPlan.amount) {
15024
+ startingPlan = plan;
15025
+ }
15026
+ }
15027
+ return `${startingPlan.amount_formatted}/${startingPlan.interval_count > 1 ? `${startingPlan.interval_count} ${startingPlan.interval}s` : `${startingPlan.interval}`}`;
15028
+ });
15029
+ _defineProperty$3(this, "renderOneProduct", (product, index, options) => {
15030
+ const isPlanMode = Boolean(this.state.mode === "plan");
15031
+ const productButtonLabel = isPlanMode ? this.locale("buttons.back") : this.locale("buttons.select");
15032
+ const productButtonCallback = isPlanMode ? this.goBack : this.selectProduct;
15033
+ return /*#__PURE__*/React__default.createElement("div", {
15034
+ key: product.id,
15035
+ 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"}`
15036
+ }, product.image && /*#__PURE__*/React__default.createElement("img", {
15037
+ alt: `image of ${product.name}`,
15038
+ src: product.image,
15039
+ className: "plc-object-contain plc-w-1/4 pelcro-select-product-image"
15040
+ }), /*#__PURE__*/React__default.createElement("div", {
15041
+ className: `plc-flex plc-flex-wrap ${product.image ? "plc-w-3/4" : "plc-w-full"}`
15042
+ }, /*#__PURE__*/React__default.createElement("div", {
15043
+ className: "plc-w-full pelcro-select-product-header"
15044
+ }, /*#__PURE__*/React__default.createElement("p", {
15045
+ className: "plc-font-bold pelcro-select-product-title"
15046
+ }, product.name), /*#__PURE__*/React__default.createElement("p", {
15047
+ className: "plc-text-xs pelcro-select-product-description"
15048
+ }, product.description)), /*#__PURE__*/React__default.createElement("div", {
15049
+ className: "plc-flex plc-items-end plc-w-full plc-mt-3"
15050
+ }, product.plans && /*#__PURE__*/React__default.createElement("p", {
15051
+ className: "plc-w-1/2 plc-text-xs pelcro-select-product-cost"
15052
+ }, this.locale("labels.startingAt"), " ", this.countStartPrice(product.plans)), /*#__PURE__*/React__default.createElement(Button, Object.assign({
15053
+ onClick: productButtonCallback,
15054
+ "data-key": product.id,
15055
+ id: "pelcro-select-product-back-button",
15056
+ className: `plc-ml-auto plc-text-xs ${options !== null && options !== void 0 && options.emphasize ? "plc-bg-primary-700" : ""}`
15057
+ }, index === 0 && {
15058
+ autoFocus: true
15059
+ }), productButtonLabel))));
15060
+ });
15061
+ _defineProperty$3(this, "renderProducts", () => {
15062
+ const userDidSelectProduct = Boolean(this.state.mode === "plan");
15063
+ const productsToShow = userDidSelectProduct ? [this.state.product] : this.state.productList;
15064
+ return productsToShow.map((product, index) => {
15065
+ if (product.plans.filter(plan => plan.type === "regular").length > 0) {
15066
+ return this.renderOneProduct(product, index);
15067
+ }
15068
+ });
15069
+ });
15070
+ _defineProperty$3(this, "renderMatchingProductsFirst", () => {
15071
+ const isPlanMode = Boolean(this.state.mode === "plan");
15072
+ if (isPlanMode) {
15073
+ return this.renderOneProduct(this.state.product);
15074
+ }
15075
+ const [productsThatMatchArticleTag, allProductsMinusMatched] = productsWithMatchedTaggedFirst$1();
15076
+
15077
+ // Render normal products if there are no available matching products
15078
+ if (!(productsThatMatchArticleTag !== null && productsThatMatchArticleTag !== void 0 && productsThatMatchArticleTag.length)) {
15079
+ return this.renderProducts();
15080
+ }
15081
+ return /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("h3", {
15082
+ className: "plc-text-sm plc-font-semibold"
15083
+ }, this.locale("labels.restrictiveArticles.subscribeTo")), productsThatMatchArticleTag.map((product, index) => this.renderOneProduct(product, index, {
15084
+ emphasize: true
15085
+ })), (allProductsMinusMatched === null || allProductsMinusMatched === void 0 ? void 0 : allProductsMinusMatched.length) > 0 && /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("hr", {
15086
+ className: "plc-my-4"
15087
+ }), /*#__PURE__*/React__default.createElement("h3", {
15088
+ className: "plc-text-sm plc-font-semibold"
15089
+ }, this.locale("labels.restrictiveArticles.or")), allProductsMinusMatched.map((product, index) => this.renderOneProduct(product, index))));
15090
+ });
15091
+ _defineProperty$3(this, "renderPlans", () => {
15092
+ return this.state.planList.map(plan => {
15093
+ const isChecked = this.state.plan.id === plan.id ? true : false;
15094
+ return /*#__PURE__*/React__default.createElement("div", {
15095
+ key: plan.id,
15096
+ className: "plc-p-2 plc-mx-3 plc-mt-2 plc-text-gray-900 plc-border plc-border-gray-400 plc-border-solid plc-rounded pelcro-select-plan-wrapper"
15097
+ }, /*#__PURE__*/React__default.createElement(Radio, {
15098
+ className: "plc-self-start pelcro-select-plan-radio",
15099
+ labelClassName: "plc-cursor-pointer plc-w-full",
15100
+ id: `pelcro-select-plan-${plan.id}`,
15101
+ name: "plan",
15102
+ checked: isChecked,
15103
+ "data-key": plan.id,
15104
+ onChange: this.selectPlan
15105
+ }, /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("p", {
15106
+ className: "plc-font-bold pelcro-select-plan-title"
15107
+ }, plan.nickname), /*#__PURE__*/React__default.createElement("p", {
15108
+ className: "plc-text-xs pelcro-select-plan-description"
15109
+ }, plan.description)), /*#__PURE__*/React__default.createElement("p", {
15110
+ className: "plc-mt-3 plc-font-bold pelcro-select-plan-price"
15111
+ }, plan.amount_formatted)));
15112
+ });
15113
+ });
15114
+ _defineProperty$3(this, "selectProduct", e => {
15115
+ const id = e.target.dataset.key;
15116
+ for (const product of this.state.productList) {
15117
+ if (+product.id === +id) {
15118
+ var _this$state$plan;
15119
+ this.setState({
15120
+ product: product
15121
+ });
15122
+ this.setState({
15123
+ planList: product.plans.filter(plan => plan.type === "regular")
15124
+ });
15125
+ this.setState({
15126
+ mode: "plan"
15127
+ });
15128
+ const isSelectedPlanPartOfThisProduct = ((_this$state$plan = this.state.plan) === null || _this$state$plan === void 0 ? void 0 : _this$state$plan.product_id) === Number(product.id);
15129
+ if (isSelectedPlanPartOfThisProduct) {
15130
+ this.setState({
15131
+ disabled: false
15132
+ });
15133
+ }
15134
+ }
15135
+ }
15136
+ });
15137
+ _defineProperty$3(this, "selectPlan", e => {
15138
+ const id = e.target.dataset.key;
15139
+ for (const plan of this.state.planList) {
15140
+ if (+plan.id === +id) {
15141
+ plan.isCheked = true;
15142
+ this.setState({
15143
+ plan: plan
15144
+ });
15145
+ this.setState({
15146
+ disabled: false
15147
+ });
15148
+ } else {
15149
+ plan.isCheked = false;
15150
+ }
15151
+ }
15152
+ });
15153
+ _defineProperty$3(this, "goBack", () => {
15154
+ this.setState({
15155
+ disabled: true
15156
+ });
15157
+ this.setState({
15158
+ mode: "product"
15159
+ });
15160
+ });
15161
+ _defineProperty$3(this, "submitOption", () => {
15162
+ this.props.setProductAndPlan(this.state.product, this.state.plan, this.state.isGift);
15163
+ const {
15164
+ product,
15165
+ isGift
15166
+ } = this.state;
15167
+ const {
15168
+ setView
15169
+ } = this.props;
15170
+ const isAuthenticated = window.Pelcro.user.isAuthenticated();
15171
+ const {
15172
+ switchToAddressView,
15173
+ switchToPaymentView
15174
+ } = usePelcro.getStore();
15175
+ if (!isAuthenticated) {
15176
+ return setView("register");
15177
+ }
15178
+ if (isGift) {
15179
+ return setView("gift-create");
15180
+ }
15181
+ if (product.address_required) {
15182
+ return switchToAddressView();
15183
+ }
15184
+ return switchToPaymentView();
15185
+ });
15186
+ _defineProperty$3(this, "displayLoginView", () => {
15187
+ this.props.setView("login");
15188
+ });
15189
+ this.state = {
15190
+ product: {},
15191
+ plan: {},
15192
+ isGift: props.isGift,
15193
+ disabled: true,
15194
+ mode: "product",
15195
+ productList: props.matchingEntitlements ? window.Pelcro.product.getByEntitlements(props.matchingEntitlements) : window.Pelcro.product.list()
15196
+ };
15197
+ this.product = this.props.product || window.Pelcro.paywall.getProduct();
15198
+ this.locale = this.props.t;
15199
+ this.closeButton = window.Pelcro.paywall.displayCloseButton();
15200
+ }
15201
+ render() {
15202
+ var _window$Pelcro$produc2, _window$Pelcro$produc3, _window$Pelcro$site$r;
15203
+ const {
15204
+ disableGifting
15205
+ } = this.props;
15206
+ if (this.state.mode === "product") {
15207
+ var _ReactGA$event;
15208
+ ReactGA$7 === null || ReactGA$7 === void 0 ? void 0 : (_ReactGA$event = ReactGA$7.event) === null || _ReactGA$event === void 0 ? void 0 : _ReactGA$event.call(ReactGA$7, {
15209
+ category: "VIEWS",
15210
+ action: "Product Modal Viewed",
15211
+ nonInteraction: true
15212
+ });
15213
+ } else if (this.state.mode === "plan") {
15214
+ var _ReactGA$event2;
15215
+ ReactGA$7 === null || ReactGA$7 === void 0 ? void 0 : (_ReactGA$event2 = ReactGA$7.event) === null || _ReactGA$event2 === void 0 ? void 0 : _ReactGA$event2.call(ReactGA$7, {
15216
+ category: "VIEWS",
15217
+ action: "Plan Modal Viewed",
15218
+ nonInteraction: true
15219
+ });
15220
+ }
15221
+ return /*#__PURE__*/React__default.createElement(Modal, {
15222
+ hideCloseButton: !this.closeButton,
15223
+ onClose: this.props.onClose,
15224
+ id: "pelcro-selection-modal"
15225
+ }, /*#__PURE__*/React__default.createElement(ModalBody, null, /*#__PURE__*/React__default.createElement("div", {
15226
+ id: "pelcro-selection-view"
15227
+ }, /*#__PURE__*/React__default.createElement("div", {
15228
+ className: "plc-mb-6 plc-text-center plc-text-gray-900 pelcro-title-wrapper"
15229
+ }, /*#__PURE__*/React__default.createElement("h4", {
15230
+ className: "plc-text-2xl plc-font-semibold"
15231
+ }, 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", {
15232
+ className: "pelcro-select-products-wrapper"
15233
+ }, (_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", {
15234
+ className: "plc-overflow-y-scroll plc-max-h-72 pelcro-select-plans-wrapper"
15235
+ }, this.renderPlans()), !disableGifting && /*#__PURE__*/React__default.createElement("div", {
15236
+ className: "plc-flex plc-justify-center plc-mt-2"
15237
+ }, /*#__PURE__*/React__default.createElement(Checkbox, {
15238
+ onChange: this.onIsGiftChange,
15239
+ checked: this.state.isGift,
15240
+ id: "pelcro-input-is-gift"
15241
+ }, this.locale("messages.checkbox"))), /*#__PURE__*/React__default.createElement(Button, {
15242
+ disabled: this.state.disabled,
15243
+ onClick: this.submitOption,
15244
+ id: "pelcro-submit",
15245
+ className: "plc-w-full plc-mt-2"
15246
+ }, this.locale("buttons.next"))))), /*#__PURE__*/React__default.createElement(ModalFooter, null, !window.Pelcro.user.isAuthenticated() && /*#__PURE__*/React__default.createElement("p", null, this.locale("messages.alreadyHaveAccount") + " ", /*#__PURE__*/React__default.createElement(Link, {
15247
+ id: "pelcro-link-login",
15248
+ onClick: this.displayLoginView
15249
+ }, this.locale("messages.loginHere"))), /*#__PURE__*/React__default.createElement(Authorship, null)));
15250
+ }
15251
+ }
15252
+ const SelectModalWithTrans = withTranslation("select")(SelectModal);
15253
+
15254
+ /**
15255
+ *
15256
+ */
15257
+ function DonationModalWithHook(props) {
15258
+ React__default.useEffect(() => {
15259
+ var _props$onDisplay;
15260
+ (_props$onDisplay = props.onDisplay) === null || _props$onDisplay === void 0 ? void 0 : _props$onDisplay.call(props);
15261
+ }, []);
15262
+ const {
15263
+ isGift,
15264
+ plan,
15265
+ product,
15266
+ isRenewingGift,
15267
+ switchView,
15268
+ resetView,
15269
+ view,
15270
+ set
15271
+ } = usePelcro();
15272
+ const entitlementsProtectedElements = document.querySelectorAll("[data-pelcro-entitlements]");
15273
+ const entitlements = entitlementsProtectedElements.length > 0 ? getEntitlementsFromElem(entitlementsProtectedElements[0]) : null;
15274
+ return /*#__PURE__*/React__default.createElement(DonationModalWithTrans, {
15275
+ isGift: isGift,
15276
+ disableGifting: isRenewingGift,
15277
+ plan: plan,
15278
+ product: product,
15279
+ onClose: () => {
15280
+ var _props$onClose;
15281
+ (_props$onClose = props.onClose) === null || _props$onClose === void 0 ? void 0 : _props$onClose.call(props);
15282
+ resetView();
15283
+ },
15284
+ setProductAndPlan: (product, plan, isGift, selectedDonationAmount, customDonationAmount) => set({
14521
15285
  product,
14522
15286
  plan,
14523
- isGift
15287
+ isGift,
15288
+ selectedDonationAmount,
15289
+ customDonationAmount
14524
15290
  }),
14525
15291
  setView: switchView,
14526
15292
  matchingEntitlements: view === "_plan-select-entitlements" ? entitlements : null
@@ -14533,18 +15299,8 @@ function productsWithMatchedTaggedFirst() {
14533
15299
  const allProductsMinusMatched = allProducts.filter(product => !productsThatMatchArticleTag.some(matchedProduct => matchedProduct.id === product.id));
14534
15300
  return [productsThatMatchArticleTag, allProductsMinusMatched];
14535
15301
  }
14536
- function productMatchPageLanguage(product) {
14537
- if (!product) {
14538
- return false;
14539
- }
14540
- if (product.language === null) {
14541
- return true;
14542
- }
14543
- const siteLanguage = window.Pelcro.helpers.getHtmlLanguageAttribute();
14544
- return product.language === siteLanguage;
14545
- }
14546
- SelectModalWithHook.viewId = "plan-select";
14547
- class SelectModal extends Component {
15302
+ DonationModalWithHook.viewId = "donation-select";
15303
+ class DonationModal extends Component {
14548
15304
  constructor(props) {
14549
15305
  super(props);
14550
15306
  _defineProperty$3(this, "componentDidMount", () => {
@@ -14575,53 +15331,39 @@ class SelectModal extends Component {
14575
15331
  mode: "plan"
14576
15332
  });
14577
15333
  }
14578
- if (this.state.productList.length === 0 && !window.Pelcro.user.isAuthenticated()) {
14579
- this.props.setView("register");
14580
- }
15334
+
15335
+ // if (
15336
+ // this.state.productList.length === 0 &&
15337
+ // !window.Pelcro.user.isAuthenticated()
15338
+ // ) {
15339
+ // this.props.setView("register");
15340
+ // }
15341
+
14581
15342
  document.addEventListener("keydown", this.handleSubmit);
14582
15343
  if (!document.querySelector("#pelcro-selection-view") || !document.querySelector(".pelcro-select-product-wrapper")) {
14583
- var _window$Pelcro2, _window$Pelcro2$user, _window$Pelcro3, _window$Pelcro3$user, _window$Pelcro4, _window$Pelcro4$user, _window$Pelcro5, _window$Pelcro5$site;
14584
- const userCurrency = (_window$Pelcro2 = window.Pelcro) === null || _window$Pelcro2 === void 0 ? void 0 : (_window$Pelcro2$user = _window$Pelcro2.user) === null || _window$Pelcro2$user === void 0 ? void 0 : _window$Pelcro2$user.read().currency;
14585
- const userCountry = (_window$Pelcro3 = window.Pelcro) === null || _window$Pelcro3 === void 0 ? void 0 : (_window$Pelcro3$user = _window$Pelcro3.user) === null || _window$Pelcro3$user === void 0 ? void 0 : _window$Pelcro3$user.location.countryCode;
14586
- const userLanguage = (_window$Pelcro4 = window.Pelcro) === null || _window$Pelcro4 === void 0 ? void 0 : (_window$Pelcro4$user = _window$Pelcro4.user) === null || _window$Pelcro4$user === void 0 ? void 0 : _window$Pelcro4$user.read().language;
14587
- const productsMatchingUserCurrency = (_window$Pelcro5 = window.Pelcro) === null || _window$Pelcro5 === void 0 ? void 0 : (_window$Pelcro5$site = _window$Pelcro5.site) === null || _window$Pelcro5$site === void 0 ? void 0 : _window$Pelcro5$site.read().products.filter(product => {
15344
+ var _window$Pelcro, _window$Pelcro$user, _window$Pelcro2, _window$Pelcro2$user, _window$Pelcro3, _window$Pelcro3$user, _window$Pelcro4, _window$Pelcro4$site;
15345
+ const userCurrency = (_window$Pelcro = window.Pelcro) === null || _window$Pelcro === void 0 ? void 0 : (_window$Pelcro$user = _window$Pelcro.user) === null || _window$Pelcro$user === void 0 ? void 0 : _window$Pelcro$user.read().currency;
15346
+ const userCountry = (_window$Pelcro2 = window.Pelcro) === null || _window$Pelcro2 === void 0 ? void 0 : (_window$Pelcro2$user = _window$Pelcro2.user) === null || _window$Pelcro2$user === void 0 ? void 0 : _window$Pelcro2$user.location.countryCode;
15347
+ (_window$Pelcro3 = window.Pelcro) === null || _window$Pelcro3 === void 0 ? void 0 : (_window$Pelcro3$user = _window$Pelcro3.user) === null || _window$Pelcro3$user === void 0 ? void 0 : _window$Pelcro3$user.read().language;
15348
+ const productsMatchingUserCurrency = (_window$Pelcro4 = window.Pelcro) === null || _window$Pelcro4 === void 0 ? void 0 : (_window$Pelcro4$site = _window$Pelcro4.site) === null || _window$Pelcro4$site === void 0 ? void 0 : _window$Pelcro4$site.read().products.filter(product => {
14588
15349
  const filteredPlans = product.plans.filter(plan => plan.currency === userCurrency || !userCurrency);
14589
15350
  if (filteredPlans.length) return filteredPlans;
14590
15351
  });
14591
- const productsMatchingUserCountry = productsMatchingUserCurrency.filter(product => {
15352
+ productsMatchingUserCurrency.filter(product => {
14592
15353
  const filteredPlans = product.plans.filter(plan => {
14593
15354
  var _plan$countries;
14594
15355
  return plan.countries && ((_plan$countries = plan.countries) === null || _plan$countries === void 0 ? void 0 : _plan$countries.includes(userCountry)) || !plan.countries || !plan.countries.length;
14595
15356
  });
14596
15357
  if (filteredPlans.length) return filteredPlans;
14597
15358
  });
14598
- notifyBugsnag(() => {
14599
- Bugsnag.notify("SelectModal - No data viewed", event => {
14600
- var _window$Pelcro6, _window$Pelcro6$site, _window$Pelcro7, _window$Pelcro7$user, _window$Pelcro8, _window$Pelcro8$uiSet, _window$Pelcro9, _this$props, _window$Pelcro10, _window$Pelcro10$help, _window$Pelcro11, _window$Pelcro11$site;
14601
- event.addMetadata("MetaData", {
14602
- site: (_window$Pelcro6 = window.Pelcro) === null || _window$Pelcro6 === void 0 ? void 0 : (_window$Pelcro6$site = _window$Pelcro6.site) === null || _window$Pelcro6$site === void 0 ? void 0 : _window$Pelcro6$site.read(),
14603
- user: (_window$Pelcro7 = window.Pelcro) === null || _window$Pelcro7 === void 0 ? void 0 : (_window$Pelcro7$user = _window$Pelcro7.user) === null || _window$Pelcro7$user === void 0 ? void 0 : _window$Pelcro7$user.read(),
14604
- uiVersion: (_window$Pelcro8 = window.Pelcro) === null || _window$Pelcro8 === void 0 ? void 0 : (_window$Pelcro8$uiSet = _window$Pelcro8.uiSettings) === null || _window$Pelcro8$uiSet === void 0 ? void 0 : _window$Pelcro8$uiSet.uiVersion,
14605
- environment: (_window$Pelcro9 = window.Pelcro) === null || _window$Pelcro9 === void 0 ? void 0 : _window$Pelcro9.environment,
14606
- matchingEntitlementsProps: (_this$props = this.props) === null || _this$props === void 0 ? void 0 : _this$props.matchingEntitlements,
14607
- productListState: this.state.productList,
14608
- methods: {
14609
- productsWithMatchedTaggedFirst: productsWithMatchedTaggedFirst(),
14610
- pelcroSDKProductsListMethod: window.Pelcro.product.list(),
14611
- pelcroSDKGetByEntitlements: this.props.matchingEntitlements ? window.Pelcro.product.getByEntitlements(this.props.matchingEntitlements) : null
14612
- },
14613
- userCurrency: userCurrency,
14614
- userCountry: userCountry,
14615
- userLanguage: userLanguage,
14616
- siteLanguage: (_window$Pelcro10 = window.Pelcro) === null || _window$Pelcro10 === void 0 ? void 0 : (_window$Pelcro10$help = _window$Pelcro10.helpers) === null || _window$Pelcro10$help === void 0 ? void 0 : _window$Pelcro10$help.getHtmlLanguageAttribute(),
14617
- products: (_window$Pelcro11 = window.Pelcro) === null || _window$Pelcro11 === void 0 ? void 0 : (_window$Pelcro11$site = _window$Pelcro11.site) === null || _window$Pelcro11$site === void 0 ? void 0 : _window$Pelcro11$site.read().products.length,
14618
- currency_matching_filter: `${productsMatchingUserCurrency.length} Products Passed`,
14619
- country_matching_filter: `${productsMatchingUserCountry.length} Products Passed`,
14620
- language_matching_filter: `${productsMatchingUserCountry.filter(productMatchPageLanguage).length} Products Passed`
14621
- });
14622
- });
15359
+ }
15360
+ });
15361
+ _defineProperty$3(this, "componentDidUpdate", (prevProps, prevState) => {
15362
+ var _this$state$planList;
15363
+ if (((_this$state$planList = this.state.planList) === null || _this$state$planList === void 0 ? void 0 : _this$state$planList.length) === 1 && this.state.plan !== this.state.planList[0]) {
15364
+ this.setState({
15365
+ plan: this.state.planList[0]
14623
15366
  });
14624
- console.log("bugsnag Triggered");
14625
15367
  }
14626
15368
  });
14627
15369
  _defineProperty$3(this, "componentWillUnmount", () => {
@@ -14677,9 +15419,7 @@ class SelectModal extends Component {
14677
15419
  className: "plc-text-xs pelcro-select-product-description"
14678
15420
  }, product.description)), /*#__PURE__*/React__default.createElement("div", {
14679
15421
  className: "plc-flex plc-items-end plc-w-full plc-mt-3"
14680
- }, product.plans && /*#__PURE__*/React__default.createElement("p", {
14681
- className: "plc-w-1/2 plc-text-xs pelcro-select-product-cost"
14682
- }, this.locale("labels.startingAt"), " ", this.countStartPrice(product.plans)), /*#__PURE__*/React__default.createElement(Button, Object.assign({
15422
+ }, /*#__PURE__*/React__default.createElement(Button, Object.assign({
14683
15423
  onClick: productButtonCallback,
14684
15424
  "data-key": product.id,
14685
15425
  id: "pelcro-select-product-back-button",
@@ -14719,24 +15459,90 @@ class SelectModal extends Component {
14719
15459
  _defineProperty$3(this, "renderPlans", () => {
14720
15460
  return this.state.planList.map(plan => {
14721
15461
  const isChecked = this.state.plan.id === plan.id ? true : false;
15462
+ let planDetails = /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
15463
+ className: "plc-bg-gray-100 plc-rounded-md plc-p-3 plc-mt-3 plc-text-sm plc-flex plc-items-center"
15464
+ }, /*#__PURE__*/React__default.createElement("div", {
15465
+ className: "plc-flex plc-items-center plc-flex-1"
15466
+ }, "Auto renew:", " ", /*#__PURE__*/React__default.createElement("span", {
15467
+ className: "plc-inline-flex plc-w-6 plc-ml-1"
15468
+ }, plan.auto_renew ? /*#__PURE__*/React__default.createElement(SvgCheck, {
15469
+ className: "plc-text-green-500"
15470
+ }) : /*#__PURE__*/React__default.createElement(SvgXIcon, {
15471
+ className: "plc-text-red-500"
15472
+ })), " "), /*#__PURE__*/React__default.createElement("div", {
15473
+ className: "plc-flex plc-items-center plc-flex-1"
15474
+ }, "Renewed every:", " ", /*#__PURE__*/React__default.createElement("span", {
15475
+ className: "plc-inline-flex plc-w-6 plc-ml-1 plc-font-bold plc-capitalize"
15476
+ }, plan.interval || "-"))), plan.preset_donation_values && /*#__PURE__*/React__default.createElement("div", {
15477
+ className: "plc-mt-3 plc-pt-3 plc-border-t plc-border-gray-200"
15478
+ }, /*#__PURE__*/React__default.createElement("h5", {
15479
+ className: "plc-mb-4 plc-font-medium plc-text-center"
15480
+ }, "Select amount"), /*#__PURE__*/React__default.createElement("ul", {
15481
+ className: "plc-grid plc-grid-cols-2 plc-gap-3"
15482
+ }, plan.preset_donation_values.map(value => /*#__PURE__*/React__default.createElement("li", {
15483
+ key: value
15484
+ }, /*#__PURE__*/React__default.createElement("button", {
15485
+ className: `plc-bg-white plc-rounded-md plc-flex plc-items-center plc-justify-center plc-text-lg plc-w-full plc-min-h-16 focus:plc-outline-none ${isChecked && +this.state.selectedDonationAmount === +value ? "plc-border-primary-500 plc-text-primary-900 plc-border-2" : "plc-border-gray-200 plc-text-gray-900 plc-border"}`,
15486
+ onClick: () => {
15487
+ this.setState({
15488
+ selectedDonationAmount: +value,
15489
+ customDonationAmount: "",
15490
+ disabled: false
15491
+ });
15492
+ }
15493
+ }, /*#__PURE__*/React__default.createElement("span", {
15494
+ className: "plc-font-bold plc-mr-1"
15495
+ }, value), /*#__PURE__*/React__default.createElement("span", {
15496
+ className: "plc-uppercase"
15497
+ }, plan === null || plan === void 0 ? void 0 : plan.currency))))), /*#__PURE__*/React__default.createElement("div", {
15498
+ className: "plc-relative plc-py-3 plc-mt-3"
15499
+ }, /*#__PURE__*/React__default.createElement("hr", null), " ", /*#__PURE__*/React__default.createElement("span", {
15500
+ className: "plc-absolute plc-top-1/2 plc-left-1/2 plc-transform plc--translate-x-1/2 plc--translate-y-1/2 plc-leading-none plc-bg-white plc-px-2"
15501
+ }, "or"))), /*#__PURE__*/React__default.createElement("div", {
15502
+ className: "plc-relative plc-mt-3"
15503
+ }, /*#__PURE__*/React__default.createElement(Input, {
15504
+ type: "number",
15505
+ value: this.state.customDonationAmount,
15506
+ onChange: e => {
15507
+ if (+e.target.value > 0) {
15508
+ this.setState({
15509
+ customDonationAmount: +e.target.value,
15510
+ selectedDonationAmount: null,
15511
+ disabled: false
15512
+ });
15513
+ } else {
15514
+ this.setState({
15515
+ customDonationAmount: ""
15516
+ });
15517
+ this.setState({
15518
+ disabled: true
15519
+ });
15520
+ }
15521
+ },
15522
+ placeholder: "Donate a custom amount ...",
15523
+ className: "plc-pr-14",
15524
+ wrapperClassName: "plc-mb-0"
15525
+ }), /*#__PURE__*/React__default.createElement("span", {
15526
+ className: "plc-absolute plc-top-1/2 plc-transform plc--translate-y-1/2 plc-right-3 plc-pl-3 plc-border-l plc-border-gray-200 plc-uppercase plc-text-sm"
15527
+ }, plan.currency)));
14722
15528
  return /*#__PURE__*/React__default.createElement("div", {
14723
15529
  key: plan.id,
14724
- className: "plc-p-2 plc-mx-3 plc-mt-2 plc-text-gray-900 plc-border plc-border-gray-400 plc-border-solid plc-rounded pelcro-select-plan-wrapper"
15530
+ className: `plc-p-2 plc-mx-3 plc-mt-2 plc-text-gray-900 plc-border-solid plc-rounded pelcro-select-plan-wrapper ${isChecked ? "plc-border-primary-500 plc-border-2" : "plc-border-gray-400 plc-border "}`
14725
15531
  }, /*#__PURE__*/React__default.createElement(Radio, {
14726
- className: "plc-self-start pelcro-select-plan-radio",
14727
- labelClassName: "plc-cursor-pointer plc-w-full",
15532
+ className: "plc-self-start pelcro-select-plan-radio plc-hidden",
15533
+ labelClassName: "plc-cursor-pointer plc-w-full plc-ml-0",
14728
15534
  id: `pelcro-select-plan-${plan.id}`,
14729
15535
  name: "plan",
14730
15536
  checked: isChecked,
14731
15537
  "data-key": plan.id,
14732
15538
  onChange: this.selectPlan
14733
- }, /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("p", {
15539
+ }, /*#__PURE__*/React__default.createElement("div", {
15540
+ className: "plc-text-center"
15541
+ }, /*#__PURE__*/React__default.createElement("p", {
14734
15542
  className: "plc-font-bold pelcro-select-plan-title"
14735
15543
  }, plan.nickname), /*#__PURE__*/React__default.createElement("p", {
14736
15544
  className: "plc-text-xs pelcro-select-plan-description"
14737
- }, plan.description)), /*#__PURE__*/React__default.createElement("p", {
14738
- className: "plc-mt-3 plc-font-bold pelcro-select-plan-price"
14739
- }, plan.amount_formatted)));
15545
+ }, plan.description))), isChecked && planDetails);
14740
15546
  });
14741
15547
  });
14742
15548
  _defineProperty$3(this, "selectProduct", e => {
@@ -14744,13 +15550,15 @@ class SelectModal extends Component {
14744
15550
  for (const product of this.state.productList) {
14745
15551
  if (+product.id === +id) {
14746
15552
  var _this$state$plan;
15553
+ const planList = product.plans.filter(plan => plan.type === "donation");
15554
+ if (planList.length === 1) {
15555
+ this.setState({
15556
+ plan: planList[0]
15557
+ });
15558
+ }
14747
15559
  this.setState({
14748
- product: product
14749
- });
14750
- this.setState({
14751
- planList: product.plans
14752
- });
14753
- this.setState({
15560
+ product: product,
15561
+ planList: planList,
14754
15562
  mode: "plan"
14755
15563
  });
14756
15564
  const isSelectedPlanPartOfThisProduct = ((_this$state$plan = this.state.plan) === null || _this$state$plan === void 0 ? void 0 : _this$state$plan.product_id) === Number(product.id);
@@ -14763,6 +15571,12 @@ class SelectModal extends Component {
14763
15571
  }
14764
15572
  });
14765
15573
  _defineProperty$3(this, "selectPlan", e => {
15574
+ this.setState({
15575
+ selectedDonationAmount: null
15576
+ });
15577
+ this.setState({
15578
+ disabled: true
15579
+ });
14766
15580
  const id = e.target.dataset.key;
14767
15581
  for (const plan of this.state.planList) {
14768
15582
  if (+plan.id === +id) {
@@ -14770,9 +15584,6 @@ class SelectModal extends Component {
14770
15584
  this.setState({
14771
15585
  plan: plan
14772
15586
  });
14773
- this.setState({
14774
- disabled: false
14775
- });
14776
15587
  } else {
14777
15588
  plan.isCheked = false;
14778
15589
  }
@@ -14787,7 +15598,7 @@ class SelectModal extends Component {
14787
15598
  });
14788
15599
  });
14789
15600
  _defineProperty$3(this, "submitOption", () => {
14790
- this.props.setProductAndPlan(this.state.product, this.state.plan, this.state.isGift);
15601
+ this.props.setProductAndPlan(this.state.product, this.state.plan, this.state.isGift, this.state.selectedDonationAmount, this.state.customDonationAmount);
14791
15602
  const {
14792
15603
  product,
14793
15604
  isGift
@@ -14800,12 +15611,14 @@ class SelectModal extends Component {
14800
15611
  switchToAddressView,
14801
15612
  switchToPaymentView
14802
15613
  } = usePelcro.getStore();
14803
- if (!isAuthenticated) {
15614
+ if (!isAuthenticated && product.address_required) {
14804
15615
  return setView("register");
14805
15616
  }
14806
- if (isGift) {
14807
- return setView("gift-create");
14808
- }
15617
+
15618
+ // if (isGift) {
15619
+ // return setView("gift-create");
15620
+ // }
15621
+
14809
15622
  if (product.address_required) {
14810
15623
  return switchToAddressView();
14811
15624
  }
@@ -14814,13 +15627,16 @@ class SelectModal extends Component {
14814
15627
  _defineProperty$3(this, "displayLoginView", () => {
14815
15628
  this.props.setView("login");
14816
15629
  });
15630
+ const productList = props.matchingEntitlements ? window.Pelcro.product.getByEntitlements(props.matchingEntitlements).filter(product => product.has_donation_plans === true) : window.Pelcro.product.list().filter(product => product.has_donation_plans === true);
14817
15631
  this.state = {
14818
15632
  product: {},
14819
15633
  plan: {},
14820
15634
  isGift: props.isGift,
14821
15635
  disabled: true,
14822
15636
  mode: "product",
14823
- productList: props.matchingEntitlements ? window.Pelcro.product.getByEntitlements(props.matchingEntitlements) : window.Pelcro.product.list()
15637
+ productList: productList,
15638
+ selectedDonationAmount: null,
15639
+ customDonationAmount: ""
14824
15640
  };
14825
15641
  this.product = this.props.product || window.Pelcro.paywall.getProduct();
14826
15642
  this.locale = this.props.t;
@@ -14828,19 +15644,17 @@ class SelectModal extends Component {
14828
15644
  }
14829
15645
  render() {
14830
15646
  var _window$Pelcro$produc2, _window$Pelcro$produc3, _window$Pelcro$site$r;
14831
- const {
14832
- disableGifting
14833
- } = this.props;
15647
+ this.props;
14834
15648
  if (this.state.mode === "product") {
14835
15649
  var _ReactGA$event;
14836
- ReactGA$7 === null || ReactGA$7 === void 0 ? void 0 : (_ReactGA$event = ReactGA$7.event) === null || _ReactGA$event === void 0 ? void 0 : _ReactGA$event.call(ReactGA$7, {
15650
+ ReactGA1 === null || ReactGA1 === void 0 ? void 0 : (_ReactGA$event = ReactGA1.event) === null || _ReactGA$event === void 0 ? void 0 : _ReactGA$event.call(ReactGA1, {
14837
15651
  category: "VIEWS",
14838
15652
  action: "Product Modal Viewed",
14839
15653
  nonInteraction: true
14840
15654
  });
14841
15655
  } else if (this.state.mode === "plan") {
14842
15656
  var _ReactGA$event2;
14843
- ReactGA$7 === null || ReactGA$7 === void 0 ? void 0 : (_ReactGA$event2 = ReactGA$7.event) === null || _ReactGA$event2 === void 0 ? void 0 : _ReactGA$event2.call(ReactGA$7, {
15657
+ ReactGA1 === null || ReactGA1 === void 0 ? void 0 : (_ReactGA$event2 = ReactGA1.event) === null || _ReactGA$event2 === void 0 ? void 0 : _ReactGA$event2.call(ReactGA1, {
14844
15658
  category: "VIEWS",
14845
15659
  action: "Plan Modal Viewed",
14846
15660
  nonInteraction: true
@@ -14859,25 +15673,16 @@ class SelectModal extends Component {
14859
15673
  }, 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", {
14860
15674
  className: "pelcro-select-products-wrapper"
14861
15675
  }, (_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", {
14862
- className: "plc-overflow-y-scroll plc-max-h-72 pelcro-select-plans-wrapper"
14863
- }, this.renderPlans()), !disableGifting && /*#__PURE__*/React__default.createElement("div", {
14864
- className: "plc-flex plc-justify-center plc-mt-2"
14865
- }, /*#__PURE__*/React__default.createElement(Checkbox, {
14866
- onChange: this.onIsGiftChange,
14867
- checked: this.state.isGift,
14868
- id: "pelcro-input-is-gift"
14869
- }, this.locale("messages.checkbox"))), /*#__PURE__*/React__default.createElement(Button, {
15676
+ className: "plc-overflow-y-scroll pelcro-select-plans-wrapper"
15677
+ }, this.renderPlans()), /*#__PURE__*/React__default.createElement(Button, {
14870
15678
  disabled: this.state.disabled,
14871
- onClick: this.submitOption,
15679
+ onClick: () => this.submitOption(),
14872
15680
  id: "pelcro-submit",
14873
15681
  className: "plc-w-full plc-mt-2"
14874
- }, this.locale("buttons.next"))))), /*#__PURE__*/React__default.createElement(ModalFooter, null, !window.Pelcro.user.isAuthenticated() && /*#__PURE__*/React__default.createElement("p", null, this.locale("messages.alreadyHaveAccount") + " ", /*#__PURE__*/React__default.createElement(Link, {
14875
- id: "pelcro-link-login",
14876
- onClick: this.displayLoginView
14877
- }, this.locale("messages.loginHere"))), /*#__PURE__*/React__default.createElement(Authorship, null)));
15682
+ }, this.locale("buttons.donate"))))), /*#__PURE__*/React__default.createElement(ModalFooter, null, /*#__PURE__*/React__default.createElement(Authorship, null)));
14878
15683
  }
14879
15684
  }
14880
- const SelectModalWithTrans = withTranslation("select")(SelectModal);
15685
+ const DonationModalWithTrans = withTranslation("donation")(DonationModal);
14881
15686
 
14882
15687
  var Provider_1 = createCommonjsModule(function (module, exports) {
14883
15688
 
@@ -17091,11 +17896,15 @@ const initialState$k = {
17091
17896
  firstName: "",
17092
17897
  lastName: "",
17093
17898
  phone: "",
17899
+ email: "",
17900
+ password: "",
17094
17901
  firstNameError: null,
17095
17902
  lastNameError: null,
17096
17903
  phoneError: null,
17904
+ emailError: null,
17097
17905
  month: "",
17098
17906
  year: "",
17907
+ passwordError: null,
17099
17908
  cyberSourceSessionId: null,
17100
17909
  alert: {
17101
17910
  type: "error",
@@ -17129,7 +17938,11 @@ const PaymentMethodContainerWithoutStripe = _ref => {
17129
17938
  set,
17130
17939
  order,
17131
17940
  selectedPaymentMethodId,
17132
- couponCode
17941
+ couponCode,
17942
+ selectedDonationAmount,
17943
+ customDonationAmount,
17944
+ isAuthenticated,
17945
+ switchView
17133
17946
  } = usePelcro();
17134
17947
  const {
17135
17948
  whenUserReady
@@ -17161,6 +17974,22 @@ const PaymentMethodContainerWithoutStripe = _ref => {
17161
17974
  });
17162
17975
  updateTotalAmountWithTax();
17163
17976
  }, []);
17977
+ const fireBugSnag = _ref2 => {
17978
+ let {
17979
+ error,
17980
+ title
17981
+ } = _ref2;
17982
+ notifyBugsnag(() => {
17983
+ Bugsnag.notify(title !== null && title !== void 0 ? title : "ERROR", event => {
17984
+ var _document$getElementB, _document$querySelect;
17985
+ event.addMetadata("MetaData", {
17986
+ error: error !== null && error !== void 0 ? error : "ERROR",
17987
+ paymentModalViewed: (_document$getElementB = !!document.getElementById("pelcro-subscription-create-modal")) !== null && _document$getElementB !== void 0 ? _document$getElementB : false,
17988
+ errorAppeared: (_document$querySelect = !!document.querySelector(".pelcro-alert-error")) !== null && _document$querySelect !== void 0 ? _document$querySelect : false
17989
+ });
17990
+ });
17991
+ });
17992
+ };
17164
17993
 
17165
17994
  /*====== Start Cybersource integration ========*/
17166
17995
  const cybersourceErrorHandle = err => {
@@ -17170,10 +17999,10 @@ const PaymentMethodContainerWithoutStripe = _ref => {
17170
17999
  const errorMessages = [];
17171
18000
 
17172
18001
  // enumerable error (ex: validation errors)
17173
- Object.values(err === null || err === void 0 ? void 0 : (_err$details2 = err.details) === null || _err$details2 === void 0 ? void 0 : (_err$details2$respons = _err$details2.responseStatus) === null || _err$details2$respons === void 0 ? void 0 : _err$details2$respons.details).forEach(_ref2 => {
18002
+ Object.values(err === null || err === void 0 ? void 0 : (_err$details2 = err.details) === null || _err$details2 === void 0 ? void 0 : (_err$details2$respons = _err$details2.responseStatus) === null || _err$details2$respons === void 0 ? void 0 : _err$details2$respons.details).forEach(_ref3 => {
17174
18003
  let {
17175
18004
  message
17176
- } = _ref2;
18005
+ } = _ref3;
17177
18006
  errorMessages.push(message);
17178
18007
  });
17179
18008
 
@@ -17435,7 +18264,7 @@ const PaymentMethodContainerWithoutStripe = _ref => {
17435
18264
 
17436
18265
  /*====== Start Tap integration ========*/
17437
18266
  const submitUsingTap = state => {
17438
- var _ref3, _ref4, _ref5, _state$updatedPrice;
18267
+ var _ref4, _ref5, _getPlanAmount;
17439
18268
  const isUsingExistingPaymentMethod = Boolean(selectedPaymentMethodId);
17440
18269
  if (isUsingExistingPaymentMethod) {
17441
18270
  // no need to create a new source using tap
@@ -17459,7 +18288,15 @@ const PaymentMethodContainerWithoutStripe = _ref => {
17459
18288
  return total + item.price * item.quantity;
17460
18289
  }, 0);
17461
18290
  };
17462
- const totalAmount = (_ref3 = (_ref4 = (_ref5 = (_state$updatedPrice = state === null || state === void 0 ? void 0 : state.updatedPrice) !== null && _state$updatedPrice !== void 0 ? _state$updatedPrice : plan === null || plan === void 0 ? void 0 : plan.amount) !== null && _ref5 !== void 0 ? _ref5 : invoice === null || invoice === void 0 ? void 0 : invoice.amount_remaining) !== null && _ref4 !== void 0 ? _ref4 : getOrderItemsTotal()) !== null && _ref3 !== void 0 ? _ref3 : 10;
18291
+ function getPlanAmount() {
18292
+ if (state.updatedPrice) return state.updatedPrice;
18293
+ if (plan.type === "donation" && (selectedDonationAmount || customDonationAmount)) {
18294
+ return selectedDonationAmount ? selectedDonationAmount * plan.amount : customDonationAmount * plan.amount;
18295
+ } else {
18296
+ return plan.amount;
18297
+ }
18298
+ }
18299
+ const totalAmount = (_ref4 = (_ref5 = (_getPlanAmount = getPlanAmount()) !== null && _getPlanAmount !== void 0 ? _getPlanAmount : invoice === null || invoice === void 0 ? void 0 : invoice.amount_remaining) !== null && _ref5 !== void 0 ? _ref5 : getOrderItemsTotal()) !== null && _ref4 !== void 0 ? _ref4 : 10;
17463
18300
  tapInstanceRef.current.createToken(tapInstanceCard.current).then(function (result) {
17464
18301
  if (result.error) {
17465
18302
  // Inform the user if there was an error
@@ -17941,13 +18778,21 @@ const PaymentMethodContainerWithoutStripe = _ref => {
17941
18778
  }, [selectedPaymentMethodId]);
17942
18779
  const initPaymentRequest = (state, dispatch) => {
17943
18780
  if (skipPayment && ((plan === null || plan === void 0 ? void 0 : plan.amount) === 0 || props !== null && props !== void 0 && props.freeOrders)) return;
18781
+ function getPlanAmount() {
18782
+ if (state.updatedPrice) return state.updatedPrice;
18783
+ if (plan.type === "donation" && (selectedDonationAmount || customDonationAmount)) {
18784
+ return selectedDonationAmount ? selectedDonationAmount * plan.amount : customDonationAmount * plan.amount;
18785
+ } else {
18786
+ return plan.amount;
18787
+ }
18788
+ }
17944
18789
  try {
17945
18790
  const paymentRequest = stripe.paymentRequest({
17946
18791
  country: window.Pelcro.user.location.countryCode || "US",
17947
18792
  currency: plan.currency,
17948
18793
  total: {
17949
18794
  label: plan.nickname || plan.description,
17950
- amount: state.updatedPrice || plan.amount
18795
+ amount: getPlanAmount()
17951
18796
  }
17952
18797
  });
17953
18798
 
@@ -17979,7 +18824,12 @@ const PaymentMethodContainerWithoutStripe = _ref => {
17979
18824
  error
17980
18825
  } = _ref7;
17981
18826
  if (error) {
17982
- return handlePaymentError(error);
18827
+ handlePaymentError(error);
18828
+ fireBugSnag({
18829
+ error,
18830
+ title: "generate3DSecureSource - ERROR"
18831
+ });
18832
+ return;
17983
18833
  }
17984
18834
  toggleAuthenticationPendingView(true, source);
17985
18835
  });
@@ -18263,13 +19113,18 @@ const PaymentMethodContainerWithoutStripe = _ref => {
18263
19113
  });
18264
19114
  if (res.error) {
18265
19115
  onFailure(res.error);
18266
- return dispatch({
19116
+ dispatch({
18267
19117
  type: SHOW_ALERT,
18268
19118
  payload: {
18269
19119
  type: "error",
18270
19120
  content: isSubCreate ? t("messages.tryAgainFromInvoice") : getErrorMessages(res.error)
18271
19121
  }
18272
19122
  });
19123
+ fireBugSnag({
19124
+ error: getErrorMessages(res.error),
19125
+ title: "StripeConfirmCardPayment - ERROR"
19126
+ });
19127
+ return;
18273
19128
  }
18274
19129
  onSuccess(res);
18275
19130
  });
@@ -18285,13 +19140,18 @@ const PaymentMethodContainerWithoutStripe = _ref => {
18285
19140
  payload: false
18286
19141
  });
18287
19142
  onFailure(error);
18288
- return dispatch({
19143
+ dispatch({
18289
19144
  type: SHOW_ALERT,
18290
19145
  payload: {
18291
19146
  type: "error",
18292
19147
  content: isSubCreate ? t("messages.tryAgainFromInvoice") : t("messages.cardAuthFailed")
18293
19148
  }
18294
19149
  });
19150
+ fireBugSnag({
19151
+ error: getErrorMessages(error),
19152
+ title: "StripeConfirmCardPayment - ERROR"
19153
+ });
19154
+ return;
18295
19155
  } else {
18296
19156
  onSuccess(response);
18297
19157
  }
@@ -18306,13 +19166,18 @@ const PaymentMethodContainerWithoutStripe = _ref => {
18306
19166
  });
18307
19167
  if (error) {
18308
19168
  onFailure(error);
18309
- return dispatch({
19169
+ dispatch({
18310
19170
  type: SHOW_ALERT,
18311
19171
  payload: {
18312
19172
  type: "error",
18313
19173
  content: getErrorMessages(error)
18314
19174
  }
18315
19175
  });
19176
+ fireBugSnag({
19177
+ error: getErrorMessages(error),
19178
+ title: "StripeConfirmCardPayment - ERROR"
19179
+ });
19180
+ return;
18316
19181
  }
18317
19182
  onSuccess(response);
18318
19183
  }
@@ -18638,6 +19503,50 @@ const PaymentMethodContainerWithoutStripe = _ref => {
18638
19503
  }
18639
19504
  });
18640
19505
  };
19506
+ const sendRegisterRequest = (state, callback) => {
19507
+ window.Pelcro.user.register({
19508
+ email: state.email,
19509
+ password: generatePassword()
19510
+ }, (err, res) => {
19511
+ if (err) {
19512
+ var _err$response, _err$response$data;
19513
+ let {
19514
+ registered_on_other_sites,
19515
+ ...errors
19516
+ } = err === null || err === void 0 ? void 0 : (_err$response = err.response) === null || _err$response === void 0 ? void 0 : (_err$response$data = _err$response.data) === null || _err$response$data === void 0 ? void 0 : _err$response$data.errors;
19517
+ err.response.data.errors = {
19518
+ ...errors
19519
+ };
19520
+ let errorContent;
19521
+ if (getErrorMessages(err) === "This email is already in use.") {
19522
+ errorContent = /*#__PURE__*/React__default.createElement("p", null, "This email is already in use.", " ", /*#__PURE__*/React__default.createElement("button", {
19523
+ className: "plc-font-bold plc-underline hover:plc-no-underline",
19524
+ onClick: () => switchView("login")
19525
+ }, "Login to continue"));
19526
+ } else {
19527
+ errorContent = getErrorMessages(err);
19528
+ }
19529
+ dispatch({
19530
+ type: SHOW_ALERT,
19531
+ payload: {
19532
+ type: "error",
19533
+ content: errorContent
19534
+ }
19535
+ });
19536
+ dispatch({
19537
+ type: DISABLE_SUBMIT,
19538
+ payload: false
19539
+ });
19540
+ dispatch({
19541
+ type: LOADING,
19542
+ payload: false
19543
+ });
19544
+ onFailure(err);
19545
+ } else {
19546
+ callback();
19547
+ }
19548
+ });
19549
+ };
18641
19550
  const submitPayment = (state, dispatch) => {
18642
19551
  if (skipPayment && props !== null && props !== void 0 && props.freeOrders) {
18643
19552
  const isQuickPurchase = !Array.isArray(order);
@@ -18665,7 +19574,7 @@ const PaymentMethodContainerWithoutStripe = _ref => {
18665
19574
  stripe.createSource({
18666
19575
  type: "card"
18667
19576
  }).then(_ref9 => {
18668
- var _ref10, _ref11, _state$updatedPrice2;
19577
+ var _ref10, _ref11, _state$updatedPrice;
18669
19578
  let {
18670
19579
  source,
18671
19580
  error
@@ -18688,7 +19597,7 @@ const PaymentMethodContainerWithoutStripe = _ref => {
18688
19597
  return total + item.price * item.quantity;
18689
19598
  }, 0);
18690
19599
  };
18691
- (_ref10 = (_ref11 = (_state$updatedPrice2 = state === null || state === void 0 ? void 0 : state.updatedPrice) !== null && _state$updatedPrice2 !== void 0 ? _state$updatedPrice2 : plan === null || plan === void 0 ? void 0 : plan.amount) !== null && _ref11 !== void 0 ? _ref11 : invoice === null || invoice === void 0 ? void 0 : invoice.amount_remaining) !== null && _ref10 !== void 0 ? _ref10 : getOrderItemsTotal();
19600
+ (_ref10 = (_ref11 = (_state$updatedPrice = state === null || state === void 0 ? void 0 : state.updatedPrice) !== null && _state$updatedPrice !== void 0 ? _state$updatedPrice : plan === null || plan === void 0 ? void 0 : plan.amount) !== null && _ref11 !== void 0 ? _ref11 : invoice === null || invoice === void 0 ? void 0 : invoice.amount_remaining) !== null && _ref10 !== void 0 ? _ref10 : getOrderItemsTotal();
18692
19601
  return handlePayment(source);
18693
19602
  }).catch(error => {
18694
19603
  return handlePaymentError(error);
@@ -18899,25 +19808,47 @@ const PaymentMethodContainerWithoutStripe = _ref => {
18899
19808
  return submitPayment(state);
18900
19809
  }
18901
19810
  if (getSiteCardProcessor() === "vantiv") {
18902
- return submitUsingVantiv(state);
19811
+ if (!isAuthenticated() && plan.type === "donation") {
19812
+ return sendRegisterRequest(state, () => submitUsingVantiv(state));
19813
+ } else {
19814
+ return submitUsingVantiv(state);
19815
+ }
18903
19816
  }
18904
19817
  if (getSiteCardProcessor() === "tap") {
18905
- return submitUsingTap(state);
19818
+ if (!isAuthenticated() && plan.type === "donation") {
19819
+ return sendRegisterRequest(state, () => submitUsingTap(state));
19820
+ } else {
19821
+ return submitUsingTap(state);
19822
+ }
19823
+ }
19824
+ if (getSiteCardProcessor() === "cybersource") {
19825
+ return submitUsingCybersource(state, dispatch);
18906
19826
  }
18907
19827
  if (getSiteCardProcessor() === "cybersource") {
18908
19828
  return submitUsingCybersource(state, dispatch);
18909
19829
  }
18910
19830
  if (selectedPaymentMethodId) {
18911
- // pay with selected method (source) if exists already
18912
- return handlePayment({
18913
- id: selectedPaymentMethodId,
18914
- isExistingSource: true
18915
- });
19831
+ if (!isAuthenticated() && plan.type === "donation") {
19832
+ return sendRegisterRequest(state, () => handlePayment({
19833
+ id: selectedPaymentMethodId,
19834
+ isExistingSource: true
19835
+ }));
19836
+ } else {
19837
+ // pay with selected method (source) if exists already
19838
+ return handlePayment({
19839
+ id: selectedPaymentMethodId,
19840
+ isExistingSource: true
19841
+ });
19842
+ }
18916
19843
  }
18917
19844
  if (type === "updatePaymentSource") {
18918
19845
  return updatePaymentSource(state, dispatch);
18919
19846
  }
18920
- submitPayment(state);
19847
+ if (!isAuthenticated() && plan.type === "donation") {
19848
+ return sendRegisterRequest(state, () => submitPayment(state));
19849
+ } else {
19850
+ return submitPayment(state);
19851
+ }
18921
19852
  });
18922
19853
  case HANDLE_PAYPAL_SUBSCRIPTION:
18923
19854
  return lib_5(state, (state, dispatch) => {
@@ -19002,6 +19933,18 @@ const PaymentMethodContainerWithoutStripe = _ref => {
19002
19933
  phone: action.payload,
19003
19934
  phoneError: null
19004
19935
  });
19936
+ case SET_EMAIL:
19937
+ return lib_7({
19938
+ ...state,
19939
+ email: action.payload,
19940
+ emailError: null
19941
+ });
19942
+ case SET_PASSWORD:
19943
+ return lib_7({
19944
+ ...state,
19945
+ password: action.payload,
19946
+ passwordError: null
19947
+ });
19005
19948
  case SET_FIRST_NAME_ERROR:
19006
19949
  return lib_7({
19007
19950
  ...state,
@@ -19020,6 +19963,18 @@ const PaymentMethodContainerWithoutStripe = _ref => {
19020
19963
  phoneError: action.payload,
19021
19964
  phone: null
19022
19965
  });
19966
+ case SET_EMAIL_ERROR:
19967
+ return lib_7({
19968
+ ...state,
19969
+ emailError: action.payload,
19970
+ email: ""
19971
+ });
19972
+ case SET_PASSWORD_ERROR:
19973
+ return lib_7({
19974
+ ...state,
19975
+ passwordError: action.payload,
19976
+ password: ""
19977
+ });
19023
19978
  case SHOW_ALERT:
19024
19979
  return lib_7({
19025
19980
  ...state,
@@ -19058,18 +20013,14 @@ const PaymentMethodContainerWithoutStripe = _ref => {
19058
20013
  const UnwrappedForm = es_12(PaymentMethodContainerWithoutStripe);
19059
20014
  const PaymentMethodContainer = props => {
19060
20015
  const [isStripeLoaded, setIsStripeLoaded] = useState(Boolean(window.Stripe));
19061
- const {
19062
- whenUserReady
19063
- } = usePelcro.getStore();
20016
+ usePelcro.getStore();
19064
20017
  const cardProcessor = getSiteCardProcessor();
19065
20018
  useEffect(() => {
19066
- whenUserReady(() => {
19067
- if (!window.Stripe && cardProcessor === "stripe") {
19068
- document.querySelector('script[src="https://js.stripe.com/v3"]').addEventListener("load", () => {
19069
- setIsStripeLoaded(true);
19070
- });
19071
- }
19072
- });
20019
+ if (!window.Stripe && cardProcessor === "stripe") {
20020
+ document.querySelector('script[src="https://js.stripe.com/v3"]').addEventListener("load", () => {
20021
+ setIsStripeLoaded(true);
20022
+ });
20023
+ }
19073
20024
  }, []);
19074
20025
  if (isStripeLoaded) {
19075
20026
  return /*#__PURE__*/React__default.createElement(es_13, {
@@ -19362,13 +20313,15 @@ const DiscountedPrice = props => {
19362
20313
  };
19363
20314
 
19364
20315
  const SubmitPaymentMethod = _ref => {
19365
- var _plan$quantity, _window$Pelcro$site$r, _window$Pelcro$site$r2;
20316
+ var _plan$quantity, _plan$quantity2, _plan$quantity3, _window$Pelcro$site$r, _window$Pelcro$site$r2;
19366
20317
  let {
19367
20318
  onClick,
19368
20319
  ...otherProps
19369
20320
  } = _ref;
19370
20321
  const {
19371
20322
  plan,
20323
+ selectedDonationAmount,
20324
+ customDonationAmount,
19372
20325
  selectedPaymentMethodId
19373
20326
  } = usePelcro();
19374
20327
  const {
@@ -19380,6 +20333,8 @@ const SubmitPaymentMethod = _ref => {
19380
20333
  firstNameError,
19381
20334
  lastNameError,
19382
20335
  phoneError,
20336
+ emailError,
20337
+ passwordError,
19383
20338
  firstName,
19384
20339
  lastName,
19385
20340
  phone,
@@ -19392,7 +20347,7 @@ const SubmitPaymentMethod = _ref => {
19392
20347
  } = useContext(store$k);
19393
20348
  const planQuantity = (_plan$quantity = plan === null || plan === void 0 ? void 0 : plan.quantity) !== null && _plan$quantity !== void 0 ? _plan$quantity : 1;
19394
20349
  const price = updatedPrice !== null && updatedPrice !== void 0 ? updatedPrice : plan === null || plan === void 0 ? void 0 : plan.amount;
19395
- const priceFormatted = getFormattedPriceByLocal(price * planQuantity, plan === null || plan === void 0 ? void 0 : plan.currency, getPageOrDefaultLanguage());
20350
+ const priceFormatted = (plan === null || plan === void 0 ? void 0 : plan.type) === "donation" && (selectedDonationAmount || customDonationAmount) ? getFormattedPriceByLocal(selectedDonationAmount ? selectedDonationAmount * (plan === null || plan === void 0 ? void 0 : plan.amount) * ((_plan$quantity2 = plan === null || plan === void 0 ? void 0 : plan.quantity) !== null && _plan$quantity2 !== void 0 ? _plan$quantity2 : 1) : customDonationAmount * (plan === null || plan === void 0 ? void 0 : plan.amount) * ((_plan$quantity3 = plan === null || plan === void 0 ? void 0 : plan.quantity) !== null && _plan$quantity3 !== void 0 ? _plan$quantity3 : 1), plan === null || plan === void 0 ? void 0 : plan.currency, getPageOrDefaultLanguage()) : getFormattedPriceByLocal(price * planQuantity, plan === null || plan === void 0 ? void 0 : plan.currency, getPageOrDefaultLanguage());
19396
20351
  const supportsTap = Boolean((_window$Pelcro$site$r = window.Pelcro.site.read()) === null || _window$Pelcro$site$r === void 0 ? void 0 : _window$Pelcro$site$r.tap_gateway_settings);
19397
20352
  const supportsCybersource = Boolean((_window$Pelcro$site$r2 = window.Pelcro.site.read()) === null || _window$Pelcro$site$r2 === void 0 ? void 0 : _window$Pelcro$site$r2.cybersource_gateway_settings);
19398
20353
  const isUserFirstName = Boolean(window.Pelcro.user.read().first_name);
@@ -19403,9 +20358,9 @@ const SubmitPaymentMethod = _ref => {
19403
20358
  if (supportsTap && isUserFirstName && isUserLastName && isUserPhone) {
19404
20359
  setDisabled(disableSubmit);
19405
20360
  } else {
19406
- setDisabled(disableSubmit || supportsTap && firstNameError || supportsTap && lastNameError || supportsTap && phoneError || supportsTap && !(firstName !== null && firstName !== void 0 && firstName.length) || supportsTap && !(lastName !== null && lastName !== void 0 && lastName.length) || supportsTap && !(phone !== null && phone !== void 0 && phone.length) || supportsCybersource && !selectedPaymentMethodId && !(month !== null && month !== void 0 && month.length) || supportsCybersource && !selectedPaymentMethodId && !(year !== null && year !== void 0 && year.length));
20361
+ setDisabled(disableSubmit || supportsTap && firstNameError || supportsTap && lastNameError || supportsTap && phoneError || supportsTap && !(firstName !== null && firstName !== void 0 && firstName.length) || supportsTap && !(lastName !== null && lastName !== void 0 && lastName.length) || supportsTap && !(phone !== null && phone !== void 0 && phone.length) || emailError || passwordError || supportsCybersource && !selectedPaymentMethodId && !(month !== null && month !== void 0 && month.length) || supportsCybersource && !selectedPaymentMethodId && !(year !== null && year !== void 0 && year.length));
19407
20362
  }
19408
- }, [disableSubmit, firstNameError, lastNameError, phoneError, firstName, lastName, phone, month, year]);
20363
+ }, [disableSubmit, firstNameError, lastNameError, phoneError, firstName, lastName, phone, emailError, passwordError, month, year]);
19409
20364
  return /*#__PURE__*/React__default.createElement(Button, Object.assign({
19410
20365
  role: "submit",
19411
20366
  className: "plc-w-full plc-py-3",
@@ -20040,6 +20995,10 @@ const OrderCreateFreeButton = _ref => {
20040
20995
  }, otherProps), t("labels.submit"));
20041
20996
  };
20042
20997
 
20998
+ const DonationEmail = props => /*#__PURE__*/React__default.createElement(Email, Object.assign({
20999
+ store: store$k
21000
+ }, props));
21001
+
20043
21002
  /**
20044
21003
  *
20045
21004
  */
@@ -20059,6 +21018,10 @@ function PaymentMethodView(_ref) {
20059
21018
  const {
20060
21019
  t
20061
21020
  } = useTranslation("checkoutForm");
21021
+ const {
21022
+ plan,
21023
+ isAuthenticated
21024
+ } = usePelcro();
20062
21025
  const cardProcessor = getSiteCardProcessor();
20063
21026
  const supportsVantiv = Boolean((_window$Pelcro$site$r = window.Pelcro.site.read()) === null || _window$Pelcro$site$r === void 0 ? void 0 : _window$Pelcro$site$r.vantiv_gateway_settings);
20064
21027
  const supportsTap = Boolean((_window$Pelcro$site$r2 = window.Pelcro.site.read()) === null || _window$Pelcro$site$r2 === void 0 ? void 0 : _window$Pelcro$site$r2.tap_gateway_settings);
@@ -20116,6 +21079,12 @@ function PaymentMethodView(_ref) {
20116
21079
  errorId: "pelcro-input-phone-error",
20117
21080
  label: t("labels.phone"),
20118
21081
  required: true
21082
+ })), !isAuthenticated() && (plan === null || plan === void 0 ? void 0 : plan.type) === "donation" && /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(DonationEmail, {
21083
+ id: "pelcro-input-email",
21084
+ errorId: "pelcro-input-email-error",
21085
+ label: t("labels.email"),
21086
+ required: true,
21087
+ autoFocus: true
20119
21088
  })), /*#__PURE__*/React__default.createElement(CheckoutForm, null), showCoupon && /*#__PURE__*/React__default.createElement("div", {
20120
21089
  className: "plc-mb-2"
20121
21090
  }, /*#__PURE__*/React__default.createElement(CouponCode, null), /*#__PURE__*/React__default.createElement(DiscountedPrice, null)), /*#__PURE__*/React__default.createElement(TaxAmount, null), /*#__PURE__*/React__default.createElement("div", {
@@ -20435,7 +21404,7 @@ const SubscriptionCancelNowButton = _ref => {
20435
21404
  switchView(null);
20436
21405
 
20437
21406
  //Show confirmation alert after closing the modal
20438
- notify$1.confirm((onSuccess, onFailure) => {
21407
+ notify.confirm((onSuccess, onFailure) => {
20439
21408
  cancelSubscription(payload, onSuccess, onFailure);
20440
21409
  }, {
20441
21410
  confirmMessage: t("messages.subCancellation.isSureToCancelNow"),
@@ -20507,7 +21476,7 @@ const SubscriptionCancelLaterButton = _ref => {
20507
21476
  switchView(null);
20508
21477
 
20509
21478
  //Show confirmation alert after closing the modal
20510
- notify$1.confirm((onSuccess, onFailure) => {
21479
+ notify.confirm((onSuccess, onFailure) => {
20511
21480
  cancelSubscription(payload, onSuccess, onFailure);
20512
21481
  }, {
20513
21482
  confirmMessage: t("messages.subCancellation.isSureToCancel"),
@@ -20744,7 +21713,7 @@ const SubscriptionSuspendButton = _ref => {
20744
21713
  switchView(null);
20745
21714
 
20746
21715
  //Show confirmation alert after closing the modal
20747
- notify$1.confirm((onSuccess, onFailure) => {
21716
+ notify.confirm((onSuccess, onFailure) => {
20748
21717
  suspendSubscription(payload, onSuccess, onFailure);
20749
21718
  }, {
20750
21719
  confirmMessage: t("messages.subCancellation.isSureToSuspendNow"),
@@ -21464,12 +22433,14 @@ const SubscriptionCreateView = _ref => {
21464
22433
  } = useTranslation("checkoutForm");
21465
22434
  const {
21466
22435
  product,
21467
- plan
22436
+ plan,
22437
+ selectedDonationAmount,
22438
+ customDonationAmount
21468
22439
  } = usePelcro();
21469
22440
  const skipPayment = (_window$Pelcro = window.Pelcro) === null || _window$Pelcro === void 0 ? void 0 : (_window$Pelcro$uiSett = _window$Pelcro.uiSettings) === null || _window$Pelcro$uiSett === void 0 ? void 0 : _window$Pelcro$uiSett.skipPaymentForFreePlans;
21470
22441
  const showSubscriptionButton = skipPayment && (plan === null || plan === void 0 ? void 0 : plan.amount) === 0;
21471
22442
  const getPricingText = plan => {
21472
- var _plan$quantity;
22443
+ var _plan$quantity, _plan$quantity2, _plan$quantity3;
21473
22444
  const autoRenewed = plan.auto_renew;
21474
22445
  const {
21475
22446
  interval,
@@ -21479,7 +22450,7 @@ const SubscriptionCreateView = _ref => {
21479
22450
  interval,
21480
22451
  count: interval_count
21481
22452
  });
21482
- const priceFormatted = getFormattedPriceByLocal((plan === null || plan === void 0 ? void 0 : plan.amount) * ((_plan$quantity = plan === null || plan === void 0 ? void 0 : plan.quantity) !== null && _plan$quantity !== void 0 ? _plan$quantity : 1), plan === null || plan === void 0 ? void 0 : plan.currency, getPageOrDefaultLanguage());
22453
+ const priceFormatted = plan.type === "donation" && (selectedDonationAmount || customDonationAmount) ? getFormattedPriceByLocal(selectedDonationAmount ? selectedDonationAmount * (plan === null || plan === void 0 ? void 0 : plan.amount) * ((_plan$quantity = plan === null || plan === void 0 ? void 0 : plan.quantity) !== null && _plan$quantity !== void 0 ? _plan$quantity : 1) : customDonationAmount * (plan === null || plan === void 0 ? void 0 : plan.amount) * ((_plan$quantity2 = plan === null || plan === void 0 ? void 0 : plan.quantity) !== null && _plan$quantity2 !== void 0 ? _plan$quantity2 : 1), plan === null || plan === void 0 ? void 0 : plan.currency, getPageOrDefaultLanguage()) : getFormattedPriceByLocal((plan === null || plan === void 0 ? void 0 : plan.amount) * ((_plan$quantity3 = plan === null || plan === void 0 ? void 0 : plan.quantity) !== null && _plan$quantity3 !== void 0 ? _plan$quantity3 : 1), plan === null || plan === void 0 ? void 0 : plan.currency, getPageOrDefaultLanguage());
21483
22454
  return /*#__PURE__*/React__default.createElement("p", {
21484
22455
  className: "plc-text-gray-600"
21485
22456
  }, /*#__PURE__*/React__default.createElement("span", {
@@ -21944,7 +22915,7 @@ function SubscriptionManageMembersView(props) {
21944
22915
  className: "plc-font-semibold plc-text-center plc-text-gray-900 pelcro-title-wrapper"
21945
22916
  }, /*#__PURE__*/React__default.createElement("h4", {
21946
22917
  className: "plc-text-2xl"
21947
- }, t("labels.inviteMembers")), /*#__PURE__*/React__default.createElement("p", null, "Comma-separated list e.g. 'john@example.com,jane@example.com'")), /*#__PURE__*/React__default.createElement("form", {
22918
+ }, t("labels.inviteMembers")), /*#__PURE__*/React__default.createElement("p", null, t("labels.listNote"), " 'john@example.com,jane@example.com'")), /*#__PURE__*/React__default.createElement("form", {
21948
22919
  action: "javascript:void(0);",
21949
22920
  className: "plc-mt-2 pelcro-form"
21950
22921
  }, /*#__PURE__*/React__default.createElement(SubscriptionManageMembersContainer, props, /*#__PURE__*/React__default.createElement(AlertWithContext, null), /*#__PURE__*/React__default.createElement(SubscriptionManageMembersEmails, {
@@ -22802,7 +23773,7 @@ const AddressCreateContainer = _ref => {
22802
23773
  });
22803
23774
  return onFailure(err);
22804
23775
  }
22805
- notify$1.success(t("messages.addressUpdated"));
23776
+ notify.success(t("messages.addressUpdated"));
22806
23777
  return onMembershipAdressUpdateSuccess(res);
22807
23778
  });
22808
23779
  }
@@ -26293,7 +27264,7 @@ const AddressSelectContainer = _ref => {
26293
27264
  });
26294
27265
  return onFailure(err);
26295
27266
  }
26296
- notify$1.success(t("messages.addressUpdated"));
27267
+ notify.success(t("messages.addressUpdated"));
26297
27268
  return onMembershipAdressUpdateSuccess(res);
26298
27269
  });
26299
27270
  }
@@ -28254,7 +29225,7 @@ const SubscriptionsItems = _ref => {
28254
29225
  return switchView("email-verify");
28255
29226
  }
28256
29227
  onClose === null || onClose === void 0 ? void 0 : onClose();
28257
- notify$1.confirm((onSuccess, onFailure) => {
29228
+ notify.confirm((onSuccess, onFailure) => {
28258
29229
  cancelSubscription(sub.id, onSuccess, onFailure);
28259
29230
  }, {
28260
29231
  confirmMessage: t("messages.subCancellation.isSureToCancel"),
@@ -28271,7 +29242,7 @@ const SubscriptionsItems = _ref => {
28271
29242
  if (userMustVerifyEmail()) {
28272
29243
  return switchView("email-verify");
28273
29244
  }
28274
- reactivateSubscription(sub.id);
29245
+ reactivateSubscription(sub.id, false);
28275
29246
  };
28276
29247
 
28277
29248
  // Renew click
@@ -28309,7 +29280,7 @@ const SubscriptionsItems = _ref => {
28309
29280
  return switchView("email-verify");
28310
29281
  }
28311
29282
  onClose === null || onClose === void 0 ? void 0 : onClose();
28312
- notify$1.confirm((onSuccess, onFailure) => {
29283
+ notify.confirm((onSuccess, onFailure) => {
28313
29284
  unSuspendSubscription(sub.id, onSuccess, onFailure);
28314
29285
  }, {
28315
29286
  confirmMessage: t("messages.subUnSuspend.isSureToUnSuspend"),
@@ -28391,7 +29362,7 @@ const SubscriptionsItems = _ref => {
28391
29362
  onClick: onCancelClick,
28392
29363
  disabled: disableSubmit,
28393
29364
  "data-key": sub.id
28394
- }, t("labels.unsubscribe")) : "", (sub === null || sub === void 0 ? void 0 : (_sub$plan = sub.plan) === null || _sub$plan === void 0 ? void 0 : _sub$plan.type) === 'membership' && /*#__PURE__*/React__default.createElement(Button, {
29365
+ }, t("labels.unsubscribe")) : "", (sub === null || sub === void 0 ? void 0 : (_sub$plan = sub.plan) === null || _sub$plan === void 0 ? void 0 : _sub$plan.type) === "membership" && /*#__PURE__*/React__default.createElement(Button, {
28395
29366
  variant: "ghost",
28396
29367
  className: "plc-text-blue-400 pelcro-dashboard-sub-manage-members-button",
28397
29368
  icon: /*#__PURE__*/React__default.createElement(SvgRefresh, null),
@@ -28438,7 +29409,10 @@ const SubscriptionsItems = _ref => {
28438
29409
  };
28439
29410
  function getNonDonationSubs() {
28440
29411
  var _window$Pelcro$subscr, _window$Pelcro$subscr2, _window$Pelcro$subscr3;
28441
- 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 : [];
29412
+ 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 => {
29413
+ var _sub$plan2;
29414
+ return ((_sub$plan2 = sub.plan) === null || _sub$plan2 === void 0 ? void 0 : _sub$plan2.type) !== "donation";
29415
+ })) !== null && _window$Pelcro$subscr !== void 0 ? _window$Pelcro$subscr : [];
28442
29416
  }
28443
29417
  function isDateAfterToday(date) {
28444
29418
  const today = new Date().setHours(0, 0, 0, 0);
@@ -28726,6 +29700,7 @@ function SvgQrcode(props) {
28726
29700
 
28727
29701
  const DonationsMenu = _ref => {
28728
29702
  let {
29703
+ onClose,
28729
29704
  reactivateSubscription,
28730
29705
  disableSubmit,
28731
29706
  cancelSubscription
@@ -28737,10 +29712,10 @@ const DonationsMenu = _ref => {
28737
29712
  switchView,
28738
29713
  setSubscriptionToCancel
28739
29714
  } = usePelcro();
28740
- const subscriptions = getDonationSubs().sort((a, b) => a.expires_at - b.expires_at).sort((a, b) => a.renews_at - b.renews_at).map(sub => {
29715
+ const donations = getDonationSubs().sort((a, b) => a.expires_at - b.expires_at).sort((a, b) => a.renews_at - b.renews_at).map(sub => {
29716
+ console.log("Sub", sub);
28741
29717
  // Cancel button click handlers
28742
29718
  const onCancelClick = () => {
28743
- var _onClose;
28744
29719
  const isImmediateCancelationEnabled = window.Pelcro.site.read().cancel_settings.status;
28745
29720
  if (isImmediateCancelationEnabled) {
28746
29721
  setSubscriptionToCancel(sub.id);
@@ -28749,16 +29724,16 @@ const DonationsMenu = _ref => {
28749
29724
  if (userMustVerifyEmail()) {
28750
29725
  return switchView("email-verify");
28751
29726
  }
28752
- (_onClose = onClose) === null || _onClose === void 0 ? void 0 : _onClose();
29727
+ onClose === null || onClose === void 0 ? void 0 : onClose();
28753
29728
  notify.confirm((onSuccess, onFailure) => {
28754
29729
  cancelSubscription(sub.id, onSuccess, onFailure);
28755
29730
  }, {
28756
- confirmMessage: t("messages.subCancellation.isSureToCancel"),
28757
- loadingMessage: t("messages.subCancellation.loading"),
28758
- successMessage: t("messages.subCancellation.success"),
28759
- errorMessage: t("messages.subCancellation.error")
29731
+ confirmMessage: t("messages.donationCancellation.isSureToCancel"),
29732
+ loadingMessage: t("messages.donationCancellation.loading"),
29733
+ successMessage: t("messages.donationCancellation.success"),
29734
+ errorMessage: t("messages.donationCancellation.error")
28760
29735
  }, {
28761
- closeButtonLabel: t("labels.subCancellation.goBack")
29736
+ closeButtonLabel: t("labels.donationCancellation.goBack")
28762
29737
  });
28763
29738
  };
28764
29739
 
@@ -28767,7 +29742,7 @@ const DonationsMenu = _ref => {
28767
29742
  if (userMustVerifyEmail()) {
28768
29743
  return switchView("email-verify");
28769
29744
  }
28770
- reactivateSubscription(sub.id);
29745
+ reactivateSubscription(sub.id, true);
28771
29746
  };
28772
29747
  return /*#__PURE__*/React__default.createElement("tr", {
28773
29748
  key: sub.id,
@@ -28808,12 +29783,18 @@ const DonationsMenu = _ref => {
28808
29783
  className: "plc-w-3/12 "
28809
29784
  }, t("labels.actions")))), /*#__PURE__*/React__default.createElement("tbody", null, /*#__PURE__*/React__default.createElement("tr", {
28810
29785
  className: "plc-h-4"
28811
- }), subscriptions));
29786
+ }), donations));
28812
29787
  };
28813
29788
  function getDonationSubs() {
28814
29789
  var _window$Pelcro$subscr, _window$Pelcro$subscr2, _window$Pelcro$subscr3, _window$Pelcro$user$r, _window$Pelcro$user$r2;
28815
- 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 && !sub.is_gift_donor)) !== null && _window$Pelcro$subscr !== void 0 ? _window$Pelcro$subscr : [];
28816
- const canceledDonations = (_window$Pelcro$user$r = (_window$Pelcro$user$r2 = window.Pelcro.user.read().expired_subscriptions) === null || _window$Pelcro$user$r2 === void 0 ? void 0 : _window$Pelcro$user$r2.filter(sub => sub.plan.is_donation && !sub.is_gift_donor)) !== null && _window$Pelcro$user$r !== void 0 ? _window$Pelcro$user$r : [];
29790
+ 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 => {
29791
+ var _sub$plan;
29792
+ return ((_sub$plan = sub.plan) === null || _sub$plan === void 0 ? void 0 : _sub$plan.type) === "donation";
29793
+ })) !== null && _window$Pelcro$subscr !== void 0 ? _window$Pelcro$subscr : [];
29794
+ const canceledDonations = (_window$Pelcro$user$r = (_window$Pelcro$user$r2 = window.Pelcro.user.read().expired_subscriptions) === null || _window$Pelcro$user$r2 === void 0 ? void 0 : _window$Pelcro$user$r2.filter(sub => {
29795
+ var _sub$plan2;
29796
+ return ((_sub$plan2 = sub.plan) === null || _sub$plan2 === void 0 ? void 0 : _sub$plan2.type) === "donation";
29797
+ })) !== null && _window$Pelcro$user$r !== void 0 ? _window$Pelcro$user$r : [];
28817
29798
  return [...donations, ...canceledDonations];
28818
29799
  }
28819
29800
  function formatStartDate(date) {
@@ -29204,7 +30185,7 @@ class Dashboard extends Component {
29204
30185
  const formattedRenewDate = new Intl.DateTimeFormat("en-CA").format(renewDate);
29205
30186
  return `${this.locale("labels.renewsOn")} ${formattedRenewDate}`;
29206
30187
  });
29207
- _defineProperty$3(this, "reactivateSubscription", subscription_id => {
30188
+ _defineProperty$3(this, "reactivateSubscription", (subscription_id, isDonation) => {
29208
30189
  // disable the Login button to prevent repeated clicks
29209
30190
  this.setState({
29210
30191
  disableSubmit: true
@@ -29218,9 +30199,17 @@ class Dashboard extends Component {
29218
30199
  });
29219
30200
  this.props.onClose();
29220
30201
  if (err) {
29221
- return notify$1.error(this.locale("messages.subReactivation.error"));
30202
+ if (isDonation) {
30203
+ return notify.error(this.locale("messages.donationReactivation.error"));
30204
+ } else {
30205
+ return notify.error(this.locale("messages.subReactivation.error"));
30206
+ }
30207
+ }
30208
+ if (isDonation) {
30209
+ return notify.success(this.locale("messages.donationReactivation.success"));
30210
+ } else {
30211
+ return notify.success(this.locale("messages.subReactivation.success"));
29222
30212
  }
29223
- return notify$1.success(this.locale("messages.subReactivation.success"));
29224
30213
  });
29225
30214
  });
29226
30215
  _defineProperty$3(this, "getSubscriptionStatus", sub => {
@@ -29582,6 +30571,7 @@ class Dashboard extends Component {
29582
30571
  }),
29583
30572
  title: this.locale("labels.donations"),
29584
30573
  content: /*#__PURE__*/React__default.createElement(DonationsMenu, {
30574
+ onClose: this.props.onClose,
29585
30575
  reactivateSubscription: this.reactivateSubscription,
29586
30576
  disableSubmit: this.state.disableSubmit,
29587
30577
  cancelSubscription: this.cancelSubscription
@@ -29623,8 +30613,14 @@ function hasInvoices() {
29623
30613
  }
29624
30614
  function hasDonationSubs() {
29625
30615
  var _window$Pelcro$subscr, _window$Pelcro$subscr2, _window$Pelcro$subscr3, _window$Pelcro$user$r4, _window$Pelcro$user$r5;
29626
- 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 && !sub.is_gift_donor)) !== null && _window$Pelcro$subscr !== void 0 ? _window$Pelcro$subscr : [];
29627
- const canceledDonations = (_window$Pelcro$user$r4 = (_window$Pelcro$user$r5 = window.Pelcro.user.read().expired_subscriptions) === null || _window$Pelcro$user$r5 === void 0 ? void 0 : _window$Pelcro$user$r5.filter(sub => sub.plan.is_donation && !sub.is_gift_donor)) !== null && _window$Pelcro$user$r4 !== void 0 ? _window$Pelcro$user$r4 : [];
30616
+ 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 => {
30617
+ var _sub$plan;
30618
+ return ((_sub$plan = sub.plan) === null || _sub$plan === void 0 ? void 0 : _sub$plan.type) === "donation";
30619
+ })) !== null && _window$Pelcro$subscr !== void 0 ? _window$Pelcro$subscr : [];
30620
+ const canceledDonations = (_window$Pelcro$user$r4 = (_window$Pelcro$user$r5 = window.Pelcro.user.read().expired_subscriptions) === null || _window$Pelcro$user$r5 === void 0 ? void 0 : _window$Pelcro$user$r5.filter(sub => {
30621
+ var _sub$plan2;
30622
+ return ((_sub$plan2 = sub.plan) === null || _sub$plan2 === void 0 ? void 0 : _sub$plan2.type) === "donation";
30623
+ })) !== null && _window$Pelcro$user$r4 !== void 0 ? _window$Pelcro$user$r4 : [];
29628
30624
  return donations.length > 0 || canceledDonations.length > 0;
29629
30625
  }
29630
30626
  function hasActiveMemberships() {
@@ -31789,7 +32785,7 @@ function VerifyLinkTokenModal(_ref) {
31789
32785
  var _props$onSuccess;
31790
32786
  (_props$onSuccess = props.onSuccess) === null || _props$onSuccess === void 0 ? void 0 : _props$onSuccess.call(props, res);
31791
32787
  resetView();
31792
- notify$1.success(t("messages.success"));
32788
+ notify.success(t("messages.success"));
31793
32789
  };
31794
32790
  return /*#__PURE__*/React__default.createElement(Modal, {
31795
32791
  id: "pelcro-login-modal",
@@ -33447,4 +34443,4 @@ const QrCodeModal = _ref => {
33447
34443
  };
33448
34444
  QrCodeModal.viewId = "qrcode";
33449
34445
 
33450
- export { AddressCreateCity, AddressCreateContainer, AddressCreateCountrySelect, AddressCreateFirstName, AddressCreateLastName, AddressCreateLine1, AddressCreateLine2, AddressCreateModal, AddressCreatePostalCode, AddressCreateSetDefault, AddressCreateStateSelect, AddressCreateSubmit, AddressCreateTextInput, AddressCreateView, AddressSelectContainer, AddressSelectList, AddressSelectModal, AddressSelectSubmit, AddressSelectView, AddressUpdateCity, AddressUpdateContainer, AddressUpdateCountrySelect, AddressUpdateFirstName, AddressUpdateLastName, AddressUpdateLine1, AddressUpdateLine2, AddressUpdateModal, AddressUpdatePostalCode, AddressUpdateSetDefault, AddressUpdateStateSelect, AddressUpdateSubmit, AddressUpdateTextInput, AddressUpdateView, AlertWithContext as Alert, Alert as AlertElement, ApplyCouponButton, Auth0LoginButton, Badge, BankAuthenticationSuccess, 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, IncludeFirstName, IncludeLastName, IncludePhone, Input, InvoiceDetailsContainer, InvoiceDetailsDownloadButton, InvoiceDetailsModal, InvoiceDetailsPayButton, InvoiceDetailsView, InvoicePaymentContainer, InvoicePaymentModal, InvoicePaymentView, Link, LoginButton, LoginContainer, LoginEmail, LoginModal, LoginPassword, LoginRequestLoginToken, LoginUsername, LoginView, Logout, MeterModal, MeterView, Modal, ModalBody, ModalFooter, NewsletterWithHook as NewsLetter, NewsletterUpdateButton, NewsletterUpdateContainer, NewsletterUpdateList, NewsletterUpdateModal, NewsletterUpdateView, Notification, OrderConfirmModal, OrderCreateContainer, OrderCreateFreeButton, OrderCreateModal, OrderCreateSubmitButton, OrderCreateView, Password, PasswordChangeButton, PasswordChangeConfirmNewPassword, PasswordChangeContainer, PasswordChangeCurrentPassword, PasswordChangeModal, PasswordChangeNewPassword, PasswordChangeView, PasswordForgotButton, PasswordForgotContainer, PasswordForgotEmail, PasswordForgotModal, PasswordForgotView, PasswordResetButton, PasswordResetConfirmPassword, PasswordResetContainer, PasswordResetEmail, PasswordResetModal, PasswordResetPassword, PasswordResetView, PasswordlessRequestContainer, PasswordlessRequestEmail, PasswordlessRequestModal, PasswordlessRequestView, PasswordlessRequestViewButton, 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, QrCodeModal, QrCodeView, Radio, RegisterButton, RegisterCompany, RegisterContainer, RegisterEmail, RegisterFirstName, RegisterJobTitle, RegisterLastName, RegisterModal, RegisterPassword, RegisterView, Select, SelectModalWithHook as SelectModal, SelectedPaymentMethod, ShopPurchaseButton, ShopSelectProductButton, ShopView, SubmitPaymentMethod, SubscriptionCancelModal, SubscriptionCreateContainer, SubscriptionCreateFreePlanButton, SubscriptionCreateModal, SubscriptionCreateView, SubscriptionManageMembersButton, SubscriptionManageMembersContainer, SubscriptionManageMembersEmails, SubscriptionManageMembersList, SubscriptionManageMembersModal, SubscriptionManageMembersView, SubscriptionRenewContainer, SubscriptionRenewModal, SubscriptionRenewView, SubscriptionSuspendContainer, SubscriptionSuspendModal, SubscriptionSuspendView, TaxAmount, TextArea, Tooltip, UserNameInput, UserUpdateButton, UserUpdateContainer, UserUpdateDisplayName, UserUpdateEmail, UserUpdateFirstName, UserUpdateLastName, UserUpdateModal, UserUpdatePhone, UserUpdateProfilePic, UserUpdateTextInput, UserUpdateTin, UserUpdateUsername, UserUpdateView, VerifyLinkTokenContainer, VerifyLinkTokenLoader, VerifyLinkTokenModal, VerifyLinkTokenView, authenticatedButtons, i18next as i18n, init$1 as initButtons, init as initContentEntitlement, invoicePaymentSubmitButton, notify$1 as notify, unauthenticatedButtons, usePelcro };
34446
+ export { AddressCreateCity, AddressCreateContainer, AddressCreateCountrySelect, AddressCreateFirstName, AddressCreateLastName, AddressCreateLine1, AddressCreateLine2, AddressCreateModal, AddressCreatePostalCode, AddressCreateSetDefault, AddressCreateStateSelect, AddressCreateSubmit, AddressCreateTextInput, AddressCreateView, AddressSelectContainer, AddressSelectList, AddressSelectModal, AddressSelectSubmit, AddressSelectView, AddressUpdateCity, AddressUpdateContainer, AddressUpdateCountrySelect, AddressUpdateFirstName, AddressUpdateLastName, AddressUpdateLine1, AddressUpdateLine2, AddressUpdateModal, AddressUpdatePostalCode, AddressUpdateSetDefault, AddressUpdateStateSelect, AddressUpdateSubmit, AddressUpdateTextInput, AddressUpdateView, AlertWithContext as Alert, Alert as AlertElement, ApplyCouponButton, Auth0LoginButton, Badge, BankAuthenticationSuccess, BankRedirection, Button, CartContainer, CartModal, CartRemoveItemButton, CartSubmit, CartTotalPrice, CartView, Checkbox, CheckoutForm, ConfirmPassword, CouponCode, CouponCodeField, DashboardWithHook as Dashboard, DashboardOpenButton, DatePicker, DiscountedPrice, DonationModalWithHook as DonationModal, Email, EmailVerifyContainer, EmailVerifyModal, EmailVerifyResendButton, EmailVerifyView, FacebookLoginButton, GiftCreateContainer, GiftCreateEmail, GiftCreateFirstName, GiftCreateLastName, GiftCreateMessage, GiftCreateModal, GiftCreateStartDate, GiftCreateSubmitButton, GiftCreateView, GiftRedeemCode, GiftRedeemContainer, GiftRedeemModal, GiftRedeemSubmitButton, GiftRedeemView, GoogleLoginButton, IncludeFirstName, IncludeLastName, IncludePhone, Input, InvoiceDetailsContainer, InvoiceDetailsDownloadButton, InvoiceDetailsModal, InvoiceDetailsPayButton, InvoiceDetailsView, InvoicePaymentContainer, InvoicePaymentModal, InvoicePaymentView, Link, LoginButton, LoginContainer, LoginEmail, LoginModal, LoginPassword, LoginRequestLoginToken, LoginUsername, LoginView, Logout, MeterModal, MeterView, Modal, ModalBody, ModalFooter, NewsletterWithHook as NewsLetter, NewsletterUpdateButton, NewsletterUpdateContainer, NewsletterUpdateList, NewsletterUpdateModal, NewsletterUpdateView, Notification, OrderConfirmModal, OrderCreateContainer, OrderCreateFreeButton, OrderCreateModal, OrderCreateSubmitButton, OrderCreateView, Password, PasswordChangeButton, PasswordChangeConfirmNewPassword, PasswordChangeContainer, PasswordChangeCurrentPassword, PasswordChangeModal, PasswordChangeNewPassword, PasswordChangeView, PasswordForgotButton, PasswordForgotContainer, PasswordForgotEmail, PasswordForgotModal, PasswordForgotView, PasswordResetButton, PasswordResetConfirmPassword, PasswordResetContainer, PasswordResetEmail, PasswordResetModal, PasswordResetPassword, PasswordResetView, PasswordlessRequestContainer, PasswordlessRequestEmail, PasswordlessRequestModal, PasswordlessRequestView, PasswordlessRequestViewButton, 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, QrCodeModal, QrCodeView, Radio, RegisterButton, RegisterCompany, RegisterContainer, RegisterEmail, RegisterFirstName, RegisterJobTitle, RegisterLastName, RegisterModal, RegisterPassword, RegisterView, Select, SelectModalWithHook as SelectModal, SelectedPaymentMethod, ShopPurchaseButton, ShopSelectProductButton, ShopView, SubmitPaymentMethod, SubscriptionCancelModal, SubscriptionCreateContainer, SubscriptionCreateFreePlanButton, SubscriptionCreateModal, SubscriptionCreateView, SubscriptionManageMembersButton, SubscriptionManageMembersContainer, SubscriptionManageMembersEmails, SubscriptionManageMembersList, SubscriptionManageMembersModal, SubscriptionManageMembersView, SubscriptionRenewContainer, SubscriptionRenewModal, SubscriptionRenewView, SubscriptionSuspendContainer, SubscriptionSuspendModal, SubscriptionSuspendView, TaxAmount, TextArea, Tooltip, UserNameInput, UserUpdateButton, UserUpdateContainer, UserUpdateDisplayName, UserUpdateEmail, UserUpdateFirstName, UserUpdateLastName, UserUpdateModal, UserUpdatePhone, UserUpdateProfilePic, UserUpdateTextInput, UserUpdateTin, UserUpdateUsername, UserUpdateView, VerifyLinkTokenContainer, VerifyLinkTokenLoader, VerifyLinkTokenModal, VerifyLinkTokenView, authenticatedButtons, i18next as i18n, init$1 as initButtons, init as initContentEntitlement, invoicePaymentSubmitButton, notify, unauthenticatedButtons, usePelcro };