tf-checkout-react 1.0.50 → 1.0.51

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.
@@ -1,22 +1,24 @@
1
- import React, { useState, useEffect, useRef } from 'react';
2
- import { Formik, Form, Field } from 'formik';
1
+ import React, { useState, Component, useEffect, useRef } from 'react';
2
+ import { Formik, Form, Field, connect } from 'formik';
3
3
  import LoadingButton from '@mui/lab/LoadingButton';
4
4
  import _identity from 'lodash-es/identity';
5
5
  import _map from 'lodash-es/map';
6
6
  import _get from 'lodash-es/get';
7
7
  import _includes from 'lodash-es/includes';
8
8
  import axios from 'axios';
9
- import { TextField, CircularProgress } from '@mui/material';
9
+ import { TextField, FormControl, InputLabel, FormHelperText, CircularProgress } from '@mui/material';
10
10
  import Modal from '@mui/material/Modal';
11
11
  import Box from '@mui/material/Box';
12
12
  import _forEach from 'lodash-es/forEach';
13
13
  import _flatMapDeep from 'lodash-es/flatMapDeep';
14
+ import _isArray from 'lodash-es/isArray';
15
+ import { nanoid } from 'nanoid';
14
16
  import TextField$1 from '@mui/material/TextField';
15
17
  import { makeStyles } from '@mui/styles';
16
18
  import FormGroup from '@mui/material/FormGroup';
17
19
  import FormControlLabel from '@mui/material/FormControlLabel';
18
20
  import Checkbox from '@mui/material/Checkbox';
19
- import { nanoid } from 'nanoid';
21
+ import Select from '@mui/material/Select';
20
22
  import Container from '@mui/material/Container';
21
23
  import Alert from '@mui/material/Alert';
22
24
  import { useStripe, useElements, CardNumberElement, CardExpiryElement, CardCvcElement, Elements } from '@stripe/react-stripe-js';
@@ -30,9 +32,8 @@ import Button$1 from 'react-bootstrap/Button';
30
32
  import jwt_decode from 'jwt-decode';
31
33
  import _sortBy from 'lodash-es/sortBy';
32
34
  import _has from 'lodash-es/has';
33
- import FormControl from '@mui/material/FormControl';
35
+ import FormControl$1 from '@mui/material/FormControl';
34
36
  import MenuItem from '@mui/material/MenuItem';
35
- import Select from '@mui/material/Select';
36
37
  import Button from '@mui/material/Button';
37
38
 
38
39
  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
@@ -89,6 +90,22 @@ function _extends() {
89
90
  return _extends.apply(this, arguments);
90
91
  }
91
92
 
93
+ function _inheritsLoose(subClass, superClass) {
94
+ subClass.prototype = Object.create(superClass.prototype);
95
+ subClass.prototype.constructor = subClass;
96
+
97
+ _setPrototypeOf(subClass, superClass);
98
+ }
99
+
100
+ function _setPrototypeOf(o, p) {
101
+ _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
102
+ o.__proto__ = p;
103
+ return o;
104
+ };
105
+
106
+ return _setPrototypeOf(o, p);
107
+ }
108
+
92
109
  function _objectWithoutPropertiesLoose(source, excluded) {
93
110
  if (source == null) return {};
94
111
  var target = {};
@@ -891,7 +908,7 @@ function styleInject(css, ref) {
891
908
  }
892
909
  }
893
910
 
