@pelcro/react-pelcro-js 4.0.0-alpha.33 → 4.0.0-alpha.34

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
@@ -8242,7 +8242,7 @@ class PelcroActions {
8242
8242
  view,
8243
8243
  cartItems,
8244
8244
  ...otherStateFields
8245
- } = initialState$n;
8245
+ } = initialState$o;
8246
8246
  this.set(otherStateFields);
8247
8247
  });
8248
8248
 
@@ -8648,7 +8648,7 @@ class PelcroCallbacks {
8648
8648
 
8649
8649
  }
8650
8650
 
8651
- const initialState$n = {
8651
+ const initialState$o = {
8652
8652
  // View
8653
8653
  view: null,
8654
8654
  // Plans
@@ -8683,7 +8683,7 @@ const createPelcroStore = () => createStore(middleware_3((set, get) => {
8683
8683
  return {
8684
8684
  // Store setter
8685
8685
  set,
8686
- ...initialState$n,
8686
+ ...initialState$o,
8687
8687
  // State actions
8688
8688
  ...actions,
8689
8689
  // Callbacks
@@ -12104,9 +12104,18 @@ const HANDLE_INVITE_MEMBERS = "HANDLE_INVITE_MEMBERS";
12104
12104
  const HANDLE_REMOVE_MEMBER = "HANDLE_REMOVE_MEMBER";
12105
12105
  const UPDATE_INVITE_BUTTON = "UPDATE_INVITE_BUTTON";
12106
12106
  const UPDATE_MEMBERS = "UPDATE_MEMBERS";
12107
- const UPDATE_REMOVE_MEMBER_ID = "UPDATE_REMOVE_MEMBER_ID";
12107
+ const UPDATE_REMOVE_MEMBER_ID = "UPDATE_REMOVE_MEMBER_ID"; //Dashboard
12108
12108
 
12109
- const initialState$m = {
12109
+ const SET_IS_OPEN = "SET_IS_OPEN";
12110
+ const SET_ADDRESSES = "SET_ADDRESSES";
12111
+ const CLOSE_DASHBOARD = "CLOSE_DASHBOARD";
12112
+ const SET_ACTIVE_DASHBOARD_LINK = "SET_ACTIVE_DASHBOARD_LINK";
12113
+ const SET_DISABLESUBMIT = "SET_DISABLESUBMIT";
12114
+ const CANCEL_SUBSCRIPTION = "CANCEL_SUBSCRIPTION";
12115
+ const UNSUSPEND_SUBSCRIPTION = "UNSUSPEND_SUBSCRIPTION";
12116
+ const REACTIVATE_SUBSCRIPTION = "REACTIVATE_SUBSCRIPTION"; //========
12117
+
12118
+ const initialState$n = {
12110
12119
  email: "",
12111
12120
  username: "",
12112
12121
  password: "",
@@ -12119,10 +12128,10 @@ const initialState$m = {
12119
12128
  content: ""
12120
12129
  }
12121
12130
  };
12122
- const store$m = /*#__PURE__*/createContext(initialState$m);
12131
+ const store$n = /*#__PURE__*/createContext(initialState$n);
12123
12132
  const {
12124
- Provider: Provider$m
12125
- } = store$m;
12133
+ Provider: Provider$n
12134
+ } = store$n;
12126
12135
 
12127
12136
  const LoginContainer = ({
12128
12137
  style,
@@ -12246,7 +12255,7 @@ const LoginContainer = ({
12246
12255
  });
12247
12256
 
12248
12257
  case RESET_LOGIN_FORM:
12249
- return initialState$m;
12258
+ return initialState$n;
12250
12259
 
12251
12260
  case DISABLE_LOGIN_BUTTON:
12252
12261
  return lib_7({ ...state,
@@ -12264,12 +12273,12 @@ const LoginContainer = ({
12264
12273
  default:
12265
12274
  return state;
12266
12275
  }
12267
- }, initialState$m);
12276
+ }, initialState$n);
12268
12277
  return /*#__PURE__*/React__default.createElement("div", {
12269
12278
  style: { ...style
12270
12279
  },
12271
12280
  className: `pelcro-container pelcro-login-container ${className}`
12272
- }, /*#__PURE__*/React__default.createElement(Provider$m, {
12281
+ }, /*#__PURE__*/React__default.createElement(Provider$n, {
12273
12282
  value: {
12274
12283
  state,
12275
12284
  dispatch
@@ -12277,12 +12286,12 @@ const LoginContainer = ({
12277
12286
  }, children.length ? children.map((child, i) => {
12278
12287
  if (child) {
12279
12288
  return /*#__PURE__*/React__default.cloneElement(child, {
12280
- store: store$m,
12289
+ store: store$n,
12281
12290
  key: i
12282
12291
  });
12283
12292
  }
12284
12293
  }) : /*#__PURE__*/React__default.cloneElement(children, {
12285
- store: store$m
12294
+ store: store$n
12286
12295
  })));
12287
12296
  };
12288
12297
 
@@ -12590,7 +12599,7 @@ const LoginButton = ({
12590
12599
  buttonDisabled
12591
12600
  },
12592
12601
  dispatch
12593
- } = useContext(store$m);
12602
+ } = useContext(store$n);
12594
12603
  const {
12595
12604
  t
12596
12605
  } = useTranslation("login");
@@ -12649,15 +12658,15 @@ const LoginRequestLoginToken = ({
12649
12658
  };
12650
12659
 
12651
12660
  const LoginEmail = props => /*#__PURE__*/React__default.createElement(Email, Object.assign({
12652
- store: store$m
12661
+ store: store$n
12653
12662
  }, props));
12654
12663
 
12655
12664
  const LoginUsername = props => /*#__PURE__*/React__default.createElement(UserNameInput, Object.assign({
12656
- store: store$m
12665
+ store: store$n
12657
12666
  }, props));
12658
12667
 
12659
12668
  const LoginPassword = props => /*#__PURE__*/React__default.createElement(Password, Object.assign({
12660
- store: store$m
12669
+ store: store$n
12661
12670
  }, props));
12662
12671
 
12663
12672
  var _path$t;
@@ -12734,7 +12743,7 @@ var facebookLoginRenderProps = createCommonjsModule(function (module, exports) {
12734
12743
  var FacebookLogin = unwrapExports(facebookLoginRenderProps);
12735
12744
  facebookLoginRenderProps.FacebookLogin;
12736
12745
 
12737
- const initialState$l = {
12746
+ const initialState$m = {
12738
12747
  email: "",
12739
12748
  password: "",
12740
12749
  emailError: null,
@@ -12751,10 +12760,10 @@ const initialState$l = {
12751
12760
  content: ""
12752
12761
  }
12753
12762
  };
12754
- const store$l = /*#__PURE__*/createContext(initialState$l);
12763
+ const store$m = /*#__PURE__*/createContext(initialState$m);
12755
12764
  const {
12756
- Provider: Provider$l
12757
- } = store$l;
12765
+ Provider: Provider$m
12766
+ } = store$m;
12758
12767
 
12759
12768
  const RegisterContainer = ({
12760
12769
  style,
@@ -12945,7 +12954,7 @@ const RegisterContainer = ({
12945
12954
  });
12946
12955
 
12947
12956
  case RESET_LOGIN_FORM:
12948
- return initialState$l;
12957
+ return initialState$m;
12949
12958
 
12950
12959
  case DISABLE_REGISTRATION_BUTTON:
12951
12960
  return lib_7({ ...state,
@@ -12963,12 +12972,12 @@ const RegisterContainer = ({
12963
12972
  default:
12964
12973
  return state;
12965
12974
  }
12966
- }, initialState$l);
12975
+ }, initialState$m);
12967
12976
  return /*#__PURE__*/React__default.createElement("div", {
12968
12977
  style: { ...style
12969
12978
  },
12970
12979
  className: `pelcro-container pelcro-register-container ${className}`
12971
- }, /*#__PURE__*/React__default.createElement(Provider$l, {
12980
+ }, /*#__PURE__*/React__default.createElement(Provider$m, {
12972
12981
  value: {
12973
12982
  state,
12974
12983
  dispatch
@@ -12976,12 +12985,12 @@ const RegisterContainer = ({
12976
12985
  }, children.length ? children.map((child, i) => {
12977
12986
  if (child) {
12978
12987
  return /*#__PURE__*/React__default.cloneElement(child, {
12979
- store: store$l,
12988
+ store: store$m,
12980
12989
  key: i
12981
12990
  });
12982
12991
  }
12983
12992
  }) : /*#__PURE__*/React__default.cloneElement(children, {
12984
- store: store$l
12993
+ store: store$m
12985
12994
  })));
12986
12995
  };
12987
12996
  /**
@@ -13021,10 +13030,10 @@ const FacebookLoginButton = ({
13021
13030
  const facebookLoginEnabled = (_window$Pelcro$site$r = window.Pelcro.site.read()) === null || _window$Pelcro$site$r === void 0 ? void 0 : _window$Pelcro$site$r.facebook_app_id;
13022
13031
  const {
13023
13032
  dispatch: loginDispatch
13024
- } = useContext(store$m);
13033
+ } = useContext(store$n);
13025
13034
  const {
13026
13035
  dispatch: registerDispatch
13027
- } = useContext(store$l);
13036
+ } = useContext(store$m);
13028
13037
 
13029
13038
  const onSuccess = facebookUser => {
13030
13039
  loginDispatch === null || loginDispatch === void 0 ? void 0 : loginDispatch({
@@ -13190,10 +13199,10 @@ const GoogleLoginButton = ({
13190
13199
  const googleClientId = (_window$Pelcro$site$r = window.Pelcro.site.read()) === null || _window$Pelcro$site$r === void 0 ? void 0 : _window$Pelcro$site$r.google_app_id;
13191
13200
  const {
13192
13201
  dispatch: loginDispatch
13193
- } = useContext(store$m);
13202
+ } = useContext(store$n);
13194
13203
  const {
13195
13204
  dispatch: registerDispatch
13196
- } = useContext(store$l);
13205
+ } = useContext(store$m);
13197
13206
  useEffect(() => {
13198
13207
  gapi.load("client:auth2", () => {
13199
13208
  gapi.auth2.init({
@@ -13297,10 +13306,10 @@ const Auth0LoginButton = ({
13297
13306
  }, [auth0Enabled, auth0Loaded]);
13298
13307
  const {
13299
13308
  dispatch: loginDispatch
13300
- } = useContext(store$m);
13309
+ } = useContext(store$n);
13301
13310
  const {
13302
13311
  dispatch: registerDispatch
13303
- } = useContext(store$l);
13312
+ } = useContext(store$m);
13304
13313
 
13305
13314
  function handleClick() {
13306
13315
  var _auth0InstanceRef$cur, _auth0InstanceRef$cur2, _auth0InstanceRef$cur3;
@@ -13675,11 +13684,11 @@ function LoginModal({
13675
13684
  LoginModal.viewId = "login";
13676
13685
 
13677
13686
  const RegisterEmail = props => /*#__PURE__*/React__default.createElement(Email, Object.assign({
13678
- store: store$l
13687
+ store: store$m
13679
13688
  }, props));
13680
13689
 
13681
13690
  const RegisterPassword = props => /*#__PURE__*/React__default.createElement(Password, Object.assign({
13682
- store: store$l
13691
+ store: store$m
13683
13692
  }, props));
13684
13693
 
13685
13694
  const RegisterButton = ({
@@ -13699,7 +13708,7 @@ const RegisterButton = ({
13699
13708
  buttonDisabled
13700
13709
  },
13701
13710
  dispatch
13702
- } = useContext(store$l);
13711
+ } = useContext(store$m);
13703
13712
  const {
13704
13713
  t
13705
13714
  } = useTranslation("register");
@@ -13837,7 +13846,7 @@ function FirstName({
13837
13846
  }
13838
13847
 
13839
13848
  const RegisterFirstName = props => /*#__PURE__*/React__default.createElement(FirstName, Object.assign({
13840
- store: store$l
13849
+ store: store$m
13841
13850
  }, props));
13842
13851
 
13843
13852
  function LastName({
@@ -13868,7 +13877,7 @@ function LastName({
13868
13877
  }
13869
13878
 
13870
13879
  const RegisterLastName = props => /*#__PURE__*/React__default.createElement(LastName, Object.assign({
13871
- store: store$l
13880
+ store: store$m
13872
13881
  }, props));
13873
13882
 
13874
13883
  /**
@@ -13991,7 +14000,7 @@ function TextInput({
13991
14000
 
13992
14001
  const RegisterTextInput = props => {
13993
14002
  return /*#__PURE__*/React__default.createElement(TextInput, Object.assign({}, props, {
13994
- store: store$l
14003
+ store: store$m
13995
14004
  }));
13996
14005
  };
13997
14006
 
@@ -21459,7 +21468,7 @@ class TapGateway {
21459
21468
 
21460
21469
  /** @type {PaymentStateType} */
21461
21470
 
21462
- const initialState$k = {
21471
+ const initialState$l = {
21463
21472
  disableSubmit: false,
21464
21473
  isLoading: false,
21465
21474
  disableCouponButton: false,
@@ -21484,10 +21493,10 @@ const initialState$k = {
21484
21493
  content: ""
21485
21494
  }
21486
21495
  };
21487
- const store$k = /*#__PURE__*/createContext(initialState$k);
21496
+ const store$l = /*#__PURE__*/createContext(initialState$l);
21488
21497
  const {
21489
- Provider: Provider$k
21490
- } = store$k;
21498
+ Provider: Provider$l
21499
+ } = store$l;
21491
21500
 
21492
21501
  const PaymentMethodContainerWithoutStripe = ({
21493
21502
  style,
@@ -23170,21 +23179,21 @@ const PaymentMethodContainerWithoutStripe = ({
23170
23179
  default:
23171
23180
  return state;
23172
23181
  }
23173
- }, initialState$k);
23182
+ }, initialState$l);
23174
23183
  return /*#__PURE__*/React__default.createElement("div", {
23175
23184
  style: { ...style
23176
23185
  },
23177
23186
  className: `pelcro-container pelcro-payment-container ${className}`
23178
- }, /*#__PURE__*/React__default.createElement(Provider$k, {
23187
+ }, /*#__PURE__*/React__default.createElement(Provider$l, {
23179
23188
  value: {
23180
23189
  state,
23181
23190
  dispatch
23182
23191
  }
23183
23192
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
23184
- store: store$k,
23193
+ store: store$l,
23185
23194
  key: i
23186
23195
  })) : /*#__PURE__*/React__default.cloneElement(children, {
23187
- store: store$k
23196
+ store: store$l
23188
23197
  })));
23189
23198
  };
23190
23199
 
@@ -23212,11 +23221,11 @@ const PaymentMethodContainer = props => {
23212
23221
  stripeAccount: window.Pelcro.site.read().account_id,
23213
23222
  locale: getPageOrDefaultLanguage()
23214
23223
  }, /*#__PURE__*/React__default.createElement(es_11, null, /*#__PURE__*/React__default.createElement(UnwrappedForm, Object.assign({
23215
- store: store$k
23224
+ store: store$l
23216
23225
  }, props))));
23217
23226
  } else {
23218
23227
  return /*#__PURE__*/React__default.createElement(PaymentMethodContainerWithoutStripe, Object.assign({
23219
- store: store$k
23228
+ store: store$l
23220
23229
  }, props));
23221
23230
  }
23222
23231
  };
@@ -23267,7 +23276,7 @@ const PelcroPaymentRequestButton = props => {
23267
23276
  currentPlan,
23268
23277
  updatedPrice
23269
23278
  }
23270
- } = useContext(store$k);
23279
+ } = useContext(store$l);
23271
23280
 
23272
23281
  const updatePaymentRequest = () => {
23273
23282
  // Make sure payment request is up to date, eg. user added a coupon code.
@@ -23349,7 +23358,7 @@ const DiscountedPrice = props => {
23349
23358
  taxAmount,
23350
23359
  percentOff
23351
23360
  }
23352
- } = useContext(store$k);
23361
+ } = useContext(store$l);
23353
23362
  const {
23354
23363
  order,
23355
23364
  plan
@@ -23399,7 +23408,7 @@ const SubmitPaymentMethod = ({
23399
23408
  isLoading,
23400
23409
  updatedPrice
23401
23410
  }
23402
- } = useContext(store$k);
23411
+ } = useContext(store$l);
23403
23412
  const planQuantity = (_plan$quantity = plan === null || plan === void 0 ? void 0 : plan.quantity) !== null && _plan$quantity !== void 0 ? _plan$quantity : 1;
23404
23413
  const price = updatedPrice !== null && updatedPrice !== void 0 ? updatedPrice : plan === null || plan === void 0 ? void 0 : plan.amount;
23405
23414
  const priceFormatted = getFormattedPriceByLocal(price * planQuantity, plan === null || plan === void 0 ? void 0 : plan.currency, getPageOrDefaultLanguage());
@@ -23431,7 +23440,7 @@ const ApplyCouponButton = ({
23431
23440
  disableCouponButton
23432
23441
  },
23433
23442
  dispatch
23434
- } = useContext(store$k);
23443
+ } = useContext(store$l);
23435
23444
  const {
23436
23445
  t
23437
23446
  } = useTranslation("checkoutForm");
@@ -23465,7 +23474,7 @@ const CouponCodeField = props => {
23465
23474
  couponCode,
23466
23475
  couponError
23467
23476
  }
23468
- } = useContext(store$k);
23477
+ } = useContext(store$l);
23469
23478
 
23470
23479
  const onCouponCodeChange = e => {
23471
23480
  dispatch({
@@ -23521,7 +23530,7 @@ const CouponCode = ({
23521
23530
  state: {
23522
23531
  enableCouponField
23523
23532
  }
23524
- } = useContext(store$k);
23533
+ } = useContext(store$l);
23525
23534
  const {
23526
23535
  t
23527
23536
  } = useTranslation("checkoutForm");
@@ -23778,7 +23787,7 @@ const PaypalSubscribeButton = props => {
23778
23787
  const {
23779
23788
  dispatch,
23780
23789
  state
23781
- } = useContext(store$k);
23790
+ } = useContext(store$l);
23782
23791
  const {
23783
23792
  product,
23784
23793
  plan,
@@ -23911,7 +23920,7 @@ const SelectedPaymentMethod = () => {
23911
23920
  state: {
23912
23921
  isLoading
23913
23922
  }
23914
- } = useContext(store$k);
23923
+ } = useContext(store$l);
23915
23924
  const {
23916
23925
  switchView,
23917
23926
  selectedPaymentMethodId
@@ -23953,7 +23962,7 @@ const TaxAmount = () => {
23953
23962
  state: {
23954
23963
  taxAmount
23955
23964
  }
23956
- } = useContext(store$k);
23965
+ } = useContext(store$l);
23957
23966
  const {
23958
23967
  plan
23959
23968
  } = usePelcro();
@@ -23972,11 +23981,11 @@ const TaxAmount = () => {
23972
23981
  };
23973
23982
 
23974
23983
  const IncludeFirstName = props => /*#__PURE__*/React__default.createElement(FirstName, Object.assign({
23975
- store: store$k
23984
+ store: store$l
23976
23985
  }, props));
23977
23986
 
23978
23987
  const IncludeLastName = props => /*#__PURE__*/React__default.createElement(LastName, Object.assign({
23979
- store: store$k
23988
+ store: store$l
23980
23989
  }, props));
23981
23990
 
23982
23991
  function Phone({
@@ -24005,7 +24014,7 @@ function Phone({
24005
24014
  }
24006
24015
 
24007
24016
  const IncludePhone = props => /*#__PURE__*/React__default.createElement(Phone, Object.assign({
24008
- store: store$k
24017
+ store: store$l
24009
24018
  }, props));
24010
24019
 
24011
24020
  const SubscriptionCreateFreePlanButton = ({
@@ -24018,7 +24027,7 @@ const SubscriptionCreateFreePlanButton = ({
24018
24027
  disableSubmit
24019
24028
  },
24020
24029
  dispatch
24021
- } = useContext(store$k);
24030
+ } = useContext(store$l);
24022
24031
  const {
24023
24032
  t
24024
24033
  } = useTranslation("common");
@@ -24234,13 +24243,13 @@ function SubscriptionRenewModal({
24234
24243
  }
24235
24244
  SubscriptionRenewModal.viewId = "subscription-renew";
24236
24245
 
24237
- const initialState$j = {
24246
+ const initialState$k = {
24238
24247
  cancelationReason: ""
24239
24248
  };
24240
- const store$j = /*#__PURE__*/createContext(initialState$j);
24249
+ const store$k = /*#__PURE__*/createContext(initialState$k);
24241
24250
  const {
24242
- Provider: Provider$j
24243
- } = store$j;
24251
+ Provider: Provider$k
24252
+ } = store$k;
24244
24253
 
24245
24254
  const SubscriptionCancelContainer = ({
24246
24255
  style,
@@ -24261,21 +24270,21 @@ const SubscriptionCancelContainer = ({
24261
24270
  default:
24262
24271
  return state;
24263
24272
  }
24264
- }, initialState$j);
24273
+ }, initialState$k);
24265
24274
  return /*#__PURE__*/React__default.createElement("div", {
24266
24275
  style: { ...style
24267
24276
  },
24268
24277
  className: `pelcro-container pelcro-subscription-cancel-container ${className}`
24269
- }, /*#__PURE__*/React__default.createElement(Provider$j, {
24278
+ }, /*#__PURE__*/React__default.createElement(Provider$k, {
24270
24279
  value: {
24271
24280
  state,
24272
24281
  dispatch
24273
24282
  }
24274
24283
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
24275
- store: store$j,
24284
+ store: store$k,
24276
24285
  key: i
24277
24286
  })) : /*#__PURE__*/React__default.cloneElement(children, {
24278
- store: store$j
24287
+ store: store$k
24279
24288
  })));
24280
24289
  };
24281
24290
 
@@ -24360,7 +24369,7 @@ const SubscriptionCancelReason = props => {
24360
24369
  const {
24361
24370
  dispatch,
24362
24371
  state
24363
- } = useContext(store$j);
24372
+ } = useContext(store$k);
24364
24373
 
24365
24374
  const handleOnTextAreaBlur = e => {
24366
24375
  dispatch({
@@ -24408,7 +24417,7 @@ const SubscriptionCancelNowButton = ({
24408
24417
  cancelationReason
24409
24418
  },
24410
24419
  dispatch
24411
- } = useContext(store$j);
24420
+ } = useContext(store$k);
24412
24421
  const {
24413
24422
  t
24414
24423
  } = useTranslation("subscriptionCancel");
@@ -24480,7 +24489,7 @@ const SubscriptionCancelLaterButton = ({
24480
24489
  cancelationReason
24481
24490
  },
24482
24491
  dispatch
24483
- } = useContext(store$j);
24492
+ } = useContext(store$k);
24484
24493
  const {
24485
24494
  t
24486
24495
  } = useTranslation("subscriptionCancel");
@@ -24591,14 +24600,14 @@ const SubscriptionCancelModal = ({
24591
24600
  };
24592
24601
  SubscriptionCancelModal.viewId = "subscription-cancel";
24593
24602
 
24594
- const initialState$i = {
24603
+ const initialState$j = {
24595
24604
  suspendDate: null,
24596
24605
  buttonDisabled: false
24597
24606
  };
24598
- const store$i = /*#__PURE__*/createContext(initialState$i);
24607
+ const store$j = /*#__PURE__*/createContext(initialState$j);
24599
24608
  const {
24600
- Provider: Provider$i
24601
- } = store$i;
24609
+ Provider: Provider$j
24610
+ } = store$j;
24602
24611
 
24603
24612
  const SubscriptionSuspendContainer = ({
24604
24613
  style,
@@ -24624,21 +24633,21 @@ const SubscriptionSuspendContainer = ({
24624
24633
  default:
24625
24634
  return state;
24626
24635
  }
24627
- }, initialState$i);
24636
+ }, initialState$j);
24628
24637
  return /*#__PURE__*/React__default.createElement("div", {
24629
24638
  style: { ...style
24630
24639
  },
24631
24640
  className: `pelcro-container pelcro-subscription-suspend-container ${className}`
24632
- }, /*#__PURE__*/React__default.createElement(Provider$i, {
24641
+ }, /*#__PURE__*/React__default.createElement(Provider$j, {
24633
24642
  value: {
24634
24643
  state,
24635
24644
  dispatch
24636
24645
  }
24637
24646
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
24638
- store: store$i,
24647
+ store: store$j,
24639
24648
  key: i
24640
24649
  })) : /*#__PURE__*/React__default.cloneElement(children, {
24641
- store: store$i
24650
+ store: store$j
24642
24651
  })));
24643
24652
  };
24644
24653
 
@@ -24687,7 +24696,7 @@ const SubscriptionSuspendDate = props => {
24687
24696
  const {
24688
24697
  dispatch,
24689
24698
  state
24690
- } = useContext(store$i);
24699
+ } = useContext(store$j);
24691
24700
 
24692
24701
  const handleInputChange = value => {
24693
24702
  if (value) {
@@ -24729,7 +24738,7 @@ const SubscriptionSuspendButton = ({
24729
24738
  buttonDisabled
24730
24739
  },
24731
24740
  dispatch
24732
- } = useContext(store$i);
24741
+ } = useContext(store$j);
24733
24742
  const {
24734
24743
  t
24735
24744
  } = useTranslation("subscriptionSuspend");
@@ -25199,7 +25208,7 @@ class DefaultNewsLetter extends Component {
25199
25208
 
25200
25209
  const NewsLetter = withTranslation("newsletter")(DefaultNewsLetter);
25201
25210
 
25202
- const initialState$h = {
25211
+ const initialState$i = {
25203
25212
  didSubToNewslettersBefore: false,
25204
25213
  newsletters: [],
25205
25214
  isListLoading: true,
@@ -25209,10 +25218,10 @@ const initialState$h = {
25209
25218
  content: ""
25210
25219
  }
25211
25220
  };
25212
- const store$h = /*#__PURE__*/createContext(initialState$h);
25221
+ const store$i = /*#__PURE__*/createContext(initialState$i);
25213
25222
  const {
25214
- Provider: Provider$h
25215
- } = store$h;
25223
+ Provider: Provider$i
25224
+ } = store$i;
25216
25225
 
25217
25226
  const NewsletterUpdateContainer = ({
25218
25227
  style,
@@ -25325,7 +25334,7 @@ const NewsletterUpdateContainer = ({
25325
25334
  default:
25326
25335
  return state;
25327
25336
  }
25328
- }, initialState$h);
25337
+ }, initialState$i);
25329
25338
  useEffect(() => {
25330
25339
  const getUserNewsletters = () => {
25331
25340
  var _window$Pelcro$user$r3, _window$Pelcro$user$r4;
@@ -25369,7 +25378,7 @@ const NewsletterUpdateContainer = ({
25369
25378
  style: { ...style
25370
25379
  },
25371
25380
  className: `pelcro-container pelcro-newsletter-update-container ${className}`
25372
- }, /*#__PURE__*/React__default.createElement(Provider$h, {
25381
+ }, /*#__PURE__*/React__default.createElement(Provider$i, {
25373
25382
  value: {
25374
25383
  state,
25375
25384
  dispatch
@@ -25377,12 +25386,12 @@ const NewsletterUpdateContainer = ({
25377
25386
  }, children.length ? children.map((child, i) => {
25378
25387
  if (child) {
25379
25388
  return /*#__PURE__*/React__default.cloneElement(child, {
25380
- store: store$h,
25389
+ store: store$i,
25381
25390
  key: i
25382
25391
  });
25383
25392
  }
25384
25393
  }) : /*#__PURE__*/React__default.cloneElement(children, {
25385
- store: store$h
25394
+ store: store$i
25386
25395
  })));
25387
25396
  };
25388
25397
 
@@ -25397,7 +25406,7 @@ const NewsletterUpdateButton = ({
25397
25406
  isSubmitting,
25398
25407
  isListLoading
25399
25408
  }
25400
- } = useContext(store$h);
25409
+ } = useContext(store$i);
25401
25410
  const {
25402
25411
  t
25403
25412
  } = useTranslation("newsletter");
@@ -25427,7 +25436,7 @@ const NewsletterUpdateList = () => {
25427
25436
  newsletters,
25428
25437
  isListLoading
25429
25438
  }
25430
- } = useContext(store$h);
25439
+ } = useContext(store$i);
25431
25440
 
25432
25441
  if (isListLoading) {
25433
25442
  return /*#__PURE__*/React__default.createElement(Loader, {
@@ -25640,7 +25649,7 @@ function SubscriptionCreateModal({
25640
25649
  }
25641
25650
  SubscriptionCreateModal.viewId = "subscription-create";
25642
25651
 
25643
- const initialState$g = {
25652
+ const initialState$h = {
25644
25653
  emails: "",
25645
25654
  emailsError: null,
25646
25655
  buttonDisabled: false,
@@ -25652,10 +25661,10 @@ const initialState$g = {
25652
25661
  content: ""
25653
25662
  }
25654
25663
  };
25655
- const store$g = /*#__PURE__*/createContext(initialState$g);
25664
+ const store$h = /*#__PURE__*/createContext(initialState$h);
25656
25665
  const {
25657
- Provider: Provider$g
25658
- } = store$g;
25666
+ Provider: Provider$h
25667
+ } = store$h;
25659
25668
 
25660
25669
  const SubscriptionManageMembersContainer = ({
25661
25670
  style,
@@ -25827,7 +25836,7 @@ const SubscriptionManageMembersContainer = ({
25827
25836
  default:
25828
25837
  return state;
25829
25838
  }
25830
- }, initialState$g);
25839
+ }, initialState$h);
25831
25840
  useEffect(() => {
25832
25841
  dispatch({
25833
25842
  type: HANDLE_LIST_MEMBERS
@@ -25837,7 +25846,7 @@ const SubscriptionManageMembersContainer = ({
25837
25846
  style: { ...style
25838
25847
  },
25839
25848
  className: `pelcro-container pelcro-manage-members-container ${className}`
25840
- }, /*#__PURE__*/React__default.createElement(Provider$g, {
25849
+ }, /*#__PURE__*/React__default.createElement(Provider$h, {
25841
25850
  value: {
25842
25851
  state,
25843
25852
  dispatch
@@ -25845,12 +25854,12 @@ const SubscriptionManageMembersContainer = ({
25845
25854
  }, children.length ? children.map((child, i) => {
25846
25855
  if (child) {
25847
25856
  return /*#__PURE__*/React__default.cloneElement(child, {
25848
- store: store$g,
25857
+ store: store$h,
25849
25858
  key: i
25850
25859
  });
25851
25860
  }
25852
25861
  }) : /*#__PURE__*/React__default.cloneElement(children, {
25853
- store: store$g
25862
+ store: store$h
25854
25863
  })));
25855
25864
  };
25856
25865
 
@@ -25866,7 +25875,7 @@ const SubscriptionManageMembersButton = ({
25866
25875
  buttonDisabled
25867
25876
  },
25868
25877
  dispatch
25869
- } = useContext(store$g);
25878
+ } = useContext(store$h);
25870
25879
  const {
25871
25880
  t
25872
25881
  } = useTranslation("subscriptionManageMembers");
@@ -25896,7 +25905,7 @@ function SubscriptionManageMembersEmails(props) {
25896
25905
  emails: stateEmails,
25897
25906
  emailsError
25898
25907
  }
25899
- } = useContext(store$g);
25908
+ } = useContext(store$h);
25900
25909
  const [emails, setEmails] = useState(stateEmails);
25901
25910
  const [finishedTyping, setFinishedTyping] = useState(false);
25902
25911
  const handleInputChange = useCallback(value => {
@@ -25955,7 +25964,7 @@ function SubscriptionManageMembersList(props) {
25955
25964
  removeMemberId,
25956
25965
  loading
25957
25966
  }
25958
- } = useContext(store$g);
25967
+ } = useContext(store$h);
25959
25968
  const getMemberStatus = useCallback(sub => {
25960
25969
  if (sub.status === "pending") {
25961
25970
  return {
@@ -26118,11 +26127,11 @@ function SubscriptionManageMembersModal({
26118
26127
  }
26119
26128
  SubscriptionManageMembersModal.viewId = "manage-members";
26120
26129
 
26121
- var _window$Pelcro$user$r, _window$Pelcro$user$r2, _window$Pelcro$user$r3, _window$Pelcro$user$r4, _window$Pelcro$user$r5, _window$Pelcro$user$r6;
26122
- const initialState$f = {
26123
- email: (_window$Pelcro$user$r = window.Pelcro.user.read()) === null || _window$Pelcro$user$r === void 0 ? void 0 : _window$Pelcro$user$r.email,
26130
+ var _window$Pelcro$user$r$1, _window$Pelcro$user$r2$1, _window$Pelcro$user$r3, _window$Pelcro$user$r4, _window$Pelcro$user$r5, _window$Pelcro$user$r6;
26131
+ const initialState$g = {
26132
+ email: (_window$Pelcro$user$r$1 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r$1 === void 0 ? void 0 : _window$Pelcro$user$r$1.email,
26124
26133
  emailError: null,
26125
- firstName: (_window$Pelcro$user$r2 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r2 === void 0 ? void 0 : _window$Pelcro$user$r2.first_name,
26134
+ firstName: (_window$Pelcro$user$r2$1 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r2$1 === void 0 ? void 0 : _window$Pelcro$user$r2$1.first_name,
26126
26135
  lastName: (_window$Pelcro$user$r3 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r3 === void 0 ? void 0 : _window$Pelcro$user$r3.last_name,
26127
26136
  lastNameError: null,
26128
26137
  username: (_window$Pelcro$user$r4 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r4 === void 0 ? void 0 : _window$Pelcro$user$r4.username,
@@ -26136,10 +26145,10 @@ const initialState$f = {
26136
26145
  content: ""
26137
26146
  }
26138
26147
  };
26139
- const store$f = /*#__PURE__*/createContext(initialState$f);
26148
+ const store$g = /*#__PURE__*/createContext(initialState$g);
26140
26149
  const {
26141
- Provider: Provider$f
26142
- } = store$f;
26150
+ Provider: Provider$g
26151
+ } = store$g;
26143
26152
 
26144
26153
  const UserUpdateContainer = ({
26145
26154
  style,
@@ -26306,12 +26315,12 @@ const UserUpdateContainer = ({
26306
26315
  default:
26307
26316
  return state;
26308
26317
  }
26309
- }, initialState$f);
26318
+ }, initialState$g);
26310
26319
  return /*#__PURE__*/React__default.createElement("div", {
26311
26320
  style: { ...style
26312
26321
  },
26313
26322
  className: `pelcro-container pelcro-user-update-container ${className}`
26314
- }, /*#__PURE__*/React__default.createElement(Provider$f, {
26323
+ }, /*#__PURE__*/React__default.createElement(Provider$g, {
26315
26324
  value: {
26316
26325
  state,
26317
26326
  dispatch
@@ -26319,12 +26328,12 @@ const UserUpdateContainer = ({
26319
26328
  }, children.length ? children.map((child, i) => {
26320
26329
  if (child) {
26321
26330
  return /*#__PURE__*/React__default.cloneElement(child, {
26322
- store: store$f,
26331
+ store: store$g,
26323
26332
  key: i
26324
26333
  });
26325
26334
  }
26326
26335
  }) : /*#__PURE__*/React__default.cloneElement(children, {
26327
- store: store$f
26336
+ store: store$g
26328
26337
  })));
26329
26338
  };
26330
26339
 
@@ -26350,7 +26359,7 @@ const UserUpdateEmail = props => {
26350
26359
  email,
26351
26360
  emailError
26352
26361
  }
26353
- } = useContext(store$f);
26362
+ } = useContext(store$g);
26354
26363
  const [enableEmailEdit, setEnableEmailEdit] = useState(false);
26355
26364
  const {
26356
26365
  t
@@ -26376,7 +26385,7 @@ const UserUpdateEmail = props => {
26376
26385
  className: "plc-flex plc-items-start plc-relative"
26377
26386
  }, /*#__PURE__*/React__default.createElement(Email, Object.assign({
26378
26387
  disabled: !enableEmailEdit,
26379
- store: store$f,
26388
+ store: store$g,
26380
26389
  label: t("labels.email"),
26381
26390
  enableEmailEdit: enableEmailEdit
26382
26391
  }, props)), /*#__PURE__*/React__default.createElement(Button, {
@@ -26401,7 +26410,7 @@ const UserUpdateButton = ({
26401
26410
  emailError
26402
26411
  },
26403
26412
  dispatch
26404
- } = useContext(store$f);
26413
+ } = useContext(store$g);
26405
26414
  const {
26406
26415
  t
26407
26416
  } = useTranslation("userEdit");
@@ -26492,19 +26501,19 @@ function UpdateUserNameInput({
26492
26501
  }
26493
26502
 
26494
26503
  const UserUpdateUsername = props => /*#__PURE__*/React__default.createElement(UpdateUserNameInput, Object.assign({
26495
- store: store$f
26504
+ store: store$g
26496
26505
  }, props));
26497
26506
 
26498
26507
  const UserUpdateFirstName = props => /*#__PURE__*/React__default.createElement(FirstName, Object.assign({
26499
- store: store$f
26508
+ store: store$g
26500
26509
  }, props));
26501
26510
 
26502
26511
  const UserUpdateLastName = props => /*#__PURE__*/React__default.createElement(LastName, Object.assign({
26503
- store: store$f
26512
+ store: store$g
26504
26513
  }, props));
26505
26514
 
26506
26515
  const UserUpdatePhone = props => /*#__PURE__*/React__default.createElement(Phone, Object.assign({
26507
- store: store$f
26516
+ store: store$g
26508
26517
  }, props));
26509
26518
 
26510
26519
  var userSolidIcon = "data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20class%3D%22plc-h-5%20plc-w-5%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22white%22%3E%20%20%3Cpath%20transform%3D%22translate%280%2C2%29%22%20fill-rule%3D%22evenodd%22%20d%3D%22M10%209a3%203%200%20100-6%203%203%200%20000%206zm-7%209a7%207%200%201114%200H3z%22%20clip-rule%3D%22evenodd%22%20%2F%3E%3C%2Fsvg%3E";
@@ -26591,7 +26600,7 @@ function Tin({
26591
26600
  }
26592
26601
 
26593
26602
  const UserUpdateTin = props => /*#__PURE__*/React__default.createElement(Tin, Object.assign({
26594
- store: store$f
26603
+ store: store$g
26595
26604
  }, props));
26596
26605
 
26597
26606
  function DisplayName({
@@ -26622,7 +26631,7 @@ function DisplayName({
26622
26631
  }
26623
26632
 
26624
26633
  const UserUpdateDisplayName = props => /*#__PURE__*/React__default.createElement(DisplayName, Object.assign({
26625
- store: store$f
26634
+ store: store$g
26626
26635
  }, props));
26627
26636
 
26628
26637
  const UserUpdateView = props => {
@@ -26717,11 +26726,11 @@ UserUpdateModal.viewId = "user-edit";
26717
26726
 
26718
26727
  const UserUpdateTextInput = props => {
26719
26728
  return /*#__PURE__*/React__default.createElement(TextInput, Object.assign({}, props, {
26720
- store: store$f
26729
+ store: store$g
26721
26730
  }));
26722
26731
  };
26723
26732
 
26724
- const initialState$e = {
26733
+ const initialState$f = {
26725
26734
  isSubmitting: false,
26726
26735
  firstName: "",
26727
26736
  firstNameError: "",
@@ -26747,10 +26756,10 @@ const initialState$e = {
26747
26756
  content: ""
26748
26757
  }
26749
26758
  };
26750
- const store$e = /*#__PURE__*/createContext(initialState$e);
26759
+ const store$f = /*#__PURE__*/createContext(initialState$f);
26751
26760
  const {
26752
- Provider: Provider$e
26753
- } = store$e;
26761
+ Provider: Provider$f
26762
+ } = store$f;
26754
26763
 
26755
26764
  const getNewlyCreatedAddress = addresses => addresses[addresses.length - 1];
26756
26765
 
@@ -26997,7 +27006,7 @@ const AddressCreateContainer = ({
26997
27006
  default:
26998
27007
  return state;
26999
27008
  }
27000
- }, initialState$e);
27009
+ }, initialState$f);
27001
27010
  useEffect(() => {
27002
27011
  const getStates = () => {
27003
27012
  dispatch({
@@ -27029,16 +27038,16 @@ const AddressCreateContainer = ({
27029
27038
  style: { ...style
27030
27039
  },
27031
27040
  className: `pelcro-container pelcro-address-create-container ${className}`
27032
- }, /*#__PURE__*/React__default.createElement(Provider$e, {
27041
+ }, /*#__PURE__*/React__default.createElement(Provider$f, {
27033
27042
  value: {
27034
27043
  state,
27035
27044
  dispatch
27036
27045
  }
27037
27046
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
27038
- store: store$e,
27047
+ store: store$f,
27039
27048
  key: i
27040
27049
  })) : /*#__PURE__*/React__default.cloneElement(children, {
27041
- store: store$e
27050
+ store: store$f
27042
27051
  })));
27043
27052
  };
27044
27053
 
@@ -27049,7 +27058,7 @@ function AddressCreateFirstName(props) {
27049
27058
  firstName,
27050
27059
  firstNameError
27051
27060
  }
27052
- } = useContext(store$e);
27061
+ } = useContext(store$f);
27053
27062
 
27054
27063
  const handleInputChange = value => {
27055
27064
  dispatch({
@@ -27085,7 +27094,7 @@ function AddressCreateLastName(props) {
27085
27094
  lastName,
27086
27095
  lastNameError
27087
27096
  }
27088
- } = useContext(store$e);
27097
+ } = useContext(store$f);
27089
27098
 
27090
27099
  const handleInputChange = value => {
27091
27100
  dispatch({
@@ -27120,7 +27129,7 @@ function AddressCreateLine1(props) {
27120
27129
  line1,
27121
27130
  line1Error
27122
27131
  }
27123
- } = useContext(store$e);
27132
+ } = useContext(store$f);
27124
27133
 
27125
27134
  const handleBlur = () => {
27126
27135
  return dispatch({
@@ -27163,7 +27172,7 @@ function AddressCreateCity(props) {
27163
27172
  city,
27164
27173
  cityError
27165
27174
  }
27166
- } = useContext(store$e);
27175
+ } = useContext(store$f);
27167
27176
 
27168
27177
  const handleInputChange = value => {
27169
27178
  dispatch({
@@ -27198,7 +27207,7 @@ function AddressCreatePostalCode(props) {
27198
27207
  postalCode,
27199
27208
  postalCodeError
27200
27209
  }
27201
- } = useContext(store$e);
27210
+ } = useContext(store$f);
27202
27211
 
27203
27212
  const handleInputChange = value => {
27204
27213
  dispatch({
@@ -27236,7 +27245,7 @@ const AddressCreateSubmit = ({
27236
27245
  state: {
27237
27246
  isSubmitting
27238
27247
  }
27239
- } = useContext(store$e);
27248
+ } = useContext(store$f);
27240
27249
  const {
27241
27250
  t
27242
27251
  } = useTranslation("address");
@@ -27349,7 +27358,7 @@ function CountrySelect({
27349
27358
  }
27350
27359
 
27351
27360
  const AddressCreateCountrySelect = props => /*#__PURE__*/React__default.createElement(CountrySelect, Object.assign({
27352
- store: store$e
27361
+ store: store$f
27353
27362
  }, props));
27354
27363
 
27355
27364
  function StateSelect({
@@ -27438,14 +27447,14 @@ function StateSelect({
27438
27447
  }
27439
27448
 
27440
27449
  const AddressCreateStateSelect = props => /*#__PURE__*/React__default.createElement(StateSelect, Object.assign({
27441
- store: store$e
27450
+ store: store$f
27442
27451
  }, props));
27443
27452
 
27444
27453
  const AddressCreateSetDefault = props => {
27445
27454
  const {
27446
27455
  dispatch,
27447
27456
  state
27448
- } = useContext(store$e);
27457
+ } = useContext(store$f);
27449
27458
 
27450
27459
  const handleCheckboxChange = e => {
27451
27460
  dispatch({
@@ -27580,18 +27589,18 @@ AddressCreateModal.viewId = "address-create";
27580
27589
 
27581
27590
  const AddressCreateTextInput = props => {
27582
27591
  return /*#__PURE__*/React__default.createElement(TextInput, Object.assign({}, props, {
27583
- store: store$e
27592
+ store: store$f
27584
27593
  }));
27585
27594
  };
27586
27595
 
27587
27596
  const AddressCreateLine2 = props => {
27588
27597
  return /*#__PURE__*/React__default.createElement(TextInput, Object.assign({
27589
27598
  fieldName: "line2",
27590
- store: store$e
27599
+ store: store$f
27591
27600
  }, props));
27592
27601
  };
27593
27602
 
27594
- const initialState$d = {
27603
+ const initialState$e = {
27595
27604
  isSubmitting: false,
27596
27605
  firstName: "",
27597
27606
  firstNameError: "",
@@ -27617,10 +27626,10 @@ const initialState$d = {
27617
27626
  content: ""
27618
27627
  }
27619
27628
  };
27620
- const store$d = /*#__PURE__*/createContext(initialState$d);
27629
+ const store$e = /*#__PURE__*/createContext(initialState$e);
27621
27630
  const {
27622
- Provider: Provider$d
27623
- } = store$d;
27631
+ Provider: Provider$e
27632
+ } = store$e;
27624
27633
 
27625
27634
  const AddressUpdateContainer = ({
27626
27635
  style,
@@ -27672,7 +27681,7 @@ const AddressUpdateContainer = ({
27672
27681
  const thisAddress = addresses[address];
27673
27682
 
27674
27683
  if (+thisAddress.id === +addressId) {
27675
- const newState = { ...initialState$d,
27684
+ const newState = { ...initialState$e,
27676
27685
  firstName: thisAddress.first_name,
27677
27686
  lastName: thisAddress.last_name,
27678
27687
  line1: thisAddress.line1,
@@ -27813,7 +27822,7 @@ const AddressUpdateContainer = ({
27813
27822
  default:
27814
27823
  return state;
27815
27824
  }
27816
- }, initialState$d);
27825
+ }, initialState$e);
27817
27826
  useEffect(() => {
27818
27827
  const getStates = () => {
27819
27828
  dispatch({
@@ -27845,21 +27854,21 @@ const AddressUpdateContainer = ({
27845
27854
  style: { ...style
27846
27855
  },
27847
27856
  className: `pelcro-container pelcro-address-update-container ${className}`
27848
- }, /*#__PURE__*/React__default.createElement(Provider$d, {
27857
+ }, /*#__PURE__*/React__default.createElement(Provider$e, {
27849
27858
  value: {
27850
27859
  state,
27851
27860
  dispatch
27852
27861
  }
27853
27862
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
27854
- store: store$d,
27863
+ store: store$e,
27855
27864
  key: i
27856
27865
  })) : /*#__PURE__*/React__default.cloneElement(children, {
27857
- store: store$d
27866
+ store: store$e
27858
27867
  })));
27859
27868
  };
27860
27869
 
27861
27870
  const AddressUpdateCountrySelect = props => /*#__PURE__*/React__default.createElement(CountrySelect, Object.assign({
27862
- store: store$d
27871
+ store: store$e
27863
27872
  }, props));
27864
27873
 
27865
27874
  function AddressUpdateFirstName(props) {
@@ -27869,7 +27878,7 @@ function AddressUpdateFirstName(props) {
27869
27878
  firstName,
27870
27879
  firstNameError
27871
27880
  }
27872
- } = useContext(store$d);
27881
+ } = useContext(store$e);
27873
27882
 
27874
27883
  const handleBlur = () => {
27875
27884
  return dispatch({
@@ -27912,7 +27921,7 @@ function AddressUpdateLastName(props) {
27912
27921
  lastName,
27913
27922
  lastNameError
27914
27923
  }
27915
- } = useContext(store$d);
27924
+ } = useContext(store$e);
27916
27925
 
27917
27926
  const handleBlur = () => {
27918
27927
  return dispatch({
@@ -27955,7 +27964,7 @@ function AddressUpdateLine1(props) {
27955
27964
  line1,
27956
27965
  line1Error
27957
27966
  }
27958
- } = useContext(store$d);
27967
+ } = useContext(store$e);
27959
27968
 
27960
27969
  const handleBlur = () => {
27961
27970
  return dispatch({
@@ -27995,7 +28004,7 @@ const AddressUpdateLine2 = props => {
27995
28004
  return /*#__PURE__*/React__default.createElement(TextInput, Object.assign({
27996
28005
  fieldName: "line2"
27997
28006
  }, props, {
27998
- store: store$d
28007
+ store: store$e
27999
28008
  }));
28000
28009
  };
28001
28010
 
@@ -28006,7 +28015,7 @@ function AddressUpdateCity(props) {
28006
28015
  city,
28007
28016
  cityError
28008
28017
  }
28009
- } = useContext(store$d);
28018
+ } = useContext(store$e);
28010
28019
 
28011
28020
  const handleBlur = () => {
28012
28021
  return dispatch({
@@ -28049,7 +28058,7 @@ function AddressUpdatePostalCode(props) {
28049
28058
  postalCode,
28050
28059
  postalCodeError
28051
28060
  }
28052
- } = useContext(store$d);
28061
+ } = useContext(store$e);
28053
28062
 
28054
28063
  const handleBlur = () => {
28055
28064
  return dispatch({
@@ -28095,7 +28104,7 @@ const AddressUpdateSubmit = ({
28095
28104
  state: {
28096
28105
  isSubmitting
28097
28106
  }
28098
- } = useContext(store$d);
28107
+ } = useContext(store$e);
28099
28108
  const {
28100
28109
  t
28101
28110
  } = useTranslation("address");
@@ -28111,7 +28120,7 @@ const AddressUpdateSubmit = ({
28111
28120
  };
28112
28121
 
28113
28122
  const AddressUpdateStateSelect = props => /*#__PURE__*/React__default.createElement(StateSelect, Object.assign({
28114
- store: store$d
28123
+ store: store$e
28115
28124
  }, props));
28116
28125
 
28117
28126
  function AddressUpdateSetDefault(props) {
@@ -28120,7 +28129,7 @@ function AddressUpdateSetDefault(props) {
28120
28129
  state: {
28121
28130
  isDefault
28122
28131
  }
28123
- } = useContext(store$d);
28132
+ } = useContext(store$e);
28124
28133
 
28125
28134
  const handleCheckboxChange = e => {
28126
28135
  dispatch({
@@ -28228,7 +28237,7 @@ AddressUpdateModal.viewId = "address-edit";
28228
28237
 
28229
28238
  const AddressUpdateTextInput = props => {
28230
28239
  return /*#__PURE__*/React__default.createElement(TextInput, Object.assign({}, props, {
28231
- store: store$d
28240
+ store: store$e
28232
28241
  }));
28233
28242
  };
28234
28243
 
@@ -28310,7 +28319,7 @@ const PaymentMethodUpdateModal = props => {
28310
28319
  };
28311
28320
  PaymentMethodUpdateModal.viewId = "payment-method-update";
28312
28321
 
28313
- const initialState$c = {
28322
+ const initialState$d = {
28314
28323
  email: "",
28315
28324
  password: "",
28316
28325
  passwordError: null,
@@ -28323,10 +28332,10 @@ const initialState$c = {
28323
28332
  content: ""
28324
28333
  }
28325
28334
  };
28326
- const store$c = /*#__PURE__*/createContext(initialState$c);
28335
+ const store$d = /*#__PURE__*/createContext(initialState$d);
28327
28336
  const {
28328
- Provider: Provider$c
28329
- } = store$c;
28337
+ Provider: Provider$d
28338
+ } = store$d;
28330
28339
 
28331
28340
  const PasswordResetContainer = ({
28332
28341
  style,
@@ -28383,7 +28392,7 @@ const PasswordResetContainer = ({
28383
28392
  type: SET_EMAIL,
28384
28393
  payload: window.Pelcro.helpers.getURLParameter("email")
28385
28394
  });
28386
- initialState$c.email = window.Pelcro.helpers.getURLParameter("email");
28395
+ initialState$d.email = window.Pelcro.helpers.getURLParameter("email");
28387
28396
  dispatch({
28388
28397
  type: SET_TOKEN,
28389
28398
  payload: window.Pelcro.helpers.getURLParameter("token")
@@ -28443,26 +28452,26 @@ const PasswordResetContainer = ({
28443
28452
  default:
28444
28453
  return state;
28445
28454
  }
28446
- }, initialState$c);
28455
+ }, initialState$d);
28447
28456
  return /*#__PURE__*/React__default.createElement("div", {
28448
28457
  style: { ...style
28449
28458
  },
28450
28459
  className: `pelcro-container pelcro-password-reset-container ${className}`
28451
- }, /*#__PURE__*/React__default.createElement(Provider$c, {
28460
+ }, /*#__PURE__*/React__default.createElement(Provider$d, {
28452
28461
  value: {
28453
28462
  state,
28454
28463
  dispatch
28455
28464
  }
28456
28465
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
28457
- store: store$c,
28466
+ store: store$d,
28458
28467
  key: i
28459
28468
  })) : /*#__PURE__*/React__default.cloneElement(children, {
28460
- store: store$c
28469
+ store: store$d
28461
28470
  })));
28462
28471
  };
28463
28472
 
28464
28473
  const PasswordResetPassword = props => /*#__PURE__*/React__default.createElement(Password, Object.assign({
28465
- store: store$c
28474
+ store: store$d
28466
28475
  }, props));
28467
28476
 
28468
28477
  const PasswordResetButton = ({
@@ -28475,7 +28484,7 @@ const PasswordResetButton = ({
28475
28484
  buttonDisabled
28476
28485
  },
28477
28486
  dispatch
28478
- } = useContext(store$c);
28487
+ } = useContext(store$d);
28479
28488
  const {
28480
28489
  t
28481
28490
  } = useTranslation("passwordReset");
@@ -28492,14 +28501,14 @@ const PasswordResetButton = ({
28492
28501
  };
28493
28502
 
28494
28503
  const PasswordResetEmail = props => /*#__PURE__*/React__default.createElement(Email, Object.assign({
28495
- store: store$c
28504
+ store: store$d
28496
28505
  }, props, {
28497
28506
  value: window.Pelcro.helpers.getURLParameter("email"),
28498
28507
  disabled: true
28499
28508
  }));
28500
28509
 
28501
28510
  const PasswordResetConfirmPassword = props => /*#__PURE__*/React__default.createElement(ConfirmPassword, Object.assign({
28502
- store: store$c
28511
+ store: store$d
28503
28512
  }, props));
28504
28513
 
28505
28514
  const PasswordResetView = props => {
@@ -28554,7 +28563,7 @@ const PasswordResetModal = ({
28554
28563
  };
28555
28564
  PasswordResetModal.viewId = "password-reset";
28556
28565
 
28557
- const initialState$b = {
28566
+ const initialState$c = {
28558
28567
  email: "",
28559
28568
  emailError: null,
28560
28569
  buttonDisabled: false,
@@ -28563,10 +28572,10 @@ const initialState$b = {
28563
28572
  content: ""
28564
28573
  }
28565
28574
  };
28566
- const store$b = /*#__PURE__*/createContext(initialState$b);
28575
+ const store$c = /*#__PURE__*/createContext(initialState$c);
28567
28576
  const {
28568
- Provider: Provider$b
28569
- } = store$b;
28577
+ Provider: Provider$c
28578
+ } = store$c;
28570
28579
 
28571
28580
  const PasswordForgotContainer = ({
28572
28581
  style,
@@ -28644,21 +28653,21 @@ const PasswordForgotContainer = ({
28644
28653
  default:
28645
28654
  return state;
28646
28655
  }
28647
- }, initialState$b);
28656
+ }, initialState$c);
28648
28657
  return /*#__PURE__*/React__default.createElement("div", {
28649
28658
  style: { ...style
28650
28659
  },
28651
28660
  className: `pelcro-container pelcro-password-forgot-container ${className}`
28652
- }, /*#__PURE__*/React__default.createElement(Provider$b, {
28661
+ }, /*#__PURE__*/React__default.createElement(Provider$c, {
28653
28662
  value: {
28654
28663
  state,
28655
28664
  dispatch
28656
28665
  }
28657
28666
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
28658
- store: store$b,
28667
+ store: store$c,
28659
28668
  key: i
28660
28669
  })) : /*#__PURE__*/React__default.cloneElement(children, {
28661
- store: store$b
28670
+ store: store$c
28662
28671
  })));
28663
28672
  };
28664
28673
 
@@ -28674,7 +28683,7 @@ const PasswordForgotButton = ({
28674
28683
  emailError
28675
28684
  },
28676
28685
  dispatch
28677
- } = useContext(store$b);
28686
+ } = useContext(store$c);
28678
28687
  const {
28679
28688
  t
28680
28689
  } = useTranslation("passwordForgot");
@@ -28695,7 +28704,7 @@ const PasswordForgotButton = ({
28695
28704
  };
28696
28705
 
28697
28706
  const PasswordForgotEmail = props => /*#__PURE__*/React__default.createElement(Email, Object.assign({
28698
- store: store$b
28707
+ store: store$c
28699
28708
  }, props));
28700
28709
 
28701
28710
  const PasswordForgotView = props => {
@@ -28749,7 +28758,7 @@ const PasswordForgotModal = ({
28749
28758
  };
28750
28759
  PasswordForgotModal.viewId = "password-forgot";
28751
28760
 
28752
- const initialState$a = {
28761
+ const initialState$b = {
28753
28762
  email: "",
28754
28763
  emailError: null,
28755
28764
  buttonDisabled: false,
@@ -28758,10 +28767,10 @@ const initialState$a = {
28758
28767
  content: ""
28759
28768
  }
28760
28769
  };
28761
- const store$a = /*#__PURE__*/createContext(initialState$a);
28770
+ const store$b = /*#__PURE__*/createContext(initialState$b);
28762
28771
  const {
28763
- Provider: Provider$a
28764
- } = store$a;
28772
+ Provider: Provider$b
28773
+ } = store$b;
28765
28774
 
28766
28775
  const PasswordlessRequestContainer = ({
28767
28776
  style,
@@ -28839,21 +28848,21 @@ const PasswordlessRequestContainer = ({
28839
28848
  default:
28840
28849
  return state;
28841
28850
  }
28842
- }, initialState$a);
28851
+ }, initialState$b);
28843
28852
  return /*#__PURE__*/React__default.createElement("div", {
28844
28853
  style: { ...style
28845
28854
  },
28846
28855
  className: `pelcro-container pelcro-password-forgot-container ${className}`
28847
- }, /*#__PURE__*/React__default.createElement(Provider$a, {
28856
+ }, /*#__PURE__*/React__default.createElement(Provider$b, {
28848
28857
  value: {
28849
28858
  state,
28850
28859
  dispatch
28851
28860
  }
28852
28861
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
28853
- store: store$a,
28862
+ store: store$b,
28854
28863
  key: i
28855
28864
  })) : /*#__PURE__*/React__default.cloneElement(children, {
28856
- store: store$a
28865
+ store: store$b
28857
28866
  })));
28858
28867
  };
28859
28868
 
@@ -28869,7 +28878,7 @@ const PasswordlessRequestViewButton = ({
28869
28878
  emailError
28870
28879
  },
28871
28880
  dispatch
28872
- } = useContext(store$a);
28881
+ } = useContext(store$b);
28873
28882
  const {
28874
28883
  t
28875
28884
  } = useTranslation("passwordlessRequest");
@@ -28890,7 +28899,7 @@ const PasswordlessRequestViewButton = ({
28890
28899
  };
28891
28900
 
28892
28901
  const PasswordlessRequestEmail = props => /*#__PURE__*/React__default.createElement(Email, Object.assign({
28893
- store: store$a
28902
+ store: store$b
28894
28903
  }, props));
28895
28904
 
28896
28905
  const PasswordlessRequestView = props => {
@@ -28934,7 +28943,7 @@ const PasswordlessRequestModal = ({
28934
28943
  };
28935
28944
  PasswordlessRequestModal.viewId = "passwordless-request";
28936
28945
 
28937
- const initialState$9 = {
28946
+ const initialState$a = {
28938
28947
  currentPassword: "",
28939
28948
  newPassword: "",
28940
28949
  confirmNewPassword: "",
@@ -28948,10 +28957,10 @@ const initialState$9 = {
28948
28957
  content: ""
28949
28958
  }
28950
28959
  };
28951
- const store$9 = /*#__PURE__*/createContext(initialState$9);
28960
+ const store$a = /*#__PURE__*/createContext(initialState$a);
28952
28961
  const {
28953
- Provider: Provider$9
28954
- } = store$9;
28962
+ Provider: Provider$a
28963
+ } = store$a;
28955
28964
  const PasswordChangeContainer = ({
28956
28965
  style,
28957
28966
  className = "",
@@ -29103,21 +29112,21 @@ const PasswordChangeContainer = ({
29103
29112
  default:
29104
29113
  return state;
29105
29114
  }
29106
- }, initialState$9);
29115
+ }, initialState$a);
29107
29116
  return /*#__PURE__*/React__default.createElement("div", {
29108
29117
  style: { ...style
29109
29118
  },
29110
29119
  className: `pelcro-container pelcro-password-change-container ${className}`
29111
- }, /*#__PURE__*/React__default.createElement(Provider$9, {
29120
+ }, /*#__PURE__*/React__default.createElement(Provider$a, {
29112
29121
  value: {
29113
29122
  state,
29114
29123
  dispatch
29115
29124
  }
29116
29125
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
29117
- store: store$9,
29126
+ store: store$a,
29118
29127
  key: i
29119
29128
  })) : /*#__PURE__*/React__default.cloneElement(children, {
29120
- store: store$9
29129
+ store: store$a
29121
29130
  })));
29122
29131
  };
29123
29132
 
@@ -29128,7 +29137,7 @@ function PasswordChangeCurrentPassword(props) {
29128
29137
  currentPassword,
29129
29138
  currentPasswordError
29130
29139
  }
29131
- } = useContext(store$9);
29140
+ } = useContext(store$a);
29132
29141
  const handleBlur = useCallback(() => {
29133
29142
  return dispatch({
29134
29143
  type: VALIDATE_PASSWORD
@@ -29162,7 +29171,7 @@ function PasswordChangeNewPassword(props) {
29162
29171
  newPassword,
29163
29172
  newPasswordError
29164
29173
  }
29165
- } = useContext(store$9);
29174
+ } = useContext(store$a);
29166
29175
  const handleBlur = useCallback(() => {
29167
29176
  return dispatch({
29168
29177
  type: VALIDATE_NEW_PASSWORD
@@ -29196,7 +29205,7 @@ function PasswordChangeConfirmNewPassword(props) {
29196
29205
  confirmNewPassword,
29197
29206
  confirmNewPasswordError
29198
29207
  }
29199
- } = useContext(store$9);
29208
+ } = useContext(store$a);
29200
29209
  const handleBlur = useCallback(() => {
29201
29210
  return dispatch({
29202
29211
  type: VALIDATE_CONFIRM_NEW_PASSWORD
@@ -29237,7 +29246,7 @@ const PasswordChangeButton = ({
29237
29246
  confirmNewPasswordError
29238
29247
  },
29239
29248
  dispatch
29240
- } = useContext(store$9);
29249
+ } = useContext(store$a);
29241
29250
  const {
29242
29251
  t
29243
29252
  } = useTranslation("passwordChange");
@@ -29306,17 +29315,17 @@ const PasswordChangeModal = ({
29306
29315
  };
29307
29316
  PasswordChangeModal.viewId = "password-change";
29308
29317
 
29309
- const initialState$8 = {
29318
+ const initialState$9 = {
29310
29319
  buttonDisabled: false,
29311
29320
  alert: {
29312
29321
  type: "error",
29313
29322
  content: ""
29314
29323
  }
29315
29324
  };
29316
- const store$8 = /*#__PURE__*/createContext(initialState$8);
29325
+ const store$9 = /*#__PURE__*/createContext(initialState$9);
29317
29326
  const {
29318
- Provider: Provider$8
29319
- } = store$8;
29327
+ Provider: Provider$9
29328
+ } = store$9;
29320
29329
 
29321
29330
  const CartContainer = ({
29322
29331
  style,
@@ -29407,21 +29416,21 @@ const CartContainer = ({
29407
29416
  default:
29408
29417
  return state;
29409
29418
  }
29410
- }, initialState$8);
29419
+ }, initialState$9);
29411
29420
  return /*#__PURE__*/React__default.createElement("div", {
29412
29421
  style: { ...style
29413
29422
  },
29414
29423
  className: `pelcro-container pelcro-cart-container ${className}`
29415
- }, /*#__PURE__*/React__default.createElement(Provider$8, {
29424
+ }, /*#__PURE__*/React__default.createElement(Provider$9, {
29416
29425
  value: {
29417
29426
  state,
29418
29427
  dispatch
29419
29428
  }
29420
29429
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
29421
- store: store$8,
29430
+ store: store$9,
29422
29431
  key: i
29423
29432
  })) : /*#__PURE__*/React__default.cloneElement(children, {
29424
- store: store$8
29433
+ store: store$9
29425
29434
  })));
29426
29435
  };
29427
29436
 
@@ -29460,7 +29469,7 @@ const CartSubmit = ({
29460
29469
  buttonDisabled
29461
29470
  },
29462
29471
  dispatch
29463
- } = useContext(store$8);
29472
+ } = useContext(store$9);
29464
29473
  const {
29465
29474
  t
29466
29475
  } = useTranslation("cart");
@@ -29494,7 +29503,7 @@ const CartTotalPrice = () => {
29494
29503
  state: {
29495
29504
  alert
29496
29505
  }
29497
- } = useContext(store$8);
29506
+ } = useContext(store$9);
29498
29507
  const {
29499
29508
  cartItems
29500
29509
  } = usePelcro();
@@ -29818,7 +29827,7 @@ const OrderConfirmModal = props => {
29818
29827
  };
29819
29828
  OrderConfirmModal.viewId = "order-confirm";
29820
29829
 
29821
- const initialState$7 = {
29830
+ const initialState$8 = {
29822
29831
  email: "",
29823
29832
  firstName: "",
29824
29833
  lastName: "",
@@ -29830,10 +29839,10 @@ const initialState$7 = {
29830
29839
  content: ""
29831
29840
  }
29832
29841
  };
29833
- const store$7 = /*#__PURE__*/createContext(initialState$7);
29842
+ const store$8 = /*#__PURE__*/createContext(initialState$8);
29834
29843
  const {
29835
- Provider: Provider$7
29836
- } = store$7;
29844
+ Provider: Provider$8
29845
+ } = store$8;
29837
29846
 
29838
29847
  const GiftCreateContainer = ({
29839
29848
  style,
@@ -29937,21 +29946,21 @@ const GiftCreateContainer = ({
29937
29946
  default:
29938
29947
  return state;
29939
29948
  }
29940
- }, initialState$7);
29949
+ }, initialState$8);
29941
29950
  return /*#__PURE__*/React__default.createElement("div", {
29942
29951
  style: { ...style
29943
29952
  },
29944
29953
  className: `pelcro-container pelcro-gift-create-container ${className}`
29945
- }, /*#__PURE__*/React__default.createElement(Provider$7, {
29954
+ }, /*#__PURE__*/React__default.createElement(Provider$8, {
29946
29955
  value: {
29947
29956
  state,
29948
29957
  dispatch
29949
29958
  }
29950
29959
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
29951
- store: store$7,
29960
+ store: store$8,
29952
29961
  key: i
29953
29962
  })) : /*#__PURE__*/React__default.cloneElement(children, {
29954
- store: store$7
29963
+ store: store$8
29955
29964
  })));
29956
29965
  };
29957
29966
 
@@ -29965,7 +29974,7 @@ const GiftCreateSubmitButton = ({
29965
29974
  state: {
29966
29975
  disableSubmit
29967
29976
  }
29968
- } = useContext(store$7);
29977
+ } = useContext(store$8);
29969
29978
  const {
29970
29979
  t
29971
29980
  } = useTranslation("register");
@@ -29982,15 +29991,15 @@ const GiftCreateSubmitButton = ({
29982
29991
 
29983
29992
  const GiftCreateEmail = props => /*#__PURE__*/React__default.createElement(Email, Object.assign({
29984
29993
  initWithUserEmail: false,
29985
- store: store$7
29994
+ store: store$8
29986
29995
  }, props));
29987
29996
 
29988
29997
  const GiftCreateFirstName = props => /*#__PURE__*/React__default.createElement(FirstName, Object.assign({
29989
- store: store$7
29998
+ store: store$8
29990
29999
  }, props));
29991
30000
 
29992
30001
  const GiftCreateLastName = props => /*#__PURE__*/React__default.createElement(LastName, Object.assign({
29993
- store: store$7
30002
+ store: store$8
29994
30003
  }, props));
29995
30004
 
29996
30005
  const nowDate = new Date();
@@ -30005,7 +30014,7 @@ const GiftCreateStartDate = props => {
30005
30014
  const {
30006
30015
  dispatch,
30007
30016
  state
30008
- } = useContext(store$7);
30017
+ } = useContext(store$8);
30009
30018
 
30010
30019
  const handleInputChange = value => {
30011
30020
  dispatch({
@@ -30040,7 +30049,7 @@ function GiftCreateMessage(props) {
30040
30049
  const {
30041
30050
  dispatch,
30042
30051
  state
30043
- } = useContext(store$7);
30052
+ } = useContext(store$8);
30044
30053
  const MAX_CHARS_COUNT = 200;
30045
30054
  const remainingCharsCount = (_ref = MAX_CHARS_COUNT - ((_state$giftMessage = state.giftMessage) === null || _state$giftMessage === void 0 ? void 0 : _state$giftMessage.length)) !== null && _ref !== void 0 ? _ref : 0;
30046
30055
 
@@ -30170,7 +30179,7 @@ const GiftCreateModal = ({
30170
30179
  };
30171
30180
  GiftCreateModal.viewId = "gift-create";
30172
30181
 
30173
- const initialState$6 = {
30182
+ const initialState$7 = {
30174
30183
  isSubmitting: false,
30175
30184
  giftCode: "",
30176
30185
  buttonDisabled: true,
@@ -30179,10 +30188,10 @@ const initialState$6 = {
30179
30188
  content: ""
30180
30189
  }
30181
30190
  };
30182
- const store$6 = /*#__PURE__*/createContext(initialState$6);
30191
+ const store$7 = /*#__PURE__*/createContext(initialState$7);
30183
30192
  const {
30184
- Provider: Provider$6
30185
- } = store$6;
30193
+ Provider: Provider$7
30194
+ } = store$7;
30186
30195
 
30187
30196
  const GiftRedeemContainer = ({
30188
30197
  style,
@@ -30296,21 +30305,21 @@ const GiftRedeemContainer = ({
30296
30305
  default:
30297
30306
  return state;
30298
30307
  }
30299
- }, initialState$6);
30308
+ }, initialState$7);
30300
30309
  return /*#__PURE__*/React__default.createElement("div", {
30301
30310
  style: { ...style
30302
30311
  },
30303
30312
  className: `pelcro-container pelcro-gift-redeem-container ${className}`
30304
- }, /*#__PURE__*/React__default.createElement(Provider$6, {
30313
+ }, /*#__PURE__*/React__default.createElement(Provider$7, {
30305
30314
  value: {
30306
30315
  state,
30307
30316
  dispatch
30308
30317
  }
30309
30318
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
30310
- store: store$6,
30319
+ store: store$7,
30311
30320
  key: i
30312
30321
  })) : /*#__PURE__*/React__default.cloneElement(children, {
30313
- store: store$6
30322
+ store: store$7
30314
30323
  })));
30315
30324
  };
30316
30325
 
@@ -30347,7 +30356,7 @@ function GiftCode({
30347
30356
  }
30348
30357
 
30349
30358
  const GiftRedeemCode = props => /*#__PURE__*/React__default.createElement(GiftCode, Object.assign({
30350
- store: store$6
30359
+ store: store$7
30351
30360
  }, props));
30352
30361
 
30353
30362
  const GiftRedeemSubmitButton = ({
@@ -30361,7 +30370,7 @@ const GiftRedeemSubmitButton = ({
30361
30370
  disableSubmit,
30362
30371
  isSubmitting
30363
30372
  }
30364
- } = useContext(store$6);
30373
+ } = useContext(store$7);
30365
30374
  const {
30366
30375
  t
30367
30376
  } = useTranslation("register");
@@ -30456,7 +30465,7 @@ const moveDefaultAddressToStart = addresses => {
30456
30465
  return [defaultAddress, ...addressesWithoutDefault];
30457
30466
  };
30458
30467
 
30459
- const initialState$5 = {
30468
+ const initialState$6 = {
30460
30469
  addresses: [],
30461
30470
  selectedAddressId: null,
30462
30471
  isSubmitting: false,
@@ -30465,10 +30474,10 @@ const initialState$5 = {
30465
30474
  content: ""
30466
30475
  }
30467
30476
  };
30468
- const store$5 = /*#__PURE__*/createContext(initialState$5);
30477
+ const store$6 = /*#__PURE__*/createContext(initialState$6);
30469
30478
  const {
30470
- Provider: Provider$5
30471
- } = store$5;
30479
+ Provider: Provider$6
30480
+ } = store$6;
30472
30481
 
30473
30482
  const AddressSelectContainer = ({
30474
30483
  style,
@@ -30605,7 +30614,7 @@ const AddressSelectContainer = ({
30605
30614
  default:
30606
30615
  return state;
30607
30616
  }
30608
- }, initialState$5);
30617
+ }, initialState$6);
30609
30618
  useEffect(() => {
30610
30619
  var _window$Pelcro$user$r;
30611
30620
 
@@ -30618,16 +30627,16 @@ const AddressSelectContainer = ({
30618
30627
  style: { ...style
30619
30628
  },
30620
30629
  className: `pelcro-container pelcro-address-select-container ${className}`
30621
- }, /*#__PURE__*/React__default.createElement(Provider$5, {
30630
+ }, /*#__PURE__*/React__default.createElement(Provider$6, {
30622
30631
  value: {
30623
30632
  state,
30624
30633
  dispatch
30625
30634
  }
30626
30635
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
30627
- store: store$5,
30636
+ store: store$6,
30628
30637
  key: i
30629
30638
  })) : /*#__PURE__*/React__default.cloneElement(children, {
30630
- store: store$5
30639
+ store: store$6
30631
30640
  })));
30632
30641
  };
30633
30642
 
@@ -30638,7 +30647,7 @@ const AddressSelectList = () => {
30638
30647
  addresses,
30639
30648
  selectedAddressId
30640
30649
  }
30641
- } = useContext(store$5);
30650
+ } = useContext(store$6);
30642
30651
 
30643
30652
  const handleAddressSelect = event => {
30644
30653
  dispatch({
@@ -30682,7 +30691,7 @@ const AddressSelectSubmit = ({
30682
30691
  selectedAddressId,
30683
30692
  isSubmitting
30684
30693
  }
30685
- } = useContext(store$5);
30694
+ } = useContext(store$6);
30686
30695
  const {
30687
30696
  t
30688
30697
  } = useTranslation("address");
@@ -30792,7 +30801,7 @@ const moveDefaultPaymentMethodToStart = paymentMethods => {
30792
30801
  return [defaultPaymentMethod, ...paymentMethodsWithoutDefault];
30793
30802
  };
30794
30803
 
30795
- const initialState$4 = {
30804
+ const initialState$5 = {
30796
30805
  paymentMethods: [],
30797
30806
  selectedPaymentMethodId: null,
30798
30807
  isSubmitting: false,
@@ -30801,10 +30810,10 @@ const initialState$4 = {
30801
30810
  content: ""
30802
30811
  }
30803
30812
  };
30804
- const store$4 = /*#__PURE__*/createContext(initialState$4);
30813
+ const store$5 = /*#__PURE__*/createContext(initialState$5);
30805
30814
  const {
30806
- Provider: Provider$4
30807
- } = store$4;
30815
+ Provider: Provider$5
30816
+ } = store$5;
30808
30817
 
30809
30818
  const PaymentMethodSelectContainer = ({
30810
30819
  style,
@@ -30863,7 +30872,7 @@ const PaymentMethodSelectContainer = ({
30863
30872
  default:
30864
30873
  return state;
30865
30874
  }
30866
- }, initialState$4);
30875
+ }, initialState$5);
30867
30876
  useEffect(() => {
30868
30877
  var _window$Pelcro$user$r3;
30869
30878
 
@@ -30876,16 +30885,16 @@ const PaymentMethodSelectContainer = ({
30876
30885
  style: { ...style
30877
30886
  },
30878
30887
  className: `pelcro-container pelcro-payment-select-container ${className}`
30879
- }, /*#__PURE__*/React__default.createElement(Provider$4, {
30888
+ }, /*#__PURE__*/React__default.createElement(Provider$5, {
30880
30889
  value: {
30881
30890
  state,
30882
30891
  dispatch
30883
30892
  }
30884
30893
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
30885
- store: store$4,
30894
+ store: store$5,
30886
30895
  key: i
30887
30896
  })) : /*#__PURE__*/React__default.cloneElement(children, {
30888
- store: store$4
30897
+ store: store$5
30889
30898
  })));
30890
30899
  };
30891
30900
 
@@ -30899,7 +30908,7 @@ const PaymentMethodSelectList = () => {
30899
30908
  paymentMethods,
30900
30909
  selectedPaymentMethodId
30901
30910
  }
30902
- } = useContext(store$4);
30911
+ } = useContext(store$5);
30903
30912
 
30904
30913
  const handlePaymentMethodSelect = event => {
30905
30914
  dispatch({
@@ -30949,7 +30958,7 @@ const PaymentMethodSelectSubmit = ({
30949
30958
  selectedPaymentMethodId,
30950
30959
  isSubmitting
30951
30960
  }
30952
- } = useContext(store$4);
30961
+ } = useContext(store$5);
30953
30962
  return /*#__PURE__*/React__default.createElement(Button, Object.assign({
30954
30963
  onClick: () => {
30955
30964
  dispatch({
@@ -31035,23 +31044,234 @@ const PaymentMethodSelectModal = ({
31035
31044
  };
31036
31045
  PaymentMethodSelectModal.viewId = "payment-method-select";
31037
31046
 
31038
- function _extends$h() {
31039
- _extends$h = Object.assign || function (target) {
31040
- for (var i = 1; i < arguments.length; i++) {
31041
- var source = arguments[i];
31047
+ var _window$Pelcro$user$r, _window$Pelcro$user$r2;
31048
+ const initialState$4 = {
31049
+ isOpen: false,
31050
+ activeDashboardLink: null,
31051
+ subscriptions: window.Pelcro.subscription.list(),
31052
+ giftRecipients: (_window$Pelcro$user$r = (_window$Pelcro$user$r2 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r2 === void 0 ? void 0 : _window$Pelcro$user$r2.gift_recipients) !== null && _window$Pelcro$user$r !== void 0 ? _window$Pelcro$user$r : [],
31053
+ disableSubmit: false,
31054
+ addresses: []
31055
+ };
31056
+ const store$4 = /*#__PURE__*/createContext(initialState$4);
31057
+ const {
31058
+ Provider: Provider$4
31059
+ } = store$4;
31042
31060
 
31043
- for (var key in source) {
31044
- if (Object.prototype.hasOwnProperty.call(source, key)) {
31045
- target[key] = source[key];
31046
- }
31047
- }
31048
- }
31061
+ const DashboardContainer = ({
31062
+ onClose,
31063
+ style,
31064
+ className = "",
31065
+ children,
31066
+ ...props
31067
+ }) => {
31068
+ const {
31069
+ t
31070
+ } = useTranslation("dashboard");
31071
+ useEffect(() => {
31072
+ var _ReactGA$event;
31049
31073
 
31050
- return target;
31051
- };
31074
+ dispatch({
31075
+ type: SET_IS_OPEN,
31076
+ payload: true
31077
+ });
31078
+ window.Pelcro.insight.track("Modal Displayed", {
31079
+ name: "dashboard"
31080
+ });
31081
+ ReactGA === null || ReactGA === void 0 ? void 0 : (_ReactGA$event = ReactGA.event) === null || _ReactGA$event === void 0 ? void 0 : _ReactGA$event.call(ReactGA, {
31082
+ category: "VIEWS",
31083
+ action: "Dashboard Modal Viewed",
31084
+ nonInteraction: true
31085
+ });
31086
+ const {
31087
+ addresses
31088
+ } = window.Pelcro.user.read();
31089
+ if (addresses) dispatch({
31090
+ type: SET_ADDRESSES,
31091
+ payload: addresses
31092
+ });
31093
+ return () => {};
31094
+ }, []);
31095
+ /**
31096
+ *
31097
+ * @param {*} payload
31098
+ * @param {*} dispatch
31099
+ */
31052
31100
 
31053
- return _extends$h.apply(this, arguments);
31054
- }
31101
+ const cancelSubscription = ({
31102
+ subscription_id,
31103
+ onSuccess,
31104
+ onFailure
31105
+ }, dispatch) => {
31106
+ window.Pelcro.subscription.cancel({
31107
+ auth_token: window.Pelcro.user.read().auth_token,
31108
+ subscription_id: subscription_id
31109
+ }, (err, res) => {
31110
+ var _ReactGA$event2;
31111
+
31112
+ dispatch({
31113
+ type: SET_DISABLESUBMIT,
31114
+ payload: false
31115
+ });
31116
+
31117
+ if (err) {
31118
+ return onFailure === null || onFailure === void 0 ? void 0 : onFailure(err);
31119
+ }
31120
+
31121
+ ReactGA === null || ReactGA === void 0 ? void 0 : (_ReactGA$event2 = ReactGA.event) === null || _ReactGA$event2 === void 0 ? void 0 : _ReactGA$event2.call(ReactGA, {
31122
+ category: "ACTIONS",
31123
+ action: "Canceled",
31124
+ nonInteraction: true
31125
+ });
31126
+ onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess(res);
31127
+ });
31128
+ };
31129
+ /**
31130
+ *
31131
+ * @param {*} payload
31132
+ * @param {*} dispatch
31133
+ */
31134
+
31135
+
31136
+ const unSuspendSubscription = ({
31137
+ subscription_id,
31138
+ onSuccess,
31139
+ onFailure
31140
+ }, dispatch) => {
31141
+ window.Pelcro.subscription.update({
31142
+ auth_token: window.Pelcro.user.read().auth_token,
31143
+ subscription_id: subscription_id,
31144
+ suspend: 0
31145
+ }, (err, res) => {
31146
+ var _ReactGA$event3;
31147
+
31148
+ dispatch({
31149
+ type: SET_DISABLESUBMIT,
31150
+ payload: false
31151
+ });
31152
+
31153
+ if (err) {
31154
+ return onFailure === null || onFailure === void 0 ? void 0 : onFailure(err);
31155
+ }
31156
+
31157
+ ReactGA === null || ReactGA === void 0 ? void 0 : (_ReactGA$event3 = ReactGA.event) === null || _ReactGA$event3 === void 0 ? void 0 : _ReactGA$event3.call(ReactGA, {
31158
+ category: "ACTIONS",
31159
+ action: "UnSuspended",
31160
+ nonInteraction: true
31161
+ });
31162
+ onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess(res);
31163
+ });
31164
+ };
31165
+ /**
31166
+ *
31167
+ * @param {*} payload
31168
+ * @param {*} dispatch
31169
+ */
31170
+
31171
+
31172
+ const reactivateSubscription = ({
31173
+ subscription_id,
31174
+ onSuccess,
31175
+ onFailure
31176
+ }, dispatch) => {
31177
+ window.Pelcro.subscription.reactivate({
31178
+ auth_token: window.Pelcro.user.read().auth_token,
31179
+ subscription_id: subscription_id
31180
+ }, (err, res) => {
31181
+ dispatch({
31182
+ type: SET_DISABLESUBMIT,
31183
+ payload: false
31184
+ });
31185
+ onClose();
31186
+
31187
+ if (err) {
31188
+ onFailure === null || onFailure === void 0 ? void 0 : onFailure(err);
31189
+ return notify.error(t("messages.subReactivation.error"));
31190
+ }
31191
+
31192
+ onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess(res);
31193
+ return notify.success(t("messages.subReactivation.success"));
31194
+ });
31195
+ };
31196
+
31197
+ const [state, dispatch] = useReducerWithSideEffects((state, action) => {
31198
+ switch (action.type) {
31199
+ case SET_IS_OPEN:
31200
+ return lib_7({ ...state,
31201
+ isOpen: action.payload
31202
+ });
31203
+
31204
+ case CLOSE_DASHBOARD:
31205
+ return lib_7({ ...state,
31206
+ isOpen: false,
31207
+ activeDashboardLink: null
31208
+ });
31209
+
31210
+ case SET_ACTIVE_DASHBOARD_LINK:
31211
+ return lib_7({ ...state,
31212
+ activeDashboardLink: action.payload
31213
+ });
31214
+
31215
+ case SET_DISABLESUBMIT:
31216
+ {
31217
+ return lib_7({ ...state,
31218
+ disableSubmit: action.payload
31219
+ });
31220
+ }
31221
+
31222
+ case CANCEL_SUBSCRIPTION:
31223
+ return lib_5({ ...state,
31224
+ disableSubmit: true
31225
+ }, (state, dispatch) => cancelSubscription(action.payload, dispatch));
31226
+
31227
+ case UNSUSPEND_SUBSCRIPTION:
31228
+ return lib_5({ ...state,
31229
+ disableSubmit: true
31230
+ }, (state, dispatch) => unSuspendSubscription(action.payload, dispatch));
31231
+
31232
+ case REACTIVATE_SUBSCRIPTION:
31233
+ return lib_5({ ...state,
31234
+ disableSubmit: true
31235
+ }, (state, dispatch) => reactivateSubscription(action.payload, dispatch));
31236
+
31237
+ default:
31238
+ return state;
31239
+ }
31240
+ }, initialState$4);
31241
+ return /*#__PURE__*/React__default.createElement("div", {
31242
+ style: { ...style
31243
+ },
31244
+ className: `pelcro-container pelcro-dashboard-container ${className}`
31245
+ }, /*#__PURE__*/React__default.createElement(Provider$4, {
31246
+ value: {
31247
+ state,
31248
+ dispatch
31249
+ }
31250
+ }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
31251
+ store: store$4,
31252
+ key: i
31253
+ })) : /*#__PURE__*/React__default.cloneElement(children, {
31254
+ store: store$4
31255
+ })));
31256
+ };
31257
+
31258
+ function _extends$h() {
31259
+ _extends$h = Object.assign || function (target) {
31260
+ for (var i = 1; i < arguments.length; i++) {
31261
+ var source = arguments[i];
31262
+
31263
+ for (var key in source) {
31264
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
31265
+ target[key] = source[key];
31266
+ }
31267
+ }
31268
+ }
31269
+
31270
+ return target;
31271
+ };
31272
+
31273
+ return _extends$h.apply(this, arguments);
31274
+ }
31055
31275
 
31056
31276
  function _objectWithoutPropertiesLoose(source, excluded) {
31057
31277
  if (source == null) return {};
@@ -32564,6 +32784,14 @@ const SubscriptionsMenu = props => {
32564
32784
  const {
32565
32785
  t
32566
32786
  } = useTranslation("dashboard");
32787
+ const {
32788
+ switchView
32789
+ } = usePelcro();
32790
+
32791
+ const displayRedeem = () => {
32792
+ return switchView("gift-redeem");
32793
+ };
32794
+
32567
32795
  return /*#__PURE__*/React__default.createElement(Card, {
32568
32796
  id: "pelcro-dashboard-subscriptions-menu",
32569
32797
  className: "plc-max-w-100% md:plc-max-w-80% plc-m-auto",
@@ -32602,22 +32830,23 @@ const SubscriptionsMenu = props => {
32602
32830
  className: "plc-w-4 plc-h-4 plc-mr-1"
32603
32831
  }),
32604
32832
  className: "plc-w-full plc-h-8 plc-font-semibold plc-tracking-wider plc-text-gray-900 plc-uppercase plc-rounded-none hover:plc-bg-gray-100",
32605
- onClick: props.displayRedeem
32833
+ onClick: displayRedeem
32606
32834
  }, t("labels.redeemGift")))))));
32607
32835
  };
32608
32836
  const SubscriptionsItems = ({
32609
32837
  onClose,
32610
- cancelSubscription,
32611
- unSuspendSubscription,
32612
- reactivateSubscription,
32613
32838
  setProductAndPlan,
32614
32839
  setSubscriptionIdToRenew,
32615
- setView,
32616
32840
  getSubscriptionStatus,
32617
- disableSubmit,
32618
32841
  activeMenu,
32619
32842
  toggleActiveMenu
32620
32843
  }) => {
32844
+ const {
32845
+ state: {
32846
+ disableSubmit
32847
+ },
32848
+ dispatch
32849
+ } = useContext(store$4);
32621
32850
  const {
32622
32851
  t
32623
32852
  } = useTranslation("dashboard");
@@ -32649,7 +32878,14 @@ const SubscriptionsItems = ({
32649
32878
  switchView(null);
32650
32879
  onClose === null || onClose === void 0 ? void 0 : onClose();
32651
32880
  notify.confirm((onSuccess, onFailure) => {
32652
- cancelSubscription(sub.id, onSuccess, onFailure);
32881
+ dispatch({
32882
+ type: CANCEL_SUBSCRIPTION,
32883
+ payload: {
32884
+ subscription_id: sub.id,
32885
+ onSuccess,
32886
+ onFailure
32887
+ }
32888
+ });
32653
32889
  }, {
32654
32890
  confirmMessage: t("messages.subCancellation.isSureToCancel"),
32655
32891
  loadingMessage: t("messages.subCancellation.loading"),
@@ -32666,7 +32902,12 @@ const SubscriptionsItems = ({
32666
32902
  return switchView("email-verify");
32667
32903
  }
32668
32904
 
32669
- reactivateSubscription(sub.id);
32905
+ dispatch({
32906
+ type: REACTIVATE_SUBSCRIPTION,
32907
+ payload: {
32908
+ subscription_id: sub.id
32909
+ }
32910
+ });
32670
32911
  }; // Renew click
32671
32912
 
32672
32913
 
@@ -32677,7 +32918,7 @@ const SubscriptionsItems = ({
32677
32918
  const plan = window.Pelcro.plan.getById(plan_id);
32678
32919
  setProductAndPlan(product, plan);
32679
32920
  setSubscriptionIdToRenew(sub.id);
32680
- setView("plan-select");
32921
+ switchView("plan-select");
32681
32922
  }; // Manage members click
32682
32923
 
32683
32924
 
@@ -32686,7 +32927,7 @@ const SubscriptionsItems = ({
32686
32927
  set({
32687
32928
  subscriptionToManageMembers
32688
32929
  });
32689
- setView("manage-members");
32930
+ switchView("manage-members");
32690
32931
  }; // Suspend click
32691
32932
 
32692
32933
 
@@ -32696,7 +32937,7 @@ const SubscriptionsItems = ({
32696
32937
  }
32697
32938
 
32698
32939
  setSubscriptionToSuspend(sub.id);
32699
- return setView("subscription-suspend");
32940
+ return switchView("subscription-suspend");
32700
32941
  }; // UnSuspend click
32701
32942
 
32702
32943
 
@@ -32707,7 +32948,14 @@ const SubscriptionsItems = ({
32707
32948
 
32708
32949
  onClose === null || onClose === void 0 ? void 0 : onClose();
32709
32950
  notify.confirm((onSuccess, onFailure) => {
32710
- unSuspendSubscription(sub.id, onSuccess, onFailure);
32951
+ dispatch({
32952
+ type: UNSUSPEND_SUBSCRIPTION,
32953
+ payload: {
32954
+ subscription_id: sub.id,
32955
+ onSuccess,
32956
+ onFailure
32957
+ }
32958
+ });
32711
32959
  }, {
32712
32960
  confirmMessage: t("messages.subUnSuspend.isSureToUnSuspend"),
32713
32961
  loadingMessage: t("messages.subUnSuspend.loading"),
@@ -33038,9 +33286,6 @@ const OrderItems = ({
33038
33286
  };
33039
33287
 
33040
33288
  const DonationsMenu = ({
33041
- reactivateSubscription,
33042
- disableSubmit,
33043
- cancelSubscription,
33044
33289
  getSubscriptionStatus,
33045
33290
  onClose
33046
33291
  }) => {
@@ -33051,6 +33296,12 @@ const DonationsMenu = ({
33051
33296
  switchView,
33052
33297
  setSubscriptionToCancel
33053
33298
  } = usePelcro();
33299
+ const {
33300
+ state: {
33301
+ disableSubmit
33302
+ },
33303
+ dispatch
33304
+ } = useContext(store$4);
33054
33305
  const subscriptions = getDonationSubs().sort((a, b) => a.expires_at - b.expires_at).sort((a, b) => a.renews_at - b.renews_at).map(sub => {
33055
33306
  // Cancel button click handlers
33056
33307
  const onCancelClick = () => {
@@ -33068,7 +33319,14 @@ const DonationsMenu = ({
33068
33319
  switchView(null);
33069
33320
  onClose === null || onClose === void 0 ? void 0 : onClose();
33070
33321
  notify.confirm((onSuccess, onFailure) => {
33071
- cancelSubscription(sub.id, onSuccess, onFailure);
33322
+ dispatch({
33323
+ type: CANCEL_SUBSCRIPTION,
33324
+ payload: {
33325
+ subscription_id: sub.id,
33326
+ onSuccess,
33327
+ onFailure
33328
+ }
33329
+ });
33072
33330
  }, {
33073
33331
  confirmMessage: t("messages.subCancellation.isSureToCancel"),
33074
33332
  loadingMessage: t("messages.subCancellation.loading"),
@@ -33085,7 +33343,12 @@ const DonationsMenu = ({
33085
33343
  return switchView("email-verify");
33086
33344
  }
33087
33345
 
33088
- reactivateSubscription(sub.id);
33346
+ dispatch({
33347
+ type: REACTIVATE_SUBSCRIPTION,
33348
+ payload: {
33349
+ subscription_id: sub.id
33350
+ }
33351
+ });
33089
33352
  };
33090
33353
 
33091
33354
  return /*#__PURE__*/React__default.createElement("tr", {
@@ -33452,8 +33715,16 @@ const GiftsMenu = props => {
33452
33715
  const {
33453
33716
  t
33454
33717
  } = useTranslation("dashboard");
33718
+ const {
33719
+ switchView,
33720
+ set
33721
+ } = usePelcro();
33455
33722
  const giftRecipients = (_window$Pelcro$user$r = (_window$Pelcro$user$r2 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r2 === void 0 ? void 0 : _window$Pelcro$user$r2.gift_recipients) !== null && _window$Pelcro$user$r !== void 0 ? _window$Pelcro$user$r : [];
33456
33723
 
33724
+ const setIsRenewingGift = isRenewingGift => set({
33725
+ isRenewingGift
33726
+ });
33727
+
33457
33728
  const renderGiftRecipients = ({
33458
33729
  disableSubmit
33459
33730
  }) => {
@@ -33470,8 +33741,8 @@ const GiftsMenu = props => {
33470
33741
  const plan = window.Pelcro.plan.getById(planId);
33471
33742
  props === null || props === void 0 ? void 0 : props.setProductAndPlan(product, plan);
33472
33743
  props === null || props === void 0 ? void 0 : props.setSubscriptionIdToRenew(recipient.id);
33473
- props === null || props === void 0 ? void 0 : props.setIsRenewingGift(true);
33474
- props === null || props === void 0 ? void 0 : props.setView("plan-select");
33744
+ setIsRenewingGift(true);
33745
+ switchView("plan-select");
33475
33746
  };
33476
33747
 
33477
33748
  return /*#__PURE__*/React__default.createElement("tr", {
@@ -33540,11 +33811,28 @@ const AddressesMenu = props => {
33540
33811
  const {
33541
33812
  t
33542
33813
  } = useTranslation("dashboard");
33814
+ const {
33815
+ switchView,
33816
+ set
33817
+ } = usePelcro();
33543
33818
  const [requestStates, setRequestStates] = useState({
33544
33819
  loading: false,
33545
33820
  success: false,
33546
33821
  failed: false
33547
33822
  });
33823
+
33824
+ const displayAddressCreate = () => {
33825
+ return switchView("address-create");
33826
+ };
33827
+
33828
+ const displayAddressEdit = e => {
33829
+ const address = e.currentTarget.dataset.key;
33830
+ set({
33831
+ addressIdToEdit: address
33832
+ });
33833
+ return switchView("address-edit");
33834
+ };
33835
+
33548
33836
  return /*#__PURE__*/React__default.createElement(Card, {
33549
33837
  id: "pelcro-dashboard-addresses-menu",
33550
33838
  className: "plc-max-w-100% md:plc-max-w-80% plc-m-auto",
@@ -33553,10 +33841,10 @@ const AddressesMenu = props => {
33553
33841
  }, /*#__PURE__*/React__default.createElement(AddressesItems, {
33554
33842
  requestStates: requestStates,
33555
33843
  setRequestStates: setRequestStates,
33556
- displayAddressEdit: props === null || props === void 0 ? void 0 : props.displayAddressEdit
33844
+ displayAddressEdit: displayAddressEdit
33557
33845
  }), /*#__PURE__*/React__default.createElement(AddNew, {
33558
33846
  title: t("labels.addAddress"),
33559
- onClick: () => props === null || props === void 0 ? void 0 : props.displayAddressCreate()
33847
+ onClick: displayAddressCreate
33560
33848
  }));
33561
33849
  };
33562
33850
 
@@ -33653,22 +33941,54 @@ const getPaymentCardIcon = name => {
33653
33941
  d: "M3 10h18M7 15h1m4 0h1m-7 4h12a3 3 0 003-3V8a3 3 0 00-3-3H6a3 3 0 00-3 3v8a3 3 0 003 3z"
33654
33942
  }));
33655
33943
  };
33944
+ const hasInvoices = () => {
33945
+ var _window$Pelcro$invoic, _window$Pelcro$invoic2;
33946
+
33947
+ const invoices = (_window$Pelcro$invoic = (_window$Pelcro$invoic2 = window.Pelcro.invoice.list()) === null || _window$Pelcro$invoic2 === void 0 ? void 0 : _window$Pelcro$invoic2.filter(invoice => invoice.total > 0)) !== null && _window$Pelcro$invoic !== void 0 ? _window$Pelcro$invoic : [];
33948
+ return invoices.length > 0;
33949
+ };
33950
+ const showNewsletters = () => {
33951
+ var _ref, _window$Pelcro, _window$Pelcro$uiSett, _window$Pelcro$uiSett2;
33952
+
33953
+ const showNewslettersUiSettings = (_ref = ((_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$uiSett2 = _window$Pelcro$uiSett.newsletters) === null || _window$Pelcro$uiSett2 === void 0 ? void 0 : _window$Pelcro$uiSett2.length) > 0) !== null && _ref !== void 0 ? _ref : false;
33954
+ return showNewslettersUiSettings;
33955
+ };
33956
+ const hasDonationSubs = () => {
33957
+ var _window$Pelcro$subscr, _window$Pelcro$subscr2, _window$Pelcro$subscr3, _window$Pelcro$user$r, _window$Pelcro$user$r2;
33958
+
33959
+ 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 : [];
33960
+ 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 : [];
33961
+ return donations.length > 0 || canceledDonations.length > 0;
33962
+ };
33963
+ const hasActiveMemberships = () => {
33964
+ var _window$Pelcro$user$r3, _window$Pelcro$user$r4;
33965
+
33966
+ return (_window$Pelcro$user$r3 = (_window$Pelcro$user$r4 = window.Pelcro.user.read().memberships) === null || _window$Pelcro$user$r4 === void 0 ? void 0 : _window$Pelcro$user$r4.some(membership => membership.status === "active" && membership.subscription.ended_at === null)) !== null && _window$Pelcro$user$r3 !== void 0 ? _window$Pelcro$user$r3 : false;
33967
+ };
33656
33968
 
33657
33969
  const PaymentCardsMenu = props => {
33658
33970
  const {
33659
33971
  t
33660
33972
  } = useTranslation("dashboard");
33973
+ const {
33974
+ switchView
33975
+ } = usePelcro();
33661
33976
  const source = window.Pelcro.user.read().source;
33977
+
33978
+ const displaySourceCreate = () => {
33979
+ return switchView("payment-method-update");
33980
+ };
33981
+
33662
33982
  return /*#__PURE__*/React__default.createElement(Card, {
33663
33983
  id: "pelcro-dashboard-payment-menu",
33664
33984
  className: "plc-max-w-100% md:plc-max-w-80% plc-m-auto",
33665
33985
  title: t("labels.paymentSource")
33666
33986
  }, source ? /*#__PURE__*/React__default.createElement(PaymentCardsItems, {
33667
- displaySourceCreate: props === null || props === void 0 ? void 0 : props.displaySourceCreate,
33987
+ displaySourceCreate: displaySourceCreate,
33668
33988
  source: source
33669
33989
  }) : /*#__PURE__*/React__default.createElement(AddNew, {
33670
33990
  title: t("labels.addCard"),
33671
- onClick: () => props === null || props === void 0 ? void 0 : props.displaySourceCreate()
33991
+ onClick: displaySourceCreate
33672
33992
  }));
33673
33993
  };
33674
33994
 
@@ -35301,625 +35621,399 @@ const SUB_MENUS = {
35301
35621
  LOGOUT: "logout",
35302
35622
  SAVED_ITEMS: "saved-items"
35303
35623
  };
35304
- /**
35305
- *
35306
- */
35307
-
35308
- function DashboardWithHook(props) {
35309
- React__default.useEffect(() => {
35310
- var _props$onDisplay;
35624
+ const DashboardContent = props => {
35625
+ var _window$Pelcro$user$r, _window$Pelcro, _window$Pelcro$uiSett;
35311
35626
 
35312
- (_props$onDisplay = props.onDisplay) === null || _props$onDisplay === void 0 ? void 0 : _props$onDisplay.call(props);
35313
- }, []);
35627
+ const {
35628
+ state: {
35629
+ isOpen,
35630
+ activeDashboardLink,
35631
+ disableSubmit
35632
+ },
35633
+ dispatch
35634
+ } = useContext(store$4);
35314
35635
  const {
35315
35636
  switchView,
35316
- resetView,
35317
- logout,
35318
- set
35637
+ set,
35638
+ logout
35319
35639
  } = usePelcro();
35320
- return /*#__PURE__*/React__default.createElement(DashboardWithTrans, {
35321
- setAddress: addressIdToEdit => set({
35322
- addressIdToEdit
35323
- }),
35324
- setSubscriptionIdToRenew: subscriptionIdToRenew => set({
35325
- subscriptionIdToRenew
35326
- }),
35327
- setIsRenewingGift: isRenewingGift => set({
35328
- isRenewingGift
35329
- }),
35330
- onClose: () => {
35331
- var _props$onClose;
35640
+ const {
35641
+ t
35642
+ } = useTranslation("dashboard");
35643
+ const menuRef = useRef(null);
35644
+ const user = window.Pelcro.user.read();
35645
+ const userHasName = user.first_name || user.last_name;
35646
+ const profilePicture = (_window$Pelcro$user$r = window.Pelcro.user.read().profile_photo) !== null && _window$Pelcro$user$r !== void 0 ? _window$Pelcro$user$r : userSolidIcon;
35647
+ const newsletters = (_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.newsletters;
35648
+ Array.isArray(newsletters) && newsletters.length > 0;
35332
35649
 
35333
- (_props$onClose = props.onClose) === null || _props$onClose === void 0 ? void 0 : _props$onClose.call(props);
35334
- resetView();
35335
- },
35336
- logout: logout,
35337
- setView: switchView,
35338
- setProductAndPlan: (product, plan, isGift) => set({
35339
- product,
35340
- plan,
35341
- isGift
35342
- })
35343
- });
35344
- }
35345
- DashboardWithHook.viewId = "dashboard";
35650
+ const initializeHideMenuHandler = () => {
35651
+ document.addEventListener("click", hideMenuIfClickedOutside);
35652
+ };
35346
35653
 
35347
- class Dashboard extends Component {
35348
- constructor(props) {
35349
- var _window$Pelcro$user$r, _window$Pelcro$user$r2;
35654
+ const hideMenuIfClickedOutside = event => {
35655
+ const dashboardSubmenus = document.getElementById("pelcro-view-dashboard-submenus");
35656
+ const didClickOutsideMenu = isOpen && menuRef.current && !menuRef.current.contains(event.target) && !(dashboardSubmenus !== null && dashboardSubmenus !== void 0 && dashboardSubmenus.contains(event.target));
35350
35657
 
35351
- super(props);
35658
+ if (didClickOutsideMenu) {
35659
+ dispatch({
35660
+ type: CLOSE_DASHBOARD
35661
+ });
35662
+ }
35663
+ };
35352
35664
 
35353
- _defineProperty$3(this, "componentDidMount", () => {
35354
- var _ReactGA$event;
35665
+ const setActiveDashboardLink = submenuName => {
35666
+ dispatch({
35667
+ type: SET_ACTIVE_DASHBOARD_LINK,
35668
+ payload: submenuName !== null && submenuName !== void 0 ? submenuName : null
35669
+ });
35670
+ };
35355
35671
 
35356
- this.setState({
35357
- isOpen: true
35358
- });
35359
- window.Pelcro.insight.track("Modal Displayed", {
35360
- name: "dashboard"
35361
- });
35362
- ReactGA === null || ReactGA === void 0 ? void 0 : (_ReactGA$event = ReactGA.event) === null || _ReactGA$event === void 0 ? void 0 : _ReactGA$event.call(ReactGA, {
35363
- category: "VIEWS",
35364
- action: "Dashboard Modal Viewed",
35365
- nonInteraction: true
35366
- });
35367
- const {
35368
- addresses
35369
- } = window.Pelcro.user.read();
35370
- if (addresses) this.setState({
35371
- addresses: addresses
35372
- });
35373
- });
35374
-
35375
- _defineProperty$3(this, "componentWillUnmount", () => {
35376
- document.removeEventListener("click", this.hideMenuIfClickedOutside);
35377
- });
35378
-
35379
- _defineProperty$3(this, "initializeHideMenuHandler", () => {
35380
- document.addEventListener("click", this.hideMenuIfClickedOutside);
35381
- });
35382
-
35383
- _defineProperty$3(this, "hideMenuIfClickedOutside", event => {
35384
- const dashboardSubmenus = document.getElementById("pelcro-view-dashboard-submenus");
35385
- const didClickOutsideMenu = this.state.isOpen && this.menuRef.current && !this.menuRef.current.contains(event.target) && !(dashboardSubmenus !== null && dashboardSubmenus !== void 0 && dashboardSubmenus.contains(event.target));
35386
-
35387
- if (didClickOutsideMenu) {
35388
- this.setState({
35389
- isOpen: false,
35390
- activeDashboardLink: null
35391
- });
35392
- }
35393
- });
35394
-
35395
- _defineProperty$3(this, "setActiveDashboardLink", submenuName => {
35396
- this.setState({
35397
- activeDashboardLink: submenuName !== null && submenuName !== void 0 ? submenuName : null
35398
- });
35399
- });
35400
-
35401
- _defineProperty$3(this, "cancelSubscription", (subscription_id, onSuccess, onFailure) => {
35402
- // disable the Login button to prevent repeated clicks
35403
- window.Pelcro.subscription.cancel({
35404
- auth_token: window.Pelcro.user.read().auth_token,
35405
- subscription_id: subscription_id
35406
- }, (err, res) => {
35407
- var _ReactGA$event2;
35408
-
35409
- if (err) {
35410
- return onFailure === null || onFailure === void 0 ? void 0 : onFailure(err);
35411
- }
35412
-
35413
- ReactGA === null || ReactGA === void 0 ? void 0 : (_ReactGA$event2 = ReactGA.event) === null || _ReactGA$event2 === void 0 ? void 0 : _ReactGA$event2.call(ReactGA, {
35414
- category: "ACTIONS",
35415
- action: "Canceled",
35416
- nonInteraction: true
35417
- });
35418
- onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess(res);
35419
- });
35420
- });
35421
-
35422
- _defineProperty$3(this, "unSuspendSubscription", (subscription_id, onSuccess, onFailure) => {
35423
- window.Pelcro.subscription.update({
35424
- auth_token: window.Pelcro.user.read().auth_token,
35425
- subscription_id: subscription_id,
35426
- suspend: 0
35427
- }, (err, res) => {
35428
- var _ReactGA$event3;
35429
-
35430
- if (err) {
35431
- return onFailure === null || onFailure === void 0 ? void 0 : onFailure(err);
35432
- }
35433
-
35434
- ReactGA === null || ReactGA === void 0 ? void 0 : (_ReactGA$event3 = ReactGA.event) === null || _ReactGA$event3 === void 0 ? void 0 : _ReactGA$event3.call(ReactGA, {
35435
- category: "ACTIONS",
35436
- action: "UnSuspended",
35437
- nonInteraction: true
35438
- });
35439
- onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess(res);
35440
- });
35441
- });
35442
-
35443
- _defineProperty$3(this, "displayRedeem", () => {
35444
- return this.props.setView("gift-redeem");
35445
- });
35446
-
35447
- _defineProperty$3(this, "displaySourceCreate", () => {
35448
- return this.props.setView("payment-method-update");
35449
- });
35450
-
35451
- _defineProperty$3(this, "displayUserEdit", () => {
35452
- return this.props.setView("user-edit");
35453
- });
35454
-
35455
- _defineProperty$3(this, "displayChangePassword", () => {
35456
- return this.props.setView("password-change");
35457
- });
35458
-
35459
- _defineProperty$3(this, "displayNewsletterUpdate", () => {
35460
- return this.props.setView("newsletter-update");
35461
- });
35462
-
35463
- _defineProperty$3(this, "displayQRCode", () => {
35464
- return this.props.setView("qrcode");
35465
- });
35672
+ const displayProfilePicChange = () => {
35673
+ return switchView("profile-picture");
35674
+ };
35466
35675
 
35467
- _defineProperty$3(this, "displayProductSelect", ({
35676
+ const setProductAndPlan = (product, plan, isGift) => {
35677
+ set({
35678
+ product,
35679
+ plan,
35468
35680
  isGift
35469
- }) => {
35470
- if (isGift) {
35471
- this.props.setProductAndPlan(null, null, true);
35472
- }
35473
-
35474
- return this.props.setView("plan-select");
35475
- });
35476
-
35477
- _defineProperty$3(this, "displayAddressCreate", () => {
35478
- return this.props.setView("address-create");
35479
35681
  });
35682
+ };
35480
35683
 
35481
- _defineProperty$3(this, "displayAddressEdit", e => {
35482
- const address = e.currentTarget.dataset.key;
35483
- this.props.setAddress(address);
35484
- return this.props.setView("address-edit");
35485
- });
35684
+ const displayProductSelect = ({
35685
+ isGift
35686
+ }) => {
35687
+ if (isGift) {
35688
+ setProductAndPlan(null, null, true);
35689
+ }
35486
35690
 
35487
- _defineProperty$3(this, "displayProfilePicChange", () => {
35488
- return this.props.setView("profile-picture");
35489
- });
35691
+ return switchView("plan-select");
35692
+ };
35490
35693
 
35491
- _defineProperty$3(this, "getSubscriptionStatusText", subscription => {
35492
- if (subscription.status === "canceled") {
35493
- const cancelDate = new Date(subscription.canceled_at);
35494
- const formattedCancelDate = new Intl.DateTimeFormat("en-CA").format(cancelDate);
35495
- return `${this.locale("labels.canceledOn")} ${formattedCancelDate}`;
35496
- }
35694
+ const getSubscriptionStatusText = subscription => {
35695
+ if (subscription.status === "canceled") {
35696
+ const cancelDate = new Date(subscription.canceled_at);
35697
+ const formattedCancelDate = new Intl.DateTimeFormat("en-CA").format(cancelDate);
35698
+ return `${t("labels.canceledOn")} ${formattedCancelDate}`;
35699
+ }
35497
35700
 
35498
- if (subscription.status === "incomplete") {
35499
- return `${this.locale("labels.status.incomplete")}`;
35500
- }
35701
+ if (subscription.status === "incomplete") {
35702
+ return `${t("labels.status.incomplete")}`;
35703
+ }
35501
35704
 
35502
- if (subscription.status === "extended") {
35503
- // DateTime from BE is missing 3 zeros so we add them before instancing a date
35504
- const expiryDate = new Date(Number(`${subscription.end_date}000`));
35505
- const formattedExpiryDate = new Intl.DateTimeFormat("en-CA").format(expiryDate);
35506
- return `${this.locale("labels.until")} ${formattedExpiryDate}`;
35507
- }
35705
+ if (subscription.status === "extended") {
35706
+ // DateTime from BE is missing 3 zeros so we add them before instancing a date
35707
+ const expiryDate = new Date(Number(`${subscription.end_date}000`));
35708
+ const formattedExpiryDate = new Intl.DateTimeFormat("en-CA").format(expiryDate);
35709
+ return `${t("labels.until")} ${formattedExpiryDate}`;
35710
+ }
35508
35711
 
35509
- if (subscription.cancel_at_period_end) {
35510
- // DateTime from BE is missing 3 zeros so we add them before instancing a date
35511
- const expiryDate = new Date(Number(`${subscription.expires_at}000`));
35512
- const formattedExpiryDate = new Intl.DateTimeFormat("en-CA").format(expiryDate);
35513
- return `${this.locale("labels.expiresOn")} ${formattedExpiryDate}`;
35514
- }
35712
+ if (subscription.cancel_at_period_end) {
35713
+ // DateTime from BE is missing 3 zeros so we add them before instancing a date
35714
+ const expiryDate = new Date(Number(`${subscription.expires_at}000`));
35715
+ const formattedExpiryDate = new Intl.DateTimeFormat("en-CA").format(expiryDate);
35716
+ return `${t("labels.expiresOn")} ${formattedExpiryDate}`;
35717
+ }
35515
35718
 
35516
- const renewDate = new Date(Number(`${subscription.renews_at}000`));
35517
- const formattedRenewDate = new Intl.DateTimeFormat("en-CA").format(renewDate);
35518
- return `${this.locale("labels.renewsOn")} ${formattedRenewDate}`;
35519
- });
35719
+ const renewDate = new Date(Number(`${subscription.renews_at}000`));
35720
+ const formattedRenewDate = new Intl.DateTimeFormat("en-CA").format(renewDate);
35721
+ return `${t("labels.renewsOn")} ${formattedRenewDate}`;
35722
+ };
35520
35723
 
35521
- _defineProperty$3(this, "reactivateSubscription", subscription_id => {
35522
- // disable the Login button to prevent repeated clicks
35523
- this.setState({
35524
- disableSubmit: true
35525
- });
35526
- window.Pelcro.subscription.reactivate({
35527
- auth_token: window.Pelcro.user.read().auth_token,
35528
- subscription_id: subscription_id
35529
- }, (err, res) => {
35530
- this.setState({
35531
- disableSubmit: false
35532
- });
35533
- this.props.onClose();
35724
+ const getSubscriptionStatus = sub => {
35725
+ const isSubscriptionEndingSoon = sub => {
35726
+ const weekFromNow = new Date().getTime() + 7 * 24 * 60 * 60 * 1000;
35727
+ const endingAt = new Date(sub.expires_at * 1000).getTime();
35728
+ return weekFromNow > endingAt && sub.cancel_at_period_end;
35729
+ };
35534
35730
 
35535
- if (err) {
35536
- return notify.error(this.locale("messages.subReactivation.error"));
35537
- }
35731
+ const isSubscriptionInTrial = sub => {
35732
+ if (!sub.trial_end) {
35733
+ return;
35734
+ }
35538
35735
 
35539
- return notify.success(this.locale("messages.subReactivation.success"));
35540
- });
35541
- });
35736
+ const now = new Date().getTime();
35737
+ const trialEndDate = new Date(sub.trial_end).getTime();
35738
+ return now < trialEndDate;
35739
+ };
35542
35740
 
35543
- _defineProperty$3(this, "getSubscriptionStatus", sub => {
35544
- const isSubscriptionEndingSoon = sub => {
35545
- const weekFromNow = new Date().getTime() + 7 * 24 * 60 * 60 * 1000;
35546
- const endingAt = new Date(sub.expires_at * 1000).getTime();
35547
- return weekFromNow > endingAt && sub.cancel_at_period_end;
35741
+ if (isSubscriptionEndingSoon(sub)) {
35742
+ return {
35743
+ title: t("labels.status.endingSoon"),
35744
+ content: getSubscriptionStatusText(sub),
35745
+ textColor: "plc-text-orange-700",
35746
+ bgColor: "plc-bg-orange-100",
35747
+ icon: /*#__PURE__*/React__default.createElement(SvgExclamation, null)
35548
35748
  };
35749
+ }
35549
35750
 
35550
- const isSubscriptionInTrial = sub => {
35551
- if (!sub.trial_end) {
35552
- return;
35553
- }
35554
-
35555
- const now = new Date().getTime();
35556
- const trialEndDate = new Date(sub.trial_end).getTime();
35557
- return now < trialEndDate;
35751
+ if (isSubscriptionInTrial(sub)) {
35752
+ return {
35753
+ title: t("labels.status.inTrial"),
35754
+ content: getSubscriptionStatusText(sub),
35755
+ textColor: "plc-text-yellow-700",
35756
+ bgColor: "plc-bg-yellow-100",
35757
+ icon: /*#__PURE__*/React__default.createElement(SvgCheckMark, null)
35558
35758
  };
35759
+ }
35559
35760
 
35560
- if (isSubscriptionEndingSoon(sub)) {
35561
- return {
35562
- title: this.locale("labels.status.endingSoon"),
35563
- content: this.getSubscriptionStatusText(sub),
35564
- textColor: "plc-text-orange-700",
35565
- bgColor: "plc-bg-orange-100",
35566
- icon: /*#__PURE__*/React__default.createElement(SvgExclamation, null)
35567
- };
35568
- }
35569
-
35570
- if (isSubscriptionInTrial(sub)) {
35571
- return {
35572
- title: this.locale("labels.status.inTrial"),
35573
- content: this.getSubscriptionStatusText(sub),
35574
- textColor: "plc-text-yellow-700",
35575
- bgColor: "plc-bg-yellow-100",
35576
- icon: /*#__PURE__*/React__default.createElement(SvgCheckMark, null)
35577
- };
35578
- }
35579
-
35580
- if (sub.status === "incomplete") {
35581
- return {
35582
- title: this.locale("labels.status.incomplete"),
35583
- content: this.getSubscriptionStatusText(sub),
35584
- textColor: "plc-text-orange-700",
35585
- bgColor: "plc-bg-orange-100",
35586
- icon: /*#__PURE__*/React__default.createElement(SvgExclamation, null)
35587
- };
35588
- }
35589
-
35590
- if (sub.status === "canceled") {
35591
- return {
35592
- title: this.locale("labels.status.canceled"),
35593
- content: this.getSubscriptionStatusText(sub),
35594
- textColor: "plc-text-red-700",
35595
- bgColor: "plc-bg-red-100",
35596
- icon: /*#__PURE__*/React__default.createElement(SvgExclamation, null)
35597
- };
35598
- }
35761
+ if (sub.status === "incomplete") {
35762
+ return {
35763
+ title: t("labels.status.incomplete"),
35764
+ content: getSubscriptionStatusText(sub),
35765
+ textColor: "plc-text-orange-700",
35766
+ bgColor: "plc-bg-orange-100",
35767
+ icon: /*#__PURE__*/React__default.createElement(SvgExclamation, null)
35768
+ };
35769
+ }
35599
35770
 
35771
+ if (sub.status === "canceled") {
35600
35772
  return {
35601
- title: this.locale("labels.status.active"),
35602
- content: this.getSubscriptionStatusText(sub),
35603
- textColor: "plc-text-green-700",
35604
- bgColor: "plc-bg-green-100",
35605
- icon: /*#__PURE__*/React__default.createElement(SvgCheckMark, null)
35773
+ title: t("labels.status.canceled"),
35774
+ content: getSubscriptionStatusText(sub),
35775
+ textColor: "plc-text-red-700",
35776
+ bgColor: "plc-bg-red-100",
35777
+ icon: /*#__PURE__*/React__default.createElement(SvgExclamation, null)
35606
35778
  };
35607
- });
35779
+ }
35608
35780
 
35609
- _defineProperty$3(this, "renderAddresses", () => {
35610
- const addresses = this.state.addresses && this.state.addresses.map((address, index) => {
35611
- return /*#__PURE__*/React__default.createElement("tr", {
35612
- key: "dashboard-address-" + address.id
35613
- }, /*#__PURE__*/React__default.createElement("td", {
35614
- className: "plc-pr-2 plc-text-gray-400 plc-truncate"
35615
- }, /*#__PURE__*/React__default.createElement("span", {
35616
- className: "plc-font-semibold plc-text-gray-600"
35617
- }, address.city ? `${address.city},` : null, " ", address.country), " ", /*#__PURE__*/React__default.createElement("span", {
35618
- title: address.line1
35619
- }, address.line1), /*#__PURE__*/React__default.createElement("div", {
35620
- className: "plc-flex plc-mb-2 plc-mt-1"
35621
- }, /*#__PURE__*/React__default.createElement("span", {
35622
- className: "plc-rounded-full plc-bg-gray-200 plc-text-black plc-inline-flex plc-items-start plc-py-1 plc-px-4 plc-text-sm plc-capitalize"
35623
- }, address.type === "shipping" ? this.locale("labels.shipping") : this.locale("labels.billing")), address.is_default && /*#__PURE__*/React__default.createElement("span", {
35624
- className: "plc-rounded-full plc-bg-gray-800 plc-text-white plc-inline-flex plc-items-start plc-py-1 plc-px-4 plc-text-sm plc-ml-2"
35625
- }, this.locale("labels.default")))), /*#__PURE__*/React__default.createElement("td", null, /*#__PURE__*/React__default.createElement(Button, {
35626
- variant: "icon",
35627
- className: "plc-text-gray-500",
35628
- icon: /*#__PURE__*/React__default.createElement(SvgEdit, null),
35629
- id: "pelcro-button-update-address-" + index,
35630
- "data-key": address.id,
35631
- onClick: this.displayAddressEdit
35632
- })));
35633
- });
35634
- return /*#__PURE__*/React__default.createElement("table", {
35635
- className: "plc-w-full plc-table-fixed"
35636
- }, /*#__PURE__*/React__default.createElement("thead", {
35637
- className: "plc-text-xs plc-font-semibold plc-tracking-wider plc-text-gray-400 plc-uppercase "
35638
- }, /*#__PURE__*/React__default.createElement("tr", null, /*#__PURE__*/React__default.createElement("th", {
35639
- className: "plc-w-10/12"
35640
- }, this.locale("labels.address")), /*#__PURE__*/React__default.createElement("th", {
35641
- className: "plc-w-2/12"
35642
- }, this.locale("labels.edit")))), /*#__PURE__*/React__default.createElement("tbody", null, /*#__PURE__*/React__default.createElement("tr", {
35643
- className: "plc-h-4"
35644
- }), addresses, /*#__PURE__*/React__default.createElement("tr", null, /*#__PURE__*/React__default.createElement("td", {
35645
- colSpan: "2",
35646
- className: "plc-p-1"
35647
- }, /*#__PURE__*/React__default.createElement(Button, {
35648
- variant: "ghost",
35649
- icon: /*#__PURE__*/React__default.createElement(SvgPlus, {
35650
- className: "plc-w-4 plc-mr-1"
35651
- }),
35652
- className: "plc-w-full plc-h-8 plc-font-semibold plc-tracking-wider plc-text-gray-900 plc-uppercase hover:plc-bg-gray-100",
35653
- onClick: this.displayAddressCreate
35654
- }, this.locale("labels.addAddress"))))));
35781
+ return {
35782
+ title: t("labels.status.active"),
35783
+ content: getSubscriptionStatusText(sub),
35784
+ textColor: "plc-text-green-700",
35785
+ bgColor: "plc-bg-green-100",
35786
+ icon: /*#__PURE__*/React__default.createElement(SvgCheckMark, null)
35787
+ };
35788
+ };
35789
+
35790
+ const setSubscriptionIdToRenew = subscriptionIdToRenew => {
35791
+ set({
35792
+ subscriptionIdToRenew
35655
35793
  });
35794
+ };
35656
35795
 
35657
- _defineProperty$3(this, "closeDashboard", () => {
35658
- this.setState({
35659
- isOpen: false,
35660
- activeDashboardLink: null
35661
- });
35796
+ const closeDashboard = () => {
35797
+ dispatch({
35798
+ type: CLOSE_DASHBOARD
35662
35799
  });
35800
+ };
35663
35801
 
35664
- this.state = {
35665
- isOpen: false,
35666
- activeDashboardLink: null,
35667
- subscriptions: window.Pelcro.subscription.list(),
35668
- giftRecipients: (_window$Pelcro$user$r = (_window$Pelcro$user$r2 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r2 === void 0 ? void 0 : _window$Pelcro$user$r2.gift_recipients) !== null && _window$Pelcro$user$r !== void 0 ? _window$Pelcro$user$r : [],
35669
- disableSubmit: false,
35670
- addresses: []
35802
+ useEffect(() => {
35803
+ return () => {
35804
+ document.removeEventListener("click", hideMenuIfClickedOutside);
35671
35805
  };
35672
- this.site = window.Pelcro.site.read();
35673
- this.locale = this.props.t;
35674
- this.user = window.Pelcro.user.read();
35675
- this.menuRef = /*#__PURE__*/React__default.createRef();
35676
- }
35677
-
35678
- render() {
35679
- var _window$Pelcro$user$r3, _window$Pelcro, _window$Pelcro$uiSett;
35680
-
35681
- const {
35682
- isOpen
35683
- } = this.state;
35684
- const userHasName = this.user.first_name || this.user.last_name;
35685
- const profilePicture = (_window$Pelcro$user$r3 = window.Pelcro.user.read().profile_photo) !== null && _window$Pelcro$user$r3 !== void 0 ? _window$Pelcro$user$r3 : userSolidIcon;
35686
- const newsletters = (_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.newsletters;
35687
- Array.isArray(newsletters) && newsletters.length > 0;
35688
- return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(Transition, {
35689
- className: "plc-fixed plc-inset-y-0 plc-left-0 plc-h-full lg:plc-w-3/12 plc-w-full plc-overflow-y-auto plc-text-left plc-bg-white plc-shadow-xl plc-z-max",
35690
- show: isOpen,
35691
- enter: "plc-transform plc-transition plc-duration-500",
35692
- enterFrom: "plc--translate-x-full",
35693
- enterTo: "plc-translate-x-0",
35694
- afterEnter: this.initializeHideMenuHandler,
35695
- leave: "plc-transform plc-transition plc-duration-500",
35696
- leaveFrom: "plc-translate-x-0",
35697
- leaveTo: "plc--translate-x-full",
35698
- afterLeave: this.props.onClose
35699
- }, /*#__PURE__*/React__default.createElement("div", {
35700
- id: "pelcro-view-dashboard",
35701
- ref: this.menuRef
35702
- }, /*#__PURE__*/React__default.createElement("header", {
35703
- className: "plc-bg-gray-200 plc-flex plc-py-5"
35704
- }, /*#__PURE__*/React__default.createElement("div", {
35705
- className: "plc-flex plc-items-center"
35706
- }, /*#__PURE__*/React__default.createElement("div", {
35707
- className: "plc-flex plc-justify-center plc-ml-3 sm:plc-ml-6 plc-flex-shrink-0"
35708
- }, /*#__PURE__*/React__default.createElement("div", {
35709
- className: "plc-relative plc-flex-shrink-0"
35710
- }, /*#__PURE__*/React__default.createElement("img", {
35711
- className: "pelcro-user-profile-picture plc-bg-gray-300 plc-cursor-pointer plc-h-10 plc-rounded-md plc-w-10",
35712
- src: profilePicture,
35713
- alt: "profile picture",
35714
- onClick: this.displayProfilePicChange
35715
- }))), /*#__PURE__*/React__default.createElement("div", {
35716
- className: "plc-flex plc-flex-col plc-justify-between plc-flex-grow plc-w-56 plc-ml-4 plc-break-words sm:plc-w-auto"
35717
- }, userHasName && /*#__PURE__*/React__default.createElement("p", {
35718
- className: "plc-font-bold plc-break-all"
35719
- }, this.user.first_name, " ", this.user.last_name), /*#__PURE__*/React__default.createElement("p", {
35720
- className: `plc-m-0 plc-text-sm plc-break-all ${userHasName ? "plc-text-sm" : "plc-text-lg plc-font-bold plc-mt-auto"}`
35721
- }, this.user.email)), /*#__PURE__*/React__default.createElement("div", {
35722
- className: "lg:plc-hidden"
35723
- }, /*#__PURE__*/React__default.createElement(Button, {
35724
- variant: "ghost",
35725
- type: "button",
35726
- className: "plc-text-gray-500 plc-rounded-2xl plc-absolute plc-z-max plc-top-5 plc-right-10",
35727
- onClick: this.closeDashboard
35728
- }, /*#__PURE__*/React__default.createElement(SvgXIcon, {
35729
- className: "plc-fill-current"
35730
- }))))), /*#__PURE__*/React__default.createElement("section", {
35731
- className: "plc-mt-6 plc-shadow-sm"
35732
- }, /*#__PURE__*/React__default.createElement("header", {
35733
- className: "plc-pl-4 plc-mb-2 sm:plc-pl-8"
35734
- }, /*#__PURE__*/React__default.createElement("p", {
35735
- className: "plc-font-bold plc-tracking-widest plc-text-gray-500"
35736
- }, this.locale("labels.mySettings"))), /*#__PURE__*/React__default.createElement(DashboardLink, {
35737
- name: SUB_MENUS.PROFILE,
35738
- icon: /*#__PURE__*/React__default.createElement(SvgUser, {
35739
- className: "plc-w-6 plc-h-6 plc-mr-2"
35740
- }),
35741
- title: this.locale("labels.profile"),
35742
- setActiveDashboardLink: this.setActiveDashboardLink,
35743
- activeDashboardLink: this.state.activeDashboardLink
35744
- }), /*#__PURE__*/React__default.createElement(DashboardLink, {
35745
- name: SUB_MENUS.QRCODE,
35746
- icon: /*#__PURE__*/React__default.createElement(SvgQrcode, {
35747
- className: "plc-w-6 plc-h-6 plc-mr-2"
35748
- }),
35749
- title: this.locale("labels.myQRCode"),
35750
- setActiveDashboardLink: this.setActiveDashboardLink,
35751
- activeDashboardLink: this.state.activeDashboardLink
35752
- }), /*#__PURE__*/React__default.createElement(DashboardLink, {
35753
- name: SUB_MENUS.PASSWORDCHANGE,
35754
- icon: /*#__PURE__*/React__default.createElement(SvgKey, {
35755
- className: "plc-w-6 plc-h-6 plc-mr-2"
35756
- }),
35757
- title: this.locale("labels.changePassword"),
35758
- setActiveDashboardLink: this.setActiveDashboardLink,
35759
- activeDashboardLink: this.state.activeDashboardLink
35760
- }), /*#__PURE__*/React__default.createElement(DashboardLink, {
35761
- name: SUB_MENUS.SAVED_ITEMS,
35762
- icon: /*#__PURE__*/React__default.createElement(SvgBookmark, null),
35763
- title: this.locale("labels.savedItems.label"),
35764
- setActiveDashboardLink: this.setActiveDashboardLink,
35765
- activeDashboardLink: this.state.activeDashboardLink
35766
- }), /*#__PURE__*/React__default.createElement("header", {
35767
- className: "plc-pl-4 plc-mb-2 sm:plc-pl-8"
35768
- }, /*#__PURE__*/React__default.createElement("p", {
35769
- className: "plc-font-bold plc-tracking-widest plc-text-gray-500"
35770
- }, this.locale("labels.accountSettings"))), /*#__PURE__*/React__default.createElement(DashboardLink, {
35771
- name: SUB_MENUS.PAYMENT_CARDS,
35772
- icon: /*#__PURE__*/React__default.createElement(SvgPaymentCard, null),
35773
- title: this.locale("labels.paymentSource"),
35774
- setActiveDashboardLink: this.setActiveDashboardLink,
35775
- activeDashboardLink: this.state.activeDashboardLink
35776
- }), /*#__PURE__*/React__default.createElement(DashboardLink, {
35777
- name: SUB_MENUS.ADDRESSES,
35778
- icon: /*#__PURE__*/React__default.createElement(SvgLocationPin, null),
35779
- title: this.locale("labels.addresses"),
35780
- setActiveDashboardLink: this.setActiveDashboardLink,
35781
- activeDashboardLink: this.state.activeDashboardLink
35782
- }), /*#__PURE__*/React__default.createElement("header", {
35783
- className: "plc-pl-4 plc-my-2 sm:plc-pl-8"
35784
- }, /*#__PURE__*/React__default.createElement("p", {
35785
- className: "plc-font-bold plc-tracking-widest plc-text-gray-500"
35786
- }, this.locale("labels.purchases"))), /*#__PURE__*/React__default.createElement(DashboardLink, {
35787
- name: SUB_MENUS.SUBSCRIPTIONS,
35788
- icon: /*#__PURE__*/React__default.createElement(SvgSubscription, {
35789
- className: "plc-w-10 plc-h-10 plc-pt-2 plc-pr-1 plc--ml-2"
35790
- }),
35791
- title: this.locale("labels.subscriptions"),
35792
- setActiveDashboardLink: this.setActiveDashboardLink,
35793
- activeDashboardLink: this.state.activeDashboardLink
35794
- }), /*#__PURE__*/React__default.createElement(DashboardLink, {
35795
- show: showNewsletters(),
35796
- name: SUB_MENUS.NEWSLETTERS,
35797
- icon: /*#__PURE__*/React__default.createElement(SvgNewsletter, {
35798
- className: "plc-transform plc--translate-x-1 plc-scale-105 plc-w-7 plc-h-8 plc-mr-1 plc-pt-1"
35799
- }),
35800
- title: this.locale("labels.Newsletters"),
35801
- setActiveDashboardLink: this.setActiveDashboardLink,
35802
- activeDashboardLink: this.state.activeDashboardLink
35803
- }), /*#__PURE__*/React__default.createElement(DashboardLink, {
35804
- show: hasActiveMemberships(),
35805
- name: SUB_MENUS.MEMBERSHIPS,
35806
- icon: /*#__PURE__*/React__default.createElement(SvgMemberships, {
35807
- className: "plc-transform plc-scale-120 plc-w-7 plc-h-8 plc-mr-1 plc-pt-1"
35808
- }),
35809
- title: this.locale("labels.memberships"),
35810
- setActiveDashboardLink: this.setActiveDashboardLink,
35811
- activeDashboardLink: this.state.activeDashboardLink
35812
- }), /*#__PURE__*/React__default.createElement(DashboardLink, {
35813
- show: hasDonationSubs(),
35814
- name: SUB_MENUS.DONATIONS,
35815
- icon: /*#__PURE__*/React__default.createElement(SvgDonate, {
35816
- className: "plc-transform plc-scale-120 plc-w-7 plc-h-8 plc-mr-1 plc-pt-1"
35817
- }),
35818
- title: this.locale("labels.donations"),
35819
- setActiveDashboardLink: this.setActiveDashboardLink,
35820
- activeDashboardLink: this.state.activeDashboardLink
35821
- }), /*#__PURE__*/React__default.createElement(DashboardLink, {
35822
- name: SUB_MENUS.GIFTS,
35823
- icon: /*#__PURE__*/React__default.createElement(SvgGift, null),
35824
- title: this.locale("labels.gifts"),
35825
- setActiveDashboardLink: this.setActiveDashboardLink,
35826
- activeDashboardLink: this.state.activeDashboardLink
35827
- }), /*#__PURE__*/React__default.createElement(DashboardLink, {
35828
- show: window.Pelcro.site.read().ecommerce_enabled,
35829
- name: SUB_MENUS.ORDERS,
35830
- icon: /*#__PURE__*/React__default.createElement(SvgShopping, null),
35831
- title: this.locale("labels.orders.label"),
35832
- setActiveDashboardLink: this.setActiveDashboardLink,
35833
- activeDashboardLink: this.state.activeDashboardLink
35834
- }), /*#__PURE__*/React__default.createElement(DashboardLink, {
35835
- show: hasInvoices(),
35836
- name: SUB_MENUS.INVOICES,
35837
- icon: /*#__PURE__*/React__default.createElement(SvgDocument, null),
35838
- title: this.locale("labels.invoices"),
35839
- setActiveDashboardLink: this.setActiveDashboardLink,
35840
- activeDashboardLink: this.state.activeDashboardLink
35841
- })), /*#__PURE__*/React__default.createElement(DashboardLink, {
35842
- name: SUB_MENUS.LOGOUT,
35843
- icon: /*#__PURE__*/React__default.createElement(SvgExit, null),
35844
- title: this.locale("labels.logout"),
35845
- setActiveDashboardLink: this.setActiveDashboardLink,
35846
- activeDashboardLink: this.state.activeDashboardLink
35847
- }))), this.state.activeDashboardLink && isOpen && /*#__PURE__*/React__default.createElement("div", {
35848
- id: "pelcro-view-dashboard-submenus",
35849
- className: "plc-fixed plc-inset-y-0 plc-right-0 plc-h-full lg:plc-w-9/12 plc-w-full plc-bg-gray-100 plc-z-max plc-overflow-auto"
35850
- }, this.state.activeDashboardLink === SUB_MENUS.PROFILE && /*#__PURE__*/React__default.createElement(ProfileMenu, null), this.state.activeDashboardLink === SUB_MENUS.QRCODE && /*#__PURE__*/React__default.createElement(QRCodeMenu, null), this.state.activeDashboardLink === SUB_MENUS.PASSWORDCHANGE && /*#__PURE__*/React__default.createElement(PasswordChangeMenu, null), this.state.activeDashboardLink === SUB_MENUS.SAVED_ITEMS && /*#__PURE__*/React__default.createElement(SavedItemsMenu, null), this.state.activeDashboardLink === SUB_MENUS.PAYMENT_CARDS && /*#__PURE__*/React__default.createElement(PaymentCardsMenu, {
35851
- displaySourceCreate: this.displaySourceCreate
35852
- }), this.state.activeDashboardLink === SUB_MENUS.ADDRESSES && /*#__PURE__*/React__default.createElement(AddressesMenu, {
35853
- displayAddressCreate: this.displayAddressCreate,
35854
- displayAddressEdit: this.displayAddressEdit
35855
- }), this.state.activeDashboardLink === SUB_MENUS.SUBSCRIPTIONS && /*#__PURE__*/React__default.createElement(SubscriptionsMenu // getSubscriptionStatus={this.getSubscriptionStatus}
35856
- , {
35857
- displayProductSelect: this.displayProductSelect,
35858
- displayRedeem: this.displayRedeem,
35859
- cancelSubscription: this.cancelSubscription,
35860
- unSuspendSubscription: this.unSuspendSubscription,
35861
- reactivateSubscription: this.reactivateSubscription,
35862
- setProductAndPlan: this.props.setProductAndPlan,
35863
- setSubscriptionIdToRenew: this.props.setSubscriptionIdToRenew,
35864
- setView: this.props.setView,
35865
- getSubscriptionStatus: this.getSubscriptionStatus,
35866
- disableSubmit: this.state.disableSubmit
35867
- }), this.state.activeDashboardLink === SUB_MENUS.MEMBERSHIPS && /*#__PURE__*/React__default.createElement(MembershipsMenu, {
35868
- getSubscriptionStatus: this.getSubscriptionStatus
35869
- }), this.state.activeDashboardLink === SUB_MENUS.NEWSLETTERS && /*#__PURE__*/React__default.createElement(NewslettersMenu, null), this.state.activeDashboardLink === SUB_MENUS.DONATIONS && /*#__PURE__*/React__default.createElement(DonationsMenu, {
35870
- cancelSubscription: this.cancelSubscription,
35871
- reactivateSubscription: this.reactivateSubscription,
35872
- disableSubmit: this.state.disableSubmit,
35873
- getSubscriptionStatus: this.getSubscriptionStatus
35874
- }), this.state.activeDashboardLink === SUB_MENUS.GIFTS && /*#__PURE__*/React__default.createElement(GiftsMenu, {
35875
- getSubscriptionStatus: this.getSubscriptionStatus,
35876
- displayProductSelect: this.displayProductSelect,
35877
- setProductAndPlan: this.props.setProductAndPlan,
35878
- setSubscriptionIdToRenew: this.props.setSubscriptionIdToRenew,
35879
- setIsRenewingGift: this.props.setIsRenewingGift,
35880
- setView: this.props.setView,
35881
- disableSubmit: this.state.disableSubmit
35882
- }), this.state.activeDashboardLink === SUB_MENUS.ORDERS && /*#__PURE__*/React__default.createElement(OrdersMenu, null), this.state.activeDashboardLink === SUB_MENUS.INVOICES && /*#__PURE__*/React__default.createElement(InvoicesMenu, null), this.state.activeDashboardLink === SUB_MENUS.LOGOUT && this.props.logout(), /*#__PURE__*/React__default.createElement(Button, {
35883
- variant: "ghost",
35884
- type: "button",
35885
- className: "plc-text-gray-500 plc-rounded-2xl plc-absolute plc-z-max plc-top-2 plc-right-2 md:plc-top-5 md:plc-right-10",
35886
- onClick: this.closeDashboard
35887
- }, /*#__PURE__*/React__default.createElement(SvgXIcon, {
35888
- className: "plc-fill-current"
35889
- }))));
35890
- }
35891
-
35892
- }
35893
-
35894
- function hasInvoices() {
35895
- var _window$Pelcro$invoic, _window$Pelcro$invoic2;
35896
-
35897
- const invoices = (_window$Pelcro$invoic = (_window$Pelcro$invoic2 = window.Pelcro.invoice.list()) === null || _window$Pelcro$invoic2 === void 0 ? void 0 : _window$Pelcro$invoic2.filter(invoice => invoice.total > 0)) !== null && _window$Pelcro$invoic !== void 0 ? _window$Pelcro$invoic : [];
35898
- return invoices.length > 0;
35899
- }
35900
-
35901
- function showNewsletters() {
35902
- var _ref, _window$Pelcro2, _window$Pelcro2$uiSet, _window$Pelcro2$uiSet2;
35903
-
35904
- const showNewslettersUiSettings = (_ref = ((_window$Pelcro2 = window.Pelcro) === null || _window$Pelcro2 === void 0 ? void 0 : (_window$Pelcro2$uiSet = _window$Pelcro2.uiSettings) === null || _window$Pelcro2$uiSet === void 0 ? void 0 : (_window$Pelcro2$uiSet2 = _window$Pelcro2$uiSet.newsletters) === null || _window$Pelcro2$uiSet2 === void 0 ? void 0 : _window$Pelcro2$uiSet2.length) > 0) !== null && _ref !== void 0 ? _ref : false;
35905
- return showNewslettersUiSettings;
35906
- }
35806
+ }, []);
35807
+ return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(Transition, {
35808
+ className: "plc-fixed plc-inset-y-0 plc-left-0 plc-h-full lg:plc-w-3/12 plc-w-full plc-overflow-y-auto plc-text-left plc-bg-white plc-shadow-xl plc-z-max",
35809
+ show: isOpen,
35810
+ enter: "plc-transform plc-transition plc-duration-500",
35811
+ enterFrom: "plc--translate-x-full",
35812
+ enterTo: "plc-translate-x-0",
35813
+ afterEnter: initializeHideMenuHandler,
35814
+ leave: "plc-transform plc-transition plc-duration-500",
35815
+ leaveFrom: "plc-translate-x-0",
35816
+ leaveTo: "plc--translate-x-full",
35817
+ afterLeave: props === null || props === void 0 ? void 0 : props.onClose
35818
+ }, /*#__PURE__*/React__default.createElement("div", {
35819
+ id: "pelcro-view-dashboard",
35820
+ ref: menuRef
35821
+ }, /*#__PURE__*/React__default.createElement("header", {
35822
+ className: "plc-bg-gray-200 plc-flex plc-py-5"
35823
+ }, /*#__PURE__*/React__default.createElement("div", {
35824
+ className: "plc-flex plc-items-center"
35825
+ }, /*#__PURE__*/React__default.createElement("div", {
35826
+ className: "plc-flex plc-justify-center plc-ml-3 sm:plc-ml-6 plc-flex-shrink-0"
35827
+ }, /*#__PURE__*/React__default.createElement("div", {
35828
+ className: "plc-relative plc-flex-shrink-0"
35829
+ }, /*#__PURE__*/React__default.createElement("img", {
35830
+ className: "pelcro-user-profile-picture plc-bg-gray-300 plc-cursor-pointer plc-h-10 plc-rounded-md plc-w-10",
35831
+ src: profilePicture,
35832
+ alt: "profile picture",
35833
+ onClick: displayProfilePicChange
35834
+ }))), /*#__PURE__*/React__default.createElement("div", {
35835
+ className: "plc-flex plc-flex-col plc-justify-between plc-flex-grow plc-w-56 plc-ml-4 plc-break-words sm:plc-w-auto"
35836
+ }, userHasName && /*#__PURE__*/React__default.createElement("p", {
35837
+ className: "plc-font-bold plc-break-all"
35838
+ }, user.first_name, " ", user.last_name), /*#__PURE__*/React__default.createElement("p", {
35839
+ className: `plc-m-0 plc-text-sm plc-break-all ${userHasName ? "plc-text-sm" : "plc-text-lg plc-font-bold plc-mt-auto"}`
35840
+ }, user.email)), /*#__PURE__*/React__default.createElement("div", {
35841
+ className: "lg:plc-hidden"
35842
+ }, /*#__PURE__*/React__default.createElement(Button, {
35843
+ variant: "ghost",
35844
+ type: "button",
35845
+ className: "plc-text-gray-500 plc-rounded-2xl plc-absolute plc-z-max plc-top-5 plc-right-10",
35846
+ onClick: closeDashboard
35847
+ }, /*#__PURE__*/React__default.createElement(SvgXIcon, {
35848
+ className: "plc-fill-current"
35849
+ }))))), /*#__PURE__*/React__default.createElement("section", {
35850
+ className: "plc-mt-6 plc-shadow-sm"
35851
+ }, /*#__PURE__*/React__default.createElement("header", {
35852
+ className: "plc-pl-4 plc-mb-2 sm:plc-pl-8"
35853
+ }, /*#__PURE__*/React__default.createElement("p", {
35854
+ className: "plc-font-bold plc-tracking-widest plc-text-gray-500"
35855
+ }, t("labels.mySettings"))), /*#__PURE__*/React__default.createElement(DashboardLink, {
35856
+ name: SUB_MENUS.PROFILE,
35857
+ icon: /*#__PURE__*/React__default.createElement(SvgUser, {
35858
+ className: "plc-w-6 plc-h-6 plc-mr-2"
35859
+ }),
35860
+ title: t("labels.profile"),
35861
+ setActiveDashboardLink: setActiveDashboardLink,
35862
+ activeDashboardLink: activeDashboardLink
35863
+ }), /*#__PURE__*/React__default.createElement(DashboardLink, {
35864
+ name: SUB_MENUS.QRCODE,
35865
+ icon: /*#__PURE__*/React__default.createElement(SvgQrcode, {
35866
+ className: "plc-w-6 plc-h-6 plc-mr-2"
35867
+ }),
35868
+ title: "My QR code",
35869
+ setActiveDashboardLink: setActiveDashboardLink,
35870
+ activeDashboardLink: activeDashboardLink
35871
+ }), /*#__PURE__*/React__default.createElement(DashboardLink, {
35872
+ name: SUB_MENUS.PASSWORDCHANGE,
35873
+ icon: /*#__PURE__*/React__default.createElement(SvgKey, {
35874
+ className: "plc-w-6 plc-h-6 plc-mr-2"
35875
+ }),
35876
+ title: t("labels.changePassword"),
35877
+ setActiveDashboardLink: setActiveDashboardLink,
35878
+ activeDashboardLink: activeDashboardLink
35879
+ }), /*#__PURE__*/React__default.createElement(DashboardLink, {
35880
+ name: SUB_MENUS.SAVED_ITEMS,
35881
+ icon: /*#__PURE__*/React__default.createElement(SvgBookmark, null),
35882
+ title: t("labels.savedItems.label"),
35883
+ setActiveDashboardLink: setActiveDashboardLink,
35884
+ activeDashboardLink: activeDashboardLink
35885
+ }), /*#__PURE__*/React__default.createElement("header", {
35886
+ className: "plc-pl-4 plc-mb-2 sm:plc-pl-8"
35887
+ }, /*#__PURE__*/React__default.createElement("p", {
35888
+ className: "plc-font-bold plc-tracking-widest plc-text-gray-500"
35889
+ }, t("labels.accountSettings"))), /*#__PURE__*/React__default.createElement(DashboardLink, {
35890
+ name: SUB_MENUS.PAYMENT_CARDS,
35891
+ icon: /*#__PURE__*/React__default.createElement(SvgPaymentCard, null),
35892
+ title: t("labels.paymentSource"),
35893
+ setActiveDashboardLink: setActiveDashboardLink,
35894
+ activeDashboardLink: activeDashboardLink
35895
+ }), /*#__PURE__*/React__default.createElement(DashboardLink, {
35896
+ name: SUB_MENUS.ADDRESSES,
35897
+ icon: /*#__PURE__*/React__default.createElement(SvgLocationPin, null),
35898
+ title: t("labels.addresses"),
35899
+ setActiveDashboardLink: setActiveDashboardLink,
35900
+ activeDashboardLink: activeDashboardLink
35901
+ }), /*#__PURE__*/React__default.createElement("header", {
35902
+ className: "plc-pl-4 plc-my-2 sm:plc-pl-8"
35903
+ }, /*#__PURE__*/React__default.createElement("p", {
35904
+ className: "plc-font-bold plc-tracking-widest plc-text-gray-500"
35905
+ }, t("labels.purchases"))), /*#__PURE__*/React__default.createElement(DashboardLink, {
35906
+ name: SUB_MENUS.SUBSCRIPTIONS,
35907
+ icon: /*#__PURE__*/React__default.createElement(SvgSubscription, {
35908
+ className: "plc-w-10 plc-h-10 plc-pt-2 plc-pr-1 plc--ml-2"
35909
+ }),
35910
+ title: t("labels.subscriptions"),
35911
+ setActiveDashboardLink: setActiveDashboardLink,
35912
+ activeDashboardLink: activeDashboardLink
35913
+ }), /*#__PURE__*/React__default.createElement(DashboardLink, {
35914
+ show: showNewsletters(),
35915
+ name: SUB_MENUS.NEWSLETTERS,
35916
+ icon: /*#__PURE__*/React__default.createElement(SvgNewsletter, {
35917
+ className: "plc-transform plc--translate-x-1 plc-scale-105 plc-w-7 plc-h-8 plc-mr-1 plc-pt-1"
35918
+ }),
35919
+ title: t("labels.Newsletters"),
35920
+ setActiveDashboardLink: setActiveDashboardLink,
35921
+ activeDashboardLink: activeDashboardLink
35922
+ }), /*#__PURE__*/React__default.createElement(DashboardLink, {
35923
+ show: hasActiveMemberships(),
35924
+ name: SUB_MENUS.MEMBERSHIPS,
35925
+ icon: /*#__PURE__*/React__default.createElement(SvgMemberships, {
35926
+ className: "plc-transform plc-scale-120 plc-w-7 plc-h-8 plc-mr-1 plc-pt-1"
35927
+ }),
35928
+ title: t("labels.memberships"),
35929
+ setActiveDashboardLink: setActiveDashboardLink,
35930
+ activeDashboardLink: activeDashboardLink
35931
+ }), /*#__PURE__*/React__default.createElement(DashboardLink, {
35932
+ show: hasDonationSubs(),
35933
+ name: SUB_MENUS.DONATIONS,
35934
+ icon: /*#__PURE__*/React__default.createElement(SvgDonate, {
35935
+ className: "plc-transform plc-scale-120 plc-w-7 plc-h-8 plc-mr-1 plc-pt-1"
35936
+ }),
35937
+ title: t("labels.donations"),
35938
+ setActiveDashboardLink: setActiveDashboardLink,
35939
+ activeDashboardLink: activeDashboardLink
35940
+ }), /*#__PURE__*/React__default.createElement(DashboardLink, {
35941
+ name: SUB_MENUS.GIFTS,
35942
+ icon: /*#__PURE__*/React__default.createElement(SvgGift, null),
35943
+ title: t("labels.gifts"),
35944
+ setActiveDashboardLink: setActiveDashboardLink,
35945
+ activeDashboardLink: activeDashboardLink
35946
+ }), /*#__PURE__*/React__default.createElement(DashboardLink, {
35947
+ show: window.Pelcro.site.read().ecommerce_enabled,
35948
+ name: SUB_MENUS.ORDERS,
35949
+ icon: /*#__PURE__*/React__default.createElement(SvgShopping, null),
35950
+ title: t("labels.orders.label"),
35951
+ setActiveDashboardLink: setActiveDashboardLink,
35952
+ activeDashboardLink: activeDashboardLink
35953
+ }), /*#__PURE__*/React__default.createElement(DashboardLink, {
35954
+ show: hasInvoices(),
35955
+ name: SUB_MENUS.INVOICES,
35956
+ icon: /*#__PURE__*/React__default.createElement(SvgDocument, null),
35957
+ title: t("labels.invoices"),
35958
+ setActiveDashboardLink: setActiveDashboardLink,
35959
+ activeDashboardLink: activeDashboardLink
35960
+ })), /*#__PURE__*/React__default.createElement(DashboardLink, {
35961
+ name: SUB_MENUS.LOGOUT,
35962
+ icon: /*#__PURE__*/React__default.createElement(SvgExit, null),
35963
+ title: t("labels.logout"),
35964
+ setActiveDashboardLink: setActiveDashboardLink,
35965
+ activeDashboardLink: activeDashboardLink
35966
+ }))), activeDashboardLink && isOpen && /*#__PURE__*/React__default.createElement("div", {
35967
+ id: "pelcro-view-dashboard-submenus",
35968
+ className: "plc-fixed plc-inset-y-0 plc-right-0 plc-h-full lg:plc-w-9/12 plc-w-full plc-bg-gray-100 plc-z-max plc-overflow-auto"
35969
+ }, activeDashboardLink === SUB_MENUS.PROFILE && /*#__PURE__*/React__default.createElement(ProfileMenu, null), activeDashboardLink === SUB_MENUS.QRCODE && /*#__PURE__*/React__default.createElement(QRCodeMenu, null), activeDashboardLink === SUB_MENUS.PASSWORDCHANGE && /*#__PURE__*/React__default.createElement(PasswordChangeMenu, null), activeDashboardLink === SUB_MENUS.SAVED_ITEMS && /*#__PURE__*/React__default.createElement(SavedItemsMenu, null), activeDashboardLink === SUB_MENUS.PAYMENT_CARDS && /*#__PURE__*/React__default.createElement(PaymentCardsMenu, null), activeDashboardLink === SUB_MENUS.ADDRESSES && /*#__PURE__*/React__default.createElement(AddressesMenu, null), activeDashboardLink === SUB_MENUS.SUBSCRIPTIONS && /*#__PURE__*/React__default.createElement(SubscriptionsMenu, {
35970
+ displayProductSelect: displayProductSelect,
35971
+ setProductAndPlan: setProductAndPlan,
35972
+ setSubscriptionIdToRenew: setSubscriptionIdToRenew,
35973
+ getSubscriptionStatus: getSubscriptionStatus
35974
+ }), activeDashboardLink === SUB_MENUS.MEMBERSHIPS && /*#__PURE__*/React__default.createElement(MembershipsMenu, {
35975
+ getSubscriptionStatus: getSubscriptionStatus
35976
+ }), activeDashboardLink === SUB_MENUS.NEWSLETTERS && /*#__PURE__*/React__default.createElement(NewslettersMenu, null), activeDashboardLink === SUB_MENUS.DONATIONS && /*#__PURE__*/React__default.createElement(DonationsMenu, {
35977
+ getSubscriptionStatus: getSubscriptionStatus
35978
+ }), activeDashboardLink === SUB_MENUS.GIFTS && /*#__PURE__*/React__default.createElement(GiftsMenu, {
35979
+ getSubscriptionStatus: getSubscriptionStatus,
35980
+ displayProductSelect: displayProductSelect,
35981
+ setProductAndPlan: setProductAndPlan,
35982
+ setSubscriptionIdToRenew: setSubscriptionIdToRenew,
35983
+ disableSubmit: disableSubmit
35984
+ }), activeDashboardLink === SUB_MENUS.ORDERS && /*#__PURE__*/React__default.createElement(OrdersMenu, null), activeDashboardLink === SUB_MENUS.INVOICES && /*#__PURE__*/React__default.createElement(InvoicesMenu, null), activeDashboardLink === SUB_MENUS.LOGOUT && logout(), /*#__PURE__*/React__default.createElement(Button, {
35985
+ variant: "ghost",
35986
+ type: "button",
35987
+ className: "plc-text-gray-500 plc-rounded-2xl plc-absolute plc-z-max plc-top-2 plc-right-2 md:plc-top-5 md:plc-right-10",
35988
+ onClick: closeDashboard
35989
+ }, /*#__PURE__*/React__default.createElement(SvgXIcon, {
35990
+ className: "plc-fill-current"
35991
+ }))));
35992
+ };
35907
35993
 
35908
- function hasDonationSubs() {
35909
- var _window$Pelcro$subscr, _window$Pelcro$subscr2, _window$Pelcro$subscr3, _window$Pelcro$user$r4, _window$Pelcro$user$r5;
35994
+ /**
35995
+ *
35996
+ */
35910
35997
 
35911
- 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 : [];
35912
- 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 : [];
35913
- return donations.length > 0 || canceledDonations.length > 0;
35914
- }
35998
+ function Dashboard(props) {
35999
+ React__default.useEffect(() => {
36000
+ var _props$onDisplay;
35915
36001
 
35916
- function hasActiveMemberships() {
35917
- var _window$Pelcro$user$r6, _window$Pelcro$user$r7;
36002
+ (_props$onDisplay = props.onDisplay) === null || _props$onDisplay === void 0 ? void 0 : _props$onDisplay.call(props);
36003
+ }, []);
36004
+ const {
36005
+ resetView
36006
+ } = usePelcro();
36007
+ return /*#__PURE__*/React__default.createElement(DashboardContainer, props, /*#__PURE__*/React__default.createElement(DashboardContent, Object.assign({
36008
+ onClose: () => {
36009
+ var _props$onClose;
35918
36010
 
35919
- return (_window$Pelcro$user$r6 = (_window$Pelcro$user$r7 = window.Pelcro.user.read().memberships) === null || _window$Pelcro$user$r7 === void 0 ? void 0 : _window$Pelcro$user$r7.some(membership => membership.status === "active" && membership.subscription.ended_at === null)) !== null && _window$Pelcro$user$r6 !== void 0 ? _window$Pelcro$user$r6 : false;
36011
+ (_props$onClose = props.onClose) === null || _props$onClose === void 0 ? void 0 : _props$onClose.call(props);
36012
+ resetView();
36013
+ }
36014
+ }, props)));
35920
36015
  }
35921
-
35922
- const DashboardWithTrans = withTranslation("dashboard")(Dashboard);
36016
+ Dashboard.viewId = "dashboard";
35923
36017
 
35924
36018
  // The button in the lower left that shows the dashboard.
35925
36019
  const DashboardOpenButton = () => {
@@ -38376,4 +38470,4 @@ const QrCodeModal = ({
38376
38470
  };
38377
38471
  QrCodeModal.viewId = "qrcode";
38378
38472
 
38379
- 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, BankRedirection, Button, CartContainer, CartModal, CartRemoveItemButton, CartSubmit, CartTotalPrice, CartView, Checkbox, CheckoutForm, ConfirmPassword, CouponCode, CouponCodeField, DashboardWithHook as Dashboard, DashboardOpenButton, DatePicker, DiscountedPrice, Email, EmailVerifyContainer, EmailVerifyModal, EmailVerifyResendButton, EmailVerifyView, FacebookLoginButton, GiftCreateContainer, GiftCreateEmail, GiftCreateFirstName, GiftCreateLastName, GiftCreateMessage, GiftCreateModal, GiftCreateStartDate, GiftCreateSubmitButton, GiftCreateView, GiftRedeemCode, GiftRedeemContainer, GiftRedeemModal, GiftRedeemSubmitButton, GiftRedeemView, GoogleLoginButton, Input, InvoiceDetailsContainer, InvoiceDetailsDownloadButton, InvoiceDetailsModal, InvoiceDetailsPayButton, InvoiceDetailsView, InvoicePaymentContainer, InvoicePaymentModal, InvoicePaymentView, Link, LoginButton, LoginContainer, LoginEmail, LoginModal, LoginPassword, LoginRequestLoginToken, LoginUsername, LoginView, Logout, MeterModal, MeterView, Modal, ModalBody, ModalFooter, ModalHeader, NewsletterWithHook as NewsLetter, NewsletterUpdateButton, NewsletterUpdateContainer, NewsletterUpdateList, NewsletterUpdateModal, NewsletterUpdateView, Notification, OrderConfirmModal, OrderCreateContainer, OrderCreateModal, OrderCreateSubmitButton, OrderCreateView, Password, PasswordChangeButton, PasswordChangeConfirmNewPassword, PasswordChangeContainer, PasswordChangeCurrentPassword, PasswordChangeModal, PasswordChangeNewPassword, PasswordChangeView, PasswordForgotButton, PasswordForgotContainer, PasswordForgotEmail, PasswordForgotModal, PasswordForgotView, PasswordResetButton, PasswordResetConfirmPassword, PasswordResetContainer, PasswordResetEmail, PasswordResetModal, PasswordResetPassword, PasswordResetView, 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 };
38473
+ export { AddNew, 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, AddressesMenu, AlertWithContext as Alert, Alert as AlertElement, ApplyCouponButton, Auth0LoginButton, Badge, BankRedirection, Button, Card, CartContainer, CartModal, CartRemoveItemButton, CartSubmit, CartTotalPrice, CartView, Checkbox, CheckoutForm, ConfirmPassword, CouponCode, CouponCodeField, Dashboard, DashboardContainer, DashboardContent, DashboardLink, DashboardOpenButton, DatePicker, DiscountedPrice, DonationsMenu, Email, EmailVerifyContainer, EmailVerifyModal, EmailVerifyResendButton, EmailVerifyView, FacebookLoginButton, GiftCreateContainer, GiftCreateEmail, GiftCreateFirstName, GiftCreateLastName, GiftCreateMessage, GiftCreateModal, GiftCreateStartDate, GiftCreateSubmitButton, GiftCreateView, GiftRedeemCode, GiftRedeemContainer, GiftRedeemModal, GiftRedeemSubmitButton, GiftRedeemView, GiftsMenu, GoogleLoginButton, Input, InvoiceDetailsContainer, InvoiceDetailsDownloadButton, InvoiceDetailsModal, InvoiceDetailsPayButton, InvoiceDetailsView, InvoicePaymentContainer, InvoicePaymentModal, InvoicePaymentView, InvoicesMenu, Link, LoginButton, LoginContainer, LoginEmail, LoginModal, LoginPassword, LoginRequestLoginToken, LoginUsername, LoginView, Logout, MembershipsMenu, MeterModal, MeterView, Modal, ModalBody, ModalFooter, ModalHeader, NewsletterWithHook as NewsLetter, NewsletterUpdateButton, NewsletterUpdateContainer, NewsletterUpdateList, NewsletterUpdateModal, NewsletterUpdateView, NewslettersMenu, Notification, OrderConfirmModal, OrderCreateContainer, OrderCreateModal, OrderCreateSubmitButton, OrderCreateView, OrderItems, Password, PasswordChangeButton, PasswordChangeConfirmNewPassword, PasswordChangeContainer, PasswordChangeCurrentPassword, PasswordChangeMenu, PasswordChangeModal, PasswordChangeNewPassword, PasswordChangeView, PasswordForgotButton, PasswordForgotContainer, PasswordForgotEmail, PasswordForgotModal, PasswordForgotView, PasswordResetButton, PasswordResetConfirmPassword, PasswordResetContainer, PasswordResetEmail, PasswordResetModal, PasswordResetPassword, PasswordResetView, PasswordlessRequestContainer, PasswordlessRequestEmail, PasswordlessRequestModal, PasswordlessRequestView, PasswordlessRequestViewButton, PaymentCardsMenu, PaymentCreateContainer, PaymentCreateView, PaymentMethodContainer, PaymentMethodSelectContainer, PaymentMethodSelectList, PaymentMethodSelectModal, PaymentMethodSelectSubmit, PaymentMethodSelectView, PaymentMethodUpdateContainer, PaymentMethodUpdateModal, PaymentMethodUpdateView, PaymentMethodView, PaymentSuccessModal, PaymentSuccessView, PaypalSubscribeButton, PelcroCardCVC, PelcroCardExpiry, PelcroCardNumber, PelcroModalController, PelcroPaymentRequestButton, ProfileMenu, ProfilePicChangeButton, ProfilePicChangeContainer, ProfilePicChangeCropper, ProfilePicChangeModal, ProfilePicChangeRemoveButton, ProfilePicChangeSelectButton, ProfilePicChangeView, ProfilePicChangeZoom, QRCodeMenu, QrCodeModal, QrCodeView, Radio, RegisterButton, RegisterCompany, RegisterContainer, RegisterEmail, RegisterFirstName, RegisterJobTitle, RegisterLastName, RegisterModal, RegisterPassword, RegisterView, SavedItems, 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, SubscriptionsItems, 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 };