summit-registration-lite 5.0.41 → 5.0.43

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/README.md CHANGED
@@ -32,6 +32,8 @@ React component for the summit registration lite widget
32
32
 
33
33
  **initialOrderCompleteButton** = string with the text for the button when the user bought his first order
34
34
 
35
+ **orderCompleteTitle** = string with the text for title when the user bought an order
36
+
35
37
  **orderComplete1stParagraph** = string with the text for the first paragraph when the user bought an order
36
38
 
37
39
  **orderComplete2ndParagraph** = string with the text for the second paragraph when the user bought an order
@@ -11,6 +11,176 @@
11
11
  return /******/ (() => { // webpackBootstrap
12
12
  /******/ var __webpack_modules__ = ({
13
13
 
14
+ /***/ 499:
15
+ /***/ ((__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) => {
16
+
17
+ "use strict";
18
+
19
+ // UNUSED EXPORTS: capitalizeFirstLetter, formatCurrency, formatErrorMessage, getTicketMaxQuantity
20
+
21
+ // EXTERNAL MODULE: ./src/utils/utils.js + 1 modules
22
+ var utils = __webpack_require__(452);
23
+ ;// CONCATENATED MODULE: ./src/helpers/getTicketMaxQuantity.js
24
+
25
+ const getTicketMaxQuantity = ticket => {
26
+ if (!ticket) return 0;
27
+ if (isPrePaidTicketType(ticket)) return 1;
28
+ return Math.min((ticket.quantity_2_sell || Number.MAX_SAFE_INTEGER) - ticket.quantity_sold, ticket.max_quantity_per_order || Number.MAX_SAFE_INTEGER);
29
+ };
30
+ ;// CONCATENATED MODULE: ./src/helpers/index.js
31
+
32
+
33
+
34
+
35
+
36
+ /***/ }),
37
+
38
+ /***/ 452:
39
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
40
+
41
+ "use strict";
42
+
43
+ // EXPORTS
44
+ __webpack_require__.d(__webpack_exports__, {
45
+ "Gj": () => (/* binding */ handleSentryException)
46
+ });
47
+
48
+ // UNUSED EXPORTS: buildTrackEvent, getContrastingTextColor, getCurrentProvider, getCurrentUserLanguage, getTicketCost, getTicketTaxes, hasDiscountApplied, isEmptyString, isFreeOrder, isPrePaidOrder, isPrePaidTicketType, parseColor, removeWhiteSpaces, ticketHasAccessLevel
49
+
50
+ // EXTERNAL MODULE: ./src/helpers/index.js + 1 modules
51
+ var helpers = __webpack_require__(499);
52
+ // EXTERNAL MODULE: external "react"
53
+ var external_react_ = __webpack_require__(689);
54
+ ;// CONCATENATED MODULE: external "@sentry/react"
55
+ const react_namespaceObject = require("@sentry/react");
56
+ ;// CONCATENATED MODULE: ./src/utils/utils.js
57
+
58
+
59
+
60
+
61
+ /**
62
+ * Copyright 2022 OpenStack Foundation
63
+ * Licensed under the Apache License, Version 2.0 (the "License");
64
+ * you may not use this file except in compliance with the License.
65
+ * You may obtain a copy of the License at
66
+ * http://www.apache.org/licenses/LICENSE-2.0
67
+ * Unless required by applicable law or agreed to in writing, software
68
+ * distributed under the License is distributed on an "AS IS" BASIS,
69
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
70
+ * See the License for the specific language governing permissions and
71
+ * limitations under the License.
72
+ **/
73
+
74
+ const getCurrentProvider = summit => {
75
+ for (let profile of summit.payment_profiles) {
76
+ if (profile.application_type === 'Registration') {
77
+ return {
78
+ publicKey: profile.test_mode_enabled ? profile.test_publishable_key : profile.live_publishable_key,
79
+ provider: profile.provider
80
+ };
81
+ }
82
+ }
83
+
84
+ return {
85
+ publicKey: null,
86
+ provider: ''
87
+ };
88
+ };
89
+ const ticketHasAccessLevel = (ticket, accessLevel) => {
90
+ if (!ticket) return false;
91
+ return ticket.badge?.type?.access_levels.map(al => al.name).includes(accessLevel);
92
+ };
93
+ const getCurrentUserLanguage = () => {
94
+ let language = 'en';
95
+
96
+ if (typeof navigator !== 'undefined') {
97
+ language = navigator.languages && navigator.languages[0] || navigator.language || navigator.userLanguage;
98
+ }
99
+
100
+ return language;
101
+ };
102
+ const isEmptyString = val => {
103
+ return typeof val === 'string' && val.trim().length == 0;
104
+ };
105
+ const getTicketTaxes = (ticket, taxes) => {
106
+ if (isPrePaidTicketType(ticket)) return '';
107
+ const ticketTaxes = taxes.filter(tax => tax.ticket_types.includes(ticket?.id));
108
+ return `${ticketTaxes.length > 0 ? ` plus ${taxes.map(t => t.name).join(' & ')}` : ''}`;
109
+ };
110
+ const hasDiscountApplied = ticketType => ticketType.hasOwnProperty('cost_with_applied_discount') && ticketType.cost !== ticketType?.cost_with_applied_discount;
111
+ const isFreeOrder = reservation => reservation.amount === 0;
112
+ const isPrePaidOrder = reservation => reservation.status === ORDER_STATUS_PAID && reservation.payment_method === ORDER_PAYMENT_METHOD_OFFLINE;
113
+ const getTicketCost = (ticket, quantity = 1) => {
114
+ return hasDiscountApplied(ticket) ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("s", null, formatCurrency(ticket.cost * quantity, {
115
+ currency: ticket.currency
116
+ }), " ", ticket.currency), "\xA0", /*#__PURE__*/React.createElement(React.Fragment, null, formatCurrency(ticket.cost_with_applied_discount * quantity, {
117
+ currency: ticket.currency
118
+ }), " ", ticket.currency)) : /*#__PURE__*/React.createElement(React.Fragment, null, formatCurrency(ticket.cost * quantity, {
119
+ currency: ticket.currency
120
+ }), " ", ticket.currency);
121
+ };
122
+ const isPrePaidTicketType = ticketType => ticketType?.sub_type === TICKET_TYPE_SUBTYPE_PREPAID;
123
+ const buildTrackEvent = (data, ticketQuantity = null, promoCode = null) => {
124
+ const eventData = {
125
+ currency: data.currency || 'USD',
126
+ items_array: [{
127
+ item_id: data.id,
128
+ item_name: data.name,
129
+ price: data.cost
130
+ }]
131
+ };
132
+
133
+ if (ticketQuantity) {
134
+ eventData.value = data.cost * ticketQuantity;
135
+ eventData.items_array[0].quantity = ticketQuantity;
136
+ }
137
+
138
+ if (promoCode) {
139
+ eventData.coupon = promoCode;
140
+ eventData.items_array[0].discount = data.cost - (data.cost_with_applied_discount || 0);
141
+ }
142
+
143
+ return eventData;
144
+ };
145
+ const removeWhiteSpaces = value => value.replace(/\s+/g, ''); // Helper function to resolve CSS variables and parse colors
146
+
147
+ const parseColor = (input, element = document.documentElement) => {
148
+ // Check if the input is a CSS variable
149
+ if (input.startsWith("var(")) {
150
+ const cssVarName = input.slice(4, -1).trim();
151
+ input = getComputedStyle(element).getPropertyValue(cssVarName).trim();
152
+ } // Convert the resolved color to RGB
153
+
154
+
155
+ const div = document.createElement("div");
156
+ div.style.color = input;
157
+ document.body.appendChild(div);
158
+ const m = getComputedStyle(div).color.match(/^rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i);
159
+ document.body.removeChild(div);
160
+ return m ? [parseInt(m[1]), parseInt(m[2]), parseInt(m[3])] : null;
161
+ };
162
+ const getContrastingTextColor = (bgColor, lightColor, darkColor) => {
163
+ // Parse the background color to RGB
164
+ const rgb = parseColor(bgColor); // Fallback to a default color if parsing fails
165
+
166
+ if (!rgb) return darkColor; // or lightColor
167
+
168
+ const [r, g, b] = rgb; // Calculate luminance
169
+
170
+ const luminance = [r, g, b].map(channel => {
171
+ const normalized = channel / 255;
172
+ return normalized <= 0.03928 ? normalized / 12.92 : Math.pow((normalized + 0.055) / 1.055, 2.4);
173
+ }).reduce((acc, val, i) => acc + val * [0.2126, 0.7152, 0.0722][i], 0); // Return the contrasting color
174
+
175
+ return luminance > 0.179 ? darkColor : lightColor;
176
+ };
177
+
178
+ const isSentryInitialized = () => !!window.SENTRY_DSN;
179
+
180
+ const handleSentryException = err => isSentryInitialized() ? react_namespaceObject.captureException(err) : console.log("Error on registration: ", err);
181
+
182
+ /***/ }),
183
+
14
184
  /***/ 107:
15
185
  /***/ ((module) => {
16
186
 
@@ -139,6 +309,8 @@ var FNid_WHT_logo_rgb_default = /*#__PURE__*/__webpack_require__.n(FNid_WHT_logo
139
309
  // EXTERNAL MODULE: ./src/assets/FNid_BLK_logo_rgb.svg
140
310
  var FNid_BLK_logo_rgb = __webpack_require__(107);
141
311
  var FNid_BLK_logo_rgb_default = /*#__PURE__*/__webpack_require__.n(FNid_BLK_logo_rgb);
312
+ // EXTERNAL MODULE: ./src/utils/utils.js + 1 modules
313
+ var utils = __webpack_require__(452);
142
314
  ;// CONCATENATED MODULE: ./src/components/login-passwordless/index.js
143
315
  /**
144
316
  * Copyright 2020 OpenStack Foundation
@@ -159,6 +331,7 @@ var FNid_BLK_logo_rgb_default = /*#__PURE__*/__webpack_require__.n(FNid_BLK_logo
159
331
 
160
332
 
161
333
 
334
+
162
335
  const PasswordlessLoginComponent = ({
163
336
  email,
164
337
  codeLength,
@@ -191,6 +364,8 @@ const PasswordlessLoginComponent = ({
191
364
  getLoginCode(email, getPasswordlessCode).then(() => {
192
365
  setCodeSent(true);
193
366
  setTimeout(() => setCodeSent(false), 3000);
367
+ }).catch(err => {
368
+ (0,utils/* handleSentryException */.Gj)(err);
194
369
  });
195
370
  };
196
371
 
@@ -1 +1 @@
1
- {"version":3,"file":"components/login-passwordless.js","mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;;;;;;ACVA,kVAAkV,4EAA4E,0BAA0B;;;;;;;ACAxb,kVAAkV,4EAA4E;;;;;;;;ACA9Z;;;;;;;;ACAA;;;;;;UCAA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCtBA;WACA;WACA;WACA;WACA;WACA,iCAAiC,WAAW;WAC5C;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;;;;;;;;;;;;;;;;;;;ACNA,MAAM,wCAA4B;;;ACAlC;AACA,mDAAe,CAAC,kYAAkY;;;;;;;;ACDlZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;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AAER,kBAAjB;AAA+B,mBAAY;AAA3C,2DACyC,kDADzC,uBA/BR,eAmCI;AAAK,aAAS,EAAEA,mBAAa2C;AAA7B,kBACI;AAAQ,aAAS,EAAG,GAAE3C,mBAAc,SAApC;AAA8C,YAAQ,EAAEqB,SAAxD;AAAmE,WAAO,EAAE,MAAME,oBAAoB,CAACR,OAAD,CAAtG;AAAiH,mBAAY;AAA7H,oBADJ,eAEI,kFAAkB;AAAM,aAAS,EAAEf,iBAAjB;AAA8B,WAAO,EAAE,MAAMS,SAAS,EAAtD;AAA0D,mBAAY;AAAtE,uBAAlB,CAFJ,CAnCJ,CAJJ,eA4CI;AAAK,aAAS,EAAET,mBAAa8C;AAA7B,8EACuD;AAAM,aAAS,EAAE9C,iBAAjB;AAA8B,WAAO,EAAE,MAAM2B,UAAU,EAAvD;AAA2D,mBAAY;AAAvE,mBADvD,UA5CJ,CADJ,CADJ;AAoDH,CApFD;;AAsFAxB,0BAA0B,CAAC4C,SAA3B,GAAuC;AACnC3C,EAAAA,KAAK,EAAEN,iDAD4B;AAEnCO,EAAAA,UAAU,EAAEP,iDAFuB;AAGnCQ,EAAAA,iBAAiB,EAAER,+CAHgB;AAInCS,EAAAA,aAAa,EAAET,oCAJoB;AAKnCU,EAAAA,SAAS,EAAEV,oCALwB;AAMnCW,EAAAA,SAAS,EAAEX,+CANwB;AAOnCY,EAAAA,YAAY,EAAEZ,+CAPqB;AAQnCa,EAAAA,mBAAmB,EAAEb,oCARc;AASnCc,EAAAA,YAAY,EAAEd,sCATqB;AAUnCe,EAAAA,WAAW,EAAEf,sCAVsB;AAWnCgB,EAAAA,UAAU,EAAEhB,sCAAgBkD;AAXO,CAAvC;AAcA,yDAAe7C,0BAAf,E","sources":["webpack://summit-registration-lite/webpack/universalModuleDefinition","webpack://summit-registration-lite/./src/assets/FNid_BLK_logo_rgb.svg","webpack://summit-registration-lite/./src/assets/FNid_WHT_logo_rgb.svg","webpack://summit-registration-lite/external commonjs \"prop-types\"","webpack://summit-registration-lite/external commonjs \"react\"","webpack://summit-registration-lite/webpack/bootstrap","webpack://summit-registration-lite/webpack/runtime/compat get default export","webpack://summit-registration-lite/webpack/runtime/define property getters","webpack://summit-registration-lite/webpack/runtime/hasOwnProperty shorthand","webpack://summit-registration-lite/webpack/runtime/make namespace object","webpack://summit-registration-lite/external commonjs \"react-otp-input\"","webpack://summit-registration-lite/./src/components/login-passwordless/index.module.scss","webpack://summit-registration-lite/./src/components/login-passwordless/index.js"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"summit-registration-lite\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"summit-registration-lite\"] = factory();\n\telse\n\t\troot[\"summit-registration-lite\"] = factory();\n})(this, function() {\nreturn ","module.exports = \"data:image/svg+xml,%3c!-- Generator: Adobe Illustrator 25.4.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) --%3e %3csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 812.24 471.64' style='enable-background:new 0 0 812.24 471.64;' xml:space='preserve'%3e %3cstyle type='text/css'%3e .st0%7bfill:%23FFFFFF;%7d .st1%7bfill:%230C64C8;%7d %3c/style%3e %3cg%3e %3cpath class='st0' d='M170.89,146.78l-64.77,178.08h535.23l64.77-178.08L170.89,146.78L170.89,146.78z M384.48,309.44H341.7 l-25.6-80.85l-29.41,80.85h-42.6l41.94-115.3h-65.52l-9.29,25.54h56.62l-10.8,29.7h-56.62l-21.84,60.06h-45.63l53.39-146.78h153.49 l25.72,81.24l29.56-81.24h42.75L384.48,309.44z'/%3e %3cg%3e %3cpath class='st1' d='M588.49,162.71v50.86c-4-4.27-8.59-7.47-13.76-9.61s-10.92-3.21-17.26-3.21c-13.01,0-23.73,4.67-32.17,14.02 c-8.44,9.34-12.66,22.83-12.66,40.45c0,15.75,3.82,29.13,11.46,40.15c7.64,11.01,18.69,16.52,33.17,16.52 c7.2,0,13.74-1.54,19.61-4.6c4.4-2.34,9.27-6.84,14.61-13.52v15.72h38.12V162.71H588.49z M583.59,275.94 c-3.47,4.07-7.8,6.11-13.01,6.11c-4.87,0-8.96-2.02-12.26-6.06s-4.95-10.4-4.95-19.07c0-9.28,1.6-15.88,4.8-19.82 s7.17-5.91,11.91-5.91c5.4,0,9.87,2.05,13.41,6.16c3.53,4.1,5.3,10.33,5.3,18.67C588.79,265.23,587.05,271.87,583.59,275.94z'/%3e %3cpath class='st1' d='M473.92,207.72c-14.37,0-26.03,7.27-26.03,16.25v2.96v45.48h9.09l3.47,37.09h26.95l3.47-37.09h9.09v-45.48 v-2.96C499.95,214.99,488.29,207.72,473.92,207.72z'/%3e %3cellipse transform='matrix(2.075247e-03 -1 1 2.075247e-03 290.6104 655.8611)' class='st1' cx='473.92' cy='182.32' rx='19.87' ry='19.86'/%3e %3c/g%3e %3c/g%3e %3c/svg%3e\"","module.exports = \"data:image/svg+xml,%3c!-- Generator: Adobe Illustrator 25.4.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) --%3e %3csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 812.24 471.64' style='enable-background:new 0 0 812.24 471.64;' xml:space='preserve'%3e %3cstyle type='text/css'%3e .st0%7bfill:%230C64C8;%7d %3c/style%3e %3cg%3e %3cpath d='M170.89,146.78l-64.77,178.08h535.23l64.77-178.08L170.89,146.78L170.89,146.78z M384.48,309.44H341.7l-25.6-80.85 l-29.41,80.85h-42.6l41.94-115.3h-65.52l-9.29,25.54h56.62l-10.8,29.7h-56.62l-21.84,60.06h-45.63l53.39-146.78h153.49l25.72,81.24 l29.56-81.24h42.75L384.48,309.44z'/%3e %3cg%3e %3cpath class='st0' d='M588.49,162.71v50.86c-4-4.27-8.59-7.47-13.76-9.61s-10.92-3.21-17.26-3.21c-13.01,0-23.73,4.67-32.17,14.02 c-8.44,9.34-12.66,22.83-12.66,40.45c0,15.75,3.82,29.13,11.46,40.15c7.64,11.01,18.69,16.52,33.17,16.52 c7.2,0,13.74-1.54,19.61-4.6c4.4-2.34,9.27-6.84,14.61-13.52v15.72h38.12V162.71H588.49z M583.59,275.94 c-3.47,4.07-7.8,6.11-13.01,6.11c-4.87,0-8.96-2.02-12.26-6.06s-4.95-10.4-4.95-19.07c0-9.28,1.6-15.88,4.8-19.82 s7.17-5.91,11.91-5.91c5.4,0,9.87,2.05,13.41,6.16c3.53,4.1,5.3,10.33,5.3,18.67C588.79,265.23,587.05,271.87,583.59,275.94z'/%3e %3cpath class='st0' d='M473.92,207.72c-14.37,0-26.03,7.27-26.03,16.25v2.96v45.48h9.09l3.47,37.09h26.95l3.47-37.09h9.09v-45.48 v-2.96C499.95,214.99,488.29,207.72,473.92,207.72z'/%3e %3cellipse transform='matrix(2.075247e-03 -1 1 2.075247e-03 290.6104 655.8611)' class='st0' cx='473.92' cy='182.32' rx='19.87' ry='19.86'/%3e %3c/g%3e %3c/g%3e %3c/svg%3e\"","module.exports = require(\"prop-types\");","module.exports = require(\"react\");","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"react-otp-input\");","// extracted by mini-css-extract-plugin\nexport default {\"passwordlessWrapper\":\"passwordlessWrapper___BRQ_s\",\"codeSent\":\"codeSent___NzYb_\",\"innerWrapper\":\"innerWrapper___nRLDi\",\"logo\":\"logo___qNVrv\",\"logoDark\":\"logoDark___VVYee\",\"digits\":\"digits___Vu5iy\",\"codeInput\":\"codeInput___LnTZe\",\"error\":\"error___wZflZ\",\"verify\":\"verify___IBgMl\",\"button\":\"button___nBhtQ\",\"link\":\"link___f6fDT\",\"resend\":\"resend___Nma1U\",\"logoLight\":\"logoLight___vSbn_\"};","/**\n * Copyright 2020 OpenStack Foundation\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n **/\n\nimport React, { useState } from 'react';\nimport PropTypes from 'prop-types';\nimport OtpInput from 'react-otp-input';\n\nimport styles from \"./index.module.scss\";\n\nimport FNidLogo from '../../assets/FNid_WHT_logo_rgb.svg';\nimport FNidLogoDark from '../../assets/FNid_BLK_logo_rgb.svg';\n\nconst PasswordlessLoginComponent = ({\n email, codeLength, passwordlessLogin, loginWithCode, codeError, goToLogin,\n getLoginCode, getPasswordlessCode, idpLogoLight, idpLogoDark, idpLogoAlt }) => {\n\n const [otpCode, setOtpCode] = useState('');\n const [otpError, setOtpError] = useState(false)\n const [codeSent, setCodeSent] = useState(false);\n const [isLoading, setIsLoading] = useState(false);\n\n const tryPasswordlessLogin = (code) => {\n if (code.length === codeLength) {\n setOtpError(false);\n setIsLoading(true);\n passwordlessLogin(otpCode, loginWithCode).finally(() => setIsLoading(false));\n } else {\n setOtpError(true)\n }\n }\n\n const resendCode = () => {\n getLoginCode(email, getPasswordlessCode)\n .then(() => {\n setCodeSent(true);\n setTimeout(() => setCodeSent(false), 3000);\n });\n }\n\n const handleSubmit = (e) => {\n e.preventDefault();\n tryPasswordlessLogin(otpCode);\n };\n\n return (\n <div className={`${styles.passwordlessWrapper} step-wrapper`}>\n <>\n {codeSent &&\n <div className={styles.codeSent}>Code has been resent.</div>\n }\n <div className={`${styles.innerWrapper}`}>\n {/* Only one logo is displayed based on data-theme through CSS */}\n <img src={idpLogoDark || FNidLogoDark} alt={idpLogoAlt || \"FNid\"} className={`${styles.logo} ${styles.logoDark}`} />\n <img src={idpLogoLight || FNidLogo} alt={idpLogoAlt || \"FNid\"} className={`${styles.logo} ${styles.logoLight}`} />\n <span>\n We sent your single-use code to <br />\n <span data-testid=\"email\">{email}</span>\n <br />\n <span className={styles.digits} data-testid=\"code-digits\">\n Add the {codeLength} digit code below\n </span>\n </span>\n <div className={styles.codeInput}>\n <form onSubmit={handleSubmit}>\n <OtpInput\n value={otpCode}\n onChange={(code) => setOtpCode(code)}\n numInputs={codeLength}\n shouldAutoFocus={true}\n hasErrored={otpError || codeError}\n errorStyle={{ border: '1px solid #e5424d' }}\n data-testid=\"otp-input\"\n />\n {/*\n this is to simulate the on key press submit (enter)\n @see https://github.com/devfolioco/react-otp-input/issues/98\n */}\n <button style={{display:'none'}} type='submit' />\n </form>\n </div>\n {codeError && (\n <span className={styles.error} data-testid=\"error\">\n The code you entered it's incorrect. <br /> Please try again.\n </span>\n )}\n <div className={styles.verify}>\n <button className={`${styles.button} button`} disabled={isLoading} onClick={() => tryPasswordlessLogin(otpCode)} data-testid=\"verify\">Verify Email</button>\n <b>or go back and <span className={styles.link} onClick={() => goToLogin()} data-testid=\"go-back\">try another way</span></b>\n </div>\n </div>\n <div className={styles.resend}>\n Didn’t receive it? Check your spam/junk folder, or <span className={styles.link} onClick={() => resendCode()} data-testid=\"resend\">resend code</span> now.\n </div>\n </>\n </div>\n );\n}\n\nPasswordlessLoginComponent.propTypes = {\n email: PropTypes.string.isRequired,\n codeLength: PropTypes.number.isRequired,\n passwordlessLogin: PropTypes.func.isRequired,\n loginWithCode: PropTypes.func,\n codeError: PropTypes.bool,\n goToLogin: PropTypes.func.isRequired,\n getLoginCode: PropTypes.func.isRequired,\n getPasswordlessCode: PropTypes.func,\n idpLogoLight: PropTypes.string,\n idpLogoDark: PropTypes.string,\n idpLogoAlt: PropTypes.string\n}\n\nexport default PasswordlessLoginComponent;\n"],"names":["React","useState","PropTypes","OtpInput","styles","FNidLogo","FNidLogoDark","PasswordlessLoginComponent","email","codeLength","passwordlessLogin","loginWithCode","codeError","goToLogin","getLoginCode","getPasswordlessCode","idpLogoLight","idpLogoDark","idpLogoAlt","otpCode","setOtpCode","otpError","setOtpError","codeSent","setCodeSent","isLoading","setIsLoading","tryPasswordlessLogin","code","length","finally","resendCode","then","setTimeout","handleSubmit","e","preventDefault","passwordlessWrapper","innerWrapper","logo","logoDark","logoLight","digits","codeInput","border","display","error","verify","button","link","resend","propTypes","string","isRequired","number","func","bool"],"sourceRoot":""}
1
+ {"version":3,"file":"components/login-passwordless.js","mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;;;;;;;;;;;;;ACVA;AAEO,MAAMC,oBAAoB,GAAI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AACnC3C,EAAAA,KAAK,EAAEN,iDAD4B;AAEnCO,EAAAA,UAAU,EAAEP,iDAFuB;AAGnCQ,EAAAA,iBAAiB,EAAER,+CAHgB;AAInCS,EAAAA,aAAa,EAAET,oCAJoB;AAKnCU,EAAAA,SAAS,EAAEV,oCALwB;AAMnCW,EAAAA,SAAS,EAAEX,+CANwB;AAOnCY,EAAAA,YAAY,EAAEZ,+CAPqB;AAQnCa,EAAAA,mBAAmB,EAAEb,oCARc;AASnCc,EAAAA,YAAY,EAAEd,sCATqB;AAUnCe,EAAAA,WAAW,EAAEf,sCAVsB;AAWnCgB,EAAAA,UAAU,EAAEhB,sCAAgBkD;AAXO,CAAvC;AAcA,yDAAe7C,0BAAf,E","sources":["webpack://summit-registration-lite/webpack/universalModuleDefinition","webpack://summit-registration-lite/./src/helpers/getTicketMaxQuantity.js","webpack://summit-registration-lite/./src/helpers/index.js","webpack://summit-registration-lite/external commonjs \"@sentry/react\"","webpack://summit-registration-lite/./src/utils/utils.js","webpack://summit-registration-lite/./src/assets/FNid_BLK_logo_rgb.svg","webpack://summit-registration-lite/./src/assets/FNid_WHT_logo_rgb.svg","webpack://summit-registration-lite/external commonjs \"prop-types\"","webpack://summit-registration-lite/external commonjs \"react\"","webpack://summit-registration-lite/webpack/bootstrap","webpack://summit-registration-lite/webpack/runtime/compat get default export","webpack://summit-registration-lite/webpack/runtime/define property getters","webpack://summit-registration-lite/webpack/runtime/hasOwnProperty shorthand","webpack://summit-registration-lite/webpack/runtime/make namespace object","webpack://summit-registration-lite/external commonjs \"react-otp-input\"","webpack://summit-registration-lite/./src/components/login-passwordless/index.module.scss","webpack://summit-registration-lite/./src/components/login-passwordless/index.js"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"summit-registration-lite\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"summit-registration-lite\"] = factory();\n\telse\n\t\troot[\"summit-registration-lite\"] = factory();\n})(this, function() {\nreturn ","import { isPrePaidTicketType } from '../utils/utils';\n\nexport const getTicketMaxQuantity = (ticket) => {\n if(!ticket) return 0;\n if(isPrePaidTicketType(ticket)) return 1;\n return Math.min((ticket.quantity_2_sell || Number.MAX_SAFE_INTEGER) - ticket.quantity_sold, (ticket.max_quantity_per_order || Number.MAX_SAFE_INTEGER));\n}\n\n","export * from './capitalizeFirstLetter';\nexport * from './formatCurrency';\nexport * from './formatErrorMessage';\nexport * from './getTicketMaxQuantity';\n","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@sentry/react\");","import { formatCurrency } from '../helpers';\nimport { ORDER_PAYMENT_METHOD_OFFLINE, ORDER_STATUS_PAID, TICKET_TYPE_SUBTYPE_PREPAID } from './constants';\n\nimport React from 'react';\nimport * as Sentry from \"@sentry/react\";\n\n/**\n * Copyright 2022 OpenStack Foundation\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n **/\n\nexport const getCurrentProvider = (summit) => {\n for (let profile of summit.payment_profiles) {\n if (profile.application_type === 'Registration') {\n return {\n publicKey : profile.test_mode_enabled ? profile.test_publishable_key : profile.live_publishable_key,\n provider : profile.provider\n }\n }\n }\n return {\n publicKey : null,\n provider : ''\n }\n}\n\nexport const ticketHasAccessLevel = (ticket, accessLevel) => {\n if(!ticket) return false;\n return ticket.badge?.type?.access_levels.map(al => al.name).includes(accessLevel);\n};\n\nexport const getCurrentUserLanguage = () => {\n let language = 'en';\n if(typeof navigator !== 'undefined') {\n language = (navigator.languages && navigator.languages[0]) || navigator.language || navigator.userLanguage;\n }\n return language;\n};\n\nexport const isEmptyString = (val) => {\n return typeof val === 'string' && val.trim().length == 0;\n}\n\nexport const getTicketTaxes = (ticket, taxes) => {\n if(isPrePaidTicketType(ticket)) return '';\n const ticketTaxes = taxes.filter(tax => tax.ticket_types.includes(ticket?.id));\n return `${ticketTaxes.length > 0 ? ` plus ${taxes.map(t => t.name).join(' & ')}` : ''}`;\n}\n\nexport const hasDiscountApplied = (ticketType) => ticketType.hasOwnProperty('cost_with_applied_discount') && ticketType.cost !== ticketType?.cost_with_applied_discount;\n\nexport const isFreeOrder = (reservation) => reservation.amount === 0 ;\n\nexport const isPrePaidOrder = (reservation) => reservation.status === ORDER_STATUS_PAID && reservation.payment_method === ORDER_PAYMENT_METHOD_OFFLINE;\n\nexport const getTicketCost = (ticket, quantity = 1) => {\n return hasDiscountApplied(ticket) ?\n <>\n <s>{formatCurrency(ticket.cost * quantity, { currency: ticket.currency })} {ticket.currency}</s>\n &nbsp;\n <>{formatCurrency(ticket.cost_with_applied_discount * quantity, { currency: ticket.currency })} {ticket.currency}</>\n </>\n :\n <>{formatCurrency(ticket.cost * quantity, { currency: ticket.currency })} {ticket.currency}</>\n}\n\nexport const isPrePaidTicketType = (ticketType) => ticketType?.sub_type === TICKET_TYPE_SUBTYPE_PREPAID;\n\nexport const buildTrackEvent = (data, ticketQuantity = null, promoCode = null) => {\n const eventData = {\n currency: data.currency || 'USD',\n items_array: [\n {\n item_id: data.id,\n item_name: data.name,\n price: data.cost,\n }\n ]\n };\n\n if (ticketQuantity) {\n eventData.value = data.cost * ticketQuantity;\n eventData.items_array[0].quantity = ticketQuantity;\n }\n\n if (promoCode) {\n eventData.coupon = promoCode;\n eventData.items_array[0].discount = data.cost - (data.cost_with_applied_discount || 0);\n }\n\n return eventData;\n}\n\nexport const removeWhiteSpaces = (value) => value.replace(/\\s+/g, '');\n\n// Helper function to resolve CSS variables and parse colors\n\nexport const parseColor = (input, element = document.documentElement) => {\n // Check if the input is a CSS variable\n if (input.startsWith(\"var(\")) { \n const cssVarName = input.slice(4, -1).trim(); \n input = getComputedStyle(element).getPropertyValue(cssVarName).trim();\n }\n\n // Convert the resolved color to RGB\n const div = document.createElement(\"div\"); \n div.style.color = input;\n document.body.appendChild(div);\n const m = getComputedStyle(div).color.match(/^rgb\\s*\\(\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*\\)$/i);\n document.body.removeChild(div);\n return m ? [parseInt(m[1]), parseInt(m[2]), parseInt(m[3])] : null;\n}\n \n\nexport const getContrastingTextColor = (bgColor, lightColor, darkColor) => {\n // Parse the background color to RGB\n const rgb = parseColor(bgColor);\n\n // Fallback to a default color if parsing fails\n if (!rgb) return darkColor; // or lightColor\n \n const [r, g, b] = rgb;\n\n // Calculate luminance \n const luminance = [r, g, b].map(channel => {\n const normalized = channel / 255;\n return normalized <= 0.03928 \n ? normalized / 12.92 \n : Math.pow((normalized + 0.055) / 1.055, 2.4);\n }).reduce((acc, val, i) => acc + val * [0.2126, 0.7152, 0.0722][i], 0);\n \n\n // Return the contrasting color\n return luminance > 0.179 ? darkColor : lightColor;\n}\n\nconst isSentryInitialized = () => !!window.SENTRY_DSN;\n\nexport const handleSentryException = (err) => \n isSentryInitialized() \n ? Sentry.captureException(err)\n : console.log(\"Error on registration: \", err);","module.exports = \"data:image/svg+xml,%3c!-- Generator: Adobe Illustrator 25.4.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) --%3e %3csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 812.24 471.64' style='enable-background:new 0 0 812.24 471.64;' xml:space='preserve'%3e %3cstyle type='text/css'%3e .st0%7bfill:%23FFFFFF;%7d .st1%7bfill:%230C64C8;%7d %3c/style%3e %3cg%3e %3cpath class='st0' d='M170.89,146.78l-64.77,178.08h535.23l64.77-178.08L170.89,146.78L170.89,146.78z M384.48,309.44H341.7 l-25.6-80.85l-29.41,80.85h-42.6l41.94-115.3h-65.52l-9.29,25.54h56.62l-10.8,29.7h-56.62l-21.84,60.06h-45.63l53.39-146.78h153.49 l25.72,81.24l29.56-81.24h42.75L384.48,309.44z'/%3e %3cg%3e %3cpath class='st1' d='M588.49,162.71v50.86c-4-4.27-8.59-7.47-13.76-9.61s-10.92-3.21-17.26-3.21c-13.01,0-23.73,4.67-32.17,14.02 c-8.44,9.34-12.66,22.83-12.66,40.45c0,15.75,3.82,29.13,11.46,40.15c7.64,11.01,18.69,16.52,33.17,16.52 c7.2,0,13.74-1.54,19.61-4.6c4.4-2.34,9.27-6.84,14.61-13.52v15.72h38.12V162.71H588.49z M583.59,275.94 c-3.47,4.07-7.8,6.11-13.01,6.11c-4.87,0-8.96-2.02-12.26-6.06s-4.95-10.4-4.95-19.07c0-9.28,1.6-15.88,4.8-19.82 s7.17-5.91,11.91-5.91c5.4,0,9.87,2.05,13.41,6.16c3.53,4.1,5.3,10.33,5.3,18.67C588.79,265.23,587.05,271.87,583.59,275.94z'/%3e %3cpath class='st1' d='M473.92,207.72c-14.37,0-26.03,7.27-26.03,16.25v2.96v45.48h9.09l3.47,37.09h26.95l3.47-37.09h9.09v-45.48 v-2.96C499.95,214.99,488.29,207.72,473.92,207.72z'/%3e %3cellipse transform='matrix(2.075247e-03 -1 1 2.075247e-03 290.6104 655.8611)' class='st1' cx='473.92' cy='182.32' rx='19.87' ry='19.86'/%3e %3c/g%3e %3c/g%3e %3c/svg%3e\"","module.exports = \"data:image/svg+xml,%3c!-- Generator: Adobe Illustrator 25.4.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) --%3e %3csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 812.24 471.64' style='enable-background:new 0 0 812.24 471.64;' xml:space='preserve'%3e %3cstyle type='text/css'%3e .st0%7bfill:%230C64C8;%7d %3c/style%3e %3cg%3e %3cpath d='M170.89,146.78l-64.77,178.08h535.23l64.77-178.08L170.89,146.78L170.89,146.78z M384.48,309.44H341.7l-25.6-80.85 l-29.41,80.85h-42.6l41.94-115.3h-65.52l-9.29,25.54h56.62l-10.8,29.7h-56.62l-21.84,60.06h-45.63l53.39-146.78h153.49l25.72,81.24 l29.56-81.24h42.75L384.48,309.44z'/%3e %3cg%3e %3cpath class='st0' d='M588.49,162.71v50.86c-4-4.27-8.59-7.47-13.76-9.61s-10.92-3.21-17.26-3.21c-13.01,0-23.73,4.67-32.17,14.02 c-8.44,9.34-12.66,22.83-12.66,40.45c0,15.75,3.82,29.13,11.46,40.15c7.64,11.01,18.69,16.52,33.17,16.52 c7.2,0,13.74-1.54,19.61-4.6c4.4-2.34,9.27-6.84,14.61-13.52v15.72h38.12V162.71H588.49z M583.59,275.94 c-3.47,4.07-7.8,6.11-13.01,6.11c-4.87,0-8.96-2.02-12.26-6.06s-4.95-10.4-4.95-19.07c0-9.28,1.6-15.88,4.8-19.82 s7.17-5.91,11.91-5.91c5.4,0,9.87,2.05,13.41,6.16c3.53,4.1,5.3,10.33,5.3,18.67C588.79,265.23,587.05,271.87,583.59,275.94z'/%3e %3cpath class='st0' d='M473.92,207.72c-14.37,0-26.03,7.27-26.03,16.25v2.96v45.48h9.09l3.47,37.09h26.95l3.47-37.09h9.09v-45.48 v-2.96C499.95,214.99,488.29,207.72,473.92,207.72z'/%3e %3cellipse transform='matrix(2.075247e-03 -1 1 2.075247e-03 290.6104 655.8611)' class='st0' cx='473.92' cy='182.32' rx='19.87' ry='19.86'/%3e %3c/g%3e %3c/g%3e %3c/svg%3e\"","module.exports = require(\"prop-types\");","module.exports = require(\"react\");","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"react-otp-input\");","// extracted by mini-css-extract-plugin\nexport default {\"passwordlessWrapper\":\"passwordlessWrapper___BRQ_s\",\"codeSent\":\"codeSent___NzYb_\",\"innerWrapper\":\"innerWrapper___nRLDi\",\"logo\":\"logo___qNVrv\",\"logoDark\":\"logoDark___VVYee\",\"digits\":\"digits___Vu5iy\",\"codeInput\":\"codeInput___LnTZe\",\"error\":\"error___wZflZ\",\"verify\":\"verify___IBgMl\",\"button\":\"button___nBhtQ\",\"link\":\"link___f6fDT\",\"resend\":\"resend___Nma1U\",\"logoLight\":\"logoLight___vSbn_\"};","/**\n * Copyright 2020 OpenStack Foundation\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n **/\n\nimport React, { useState } from 'react';\nimport PropTypes from 'prop-types';\nimport OtpInput from 'react-otp-input';\n\nimport styles from \"./index.module.scss\";\n\nimport FNidLogo from '../../assets/FNid_WHT_logo_rgb.svg';\nimport FNidLogoDark from '../../assets/FNid_BLK_logo_rgb.svg';\nimport { handleSentryException } from '../../utils/utils';\n\nconst PasswordlessLoginComponent = ({\n email, codeLength, passwordlessLogin, loginWithCode, codeError, goToLogin,\n getLoginCode, getPasswordlessCode, idpLogoLight, idpLogoDark, idpLogoAlt }) => {\n\n const [otpCode, setOtpCode] = useState('');\n const [otpError, setOtpError] = useState(false)\n const [codeSent, setCodeSent] = useState(false);\n const [isLoading, setIsLoading] = useState(false);\n\n const tryPasswordlessLogin = (code) => {\n if (code.length === codeLength) {\n setOtpError(false);\n setIsLoading(true);\n passwordlessLogin(otpCode, loginWithCode).finally(() => setIsLoading(false));\n } else {\n setOtpError(true)\n }\n }\n\n const resendCode = () => {\n getLoginCode(email, getPasswordlessCode)\n .then(() => {\n setCodeSent(true);\n setTimeout(() => setCodeSent(false), 3000);\n })\n .catch((err) => {\n handleSentryException(err);\n });\n }\n\n const handleSubmit = (e) => {\n e.preventDefault();\n tryPasswordlessLogin(otpCode);\n };\n\n return (\n <div className={`${styles.passwordlessWrapper} step-wrapper`}>\n <>\n {codeSent &&\n <div className={styles.codeSent}>Code has been resent.</div>\n }\n <div className={`${styles.innerWrapper}`}>\n {/* Only one logo is displayed based on data-theme through CSS */}\n <img src={idpLogoDark || FNidLogoDark} alt={idpLogoAlt || \"FNid\"} className={`${styles.logo} ${styles.logoDark}`} />\n <img src={idpLogoLight || FNidLogo} alt={idpLogoAlt || \"FNid\"} className={`${styles.logo} ${styles.logoLight}`} />\n <span>\n We sent your single-use code to <br />\n <span data-testid=\"email\">{email}</span>\n <br />\n <span className={styles.digits} data-testid=\"code-digits\">\n Add the {codeLength} digit code below\n </span>\n </span>\n <div className={styles.codeInput}>\n <form onSubmit={handleSubmit}>\n <OtpInput\n value={otpCode}\n onChange={(code) => setOtpCode(code)}\n numInputs={codeLength}\n shouldAutoFocus={true}\n hasErrored={otpError || codeError}\n errorStyle={{ border: '1px solid #e5424d' }}\n data-testid=\"otp-input\"\n />\n {/*\n this is to simulate the on key press submit (enter)\n @see https://github.com/devfolioco/react-otp-input/issues/98\n */}\n <button style={{display:'none'}} type='submit' />\n </form>\n </div>\n {codeError && (\n <span className={styles.error} data-testid=\"error\">\n The code you entered it's incorrect. <br /> Please try again.\n </span>\n )}\n <div className={styles.verify}>\n <button className={`${styles.button} button`} disabled={isLoading} onClick={() => tryPasswordlessLogin(otpCode)} data-testid=\"verify\">Verify Email</button>\n <b>or go back and <span className={styles.link} onClick={() => goToLogin()} data-testid=\"go-back\">try another way</span></b>\n </div>\n </div>\n <div className={styles.resend}>\n Didn’t receive it? Check your spam/junk folder, or <span className={styles.link} onClick={() => resendCode()} data-testid=\"resend\">resend code</span> now.\n </div>\n </>\n </div>\n );\n}\n\nPasswordlessLoginComponent.propTypes = {\n email: PropTypes.string.isRequired,\n codeLength: PropTypes.number.isRequired,\n passwordlessLogin: PropTypes.func.isRequired,\n loginWithCode: PropTypes.func,\n codeError: PropTypes.bool,\n goToLogin: PropTypes.func.isRequired,\n getLoginCode: PropTypes.func.isRequired,\n getPasswordlessCode: PropTypes.func,\n idpLogoLight: PropTypes.string,\n idpLogoDark: PropTypes.string,\n idpLogoAlt: PropTypes.string\n}\n\nexport default PasswordlessLoginComponent;\n"],"names":["isPrePaidTicketType","getTicketMaxQuantity","ticket","Math","min","quantity_2_sell","Number","MAX_SAFE_INTEGER","quantity_sold","max_quantity_per_order","formatCurrency","ORDER_PAYMENT_METHOD_OFFLINE","ORDER_STATUS_PAID","TICKET_TYPE_SUBTYPE_PREPAID","React","Sentry","getCurrentProvider","summit","profile","payment_profiles","application_type","publicKey","test_mode_enabled","test_publishable_key","live_publishable_key","provider","ticketHasAccessLevel","accessLevel","badge","type","access_levels","map","al","name","includes","getCurrentUserLanguage","language","navigator","languages","userLanguage","isEmptyString","val","trim","length","getTicketTaxes","taxes","ticketTaxes","filter","tax","ticket_types","id","t","join","hasDiscountApplied","ticketType","hasOwnProperty","cost","cost_with_applied_discount","isFreeOrder","reservation","amount","isPrePaidOrder","status","payment_method","getTicketCost","quantity","currency","sub_type","buildTrackEvent","data","ticketQuantity","promoCode","eventData","items_array","item_id","item_name","price","value","coupon","discount","removeWhiteSpaces","replace","parseColor","input","element","document","documentElement","startsWith","cssVarName","slice","getComputedStyle","getPropertyValue","div","createElement","style","color","body","appendChild","m","match","removeChild","parseInt","getContrastingTextColor","bgColor","lightColor","darkColor","rgb","r","g","b","luminance","channel","normalized","pow","reduce","acc","i","isSentryInitialized","window","SENTRY_DSN","handleSentryException","err","captureException","console","log","useState","PropTypes","OtpInput","styles","FNidLogo","FNidLogoDark","PasswordlessLoginComponent","email","codeLength","passwordlessLogin","loginWithCode","codeError","goToLogin","getLoginCode","getPasswordlessCode","idpLogoLight","idpLogoDark","idpLogoAlt","otpCode","setOtpCode","otpError","setOtpError","codeSent","setCodeSent","isLoading","setIsLoading","tryPasswordlessLogin","code","finally","resendCode","then","setTimeout","catch","handleSubmit","e","preventDefault","passwordlessWrapper","innerWrapper","logo","logoDark","logoLight","digits","codeInput","border","display","error","verify","button","link","resend","propTypes","string","isRequired","number","func","bool"],"sourceRoot":""}
@@ -18,8 +18,8 @@ return /******/ (() => { // webpackBootstrap
18
18
 
19
19
  // UNUSED EXPORTS: capitalizeFirstLetter, formatCurrency, formatErrorMessage, getTicketMaxQuantity
20
20
 
21
- // EXTERNAL MODULE: ./src/utils/utils.js
22
- var utils = __webpack_require__(868);
21
+ // EXTERNAL MODULE: ./src/utils/utils.js + 1 modules
22
+ var utils = __webpack_require__(452);
23
23
  ;// CONCATENATED MODULE: ./src/helpers/getTicketMaxQuantity.js
24
24
 
25
25
  const getTicketMaxQuantity = ticket => {
@@ -35,17 +35,27 @@ const getTicketMaxQuantity = ticket => {
35
35
 
36
36
  /***/ }),
37
37
 
38
- /***/ 868:
38
+ /***/ 452:
39
39
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
40
40
 
41
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
42
- /* harmony export */ "Jg": () => (/* binding */ removeWhiteSpaces),
43
- /* harmony export */ "YJ": () => (/* binding */ getContrastingTextColor)
44
- /* harmony export */ });
45
- /* unused harmony exports getCurrentProvider, ticketHasAccessLevel, getCurrentUserLanguage, isEmptyString, getTicketTaxes, hasDiscountApplied, isFreeOrder, isPrePaidOrder, getTicketCost, isPrePaidTicketType, buildTrackEvent, parseColor */
46
- /* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(499);
47
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(689);
48
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
41
+
42
+ // EXPORTS
43
+ __webpack_require__.d(__webpack_exports__, {
44
+ "YJ": () => (/* binding */ getContrastingTextColor),
45
+ "Gj": () => (/* binding */ handleSentryException),
46
+ "Jg": () => (/* binding */ removeWhiteSpaces)
47
+ });
48
+
49
+ // UNUSED EXPORTS: buildTrackEvent, getCurrentProvider, getCurrentUserLanguage, getTicketCost, getTicketTaxes, hasDiscountApplied, isEmptyString, isFreeOrder, isPrePaidOrder, isPrePaidTicketType, parseColor, ticketHasAccessLevel
50
+
51
+ // EXTERNAL MODULE: ./src/helpers/index.js + 1 modules
52
+ var helpers = __webpack_require__(499);
53
+ // EXTERNAL MODULE: external "react"
54
+ var external_react_ = __webpack_require__(689);
55
+ ;// CONCATENATED MODULE: external "@sentry/react"
56
+ const react_namespaceObject = require("@sentry/react");
57
+ ;// CONCATENATED MODULE: ./src/utils/utils.js
58
+
49
59
 
50
60
 
51
61
 
@@ -166,6 +176,10 @@ const getContrastingTextColor = (bgColor, lightColor, darkColor) => {
166
176
  return luminance > 0.179 ? darkColor : lightColor;
167
177
  };
168
178
 
179
+ const isSentryInitialized = () => !!window.SENTRY_DSN;
180
+
181
+ const handleSentryException = err => isSentryInitialized() ? react_namespaceObject.captureException(err) : console.log("Error on registration: ", err);
182
+
169
183
  /***/ }),
170
184
 
171
185
  /***/ 580:
@@ -270,8 +284,8 @@ var external_prop_types_default = /*#__PURE__*/__webpack_require__.n(external_pr
270
284
  ;// CONCATENATED MODULE: external "@mui/icons-material/EmailRounded"
271
285
  const EmailRounded_namespaceObject = require("@mui/icons-material/EmailRounded");
272
286
  var EmailRounded_default = /*#__PURE__*/__webpack_require__.n(EmailRounded_namespaceObject);
273
- // EXTERNAL MODULE: ./src/utils/utils.js
274
- var utils = __webpack_require__(868);
287
+ // EXTERNAL MODULE: ./src/utils/utils.js + 1 modules
288
+ var utils = __webpack_require__(452);
275
289
  ;// CONCATENATED MODULE: ./src/components/login/index.module.scss
276
290
  // extracted by mini-css-extract-plugin
277
291
  /* harmony default export */ const index_module = ({"loginWrapper":"loginWrapper___sxUEn","innerWrapper":"innerWrapper___GQRkq","button":"button___QMZPu","title":"title___NnwWR","loginCode":"loginCode___dDBup","error":"error___aCF7E","primaryEmailButton":"primaryEmailButton___gH1fC","buttonDisabled":"buttonDisabled___T9tkn","pointerDisabled":"pointerDisabled___qt_HK","email_login_button":"email_login_button___seiLi","h2Styled":"h2Styled___rfIKD","input":"input___QR9sA"});
@@ -321,8 +335,9 @@ const LoginComponent = ({
321
335
  setLoginError(false);
322
336
 
323
337
  if (isValid) {
324
- getLoginCode(email, getPasswordlessCode).catch(e => {
325
- setLoginError(e.message);
338
+ getLoginCode(email, getPasswordlessCode).catch(err => {
339
+ setLoginError(err.message);
340
+ (0,utils/* handleSentryException */.Gj)(err);
326
341
  });
327
342
  }
328
343
  };
@@ -1 +1 @@
1
- {"version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AEI,kDAFJ,CAFJ,eAMI;AAAK,WAAO,EAAE,MAAMA,SAAS,EAA7B;AAAiC,mBAAY,cAA7C;AAA4D,aAAS,EAAC,QAAtE;AAA+E,SAAK,EAAE;AAAEkC,MAAAA,UAAU,EAAE,MAAd;AAAsBjF,MAAAA,KAAK,EAAE;AAA7B;AAAtF,6BANJ,EASKsC,UAAU,iBAAI;AAAM,mBAAY;AAAlB,yCATnB,CAlDR,CADJ,CADJ,CADJ;AAqEH,CAjHD;;AAmHAZ,cAAc,CAACwD,SAAf,GAA2B;AACvBtD,EAAAA,YAAY,EAAEL,gDADS;AAEvBM,EAAAA,KAAK,EAAEN,+CAFgB;AAGvBO,EAAAA,gBAAgB,EAAEP,oCAHK;AAIvBQ,EAAAA,kBAAkB,EAAER,oCAJG;AAKvBS,EAAAA,YAAY,EAAET,+CALS;AAMvBU,EAAAA,mBAAmB,EAAEV,oCANE;AAOvBW,EAAAA,iBAAiB,EAAEX,sCAPI;AAQvBY,EAAAA,KAAK,EAAEZ,sCAAgBgE;AARA,CAA3B;AAWA7D,cAAc,CAAC8D,YAAf,GAA8B;AAC1B1D,EAAAA,gBAAgB,EAAE,IADQ;AAE1BC,EAAAA,kBAAkB,EAAE,KAFM;AAG1BG,EAAAA,iBAAiB,EAAE,EAHO;AAI1BC,EAAAA,KAAK,EAAE;AAJmB,CAA9B;AAQA,4CAAeT,cAAf,E","sources":["webpack://summit-registration-lite/webpack/universalModuleDefinition","webpack://summit-registration-lite/./src/helpers/getTicketMaxQuantity.js","webpack://summit-registration-lite/./src/helpers/index.js","webpack://summit-registration-lite/./src/utils/utils.js","webpack://summit-registration-lite/external commonjs \"prop-types\"","webpack://summit-registration-lite/external commonjs \"react\"","webpack://summit-registration-lite/webpack/bootstrap","webpack://summit-registration-lite/webpack/runtime/compat get default export","webpack://summit-registration-lite/webpack/runtime/define property getters","webpack://summit-registration-lite/webpack/runtime/hasOwnProperty shorthand","webpack://summit-registration-lite/webpack/runtime/make namespace object","webpack://summit-registration-lite/external commonjs \"@mui/icons-material/EmailRounded\"","webpack://summit-registration-lite/./src/components/login/index.module.scss","webpack://summit-registration-lite/./src/components/login/index.js"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"summit-registration-lite\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"summit-registration-lite\"] = factory();\n\telse\n\t\troot[\"summit-registration-lite\"] = factory();\n})(this, function() {\nreturn ","import { isPrePaidTicketType } from '../utils/utils';\n\nexport const getTicketMaxQuantity = (ticket) => {\n if(!ticket) return 0;\n if(isPrePaidTicketType(ticket)) return 1;\n return Math.min((ticket.quantity_2_sell || Number.MAX_SAFE_INTEGER) - ticket.quantity_sold, (ticket.max_quantity_per_order || Number.MAX_SAFE_INTEGER));\n}\n\n","export * from './capitalizeFirstLetter';\nexport * from './formatCurrency';\nexport * from './formatErrorMessage';\nexport * from './getTicketMaxQuantity';\n","import { formatCurrency } from '../helpers';\nimport { ORDER_PAYMENT_METHOD_OFFLINE, ORDER_STATUS_PAID, TICKET_TYPE_SUBTYPE_PREPAID } from './constants';\n\nimport React from 'react';\n\n/**\n * Copyright 2022 OpenStack Foundation\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n **/\n\nexport const getCurrentProvider = (summit) => {\n for (let profile of summit.payment_profiles) {\n if (profile.application_type === 'Registration') {\n return {\n publicKey : profile.test_mode_enabled ? profile.test_publishable_key : profile.live_publishable_key,\n provider : profile.provider\n }\n }\n }\n return {\n publicKey : null,\n provider : ''\n }\n}\n\nexport const ticketHasAccessLevel = (ticket, accessLevel) => {\n if(!ticket) return false;\n return ticket.badge?.type?.access_levels.map(al => al.name).includes(accessLevel);\n};\n\nexport const getCurrentUserLanguage = () => {\n let language = 'en';\n if(typeof navigator !== 'undefined') {\n language = (navigator.languages && navigator.languages[0]) || navigator.language || navigator.userLanguage;\n }\n return language;\n};\n\nexport const isEmptyString = (val) => {\n return typeof val === 'string' && val.trim().length == 0;\n}\n\nexport const getTicketTaxes = (ticket, taxes) => {\n if(isPrePaidTicketType(ticket)) return '';\n const ticketTaxes = taxes.filter(tax => tax.ticket_types.includes(ticket?.id));\n return `${ticketTaxes.length > 0 ? ` plus ${taxes.map(t => t.name).join(' & ')}` : ''}`;\n}\n\nexport const hasDiscountApplied = (ticketType) => ticketType.hasOwnProperty('cost_with_applied_discount') && ticketType.cost !== ticketType?.cost_with_applied_discount;\n\nexport const isFreeOrder = (reservation) => reservation.amount === 0 ;\n\nexport const isPrePaidOrder = (reservation) => reservation.status === ORDER_STATUS_PAID && reservation.payment_method === ORDER_PAYMENT_METHOD_OFFLINE;\n\nexport const getTicketCost = (ticket, quantity = 1) => {\n return hasDiscountApplied(ticket) ?\n <>\n <s>{formatCurrency(ticket.cost * quantity, { currency: ticket.currency })} {ticket.currency}</s>\n &nbsp;\n <>{formatCurrency(ticket.cost_with_applied_discount * quantity, { currency: ticket.currency })} {ticket.currency}</>\n </>\n :\n <>{formatCurrency(ticket.cost * quantity, { currency: ticket.currency })} {ticket.currency}</>\n}\n\nexport const isPrePaidTicketType = (ticketType) => ticketType?.sub_type === TICKET_TYPE_SUBTYPE_PREPAID;\n\nexport const buildTrackEvent = (data, ticketQuantity = null, promoCode = null) => {\n const eventData = {\n currency: data.currency || 'USD',\n items_array: [\n {\n item_id: data.id,\n item_name: data.name,\n price: data.cost,\n }\n ]\n };\n\n if (ticketQuantity) {\n eventData.value = data.cost * ticketQuantity;\n eventData.items_array[0].quantity = ticketQuantity;\n }\n\n if (promoCode) {\n eventData.coupon = promoCode;\n eventData.items_array[0].discount = data.cost - (data.cost_with_applied_discount || 0);\n }\n\n return eventData;\n}\n\nexport const removeWhiteSpaces = (value) => value.replace(/\\s+/g, '');\n\n// Helper function to resolve CSS variables and parse colors\n\nexport const parseColor = (input, element = document.documentElement) => {\n // Check if the input is a CSS variable\n if (input.startsWith(\"var(\")) { \n const cssVarName = input.slice(4, -1).trim(); \n input = getComputedStyle(element).getPropertyValue(cssVarName).trim();\n }\n\n // Convert the resolved color to RGB\n const div = document.createElement(\"div\"); \n div.style.color = input;\n document.body.appendChild(div);\n const m = getComputedStyle(div).color.match(/^rgb\\s*\\(\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*\\)$/i);\n document.body.removeChild(div);\n return m ? [parseInt(m[1]), parseInt(m[2]), parseInt(m[3])] : null;\n}\n \n\nexport const getContrastingTextColor = (bgColor, lightColor, darkColor) => {\n // Parse the background color to RGB\n const rgb = parseColor(bgColor);\n\n // Fallback to a default color if parsing fails\n if (!rgb) return darkColor; // or lightColor\n \n const [r, g, b] = rgb;\n\n // Calculate luminance \n const luminance = [r, g, b].map(channel => {\n const normalized = channel / 255;\n return normalized <= 0.03928 \n ? normalized / 12.92 \n : Math.pow((normalized + 0.055) / 1.055, 2.4);\n }).reduce((acc, val, i) => acc + val * [0.2126, 0.7152, 0.0722][i], 0);\n \n\n // Return the contrasting color\n return luminance > 0.179 ? darkColor : lightColor;\n}\n","module.exports = require(\"prop-types\");","module.exports = require(\"react\");","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@mui/icons-material/EmailRounded\");","// extracted by mini-css-extract-plugin\nexport default {\"loginWrapper\":\"loginWrapper___sxUEn\",\"innerWrapper\":\"innerWrapper___GQRkq\",\"button\":\"button___QMZPu\",\"title\":\"title___NnwWR\",\"loginCode\":\"loginCode___dDBup\",\"error\":\"error___aCF7E\",\"primaryEmailButton\":\"primaryEmailButton___gH1fC\",\"buttonDisabled\":\"buttonDisabled___T9tkn\",\"pointerDisabled\":\"pointerDisabled___qt_HK\",\"email_login_button\":\"email_login_button___seiLi\",\"h2Styled\":\"h2Styled___rfIKD\",\"input\":\"input___QR9sA\"};","/**\n * Copyright 2020 OpenStack Foundation\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n **/\n\nimport React, { useState } from 'react';\nimport PropTypes from 'prop-types';\nimport EmailRoundedIcon from '@mui/icons-material/EmailRounded';\nimport { getContrastingTextColor } from '../../utils/utils'\n\nimport styles from \"./index.module.scss\";\nimport { removeWhiteSpaces } from '../../utils/utils';\n\nconst LoginComponent = ({\n summitData,\n loginOptions,\n login,\n allowsNativeAuth,\n allowsOtpAuthlogin,\n getLoginCode,\n getPasswordlessCode,\n initialEmailValue,\n title }) => {\n\n const [email, setEmail] = useState(initialEmailValue);\n const [emailError, setEmailError] = useState(false);\n const [loginError, setLoginError] = useState(false);\n\n const isValidEmail = (email) => {\n const re = /^(([^<>()[\\]\\\\.,;:\\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,}))$/;\n return re.test(String(email).toLowerCase());\n }\n\n const loginCode = () => {\n let isValid = isValidEmail(email);\n setEmailError(!isValid);\n setLoginError(false);\n if (isValid) {\n getLoginCode(email, getPasswordlessCode).catch((e) => {\n setLoginError(e.message);\n });\n }\n }\n \n const emailButtonStyles = {\n color: getContrastingTextColor(email === \"\" ? \"var(--color_secondary_contrast)\" : \"var(--color_input_background_color)\", \"var(--color_text_light)\", \"var(--color_text_dark)\")\n };\n\n const handleEmailChange = (ev) => {\n const { target: { value } } = ev;\n if(!value.length) {\n setEmailError(false);\n setLoginError(false);\n }\n setEmail(removeWhiteSpaces(value));\n }\n\n return (\n <div className={`${styles.loginWrapper}`}>\n <>\n <div className={`${styles.innerWrapper}`}>\n <div className={styles.loginCode}>\n {summitData?.secondary_logo && <img className=\"login-logo\" src={`${summitData?.secondary_logo}`} />}\n <div className={styles.title}>{title}</div>\n <div className={styles.input}>\n <input placeholder=\"youremail@example.com\" value={email} onChange={handleEmailChange}\n onKeyPress={(ev) => ev.key === 'Enter' ? loginCode() : null} data-testid=\"email-input\" />\n </div>\n <div onClick={() => loginCode()} data-testid=\"email-button\" id=\"email-button\" style={emailButtonStyles}\n className={`${styles.button} ${styles.email_login_button} ${email === '' ? `${styles.pointerDisabled} ${styles.buttonDisabled}` : `${styles.primaryEmailButton}`}`}>\n <EmailRoundedIcon style={{ fontSize: \"20px\" }} />\n <span>Email me a single-use code</span>\n <span></span>\n </div>\n {emailError && <span className={styles.error} data-testid=\"email-error\">Please enter a valid email address</span>}\n {loginError && <span className={styles.error} data-testid=\"login-error\">{loginError}</span>}\n <h2 className={styles.h2Styled}>or</h2>\n </div>\n {loginOptions.map((o, index) => {\n return (\n o.provider_param ?\n <div className={`${styles.button}`} key={`provider-${o.provider_param}`} data-testid=\"login-button\"\n style={{\n color: o.button_text_color ? o.button_text_color : '#ffffff',\n border: `thin solid ${o.button_border_color ? o.button_border_color : o.button_color}`,\n backgroundColor: o.button_color,\n backgroundImage: o.provider_logo ? `url(${o.provider_logo})` : 'none',\n backgroundSize: o.provider_logo_size ? o.provider_logo_size : '',\n }}\n onClick={() => login(o.provider_param)}>\n {o.provider_label}\n </div>\n :\n allowsNativeAuth ?\n <div className={`${styles.button}`} key={`provider-fnid`} data-testid=\"login-button\"\n style={{\n color: o.button_border_color ? o.button_border_color : '#ffffff',\n border: `thin solid ${o.button_border_color ? o.button_border_color : o.button_color}`,\n backgroundColor: o.button_color,\n backgroundImage: o.provider_logo ? `url(${o.provider_logo})` : 'none',\n backgroundSize: o.provider_logo_size ? o.provider_logo_size : ''\n }}\n onClick={() => login(o.provider_param)}>\n {o.provider_label}\n </div>\n :\n null\n )\n })}\n {allowsOtpAuthlogin &&\n <div className={styles.loginCode}>\n or get a login code emailed to you\n <div className={styles.input}>\n <input placeholder=\"youremail@example.com\" value={email} onChange={e => setEmail(e.target.value)} onKeyPress={(ev) => ev.key === 'Enter' ? loginCode() : null} data-testid=\"email-input\" />\n <br />\n </div>\n <div onClick={() => loginCode()} data-testid=\"email-button\" className=\"button\" style={{ background: \"#000\", color: \"#fff\"}}>\n Email me a login code\n </div>\n {emailError && <span data-testid=\"email-error\">Please enter a valid email adress</span>}\n </div>\n }\n </div>\n </>\n </div>\n );\n}\n\nLoginComponent.propTypes = {\n loginOptions: PropTypes.array.isRequired,\n login: PropTypes.func.isRequired,\n allowsNativeAuth: PropTypes.bool,\n allowsOtpAuthlogin: PropTypes.bool,\n getLoginCode: PropTypes.func.isRequired,\n getPasswordlessCode: PropTypes.func,\n initialEmailValue: PropTypes.string,\n title: PropTypes.string,\n}\n\nLoginComponent.defaultProps = {\n allowsNativeAuth: true,\n allowsOtpAuthlogin: false,\n initialEmailValue: '',\n title: 'Enter your email to begin registration:',\n}\n\n\nexport default LoginComponent\n\n"],"names":["isPrePaidTicketType","getTicketMaxQuantity","ticket","Math","min","quantity_2_sell","Number","MAX_SAFE_INTEGER","quantity_sold","max_quantity_per_order","formatCurrency","ORDER_PAYMENT_METHOD_OFFLINE","ORDER_STATUS_PAID","TICKET_TYPE_SUBTYPE_PREPAID","React","getCurrentProvider","summit","profile","payment_profiles","application_type","publicKey","test_mode_enabled","test_publishable_key","live_publishable_key","provider","ticketHasAccessLevel","accessLevel","badge","type","access_levels","map","al","name","includes","getCurrentUserLanguage","language","navigator","languages","userLanguage","isEmptyString","val","trim","length","getTicketTaxes","taxes","ticketTaxes","filter","tax","ticket_types","id","t","join","hasDiscountApplied","ticketType","hasOwnProperty","cost","cost_with_applied_discount","isFreeOrder","reservation","amount","isPrePaidOrder","status","payment_method","getTicketCost","quantity","currency","sub_type","buildTrackEvent","data","ticketQuantity","promoCode","eventData","items_array","item_id","item_name","price","value","coupon","discount","removeWhiteSpaces","replace","parseColor","input","element","document","documentElement","startsWith","cssVarName","slice","getComputedStyle","getPropertyValue","div","createElement","style","color","body","appendChild","m","match","removeChild","parseInt","getContrastingTextColor","bgColor","lightColor","darkColor","rgb","r","g","b","luminance","channel","normalized","pow","reduce","acc","i","useState","PropTypes","EmailRoundedIcon","styles","LoginComponent","summitData","loginOptions","login","allowsNativeAuth","allowsOtpAuthlogin","getLoginCode","getPasswordlessCode","initialEmailValue","title","email","setEmail","emailError","setEmailError","loginError","setLoginError","isValidEmail","re","test","String","toLowerCase","loginCode","isValid","catch","e","message","emailButtonStyles","handleEmailChange","ev","target","loginWrapper","innerWrapper","secondary_logo","key","button","email_login_button","pointerDisabled","buttonDisabled","primaryEmailButton","fontSize","error","h2Styled","o","index","provider_param","button_text_color","border","button_border_color","button_color","backgroundColor","backgroundImage","provider_logo","backgroundSize","provider_logo_size","provider_label","background","propTypes","array","isRequired","func","bool","string","defaultProps"],"sourceRoot":""}
1
+ {"version":3,"file":"components/login.js","mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;;;;;;;;;;;;;ACVA;AAEO,MAAMC,oBAAoB,GAAIC,MAAD,IAAY;AAC5C,MAAG,CAACA,MAAJ,EAAY,OAAO,CAAP;AACZ,MAAGF,mBAAmB,CAACE,MAAD,CAAtB,EAAgC,OAAO,CAAP;AAChC,SAAOC,IAAI,CAACC,GAAL,CAAS,CAACF,MAAM,CAACG,eAAP,IAA0BC,MAAM,CAACC,gBAAlC,IAAsDL,MAAM,CAACM,aAAtE,EAAsFN,MAAM,CAACO,sBAAP,IAAiCH,MAAM,CAACC,gBAA9H,CAAP;AACH,CAJM;;ACFP;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;ACFA,MAAM,qBAA4B;;ACAlC;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEO,MAAMS,kBAAkB,GAAIC,MAAD,IAAY;AAC1C,OAAK,IAAIC,OAAT,IAAoBD,MAAM,CAACE,gBAA3B,EAA6C;AACzC,QAAID,OAAO,CAACE,gBAAR,KAA6B,cAAjC,EAAiD;AAC7C,aAAO;AACHC,QAAAA,SAAS,EAAGH,OAAO,CAACI,iB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YAAY,EAAET,+CALS;AAMvBU,EAAAA,mBAAmB,EAAEV,oCANE;AAOvBW,EAAAA,iBAAiB,EAAEX,sCAPI;AAQvBY,EAAAA,KAAK,EAAEZ,sCAAgBgE;AARA,CAA3B;AAWA7D,cAAc,CAAC8D,YAAf,GAA8B;AAC1B1D,EAAAA,gBAAgB,EAAE,IADQ;AAE1BC,EAAAA,kBAAkB,EAAE,KAFM;AAG1BG,EAAAA,iBAAiB,EAAE,EAHO;AAI1BC,EAAAA,KAAK,EAAE;AAJmB,CAA9B;AAQA,4CAAeT,cAAf,E","sources":["webpack://summit-registration-lite/webpack/universalModuleDefinition","webpack://summit-registration-lite/./src/helpers/getTicketMaxQuantity.js","webpack://summit-registration-lite/./src/helpers/index.js","webpack://summit-registration-lite/external commonjs \"@sentry/react\"","webpack://summit-registration-lite/./src/utils/utils.js","webpack://summit-registration-lite/external commonjs \"prop-types\"","webpack://summit-registration-lite/external commonjs \"react\"","webpack://summit-registration-lite/webpack/bootstrap","webpack://summit-registration-lite/webpack/runtime/compat get default export","webpack://summit-registration-lite/webpack/runtime/define property getters","webpack://summit-registration-lite/webpack/runtime/hasOwnProperty shorthand","webpack://summit-registration-lite/webpack/runtime/make namespace object","webpack://summit-registration-lite/external commonjs \"@mui/icons-material/EmailRounded\"","webpack://summit-registration-lite/./src/components/login/index.module.scss","webpack://summit-registration-lite/./src/components/login/index.js"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"summit-registration-lite\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"summit-registration-lite\"] = factory();\n\telse\n\t\troot[\"summit-registration-lite\"] = factory();\n})(this, function() {\nreturn ","import { isPrePaidTicketType } from '../utils/utils';\n\nexport const getTicketMaxQuantity = (ticket) => {\n if(!ticket) return 0;\n if(isPrePaidTicketType(ticket)) return 1;\n return Math.min((ticket.quantity_2_sell || Number.MAX_SAFE_INTEGER) - ticket.quantity_sold, (ticket.max_quantity_per_order || Number.MAX_SAFE_INTEGER));\n}\n\n","export * from './capitalizeFirstLetter';\nexport * from './formatCurrency';\nexport * from './formatErrorMessage';\nexport * from './getTicketMaxQuantity';\n","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@sentry/react\");","import { formatCurrency } from '../helpers';\nimport { ORDER_PAYMENT_METHOD_OFFLINE, ORDER_STATUS_PAID, TICKET_TYPE_SUBTYPE_PREPAID } from './constants';\n\nimport React from 'react';\nimport * as Sentry from \"@sentry/react\";\n\n/**\n * Copyright 2022 OpenStack Foundation\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n **/\n\nexport const getCurrentProvider = (summit) => {\n for (let profile of summit.payment_profiles) {\n if (profile.application_type === 'Registration') {\n return {\n publicKey : profile.test_mode_enabled ? profile.test_publishable_key : profile.live_publishable_key,\n provider : profile.provider\n }\n }\n }\n return {\n publicKey : null,\n provider : ''\n }\n}\n\nexport const ticketHasAccessLevel = (ticket, accessLevel) => {\n if(!ticket) return false;\n return ticket.badge?.type?.access_levels.map(al => al.name).includes(accessLevel);\n};\n\nexport const getCurrentUserLanguage = () => {\n let language = 'en';\n if(typeof navigator !== 'undefined') {\n language = (navigator.languages && navigator.languages[0]) || navigator.language || navigator.userLanguage;\n }\n return language;\n};\n\nexport const isEmptyString = (val) => {\n return typeof val === 'string' && val.trim().length == 0;\n}\n\nexport const getTicketTaxes = (ticket, taxes) => {\n if(isPrePaidTicketType(ticket)) return '';\n const ticketTaxes = taxes.filter(tax => tax.ticket_types.includes(ticket?.id));\n return `${ticketTaxes.length > 0 ? ` plus ${taxes.map(t => t.name).join(' & ')}` : ''}`;\n}\n\nexport const hasDiscountApplied = (ticketType) => ticketType.hasOwnProperty('cost_with_applied_discount') && ticketType.cost !== ticketType?.cost_with_applied_discount;\n\nexport const isFreeOrder = (reservation) => reservation.amount === 0 ;\n\nexport const isPrePaidOrder = (reservation) => reservation.status === ORDER_STATUS_PAID && reservation.payment_method === ORDER_PAYMENT_METHOD_OFFLINE;\n\nexport const getTicketCost = (ticket, quantity = 1) => {\n return hasDiscountApplied(ticket) ?\n <>\n <s>{formatCurrency(ticket.cost * quantity, { currency: ticket.currency })} {ticket.currency}</s>\n &nbsp;\n <>{formatCurrency(ticket.cost_with_applied_discount * quantity, { currency: ticket.currency })} {ticket.currency}</>\n </>\n :\n <>{formatCurrency(ticket.cost * quantity, { currency: ticket.currency })} {ticket.currency}</>\n}\n\nexport const isPrePaidTicketType = (ticketType) => ticketType?.sub_type === TICKET_TYPE_SUBTYPE_PREPAID;\n\nexport const buildTrackEvent = (data, ticketQuantity = null, promoCode = null) => {\n const eventData = {\n currency: data.currency || 'USD',\n items_array: [\n {\n item_id: data.id,\n item_name: data.name,\n price: data.cost,\n }\n ]\n };\n\n if (ticketQuantity) {\n eventData.value = data.cost * ticketQuantity;\n eventData.items_array[0].quantity = ticketQuantity;\n }\n\n if (promoCode) {\n eventData.coupon = promoCode;\n eventData.items_array[0].discount = data.cost - (data.cost_with_applied_discount || 0);\n }\n\n return eventData;\n}\n\nexport const removeWhiteSpaces = (value) => value.replace(/\\s+/g, '');\n\n// Helper function to resolve CSS variables and parse colors\n\nexport const parseColor = (input, element = document.documentElement) => {\n // Check if the input is a CSS variable\n if (input.startsWith(\"var(\")) { \n const cssVarName = input.slice(4, -1).trim(); \n input = getComputedStyle(element).getPropertyValue(cssVarName).trim();\n }\n\n // Convert the resolved color to RGB\n const div = document.createElement(\"div\"); \n div.style.color = input;\n document.body.appendChild(div);\n const m = getComputedStyle(div).color.match(/^rgb\\s*\\(\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*\\)$/i);\n document.body.removeChild(div);\n return m ? [parseInt(m[1]), parseInt(m[2]), parseInt(m[3])] : null;\n}\n \n\nexport const getContrastingTextColor = (bgColor, lightColor, darkColor) => {\n // Parse the background color to RGB\n const rgb = parseColor(bgColor);\n\n // Fallback to a default color if parsing fails\n if (!rgb) return darkColor; // or lightColor\n \n const [r, g, b] = rgb;\n\n // Calculate luminance \n const luminance = [r, g, b].map(channel => {\n const normalized = channel / 255;\n return normalized <= 0.03928 \n ? normalized / 12.92 \n : Math.pow((normalized + 0.055) / 1.055, 2.4);\n }).reduce((acc, val, i) => acc + val * [0.2126, 0.7152, 0.0722][i], 0);\n \n\n // Return the contrasting color\n return luminance > 0.179 ? darkColor : lightColor;\n}\n\nconst isSentryInitialized = () => !!window.SENTRY_DSN;\n\nexport const handleSentryException = (err) => \n isSentryInitialized() \n ? Sentry.captureException(err)\n : console.log(\"Error on registration: \", err);","module.exports = require(\"prop-types\");","module.exports = require(\"react\");","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@mui/icons-material/EmailRounded\");","// extracted by mini-css-extract-plugin\nexport default {\"loginWrapper\":\"loginWrapper___sxUEn\",\"innerWrapper\":\"innerWrapper___GQRkq\",\"button\":\"button___QMZPu\",\"title\":\"title___NnwWR\",\"loginCode\":\"loginCode___dDBup\",\"error\":\"error___aCF7E\",\"primaryEmailButton\":\"primaryEmailButton___gH1fC\",\"buttonDisabled\":\"buttonDisabled___T9tkn\",\"pointerDisabled\":\"pointerDisabled___qt_HK\",\"email_login_button\":\"email_login_button___seiLi\",\"h2Styled\":\"h2Styled___rfIKD\",\"input\":\"input___QR9sA\"};","/**\n * Copyright 2020 OpenStack Foundation\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n **/\n\nimport React, { useState } from 'react';\nimport PropTypes from 'prop-types';\nimport EmailRoundedIcon from '@mui/icons-material/EmailRounded';\nimport { getContrastingTextColor, handleSentryException } from '../../utils/utils'\n\nimport styles from \"./index.module.scss\";\nimport { removeWhiteSpaces } from '../../utils/utils';\n\nconst LoginComponent = ({\n summitData,\n loginOptions,\n login,\n allowsNativeAuth,\n allowsOtpAuthlogin,\n getLoginCode,\n getPasswordlessCode,\n initialEmailValue,\n title }) => {\n\n const [email, setEmail] = useState(initialEmailValue);\n const [emailError, setEmailError] = useState(false);\n const [loginError, setLoginError] = useState(false);\n\n const isValidEmail = (email) => {\n const re = /^(([^<>()[\\]\\\\.,;:\\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,}))$/;\n return re.test(String(email).toLowerCase());\n }\n\n const loginCode = () => {\n let isValid = isValidEmail(email);\n setEmailError(!isValid);\n setLoginError(false);\n if (isValid) { \n getLoginCode(email, getPasswordlessCode)\n .catch((err) => {\n setLoginError(err.message); \n handleSentryException(err);\n });\n }\n }\n \n const emailButtonStyles = {\n color: getContrastingTextColor(email === \"\" ? \"var(--color_secondary_contrast)\" : \"var(--color_input_background_color)\", \"var(--color_text_light)\", \"var(--color_text_dark)\")\n };\n\n const handleEmailChange = (ev) => {\n const { target: { value } } = ev;\n if(!value.length) {\n setEmailError(false);\n setLoginError(false);\n }\n setEmail(removeWhiteSpaces(value));\n }\n\n return (\n <div className={`${styles.loginWrapper}`}>\n <>\n <div className={`${styles.innerWrapper}`}>\n <div className={styles.loginCode}>\n {summitData?.secondary_logo && <img className=\"login-logo\" src={`${summitData?.secondary_logo}`} />}\n <div className={styles.title}>{title}</div>\n <div className={styles.input}>\n <input placeholder=\"youremail@example.com\" value={email} onChange={handleEmailChange}\n onKeyPress={(ev) => ev.key === 'Enter' ? loginCode() : null} data-testid=\"email-input\" />\n </div>\n <div onClick={() => loginCode()} data-testid=\"email-button\" id=\"email-button\" style={emailButtonStyles}\n className={`${styles.button} ${styles.email_login_button} ${email === '' ? `${styles.pointerDisabled} ${styles.buttonDisabled}` : `${styles.primaryEmailButton}`}`}>\n <EmailRoundedIcon style={{ fontSize: \"20px\" }} />\n <span>Email me a single-use code</span>\n <span></span>\n </div>\n {emailError && <span className={styles.error} data-testid=\"email-error\">Please enter a valid email address</span>}\n {loginError && <span className={styles.error} data-testid=\"login-error\">{loginError}</span>}\n <h2 className={styles.h2Styled}>or</h2>\n </div>\n {loginOptions.map((o, index) => {\n return (\n o.provider_param ?\n <div className={`${styles.button}`} key={`provider-${o.provider_param}`} data-testid=\"login-button\"\n style={{\n color: o.button_text_color ? o.button_text_color : '#ffffff',\n border: `thin solid ${o.button_border_color ? o.button_border_color : o.button_color}`,\n backgroundColor: o.button_color,\n backgroundImage: o.provider_logo ? `url(${o.provider_logo})` : 'none',\n backgroundSize: o.provider_logo_size ? o.provider_logo_size : '',\n }}\n onClick={() => login(o.provider_param)}>\n {o.provider_label}\n </div>\n :\n allowsNativeAuth ?\n <div className={`${styles.button}`} key={`provider-fnid`} data-testid=\"login-button\"\n style={{\n color: o.button_border_color ? o.button_border_color : '#ffffff',\n border: `thin solid ${o.button_border_color ? o.button_border_color : o.button_color}`,\n backgroundColor: o.button_color,\n backgroundImage: o.provider_logo ? `url(${o.provider_logo})` : 'none',\n backgroundSize: o.provider_logo_size ? o.provider_logo_size : ''\n }}\n onClick={() => login(o.provider_param)}>\n {o.provider_label}\n </div>\n :\n null\n )\n })}\n {allowsOtpAuthlogin &&\n <div className={styles.loginCode}>\n or get a login code emailed to you\n <div className={styles.input}>\n <input placeholder=\"youremail@example.com\" value={email} onChange={e => setEmail(e.target.value)} onKeyPress={(ev) => ev.key === 'Enter' ? loginCode() : null} data-testid=\"email-input\" />\n <br />\n </div>\n <div onClick={() => loginCode()} data-testid=\"email-button\" className=\"button\" style={{ background: \"#000\", color: \"#fff\"}}>\n Email me a login code\n </div>\n {emailError && <span data-testid=\"email-error\">Please enter a valid email adress</span>}\n </div>\n }\n </div>\n </>\n </div>\n );\n}\n\nLoginComponent.propTypes = {\n loginOptions: PropTypes.array.isRequired,\n login: PropTypes.func.isRequired,\n allowsNativeAuth: PropTypes.bool,\n allowsOtpAuthlogin: PropTypes.bool,\n getLoginCode: PropTypes.func.isRequired,\n getPasswordlessCode: PropTypes.func,\n initialEmailValue: PropTypes.string,\n title: PropTypes.string,\n}\n\nLoginComponent.defaultProps = {\n allowsNativeAuth: true,\n allowsOtpAuthlogin: false,\n initialEmailValue: '',\n title: 'Enter your email to begin registration:',\n}\n\n\nexport default LoginComponent\n\n"],"names":["isPrePaidTicketType","getTicketMaxQuantity","ticket","Math","min","quantity_2_sell","Number","MAX_SAFE_INTEGER","quantity_sold","max_quantity_per_order","formatCurrency","ORDER_PAYMENT_METHOD_OFFLINE","ORDER_STATUS_PAID","TICKET_TYPE_SUBTYPE_PREPAID","React","Sentry","getCurrentProvider","summit","profile","payment_profiles","application_type","publicKey","test_mode_enabled","test_publishable_key","live_publishable_key","provider","ticketHasAccessLevel","accessLevel","badge","type","access_levels","map","al","name","includes","getCurrentUserLanguage","language","navigator","languages","userLanguage","isEmptyString","val","trim","length","getTicketTaxes","taxes","ticketTaxes","filter","tax","ticket_types","id","t","join","hasDiscountApplied","ticketType","hasOwnProperty","cost","cost_with_applied_discount","isFreeOrder","reservation","amount","isPrePaidOrder","status","payment_method","getTicketCost","quantity","currency","sub_type","buildTrackEvent","data","ticketQuantity","promoCode","eventData","items_array","item_id","item_name","price","value","coupon","discount","removeWhiteSpaces","replace","parseColor","input","element","document","documentElement","startsWith","cssVarName","slice","getComputedStyle","getPropertyValue","div","createElement","style","color","body","appendChild","m","match","removeChild","parseInt","getContrastingTextColor","bgColor","lightColor","darkColor","rgb","r","g","b","luminance","channel","normalized","pow","reduce","acc","i","isSentryInitialized","window","SENTRY_DSN","handleSentryException","err","captureException","console","log","useState","PropTypes","EmailRoundedIcon","styles","LoginComponent","summitData","loginOptions","login","allowsNativeAuth","allowsOtpAuthlogin","getLoginCode","getPasswordlessCode","initialEmailValue","title","email","setEmail","emailError","setEmailError","loginError","setLoginError","isValidEmail","re","test","String","toLowerCase","loginCode","isValid","catch","message","emailButtonStyles","handleEmailChange","ev","target","loginWrapper","innerWrapper","secondary_logo","key","button","email_login_button","pointerDisabled","buttonDisabled","primaryEmailButton","fontSize","error","h2Styled","o","index","provider_param","button_text_color","border","button_border_color","button_color","backgroundColor","backgroundImage","provider_logo","backgroundSize","provider_logo_size","provider_label","e","background","propTypes","array","isRequired","func","bool","string","defaultProps"],"sourceRoot":""}