894
- var css_248z = ".style_button-container__2bhts{display:flex;justify-content:center;padding:20px}.style_billing-info-container__3ZE3J{margin:0 auto;max-width:800px}.style_billing-info-container__3ZE3J .style_is-half__1W_rP{width:49%}.style_billing-info-container__3ZE3J p{color:#000}.style_billing-info-container__3ZE3J .style_main-header__2OFWa{font-size:2rem;font-weight:600}.style_billing-info-container__twoFields__2tDqt{display:flex;justify-content:space-between;margin-top:15px}.style_billing-info-container__singleField__2bcsf{margin-top:15px}button{margin-top:10px}.style_account-actions-block__16OH-{color:#182026;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,Icons16,sans-serif;margin-top:10px}.style_login-register-button__fGgZf,.style_MuiButtonBase-root__1UBk9.style_MuiButton-root__3NzEO,.style_MuiButtonBase-root__1UBk9.style_MuiButton-root__3NzEO:hover{background-color:#212529;border:#f28051;border-radius:5px;color:#fff;cursor:pointer;display:block;font-family:Inter-Bold;font-size:26px;font-weight:700;line-height:1.15;margin-top:10px;min-height:46px;outline:none;overflow:hidden;padding:14px 12px 12px;position:relative;text-align:center;text-overflow:ellipsis;text-transform:uppercase;width:49%}.style_logo-image-container__2A2uH{margin-top:5px;text-align:center;width:49%}.style_logo-image-container__2A2uH img{height:30px}.style_login-block__22kcN{align-items:center;display:flex;flex-direction:column}.style_login-register-button__fGgZf:hover{background-color:#505050!important;border-color:#505050!important}.style_login-register-block__36tu5{display:flex;justify-content:space-between}@media only screen and (max-width:820px){.style_billing-info-container__3ZE3J{width:90%}.style_billing-info-container__3ZE3J .style_main-header__2OFWa{font-size:1.5rem}}";
911
+ var css_248z = ".style_button-container__2bhts{display:flex;justify-content:center;padding:20px}.style_billing-info-container__3ZE3J{margin:0 auto;max-width:800px}.style_billing-info-container__3ZE3J .style_is-half__1W_rP{width:49%}.style_billing-info-container__3ZE3J p{color:#000}.style_billing-info-container__3ZE3J .style_main-header__2OFWa{font-size:2rem;font-weight:600}.style_billing-info-container__twoFields__2tDqt{display:flex;justify-content:space-between;margin-top:15px}.style_billing-info-container__singleField__2bcsf{margin-top:15px}button{margin-top:10px}.style_account-actions-block__16OH-{color:#182026;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,Icons16,sans-serif;margin-top:10px}.style_login-register-button__fGgZf,.style_MuiButtonBase-root__1UBk9.style_MuiButton-root__3NzEO,.style_MuiButtonBase-root__1UBk9.style_MuiButton-root__3NzEO:hover{background-color:#212529;border:#f28051;border-radius:5px;color:#fff;cursor:pointer;display:block;font-family:Inter-Bold;font-size:26px;font-weight:700;line-height:1.15;margin-top:10px;min-height:46px;outline:none;overflow:hidden;padding:14px 12px 12px;position:relative;text-align:center;text-overflow:ellipsis;text-transform:uppercase;width:49%}.style_logo-image-container__2A2uH{margin-top:5px;text-align:center;width:49%}.style_logo-image-container__2A2uH img{height:30px}.style_login-block__22kcN{align-items:center;display:flex;flex-direction:column}.style_login-register-button__fGgZf:hover{background-color:#505050!important;border-color:#505050!important}.style_login-register-block__36tu5{display:flex;justify-content:space-between}@media only screen and (max-width:820px){.style_billing-info-container__3ZE3J{width:90%}.style_billing-info-container__3ZE3J .style_main-header__2OFWa{font-size:1.5rem}}.style_email-checking__yKzPA{margin-bottom:15px}";
895
912
  styleInject(css_248z);
896
913
 
897
914
  var emailRegex = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
@@ -1559,6 +1576,7 @@ var setLoggedUserData = function setLoggedUserData(data) {
1559
1576
  first_name: data.firstName,
1560
1577
  last_name: data.lastName,
1561
1578
  email: data.email,
1579
+ confirmEmail: data.email,
1562
1580
  city: (data == null ? void 0 : data.city) || '',
1563
1581
  country: (data == null ? void 0 : data.country) || '',
1564
1582
  phone: (data == null ? void 0 : data.phone) || '',
@@ -1639,6 +1657,38 @@ var createCheckoutDataBody = function createCheckoutDataBody(ticketsQuantity, va
1639
1657
 
1640
1658
  return body;
1641
1659
  };
1660
+ var getValidateFunctions = function getValidateFunctions(element, states) {
1661
+ var validationFunctions = [];
1662
+
1663
+ if (element.required) {
1664
+ if (element.name !== 'state' || element.name === 'state' && states.length) {
1665
+ validationFunctions.push(requiredValidator);
1666
+ }
1667
+ }
1668
+
1669
+ if (element.onValidate) {
1670
+ validationFunctions.push(element.onValidate);
1671
+ }
1672
+
1673
+ return combineValidators.apply(void 0, validationFunctions);
1674
+ };
1675
+ var assingUniqueIds = function assingUniqueIds(data) {
1676
+ if (_get(data[0], 'uniqueId')) {
1677
+ return data;
1678
+ }
1679
+
1680
+ return _map(data, function (item) {
1681
+ _forEach(item, function (itemValue, key) {
1682
+ if (_isArray(itemValue)) {
1683
+ item[key] = assingUniqueIds(itemValue);
1684
+ }
1685
+ });
1686
+
1687
+ return _extends({}, item, {
1688
+ uniqueId: nanoid()
1689
+ });
1690
+ });
1691
+ };
1642
1692
 
1643
1693
  var useStyles = /*#__PURE__*/makeStyles({
1644
1694
  input: {
@@ -1660,10 +1710,10 @@ var CustomField = function CustomField(_ref) {
1660
1710
  theme = _ref.theme;
1661
1711
  var isSelectField = type === 'select';
1662
1712
  var isShrink = Boolean(field.value) || type === 'date' || type === 'select';
1663
- var isTouched = Boolean(_get(touched, field.name));
1664
1713
 
1665
1714
  var error = _get(errors, field.name);
1666
1715
 
1716
+ var isTouched = Boolean(_get(touched, field.name)) || _includes(field.name, 'holder') && !!error;
1667
1717
  var classes = useStyles();
1668
1718
  return React.createElement(TextField$1, Object.assign({
1669
1719
  id: field.name,
@@ -1726,6 +1776,101 @@ var getQueryVariable = function getQueryVariable(variable) {
1726
1776
  return false;
1727
1777
  };
1728
1778
 
1779
+ var useStyles$1 = /*#__PURE__*/makeStyles({
1780
+ input: {
1781
+ '&::placeholder': {
1782
+ color: 'gray'
1783
+ }
1784
+ }
1785
+ });
1786
+ var SelectField = function SelectField(_ref) {
1787
+ var label = _ref.label,
1788
+ _ref$type = _ref.type,
1789
+ type = _ref$type === void 0 ? 'text' : _ref$type,
1790
+ field = _ref.field,
1791
+ _ref$selectOptions = _ref.selectOptions,
1792
+ selectOptions = _ref$selectOptions === void 0 ? [] : _ref$selectOptions,
1793
+ _ref$form = _ref.form,
1794
+ touched = _ref$form.touched,
1795
+ errors = _ref$form.errors,
1796
+ theme = _ref.theme;
1797
+ var isTouched = Boolean(_get(touched, field.name));
1798
+
1799
+ var error = _get(errors, field.name);
1800
+
1801
+ var classes = useStyles$1();
1802
+ return React.createElement(FormControl, {
1803
+ fullWidth: true
1804
+ }, React.createElement(InputLabel, {
1805
+ htmlFor: field.name,
1806
+ error: !!error && isTouched
1807
+ }, label), React.createElement(Select, Object.assign({
1808
+ id: field.name,
1809
+ label: label,
1810
+ type: type,
1811
+ fullWidth: true,
1812
+ error: !!error && isTouched,
1813
+ inputProps: {
1814
+ id: field.name,
1815
+ classes: {
1816
+ input: classes.input
1817
+ }
1818
+ },
1819
+ "native": true,
1820
+ className: theme,
1821
+ MenuProps: {
1822
+ className: theme
1823
+ }
1824
+ }, field), _map(selectOptions, function (option) {
1825
+ return React.createElement("option", {
1826
+ key: option.value,
1827
+ value: option.value,
1828
+ disabled: option.disabled
1829
+ }, option.label);
1830
+ })), isTouched && error ? React.createElement(FormHelperText, {
1831
+ error: !!error && isTouched
1832
+ }, error) : null);
1833
+ };
1834
+
1835
+ var ErrorFocusInternal = /*#__PURE__*/function (_Component) {
1836
+ _inheritsLoose(ErrorFocusInternal, _Component);
1837
+
1838
+ function ErrorFocusInternal() {
1839
+ var _this;
1840
+
1841
+ _this = _Component.apply(this, arguments) || this;
1842
+
1843
+ _this.render = function () {
1844
+ return null;
1845
+ };
1846
+
1847
+ return _this;
1848
+ }
1849
+
1850
+ var _proto = ErrorFocusInternal.prototype;
1851
+
1852
+ _proto.componentDidUpdate = function componentDidUpdate(prevProps) {
1853
+ var _prevProps$formik = prevProps.formik,
1854
+ isSubmitting = _prevProps$formik.isSubmitting,
1855
+ isValidating = _prevProps$formik.isValidating,
1856
+ errors = _prevProps$formik.errors;
1857
+ var keys = Object.keys(errors);
1858
+
1859
+ if (keys.length > 0 && isSubmitting && !isValidating) {
1860
+ var selector = "[name=\"" + keys[0] + "\"]";
1861
+ var errorElement = document.querySelector(selector);
1862
+
1863
+ if (errorElement) {
1864
+ errorElement.focus();
1865
+ }
1866
+ }
1867
+ };
1868
+
1869
+ return ErrorFocusInternal;
1870
+ }(Component);
1871
+
1872
+ var ErrorFocus = /*#__PURE__*/connect(ErrorFocusInternal);
1873
+
1729
1874
  var LogicRunner = function LogicRunner(_ref) {
1730
1875
  var values = _ref.values,
1731
1876
  setStates = _ref.setStates,
@@ -1797,7 +1942,7 @@ var LogicRunner = function LogicRunner(_ref) {
1797
1942
  lastName: parsedData == null ? void 0 : parsedData.last_name,
1798
1943
  email: (parsedData == null ? void 0 : parsedData.email) || '',
1799
1944
  phone: (parsedData == null ? void 0 : parsedData.phone) || '',
1800
- confirmEmail: '',
1945
+ confirmEmail: (parsedData == null ? void 0 : parsedData.email) || '',
1801
1946
  state: (parsedData == null ? void 0 : parsedData.state) || '',
1802
1947
  street_address: (parsedData == null ? void 0 : parsedData.street_address) || '',
1803
1948
  country: (parsedData == null ? void 0 : parsedData.country) || 1,
@@ -1866,39 +2011,43 @@ var BillingInfoContainer = function BillingInfoContainer(_ref3) {
1866
2011
  var userData = typeof window !== 'undefined' && window.localStorage.getItem('user_data') ? JSON.parse(window.localStorage.getItem('user_data') || '') : {};
1867
2012
  var access_token = typeof window !== 'undefined' && window.localStorage.getItem('access_token') ? window.localStorage.getItem('access_token') || '' : '';
1868
2013
 
1869
- var _useState = useState({}),
1870
- cartInfoData = _useState[0],
1871
- setCartInfo = _useState[1];
2014
+ var _useState = useState(data),
2015
+ dataWithUniqueIds = _useState[0],
2016
+ setDataWithUniqueIds = _useState[1];
1872
2017
 
1873
- var _useState2 = useState([]),
1874
- countries = _useState2[0],
1875
- setCountries = _useState2[1];
2018
+ var _useState2 = useState({}),
2019
+ cartInfoData = _useState2[0],
2020
+ setCartInfo = _useState2[1];
1876
2021
 
1877
2022
  var _useState3 = useState([]),
1878
- states = _useState3[0],
1879
- setStates = _useState3[1];
2023
+ countries = _useState3[0],
2024
+ setCountries = _useState3[1];
1880
2025
 
1881
- var _useState4 = useState(false),
1882
- showModalLogin = _useState4[0],
1883
- setShowModalLogin = _useState4[1];
2026
+ var _useState4 = useState([]),
2027
+ states = _useState4[0],
2028
+ setStates = _useState4[1];
1884
2029
 
1885
2030
  var _useState5 = useState(false),
1886
- alreadyHasUser = _useState5[0],
1887
- setAlreadyHasUser = _useState5[1];
2031
+ showModalLogin = _useState5[0],
2032
+ setShowModalLogin = _useState5[1];
1888
2033
 
1889
2034
  var _useState6 = useState(false),
1890
- userExpired = _useState6[0],
1891
- setUserExpired = _useState6[1];
2035
+ alreadyHasUser = _useState6[0],
2036
+ setAlreadyHasUser = _useState6[1];
1892
2037
 
1893
2038
  var _useState7 = useState(false),
1894
- showModalRegister = _useState7[0],
1895
- setShowModalRegister = _useState7[1];
2039
+ userExpired = _useState7[0],
2040
+ setUserExpired = _useState7[1];
2041
+
2042
+ var _useState8 = useState(false),
2043
+ showModalRegister = _useState8[0],
2044
+ setShowModalRegister = _useState8[1];
1896
2045
 
1897
- var _useState8 = useState([]),
1898
- ticketsQuantity = _useState8[0],
1899
- setTicketsQuantity = _useState8[1];
2046
+ var _useState9 = useState([]),
2047
+ ticketsQuantity = _useState9[0],
2048
+ setTicketsQuantity = _useState9[1];
1900
2049
 
1901
- var _useState9 = useState({
2050
+ var _useState10 = useState({
1902
2051
  firstName: '',
1903
2052
  lastName: '',
1904
2053
  email: '',
@@ -1913,8 +2062,8 @@ var BillingInfoContainer = function BillingInfoContainer(_ref3) {
1913
2062
  state: '',
1914
2063
  zip: ''
1915
2064
  }),
1916
- userValues = _useState9[0],
1917
- setUserValues = _useState9[1];
2065
+ userValues = _useState10[0],
2066
+ setUserValues = _useState10[1];
1918
2067
 
1919
2068
  var isLoggedIn = !!access_token;
1920
2069
 
@@ -1930,7 +2079,11 @@ var BillingInfoContainer = function BillingInfoContainer(_ref3) {
1930
2079
 
1931
2080
  var optedInFieldValue = _get(cartInfoData, 'optedIn', false);
1932
2081
 
1933
- var hideOptIn = _get(cartInfoData, 'hide_ttf_opt_in', false);
2082
+ var hideTtfOptIn = _get(cartInfoData, 'hide_ttf_opt_in', true);
2083
+
2084
+ if (!_get(dataWithUniqueIds, '[0].uniqueId')) {
2085
+ setDataWithUniqueIds(assingUniqueIds(data));
2086
+ }
1934
2087
 
1935
2088
  var getQuantity = function getQuantity(cart) {
1936
2089
  if (cart === void 0) {
@@ -2097,7 +2250,7 @@ var BillingInfoContainer = function BillingInfoContainer(_ref3) {
2097
2250
  fetchUserData(access_token);
2098
2251
  }, [access_token]);
2099
2252
  return React.createElement(React.Fragment, null, React.createElement(Formik, {
2100
- initialValues: getInitialValues(data, _extends({}, initialValues, {
2253
+ initialValues: getInitialValues(dataWithUniqueIds, _extends({}, initialValues, {
2101
2254
  email: emailLogged,
2102
2255
  firstName: firstNameLogged,
2103
2256
  lastName: lastNameLogged,
@@ -2258,7 +2411,7 @@ var BillingInfoContainer = function BillingInfoContainer(_ref3) {
2258
2411
  }, function (props) {
2259
2412
  return React.createElement(Form, {
2260
2413
  onSubmit: props.handleSubmit
2261
- }, React.createElement(LogicRunner, {
2414
+ }, React.createElement(ErrorFocus, null), React.createElement(LogicRunner, {
2262
2415
  values: props.values,
2263
2416
  setStates: setStates,
2264
2417
  setFieldValue: props.setFieldValue,
@@ -2279,7 +2432,7 @@ var BillingInfoContainer = function BillingInfoContainer(_ref3) {
2279
2432
  onLogin();
2280
2433
  setShowModalLogin(true);
2281
2434
  }
2282
- }, "Login"))), _map(data, function (item) {
2435
+ }, "Login"))), _map(dataWithUniqueIds, function (item) {
2283
2436
  var label = item.label,
2284
2437
  labelClassName = item.labelClassName,
2285
2438
  fields = item.fields;
@@ -2289,7 +2442,7 @@ var BillingInfoContainer = function BillingInfoContainer(_ref3) {
2289
2442
  }
2290
2443
 
2291
2444
  return React.createElement(React.Fragment, {
2292
- key: nanoid()
2445
+ key: item.uniqueId
2293
2446
  }, React.createElement("p", {
2294
2447
  className: labelClassName
2295
2448
  }, label), _map(fields, function (group) {
@@ -2298,7 +2451,7 @@ var BillingInfoContainer = function BillingInfoContainer(_ref3) {
2298
2451
  groupLabel = group.groupLabel,
2299
2452
  groupLabelClassName = group.groupLabelClassName;
2300
2453
  return React.createElement(React.Fragment, {
2301
- key: nanoid()
2454
+ key: group.uniqueId
2302
2455
  }, !isLoggedIn && React.createElement("div", {
2303
2456
  className: groupLabelClassName
2304
2457
  }, groupLabel), React.createElement("div", {
@@ -2316,47 +2469,45 @@ var BillingInfoContainer = function BillingInfoContainer(_ref3) {
2316
2469
  return false;
2317
2470
  }
2318
2471
 
2319
- if (el.name === 'brand_opt_in' && hideOptIn) {
2472
+ if (el.name === 'ttf_opt_in' && hideTtfOptIn) {
2320
2473
  return false;
2321
2474
  }
2322
2475
 
2323
2476
  return true;
2324
2477
  }), function (element) {
2325
2478
  return ['password', 'confirmPassword'].includes(element.name) && isLoggedIn ? null : React.createElement(React.Fragment, {
2326
- key: nanoid()
2479
+ key: element.uniqueId
2327
2480
  }, element.name === 'email' ? React.createElement("div", {
2328
2481
  className: "email-checking"
2329
- }, "IMPORTANT: Please double check that your email address is correct. It's where we send your confirmation and e-tickets to!") : null, React.createElement("div", {
2482
+ }, "IMPORTANT: Please double check that your\n email address is correct. It's where we\n send your confirmation and e-tickets to!") : null, React.createElement("div", {
2330
2483
  className: element.className
2331
2484
  }, element.component ? element.component : React.createElement(Field, {
2332
2485
  name: element.name,
2333
2486
  label: element.label,
2334
2487
  type: element.type,
2335
- validate: combineValidators(element.required ? requiredValidator : function () {}, element.onValidate ? element.onValidate : function () {}),
2336
- component: element.type === 'checkbox' ? CheckboxField : CustomField,
2488
+ validate: getValidateFunctions(element, states),
2489
+ component: element.type === 'checkbox' ? CheckboxField : element.type === 'select' ? SelectField : CustomField,
2337
2490
  selectOptions: element.name === 'country' ? countries : element.name === 'state' ? states : [],
2338
2491
  theme: theme
2339
2492
  })));
2340
2493
  })));
2341
2494
  }));
2342
- }), showTicketHolderName && React.createElement(React.Fragment, {
2343
- key: nanoid()
2344
- }, React.createElement("div", {
2495
+ }), showTicketHolderName && React.createElement(React.Fragment, null, React.createElement("div", {
2345
2496
  className: "ticket-holders-fields"
2346
2497
  }, React.createElement("p", null, ticketHoldersFields.label), _map(ticketsQuantity, function (_item, index) {
2347
2498
  return React.createElement("div", {
2348
- key: nanoid()
2499
+ key: _item
2349
2500
  }, React.createElement("h5", null, "Ticket ", index + 1), _map(ticketHoldersFields.fields, function (group) {
2350
2501
  var groupClassname = group.groupClassname,
2351
2502
  groupItems = group.groupItems;
2352
2503
  return React.createElement("div", {
2353
- key: nanoid()
2504
+ key: group.uniqueId
2354
2505
  }, React.createElement("div", {
2355
2506
  className: groupClassname
2356
2507
  }, _map(groupItems, function (element) {
2357
2508
  return React.createElement("div", {
2358
2509
  className: element.className,
2359
- key: nanoid()
2510
+ key: element.uniqueId
2360
2511
  }, React.createElement(Field, {
2361
2512
  name: element.name + "-" + index,
2362
2513
  label: element.label,
@@ -2368,8 +2519,7 @@ var BillingInfoContainer = function BillingInfoContainer(_ref3) {
2368
2519
  })));
2369
2520
  }));
2370
2521
  }))), React.createElement("div", {
2371
- className: "button-container",
2372
- key: nanoid()
2522
+ className: "button-container"
2373
2523
  }, React.createElement(LoadingButton, {
2374
2524
  type: "submit",
2375
2525
  variant: "contained",
@@ -2407,10 +2557,10 @@ var BillingInfoContainer = function BillingInfoContainer(_ref3) {
2407
2557
  }));
2408
2558
  };
2409
2559
 
2410
- var css_248z$3 = ".style_payment_page__1PUd8{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,Icons16,sans-serif}.style_payment_page__1PUd8 .style_order_info_section__J1olw{padding:15px 0}.style_payment_page__1PUd8 .style_order_info_section__J1olw .style_order_info_block__3kZN4{padding-bottom:15px;padding-top:15px}.style_payment_page__1PUd8 .style_order_info_section__J1olw .style_order_info_block__3kZN4 .style_field-underline__2M8Bd{border-bottom:1px solid #000;padding-bottom:15px}.style_payment_page__1PUd8 .style_order_info_section__J1olw .style_order_info_block__3kZN4 .style_order_info_title__1MBgS{font-size:14px;font-weight:700;padding-bottom:3px}.style_payment_page__1PUd8 .style_order_info_section__J1olw .style_order_info_block__3kZN4 .style_order_info_text__3gSEK{font-size:16px;line-height:1.15;outline:none}.style_payment_page__1PUd8 .style_MuiBox-root__2LeaA{margin-left:auto;margin-right:auto;padding:20px;text-align:center}.style_payment_page__1PUd8 .style_payment_info_label__3Zmjp{padding:20px 0;text-align:center}.style_payment_page__1PUd8 .style_payment_form__2arf4{color:#fff;padding:20px}.style_payment_page__1PUd8 .style_payment_form__2arf4 input,.style_payment_page__1PUd8 .style_payment_form__2arf4 label{color:#fff}.style_payment_page__1PUd8 .style_payment_button__3WzAn{padding-top:20px;text-align:center}.style_conditions-block__3XPwW{background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:4px;box-shadow:inset 0 1px 1px rgba(0,0,0,.05);padding:19px}";
2560
+ var css_248z$3 = ".style_payment_page__1PUd8{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,Icons16,sans-serif}.style_payment_page__1PUd8 .style_order_info_section__J1olw{padding:15px 0}.style_payment_page__1PUd8 .style_order_info_section__J1olw .style_order_info_block__3kZN4{padding-bottom:15px;padding-top:15px}.style_payment_page__1PUd8 .style_order_info_section__J1olw .style_order_info_block__3kZN4 .style_field-underline__2M8Bd{border-bottom:1px solid #000;padding-bottom:15px}.style_payment_page__1PUd8 .style_order_info_section__J1olw .style_order_info_block__3kZN4 .style_order_info_title__1MBgS{font-size:14px;font-weight:700;padding-bottom:3px}.style_payment_page__1PUd8 .style_order_info_section__J1olw .style_order_info_block__3kZN4 .style_order_info_text__3gSEK{font-size:16px;line-height:1.15;outline:none}.style_payment_page__1PUd8 .style_MuiBox-root__2LeaA{margin-left:auto;margin-right:auto;padding:20px;text-align:center}.style_payment_page__1PUd8 .style_payment_info_label__3Zmjp{padding:20px 0;text-align:center}.style_payment_page__1PUd8 .style_payment_form__2arf4{color:#fff;padding:20px}.style_payment_page__1PUd8 .style_payment_form__2arf4 input,.style_payment_page__1PUd8 .style_payment_form__2arf4 label{color:#fff}.style_payment_page__1PUd8 .style_payment_button__3WzAn{padding-top:20px;text-align:center}";
2411
2561
  styleInject(css_248z$3);
2412
2562
 
2413
- var css_248z$4 = ".style_card_form_inner__7vzGq{background:#232323;border-radius:8px;padding:15px}.style_card_form_inner__7vzGq .style_card_label_text__F7GFa{color:#fff}.style_card_form_inner__7vzGq .style_StripeElement__jS5TJ{margin:5px 0 10px}.style_card_label_text__F7GFa{color:#fff}.style_payment_button__2rkp8{padding-top:15px;text-align:center}.style_payment_button__2rkp8 button{background-color:#212529;border-radius:8px;color:#fff;cursor:pointer;font-size:26px;padding:15px 30px;transition:opacity .5s;width:200px}.style_payment_button__2rkp8 button:hover{opacity:.7}.style_disabled-payment-button__3MiUR button{opacity:.3;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.style_checkout_error_block__3LUN5{color:#e53935;font-weight:600;padding:15px 0}.style_zip_element__31oFa p{margin-bottom:0}.style_zip_element__31oFa input{background-color:#232323;border:none;color:#fff;font-size:18px;margin-top:5px;outline:none;width:100%}";
2563
+ var css_248z$4 = ".style_card_form_inner__7vzGq{background:#232323;border-radius:8px;margin:0 auto 20px;min-width:325px;padding:15px;width:50%}.style_card_form_inner__7vzGq .style_card_label_text__F7GFa{color:#fff}.style_card_form_inner__7vzGq .style_StripeElement__jS5TJ{margin:5px 0 10px}.style_card_label_text__F7GFa{color:#fff}.style_payment_button__2rkp8{padding-top:15px;text-align:center}.style_payment_button__2rkp8 button{background-color:#212529;border-radius:8px;color:#fff;cursor:pointer;font-size:26px;padding:15px 30px;transition:opacity .5s;width:200px}.style_payment_button__2rkp8 button:hover{opacity:.7}.style_disabled-payment-button__3MiUR button{opacity:.3;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.style_checkout_error_block__3LUN5{color:#e53935;font-weight:600;padding:15px 0}.style_zip_element__31oFa p{margin-bottom:0}.style_zip_element__31oFa input{background-color:#232323;border:none;color:#fff;font-size:18px;margin-top:5px;outline:none;width:100%}";
2414
2564
  styleInject(css_248z$4);
2415
2565
 
2416
2566
  var currencyNormalizerCreator = function currencyNormalizerCreator(value, currency) {
@@ -3171,7 +3321,7 @@ var TicketRow = function TicketRow(_ref) {
3171
3321
  className: "get-tickets"
3172
3322
  }, React.createElement(Box, {
3173
3323
  className: "get-tickets__selectbox"
3174
- }, React.createElement(FormControl, {
3324
+ }, React.createElement(FormControl$1, {
3175
3325
  fullWidth: true
3176
3326
  }, React.createElement(Select, {
3177
3327
  value: selectedTickets[ticketTier.id] ? selectedTickets[ticketTier.id] : 0,
@@ -3327,25 +3477,24 @@ var WaitingList = function WaitingList(_ref) {
3327
3477
  setShowSuccessMessage(true);
3328
3478
  }
3329
3479
 
3330
- _context.next = 14;
3480
+ _context.next = 13;
3331
3481
  break;
3332
3482
 
3333
3483
  case 11:
3334
3484
  _context.prev = 11;
3335
3485
  _context.t0 = _context["catch"](0);
3336
- console.log(_context.t0);
3337
3486
 
3338
- case 14:
3339
- _context.prev = 14;
3487
+ case 13:
3488
+ _context.prev = 13;
3340
3489
  setLoading(false);
3341
- return _context.finish(14);
3490
+ return _context.finish(13);
3342
3491
 
3343
- case 17:
3492
+ case 16:
3344
3493
  case "end":
3345
3494
  return _context.stop();
3346
3495
  }
3347
3496
  }
3348
- }, _callee, null, [[0, 11, 14, 17]]);
3497
+ }, _callee, null, [[0, 11, 13, 16]]);
3349
3498
  }));
3350
3499
 
3351
3500
  return function handleSubmit(_x) {
@@ -3366,7 +3515,7 @@ var WaitingList = function WaitingList(_ref) {
3366
3515
  email: ''
3367
3516
  },
3368
3517
  onSubmit: handleSubmit
3369
- }, React.createElement(Form, null, showTicketsField && React.createElement(React.Fragment, null, React.createElement("div", {
3518
+ }, React.createElement(Form, null, React.createElement(ErrorFocus, null), showTicketsField && React.createElement(React.Fragment, null, React.createElement("div", {
3370
3519
  className: "field-item"
3371
3520
  }, React.createElement(Field, {
3372
3521
  name: "ticketTypeId",