summit-registration-lite 7.0.1 → 7.0.3
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/.github/workflows/ci.yml +54 -0
- package/dist/components/index.css +12 -27
- package/dist/components/index.css.map +1 -1
- package/dist/components/index.js +813 -264
- package/dist/components/index.js.map +1 -1
- package/dist/components/login-passwordless.css +1 -2
- package/dist/components/login-passwordless.js +21 -4
- package/dist/components/login-passwordless.js.map +1 -1
- package/dist/components/login.css +1 -2
- package/dist/components/login.js +69 -2
- package/dist/components/login.js.map +1 -1
- package/dist/components/registration-form.css +12 -26
- package/dist/components/registration-form.css.map +1 -1
- package/dist/components/registration-form.js +808 -260
- package/dist/components/registration-form.js.map +1 -1
- package/dist/components/registration-modal.css +12 -27
- package/dist/components/registration-modal.css.map +1 -1
- package/dist/components/registration-modal.js +812 -263
- package/dist/components/registration-modal.js.map +1 -1
- package/dist/index.css +12 -27
- package/dist/index.css.map +1 -1
- package/dist/index.js +812 -263
- package/dist/index.js.map +1 -1
- package/dist/utils/constants.js +11 -1
- package/dist/utils/constants.js.map +1 -1
- package/e2e/fixtures.js +84 -0
- package/e2e/promo-code-discovery.spec.js +364 -0
- package/package.json +12 -4
- package/playwright.config.js +26 -0
- package/.claude/rules/summit-registration-lite-component-props.md +0 -95
- package/.claude/rules/summit-registration-lite-i18n.md +0 -62
- package/.claude/rules/summit-registration-lite-payment-providers.md +0 -69
- package/.claude/rules/summit-registration-lite-project.md +0 -80
- package/.claude/rules/summit-registration-lite-redux-actions.md +0 -65
- package/.claude/rules/summit-registration-lite-step-flow.md +0 -77
- package/.claude/rules/summit-registration-lite-testing.md +0 -97
- package/.claude/rules/summit-registration-lite-utils.md +0 -71
- package/.claude/skills/summit-registration-lite-add-provider/SKILL.md +0 -155
- package/.claude/skills/summit-registration-lite-dev-setup/SKILL.md +0 -67
- package/.claude/skills/summit-registration-lite-publish/SKILL.md +0 -64
- package/.claude/skills/summit-registration-lite-scaffold-component/SKILL.md +0 -152
|
@@ -1,2 +1 @@
|
|
|
1
|
-
.passwordlessWrapper___BRQ_s{height:450px;display:flex;justify-content:center;align-items:center;flex-direction:column}.passwordlessWrapper___BRQ_s .codeSent___NzYb_{margin-top:10px;color:#e5424d;font-weight:bold;font-size:14px}.passwordlessWrapper___BRQ_s .innerWrapper___nRLDi{text-align:center;font-weight:bold;height:100%;width:300px;display:flex;flex-direction:column;justify-content:center}.passwordlessWrapper___BRQ_s .innerWrapper___nRLDi .logo___qNVrv{width:175px;align-self:center}.passwordlessWrapper___BRQ_s .innerWrapper___nRLDi .logo___qNVrv.logoDark___VVYee{display:none}.passwordlessWrapper___BRQ_s .innerWrapper___nRLDi .digits___Vu5iy{margin-top:15px;display:inline-block}.passwordlessWrapper___BRQ_s .innerWrapper___nRLDi .codeInput___LnTZe{margin-top:20px;display:flex;justify-content:center}.passwordlessWrapper___BRQ_s .innerWrapper___nRLDi .codeInput___LnTZe input{font-family:"Monaco",
|
|
2
|
-
|
|
1
|
+
.passwordlessWrapper___BRQ_s{height:450px;display:flex;justify-content:center;align-items:center;flex-direction:column}.passwordlessWrapper___BRQ_s .codeSent___NzYb_{margin-top:10px;color:#e5424d;font-weight:bold;font-size:14px}.passwordlessWrapper___BRQ_s .innerWrapper___nRLDi{text-align:center;font-weight:bold;height:100%;width:300px;display:flex;flex-direction:column;justify-content:center}.passwordlessWrapper___BRQ_s .innerWrapper___nRLDi .logo___qNVrv{width:175px;align-self:center}.passwordlessWrapper___BRQ_s .innerWrapper___nRLDi .logo___qNVrv.logoDark___VVYee{display:none}.passwordlessWrapper___BRQ_s .innerWrapper___nRLDi .digits___Vu5iy{margin-top:15px;display:inline-block}.passwordlessWrapper___BRQ_s .innerWrapper___nRLDi .codeInput___LnTZe{margin-top:20px;display:flex;justify-content:center}.passwordlessWrapper___BRQ_s .innerWrapper___nRLDi .codeInput___LnTZe input{font-family:"Monaco",monospace,"OpenSans",Helvetica;height:56px;width:56px;font-size:42px;color:var(--color_input_text_color);background-color:var(--color_input_background_color);border:1px solid var(--color_input_border_color);border-radius:5px;padding:5px;display:inline-flex;text-transform:uppercase;text-align:center;margin:0 5px}.passwordlessWrapper___BRQ_s .innerWrapper___nRLDi .error___wZflZ{margin-top:10px;color:#e5424d;font-size:14px}.passwordlessWrapper___BRQ_s .innerWrapper___nRLDi .verify___IBgMl{margin-top:10px}.passwordlessWrapper___BRQ_s .innerWrapper___nRLDi .verify___IBgMl .button___nBhtQ{padding:10px 30px;font-weight:normal;justify-content:center;margin:5px 0;border-radius:5px;cursor:pointer;color:var(--color_input_text_color);background-color:var(--color_input_background_color);border:1px solid var(--color_input_border_color);width:100%;font-size:1em}.passwordlessWrapper___BRQ_s .innerWrapper___nRLDi .verify___IBgMl .link___f6fDT{color:var(--color_text_dark);text-decoration:underline;cursor:pointer}.passwordlessWrapper___BRQ_s .resend___Nma1U{margin:auto 0 0 0;font-weight:normal;font-size:14px}.passwordlessWrapper___BRQ_s .resend___Nma1U button{color:var(--color_text_dark);text-decoration:underline;cursor:pointer;display:inline;border:none;background-color:rgba(0,0,0,0);padding:0}.passwordlessWrapper___BRQ_s .resend___Nma1U .disabled___fMnzY{color:var(--color_text_med);cursor:not-allowed}html[data-theme=DARK] .logoLight___vSbn_{display:none}html[data-theme=DARK] .logoDark___VVYee{display:block !important}html[data-theme=LIGHT] .logoDark___VVYee{display:none}html[data-theme=LIGHT] .logoLight___vSbn_{display:block !important}
|
|
@@ -22,10 +22,16 @@ return /******/ (() => { // webpackBootstrap
|
|
|
22
22
|
var utils = __webpack_require__(452);
|
|
23
23
|
;// CONCATENATED MODULE: ./src/helpers/getTicketMaxQuantity.js
|
|
24
24
|
|
|
25
|
-
const getTicketMaxQuantity = ticket => {
|
|
25
|
+
const getTicketMaxQuantity = (ticket, remainingQuantityPerAccount) => {
|
|
26
26
|
if (!ticket) return 0;
|
|
27
27
|
if (isPrePaidTicketType(ticket)) return 1;
|
|
28
|
-
|
|
28
|
+
let max = Math.min((ticket.quantity_2_sell ?? Number.MAX_SAFE_INTEGER) - ticket.quantity_sold, ticket.max_quantity_per_order ?? Number.MAX_SAFE_INTEGER);
|
|
29
|
+
|
|
30
|
+
if (remainingQuantityPerAccount != null) {
|
|
31
|
+
max = Math.min(max, remainingQuantityPerAccount);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
return max;
|
|
29
35
|
};
|
|
30
36
|
;// CONCATENATED MODULE: ./src/helpers/index.js
|
|
31
37
|
|
|
@@ -42,7 +48,7 @@ const getTicketMaxQuantity = ticket => {
|
|
|
42
48
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
43
49
|
/* harmony export */ "RESEND_TIME": () => (/* binding */ RESEND_TIME)
|
|
44
50
|
/* harmony export */ });
|
|
45
|
-
/* unused harmony exports AUTH_ERROR_MESSAGE, AUTH_ERROR_MISSING_REFRESH_TOKEN, AUTH_ERROR_REQUEST_FAILED, VirtualAccessLevel, DefaultBGColor, DefaultTextColor, DefaultHintColor, EMAIL_REGEXP, TICKET_OWNER_MYSELF, TICKET_OWNER_SOMEONE, TICKET_OWNER_UNASSIGNED, TICKET_TYPE_SUBTYPE_PREPAID, ORDER_STATUS_PAID, ORDER_PAYMENT_METHOD_OFFLINE, STEP_SELECT_TICKET_TYPE, STEP_PERSONAL_INFO, STEP_PAYMENT, STEP_COMPLETE, VIEW_ITEM, ADD_TO_CART, BEGIN_CHECKOUT, PURCHASE_COMPLETE, ERROR_TYPE_ERROR, ERROR_TYPE_VALIDATION, ERROR_TYPE_PAYMENT, PAYMENT_PROVIDER_STRIPE, PAYMENT_PROVIDER_LAWPAY */
|
|
51
|
+
/* unused harmony exports AUTH_ERROR_MESSAGE, AUTH_ERROR_MISSING_REFRESH_TOKEN, AUTH_ERROR_REQUEST_FAILED, VirtualAccessLevel, DefaultBGColor, DefaultTextColor, DefaultHintColor, EMAIL_REGEXP, TICKET_OWNER_MYSELF, TICKET_OWNER_SOMEONE, TICKET_OWNER_UNASSIGNED, TICKET_TYPE_SUBTYPE_PREPAID, ORDER_STATUS_PAID, ORDER_PAYMENT_METHOD_OFFLINE, STEP_SELECT_TICKET_TYPE, STEP_PERSONAL_INFO, STEP_PAYMENT, STEP_COMPLETE, VIEW_ITEM, ADD_TO_CART, BEGIN_CHECKOUT, PURCHASE_COMPLETE, ERROR_TYPE_ERROR, ERROR_TYPE_VALIDATION, ERROR_TYPE_PAYMENT, PROMO_STATUS, PAYMENT_PROVIDER_STRIPE, PAYMENT_PROVIDER_LAWPAY */
|
|
46
52
|
/**
|
|
47
53
|
* Copyright 2022 OpenStack Foundation
|
|
48
54
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -82,7 +88,16 @@ const PURCHASE_COMPLETE = 'purchase_complete'; // ERRORS
|
|
|
82
88
|
|
|
83
89
|
const ERROR_TYPE_ERROR = 'error_type_error';
|
|
84
90
|
const ERROR_TYPE_VALIDATION = 'error_type_validation';
|
|
85
|
-
const ERROR_TYPE_PAYMENT = 'error_type_payment'; //
|
|
91
|
+
const ERROR_TYPE_PAYMENT = 'error_type_payment'; // PROMO CODE STATUS
|
|
92
|
+
|
|
93
|
+
const PROMO_STATUS = {
|
|
94
|
+
IDLE: 'idle',
|
|
95
|
+
SUGGESTED: 'suggested',
|
|
96
|
+
APPLYING: 'applying',
|
|
97
|
+
VALIDATING: 'validating',
|
|
98
|
+
VALID: 'valid',
|
|
99
|
+
INVALID: 'invalid'
|
|
100
|
+
}; // PROVIDERS
|
|
86
101
|
|
|
87
102
|
const PAYMENT_PROVIDER_STRIPE = 'Stripe';
|
|
88
103
|
const PAYMENT_PROVIDER_LAWPAY = 'LawPay';
|
|
@@ -103,6 +118,8 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
103
118
|
|
|
104
119
|
// EXTERNAL MODULE: ./src/helpers/index.js + 1 modules
|
|
105
120
|
var helpers = __webpack_require__(499);
|
|
121
|
+
// EXTERNAL MODULE: ./src/utils/constants.js
|
|
122
|
+
var constants = __webpack_require__(243);
|
|
106
123
|
// EXTERNAL MODULE: external "react"
|
|
107
124
|
var external_react_ = __webpack_require__(689);
|
|
108
125
|
;// CONCATENATED MODULE: external "@sentry/react"
|
|
@@ -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;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEO,MAAMG,kBAAkB,GAAG,mBAA3B;AACA,MAAMC,gCAAgC,GAAG,uBAAzC;AACA,MAAMC,yBAAyB,GAAG,gBAAlC;AACA,MAAMC,kBAAkB,GAAG,SAA3B;AACA,MAAMC,cAAc,GAAG,SAAvB;AACA,MAAMC,gBAAgB,GAAG,SAAzB;AACA,MAAMC,gBAAgB,GAAG,iBAAzB;AAEA,MAAMC,YAAY,GAAG,sJAArB;AAEA,MAAMC,mBAAmB,GAAG,QAA5B;AACA,MAAMC,oBAAoB,GAAG,aAA7B;AACA,MAAMC,uBAAuB,GAAG,YAAhC;AAEA,MAAMC,2BAA2B,GAAG,SAApC;AACA,MAAMC,iBAAiB,GAAG,MAA1B;AACA,MAAMC,4BAA4B,GAAG,SAArC;AAEA,MAAMC,uBAAuB,GAAG,CAAhC;AACA,MAAMC,kBAAkB,GAAG,CAA3B;AACA,MAA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qB;AAInCU,EAAAA,iBAAiB,EAAEV,+CAJgB;AAKnCW,EAAAA,aAAa,EAAEX,oCALoB;AAMnCY,EAAAA,SAAS,EAAEZ,oCANwB;AAOnCa,EAAAA,SAAS,EAAEb,+CAPwB;AAQnCc,EAAAA,YAAY,EAAEd,+CARqB;AASnCe,EAAAA,mBAAmB,EAAEf,oCATc;AAUnCgB,EAAAA,YAAY,EAAEhB,sCAVqB;AAWnCiB,EAAAA,WAAW,EAAEjB,sCAXsB;AAYnCkB,EAAAA,UAAU,EAAElB,sCAAgB+D;AAZO,CAAvC;AAeA,yDAAezD,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/./src/utils/constants.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/external commonjs \"moment-timezone\"","webpack://summit-registration-lite/./src/components/login-passwordless/index.module.scss","webpack://summit-registration-lite/./src/utils/hooks/useCountdown.js","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","/**\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 AUTH_ERROR_MESSAGE = 'Missing Auth info';\nexport const AUTH_ERROR_MISSING_REFRESH_TOKEN = \"missing Refresh Token\";\nexport const AUTH_ERROR_REQUEST_FAILED = 'Request failed';\nexport const VirtualAccessLevel = 'VIRTUAL';\nexport const DefaultBGColor = '#000000';\nexport const DefaultTextColor = '#FFFFFF';\nexport const DefaultHintColor = 'rgb(58, 63, 65)';\n\nexport const EMAIL_REGEXP = /(([^<>()\\[\\]\\\\.,;:\\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\nexport const TICKET_OWNER_MYSELF = 'myself';\nexport const TICKET_OWNER_SOMEONE = 'someoneElse';\nexport const TICKET_OWNER_UNASSIGNED = 'unassigned';\n\nexport const TICKET_TYPE_SUBTYPE_PREPAID = 'PrePaid';\nexport const ORDER_STATUS_PAID = 'Paid';\nexport const ORDER_PAYMENT_METHOD_OFFLINE = 'Offline';\n\nexport const STEP_SELECT_TICKET_TYPE = 0;\nexport const STEP_PERSONAL_INFO = 1;\nexport const STEP_PAYMENT = 2;\nexport const STEP_COMPLETE = 3;\n\nexport const RESEND_TIME = 60;\n\n// ANALYTICS\nexport const VIEW_ITEM = 'view_item';\nexport const ADD_TO_CART = 'add_to_cart';\nexport const BEGIN_CHECKOUT = 'begin_checkout';\nexport const PURCHASE_COMPLETE = 'purchase_complete';\n// ERRORS\nexport const ERROR_TYPE_ERROR= 'error_type_error';\nexport const ERROR_TYPE_VALIDATION = 'error_type_validation';\nexport const ERROR_TYPE_PAYMENT = 'error_type_payment';\n// PROVIDERS\n\nexport const PAYMENT_PROVIDER_STRIPE = 'Stripe';\nexport const PAYMENT_PROVIDER_LAWPAY = 'LawPay';\n\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 \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);\n\nexport const avoidTooltipOverflow = ({ left, top }, _e, _t, node) => {\n return {\n top,\n left: typeof node === 'string' ? left : Math.max(left, 0),\n };\n}","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\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"moment-timezone\");","// 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\",\"disabled\":\"disabled___fMnzY\",\"logoLight\":\"logoLight___vSbn_\"};","import { useState, useEffect, useRef } from 'react';\n\nconst useCountdown = (initialTime) => {\n const [countdown, setCountdown] = useState(initialTime);\n const intervalRef = useRef(null);\n\n const resetCountdown = (newTime) => {\n const time = newTime !== undefined ? newTime : initialTime;\n if (intervalRef.current) clearInterval(intervalRef.current);\n setCountdown(time);\n\n if (time > 0) {\n intervalRef.current = setInterval(() => {\n setCountdown((prevCountdown) => {\n if (prevCountdown <= 1) {\n clearInterval(intervalRef.current);\n return 0;\n }\n return prevCountdown - 1;\n });\n }, 1000);\n }\n };\n\n useEffect(() => {\n // Initialize the countdown when the hook is first used\n resetCountdown(initialTime);\n return () => clearInterval(intervalRef.current);\n }, [initialTime]);\n\n return [countdown, resetCountdown];\n};\n\nexport default useCountdown;","/**\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, useEffect } from 'react';\nimport PropTypes from 'prop-types';\nimport OtpInput from 'react-otp-input';\nimport moment from 'moment-timezone';\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';\nimport { RESEND_TIME } from '../../utils/constants';\nimport useCountdown from '../../utils/hooks/useCountdown';\n\nconst PasswordlessLoginComponent = ({\n email, codeLength, codeLifeTime, 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 const [resendCountdown, resetResendCountdown] = useCountdown(0);\n const [lifetimeCountdown, resetLifetimeCountdown] = useCountdown(0);\n\n useEffect(() => {\n if(codeLifeTime > 0) {\n resetLifetimeCountdown(codeLifeTime);\n }\n }, [codeLifeTime])\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 resetResendCountdown(RESEND_TIME);\n })\n .catch((err) => {\n handleSentryException(err);\n });\n };\n\n const handleSubmit = (e) => {\n e.preventDefault();\n tryPasswordlessLogin(otpCode);\n };\n\n const formatDuration = (seconds) => {\n const duration = moment.duration(seconds, 'seconds');\n return moment.utc(duration.asMilliseconds()).format('mm:ss');\n };\n\n return (\n <div className={`${styles.passwordlessWrapper} step-wrapper`}>\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 {codeSent &&\n <p className={styles.codeSent}>Code has been resent.</p>\n }\n {lifetimeCountdown > 0 &&\n <p className={styles.codeSent}>Code expires in {formatDuration(lifetimeCountdown)} minutes.</p>\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 \n <button\n className={`${styles.link} ${resendCountdown > 0 ? styles.disabled : ''}`}\n disabled={resendCountdown > 0}\n onClick={() => resendCode()}\n data-testid=\"resend\">\n resend code {' '} {resendCountdown > 0 && (<span>({resendCountdown})</span>)}\n </button>\n now.\n </div>\n </>\n </div>\n );\n}\n\nPasswordlessLoginComponent.propTypes = {\n email: PropTypes.string.isRequired,\n codeLength: PropTypes.number.isRequired,\n codeLifeTime: 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","AUTH_ERROR_MESSAGE","AUTH_ERROR_MISSING_REFRESH_TOKEN","AUTH_ERROR_REQUEST_FAILED","VirtualAccessLevel","DefaultBGColor","DefaultTextColor","DefaultHintColor","EMAIL_REGEXP","TICKET_OWNER_MYSELF","TICKET_OWNER_SOMEONE","TICKET_OWNER_UNASSIGNED","TICKET_TYPE_SUBTYPE_PREPAID","ORDER_STATUS_PAID","ORDER_PAYMENT_METHOD_OFFLINE","STEP_SELECT_TICKET_TYPE","STEP_PERSONAL_INFO","STEP_PAYMENT","STEP_COMPLETE","RESEND_TIME","VIEW_ITEM","ADD_TO_CART","BEGIN_CHECKOUT","PURCHASE_COMPLETE","ERROR_TYPE_ERROR","ERROR_TYPE_VALIDATION","ERROR_TYPE_PAYMENT","PAYMENT_PROVIDER_STRIPE","PAYMENT_PROVIDER_LAWPAY","formatCurrency","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","avoidTooltipOverflow","left","top","_e","_t","node","max","useState","useEffect","useRef","useCountdown","initialTime","countdown","setCountdown","intervalRef","resetCountdown","newTime","time","undefined","current","clearInterval","setInterval","prevCountdown","PropTypes","OtpInput","moment","styles","FNidLogo","FNidLogoDark","PasswordlessLoginComponent","email","codeLength","codeLifeTime","passwordlessLogin","loginWithCode","codeError","goToLogin","getLoginCode","getPasswordlessCode","idpLogoLight","idpLogoDark","idpLogoAlt","otpCode","setOtpCode","otpError","setOtpError","codeSent","setCodeSent","isLoading","setIsLoading","resendCountdown","resetResendCountdown","lifetimeCountdown","resetLifetimeCountdown","tryPasswordlessLogin","code","finally","resendCode","then","setTimeout","catch","handleSubmit","e","preventDefault","formatDuration","seconds","duration","utc","asMilliseconds","format","passwordlessWrapper","innerWrapper","logo","logoDark","logoLight","digits","codeInput","border","display","error","verify","button","link","resend","disabled","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,GAAG,CAACC,MAAD,EAASC,2BAAT,KAAyC;AACzE,MAAG,CAACD,MAAJ,EAAY,OAAO,CAAP;AACZ,MAAGF,mBAAmB,CAACE,MAAD,CAAtB,EAAgC,OAAO,CAAP;AAChC,MAAIE,GAAG,GAAGC,IAAI,CAACC,GAAL,CAAS,CAACJ,MAAM,CAACK,eAAP,IAA0BC,MAAM,CAACC,gBAAlC,IAAsDP,MAAM,CAACQ,aAAtE,EAAsFR,MAAM,CAACS,sBAAP,IAAiCH,MAAM,CAACC,gBAA9H,CAAV;;AACA,MAAIN,2BAA2B,IAAI,IAAnC,EAAyC;AACrCC,IAAAA,GAAG,GAAGC,IAAI,CAACC,GAAL,CAASF,GAAT,EAAcD,2BAAd,CAAN;AACH;;AACD,SAAOC,GAAP;AACH,CARM;;ACFP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CAAvC;AAeA,yDAAezD,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/./src/utils/constants.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/external commonjs \"moment-timezone\"","webpack://summit-registration-lite/./src/components/login-passwordless/index.module.scss","webpack://summit-registration-lite/./src/utils/hooks/useCountdown.js","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, remainingQuantityPerAccount) => {\n if(!ticket) return 0;\n if(isPrePaidTicketType(ticket)) return 1;\n let max = Math.min((ticket.quantity_2_sell ?? Number.MAX_SAFE_INTEGER) - ticket.quantity_sold, (ticket.max_quantity_per_order ?? Number.MAX_SAFE_INTEGER));\n if (remainingQuantityPerAccount != null) {\n max = Math.min(max, remainingQuantityPerAccount);\n }\n return max;\n}\n\n","export * from './capitalizeFirstLetter';\nexport * from './formatCurrency';\nexport * from './formatErrorMessage';\nexport * from './getTicketMaxQuantity';\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 AUTH_ERROR_MESSAGE = 'Missing Auth info';\nexport const AUTH_ERROR_MISSING_REFRESH_TOKEN = \"missing Refresh Token\";\nexport const AUTH_ERROR_REQUEST_FAILED = 'Request failed';\nexport const VirtualAccessLevel = 'VIRTUAL';\nexport const DefaultBGColor = '#000000';\nexport const DefaultTextColor = '#FFFFFF';\nexport const DefaultHintColor = 'rgb(58, 63, 65)';\n\nexport const EMAIL_REGEXP = /(([^<>()\\[\\]\\\\.,;:\\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\nexport const TICKET_OWNER_MYSELF = 'myself';\nexport const TICKET_OWNER_SOMEONE = 'someoneElse';\nexport const TICKET_OWNER_UNASSIGNED = 'unassigned';\n\nexport const TICKET_TYPE_SUBTYPE_PREPAID = 'PrePaid';\nexport const ORDER_STATUS_PAID = 'Paid';\nexport const ORDER_PAYMENT_METHOD_OFFLINE = 'Offline';\n\nexport const STEP_SELECT_TICKET_TYPE = 0;\nexport const STEP_PERSONAL_INFO = 1;\nexport const STEP_PAYMENT = 2;\nexport const STEP_COMPLETE = 3;\n\nexport const RESEND_TIME = 60;\n\n// ANALYTICS\nexport const VIEW_ITEM = 'view_item';\nexport const ADD_TO_CART = 'add_to_cart';\nexport const BEGIN_CHECKOUT = 'begin_checkout';\nexport const PURCHASE_COMPLETE = 'purchase_complete';\n\n// ERRORS\nexport const ERROR_TYPE_ERROR= 'error_type_error';\nexport const ERROR_TYPE_VALIDATION = 'error_type_validation';\nexport const ERROR_TYPE_PAYMENT = 'error_type_payment';\n\n// PROMO CODE STATUS\nexport const PROMO_STATUS = {\n IDLE: 'idle',\n SUGGESTED: 'suggested',\n APPLYING: 'applying',\n VALIDATING: 'validating',\n VALID: 'valid',\n INVALID: 'invalid',\n};\n\n// PROVIDERS\nexport const PAYMENT_PROVIDER_STRIPE = 'Stripe';\nexport const PAYMENT_PROVIDER_LAWPAY = 'LawPay';\n\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 \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);\n\nexport const avoidTooltipOverflow = ({ left, top }, _e, _t, node) => {\n return {\n top,\n left: typeof node === 'string' ? left : Math.max(left, 0),\n };\n}","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\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"moment-timezone\");","// 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\",\"disabled\":\"disabled___fMnzY\",\"logoLight\":\"logoLight___vSbn_\"};","import { useState, useEffect, useRef } from 'react';\n\nconst useCountdown = (initialTime) => {\n const [countdown, setCountdown] = useState(initialTime);\n const intervalRef = useRef(null);\n\n const resetCountdown = (newTime) => {\n const time = newTime !== undefined ? newTime : initialTime;\n if (intervalRef.current) clearInterval(intervalRef.current);\n setCountdown(time);\n\n if (time > 0) {\n intervalRef.current = setInterval(() => {\n setCountdown((prevCountdown) => {\n if (prevCountdown <= 1) {\n clearInterval(intervalRef.current);\n return 0;\n }\n return prevCountdown - 1;\n });\n }, 1000);\n }\n };\n\n useEffect(() => {\n // Initialize the countdown when the hook is first used\n resetCountdown(initialTime);\n return () => clearInterval(intervalRef.current);\n }, [initialTime]);\n\n return [countdown, resetCountdown];\n};\n\nexport default useCountdown;","/**\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, useEffect } from 'react';\nimport PropTypes from 'prop-types';\nimport OtpInput from 'react-otp-input';\nimport moment from 'moment-timezone';\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';\nimport { RESEND_TIME } from '../../utils/constants';\nimport useCountdown from '../../utils/hooks/useCountdown';\n\nconst PasswordlessLoginComponent = ({\n email, codeLength, codeLifeTime, 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 const [resendCountdown, resetResendCountdown] = useCountdown(0);\n const [lifetimeCountdown, resetLifetimeCountdown] = useCountdown(0);\n\n useEffect(() => {\n if(codeLifeTime > 0) {\n resetLifetimeCountdown(codeLifeTime);\n }\n }, [codeLifeTime])\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 resetResendCountdown(RESEND_TIME);\n })\n .catch((err) => {\n handleSentryException(err);\n });\n };\n\n const handleSubmit = (e) => {\n e.preventDefault();\n tryPasswordlessLogin(otpCode);\n };\n\n const formatDuration = (seconds) => {\n const duration = moment.duration(seconds, 'seconds');\n return moment.utc(duration.asMilliseconds()).format('mm:ss');\n };\n\n return (\n <div className={`${styles.passwordlessWrapper} step-wrapper`}>\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 {codeSent &&\n <p className={styles.codeSent}>Code has been resent.</p>\n }\n {lifetimeCountdown > 0 &&\n <p className={styles.codeSent}>Code expires in {formatDuration(lifetimeCountdown)} minutes.</p>\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 \n <button\n className={`${styles.link} ${resendCountdown > 0 ? styles.disabled : ''}`}\n disabled={resendCountdown > 0}\n onClick={() => resendCode()}\n data-testid=\"resend\">\n resend code {' '} {resendCountdown > 0 && (<span>({resendCountdown})</span>)}\n </button>\n now.\n </div>\n </>\n </div>\n );\n}\n\nPasswordlessLoginComponent.propTypes = {\n email: PropTypes.string.isRequired,\n codeLength: PropTypes.number.isRequired,\n codeLifeTime: 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","remainingQuantityPerAccount","max","Math","min","quantity_2_sell","Number","MAX_SAFE_INTEGER","quantity_sold","max_quantity_per_order","AUTH_ERROR_MESSAGE","AUTH_ERROR_MISSING_REFRESH_TOKEN","AUTH_ERROR_REQUEST_FAILED","VirtualAccessLevel","DefaultBGColor","DefaultTextColor","DefaultHintColor","EMAIL_REGEXP","TICKET_OWNER_MYSELF","TICKET_OWNER_SOMEONE","TICKET_OWNER_UNASSIGNED","TICKET_TYPE_SUBTYPE_PREPAID","ORDER_STATUS_PAID","ORDER_PAYMENT_METHOD_OFFLINE","STEP_SELECT_TICKET_TYPE","STEP_PERSONAL_INFO","STEP_PAYMENT","STEP_COMPLETE","RESEND_TIME","VIEW_ITEM","ADD_TO_CART","BEGIN_CHECKOUT","PURCHASE_COMPLETE","ERROR_TYPE_ERROR","ERROR_TYPE_VALIDATION","ERROR_TYPE_PAYMENT","PROMO_STATUS","IDLE","SUGGESTED","APPLYING","VALIDATING","VALID","INVALID","PAYMENT_PROVIDER_STRIPE","PAYMENT_PROVIDER_LAWPAY","formatCurrency","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","avoidTooltipOverflow","left","top","_e","_t","node","useState","useEffect","useRef","useCountdown","initialTime","countdown","setCountdown","intervalRef","resetCountdown","newTime","time","undefined","current","clearInterval","setInterval","prevCountdown","PropTypes","OtpInput","moment","styles","FNidLogo","FNidLogoDark","PasswordlessLoginComponent","email","codeLength","codeLifeTime","passwordlessLogin","loginWithCode","codeError","goToLogin","getLoginCode","getPasswordlessCode","idpLogoLight","idpLogoDark","idpLogoAlt","otpCode","setOtpCode","otpError","setOtpError","codeSent","setCodeSent","isLoading","setIsLoading","resendCountdown","resetResendCountdown","lifetimeCountdown","resetLifetimeCountdown","tryPasswordlessLogin","code","finally","resendCode","then","setTimeout","catch","handleSubmit","e","preventDefault","formatDuration","seconds","duration","utc","asMilliseconds","format","passwordlessWrapper","innerWrapper","logo","logoDark","logoLight","digits","codeInput","border","display","error","verify","button","link","resend","disabled","propTypes","string","isRequired","number","func","bool"],"sourceRoot":""}
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
.loginWrapper___sxUEn{display:flex;justify-content:center;font-weight:bold;text-align:center;padding:20px 0 30px}.innerWrapper___GQRkq{display:flex;flex-direction:column;justify-content:center;width:300px}.innerWrapper___GQRkq span{margin:10px 0}.button___QMZPu{padding:10px 30px;font-weight:normal;display:inline-flex;justify-content:center;margin:5px 0;border-radius:5px;cursor:pointer;background-position:12px center;background-repeat:no-repeat;background-size:16px;line-height:1.4;box-shadow:0px 3px 1px -2px rgba(0,0,0
|
|
2
|
-
|
|
1
|
+
.loginWrapper___sxUEn{display:flex;justify-content:center;font-weight:bold;text-align:center;padding:20px 0 30px}.innerWrapper___GQRkq{display:flex;flex-direction:column;justify-content:center;width:300px}.innerWrapper___GQRkq span{margin:10px 0}.button___QMZPu{padding:10px 30px;font-weight:normal;display:inline-flex;justify-content:center;margin:5px 0;border-radius:5px;cursor:pointer;background-position:12px center;background-repeat:no-repeat;background-size:16px;line-height:1.4;box-shadow:0px 3px 1px -2px rgba(0,0,0,.2),0px 2px 2px 0px rgba(0,0,0,.14),0px 1px 5px 0px rgba(0,0,0,.12)}.button___QMZPu:hover{box-shadow:0px 2px 4px -1px rgba(0,0,0,.2),0px 4px 5px 0px rgba(0,0,0,.14),0px 1px 10px 0px rgba(0,0,0,.12)}.title___NnwWR{padding:15px 0 0 0}.loginCode___dDBup{margin-bottom:10px;font-size:15px}.loginCode___dDBup>div{margin-top:10px}.loginCode___dDBup span{display:inline-block;font-weight:normal;font-size:14px}.loginCode___dDBup .error___aCF7E{color:#e5424d;font-size:14px;font-weight:bold}.loginCode___dDBup .error___aCF7E a{color:#e5424d;text-decoration:underline}.primaryEmailButton___gH1fC{background-color:var(--color_input_background_color);border:1px solid var(--color_input_border_color);color:var(--color_input_text_color)}.buttonDisabled___T9tkn{background-color:var(--color_secondary_contrast);color:var(--color_input_text_color_disabled)}.pointerDisabled___qt_HK{pointer-events:none}.email_login_button___seiLi{display:flex;justify-content:space-between;padding:10px 9px;width:100%}.email_login_button___seiLi span{padding:0 0 0 8px;margin:0}.h2Styled___rfIKD{color:var(--color_gray_darker) !important;font-size:18px !important;font-weight:800 !important;display:flex;flex-direction:row}.h2Styled___rfIKD::before,.h2Styled___rfIKD::after{content:"";flex:1 1;border-bottom:1px solid var(--color_gray_dark);margin:auto}.h2Styled___rfIKD::before{margin-right:10px}.h2Styled___rfIKD::after{margin-left:10px}.input___QR9sA{display:flex;height:40px;margin-top:5px}.input___QR9sA input{border:1px solid var(--color_input_border_color);color:var(--color_input_text_color);background-color:var(--color_input_background_color);border-radius:5px;padding:5px;width:100%}.input___QR9sA input::placeholder{color:var(--color_text_input_hints)}.input___QR9sA button{margin-left:5px;background-color:var(--color_input_background_color);padding:0px 15px;border:1px solid var(--color_input_border_color);color:var(--color_text_dark);box-shadow:none;text-align:center;white-space:nowrap;font-weight:bold;border-radius:5px;cursor:pointer;display:flex;align-items:center;justify-content:center}
|
package/dist/components/login.js
CHANGED
|
@@ -22,10 +22,16 @@ return /******/ (() => { // webpackBootstrap
|
|
|
22
22
|
var utils = __webpack_require__(452);
|
|
23
23
|
;// CONCATENATED MODULE: ./src/helpers/getTicketMaxQuantity.js
|
|
24
24
|
|
|
25
|
-
const getTicketMaxQuantity = ticket => {
|
|
25
|
+
const getTicketMaxQuantity = (ticket, remainingQuantityPerAccount) => {
|
|
26
26
|
if (!ticket) return 0;
|
|
27
27
|
if (isPrePaidTicketType(ticket)) return 1;
|
|
28
|
-
|
|
28
|
+
let max = Math.min((ticket.quantity_2_sell ?? Number.MAX_SAFE_INTEGER) - ticket.quantity_sold, ticket.max_quantity_per_order ?? Number.MAX_SAFE_INTEGER);
|
|
29
|
+
|
|
30
|
+
if (remainingQuantityPerAccount != null) {
|
|
31
|
+
max = Math.min(max, remainingQuantityPerAccount);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
return max;
|
|
29
35
|
};
|
|
30
36
|
;// CONCATENATED MODULE: ./src/helpers/index.js
|
|
31
37
|
|
|
@@ -33,6 +39,65 @@ const getTicketMaxQuantity = ticket => {
|
|
|
33
39
|
|
|
34
40
|
|
|
35
41
|
|
|
42
|
+
/***/ }),
|
|
43
|
+
|
|
44
|
+
/***/ 243:
|
|
45
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
46
|
+
|
|
47
|
+
/* unused harmony exports AUTH_ERROR_MESSAGE, AUTH_ERROR_MISSING_REFRESH_TOKEN, AUTH_ERROR_REQUEST_FAILED, VirtualAccessLevel, DefaultBGColor, DefaultTextColor, DefaultHintColor, EMAIL_REGEXP, TICKET_OWNER_MYSELF, TICKET_OWNER_SOMEONE, TICKET_OWNER_UNASSIGNED, TICKET_TYPE_SUBTYPE_PREPAID, ORDER_STATUS_PAID, ORDER_PAYMENT_METHOD_OFFLINE, STEP_SELECT_TICKET_TYPE, STEP_PERSONAL_INFO, STEP_PAYMENT, STEP_COMPLETE, RESEND_TIME, VIEW_ITEM, ADD_TO_CART, BEGIN_CHECKOUT, PURCHASE_COMPLETE, ERROR_TYPE_ERROR, ERROR_TYPE_VALIDATION, ERROR_TYPE_PAYMENT, PROMO_STATUS, PAYMENT_PROVIDER_STRIPE, PAYMENT_PROVIDER_LAWPAY */
|
|
48
|
+
/**
|
|
49
|
+
* Copyright 2022 OpenStack Foundation
|
|
50
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
51
|
+
* you may not use this file except in compliance with the License.
|
|
52
|
+
* You may obtain a copy of the License at
|
|
53
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
54
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
55
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
56
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
57
|
+
* See the License for the specific language governing permissions and
|
|
58
|
+
* limitations under the License.
|
|
59
|
+
**/
|
|
60
|
+
const AUTH_ERROR_MESSAGE = 'Missing Auth info';
|
|
61
|
+
const AUTH_ERROR_MISSING_REFRESH_TOKEN = "missing Refresh Token";
|
|
62
|
+
const AUTH_ERROR_REQUEST_FAILED = 'Request failed';
|
|
63
|
+
const VirtualAccessLevel = 'VIRTUAL';
|
|
64
|
+
const DefaultBGColor = '#000000';
|
|
65
|
+
const DefaultTextColor = '#FFFFFF';
|
|
66
|
+
const DefaultHintColor = 'rgb(58, 63, 65)';
|
|
67
|
+
const EMAIL_REGEXP = /(([^<>()\[\]\\.,;:\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,}))/;
|
|
68
|
+
const TICKET_OWNER_MYSELF = 'myself';
|
|
69
|
+
const TICKET_OWNER_SOMEONE = 'someoneElse';
|
|
70
|
+
const TICKET_OWNER_UNASSIGNED = 'unassigned';
|
|
71
|
+
const TICKET_TYPE_SUBTYPE_PREPAID = 'PrePaid';
|
|
72
|
+
const ORDER_STATUS_PAID = 'Paid';
|
|
73
|
+
const ORDER_PAYMENT_METHOD_OFFLINE = 'Offline';
|
|
74
|
+
const STEP_SELECT_TICKET_TYPE = 0;
|
|
75
|
+
const STEP_PERSONAL_INFO = 1;
|
|
76
|
+
const STEP_PAYMENT = 2;
|
|
77
|
+
const STEP_COMPLETE = 3;
|
|
78
|
+
const RESEND_TIME = 60; // ANALYTICS
|
|
79
|
+
|
|
80
|
+
const VIEW_ITEM = 'view_item';
|
|
81
|
+
const ADD_TO_CART = 'add_to_cart';
|
|
82
|
+
const BEGIN_CHECKOUT = 'begin_checkout';
|
|
83
|
+
const PURCHASE_COMPLETE = 'purchase_complete'; // ERRORS
|
|
84
|
+
|
|
85
|
+
const ERROR_TYPE_ERROR = 'error_type_error';
|
|
86
|
+
const ERROR_TYPE_VALIDATION = 'error_type_validation';
|
|
87
|
+
const ERROR_TYPE_PAYMENT = 'error_type_payment'; // PROMO CODE STATUS
|
|
88
|
+
|
|
89
|
+
const PROMO_STATUS = {
|
|
90
|
+
IDLE: 'idle',
|
|
91
|
+
SUGGESTED: 'suggested',
|
|
92
|
+
APPLYING: 'applying',
|
|
93
|
+
VALIDATING: 'validating',
|
|
94
|
+
VALID: 'valid',
|
|
95
|
+
INVALID: 'invalid'
|
|
96
|
+
}; // PROVIDERS
|
|
97
|
+
|
|
98
|
+
const PAYMENT_PROVIDER_STRIPE = 'Stripe';
|
|
99
|
+
const PAYMENT_PROVIDER_LAWPAY = 'LawPay';
|
|
100
|
+
|
|
36
101
|
/***/ }),
|
|
37
102
|
|
|
38
103
|
/***/ 452:
|
|
@@ -50,6 +115,8 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
50
115
|
|
|
51
116
|
// EXTERNAL MODULE: ./src/helpers/index.js + 1 modules
|
|
52
117
|
var helpers = __webpack_require__(499);
|
|
118
|
+
// EXTERNAL MODULE: ./src/utils/constants.js
|
|
119
|
+
var constants = __webpack_require__(243);
|
|
53
120
|
// EXTERNAL MODULE: external "react"
|
|
54
121
|
var external_react_ = __webpack_require__(689);
|
|
55
122
|
;// CONCATENATED MODULE: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AMvBU,EAAAA,mBAAmB,EAAEV,oCANE;AAOvBW,EAAAA,iBAAiB,EAAEX,sCAPI;AAQvBY,EAAAA,KAAK,EAAEZ,sCAAgBiE;AARA,CAA3B;AAWA9D,cAAc,CAAC+D,YAAf,GAA8B;AAC1B3D,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 \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);\n\nexport const avoidTooltipOverflow = ({ left, top }, _e, _t, node) => {\n return {\n top,\n left: typeof node === 'string' ? left : Math.max(left, 0),\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, 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\" dangerouslySetInnerHTML={{ __html: loginError }} />}\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","avoidTooltipOverflow","left","top","_e","_t","node","max","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","__html","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":""}
|
|
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,GAAG,CAACC,MAAD,EAASC,2BAAT,KAAyC;AACzE,MAAG,CAACD,MAAJ,EAAY,OAAO,CAAP;AACZ,MAAGF,mBAAmB,CAACE,MAAD,CAAtB,EAAgC,OAAO,CAAP;AAChC,MAAIE,GAAG,GAAGC,IAAI,CAACC,GAAL,CAAS,CAACJ,MAAM,CAACK,eAAP,IAA0BC,MAAM,CAACC,gBAAlC,IAAsDP,MAAM,CAACQ,aAAtE,EAAsFR,MAAM,CAACS,sBAAP,IAAiCH,MAAM,CAACC,gBAA9H,CAAV;;AACA,MAAIN,2BAA2B,IAAI,IAAnC,EAAyC;AACrCC,IAAAA,GAAG,GAAGC,IAAI,CAACC,GAAL,CAASF,GAAT,EAAcD,2BAAd,CAAN;AACH;;AACD,SAAOC,GAAP;AACH,CARM;;ACFP;AACA;AACA;;;;;;;;;ACFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEO,MAAMQ,kBAAkB,GAAG,mBAA3B;AACA,MAAMC,gCAAgC,GAAG,uBAAzC;AACA,MAAMC,yBAAyB,GAAG,gBAAlC;AACA,MAAMC,kBAAkB,GAAG,SAA3B;AACA,MAAMC,cAAc,GAAG,SAAvB;AACA,MA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J,CAFJ,eAMI;AAAK,WAAO,EAAE,MAAMA,SAAS,EAA7B;AAAiC,mBAAY,cAA7C;AAA4D,aAAS,EAAC,QAAtE;AAA+E,SAAK,EAAE;AAAEmC,MAAAA,UAAU,EAAE,MAAd;AAAsBhG,MAAAA,KAAK,EAAE;AAA7B;AAAtF,6BANJ,EASKoD,UAAU,iBAAI;AAAM,mBAAY;AAAlB,yCATnB,CAlDR,CADJ,CADJ,CADJ;AAqEH,CAnHD;;AAqHAZ,cAAc,CAACyD,SAAf,GAA2B;AACvBvD,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,sCAAgBiE;AARA,CAA3B;AAWA9D,cAAc,CAAC+D,YAAf,GAA8B;AAC1B3D,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/constants.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, remainingQuantityPerAccount) => {\n if(!ticket) return 0;\n if(isPrePaidTicketType(ticket)) return 1;\n let max = Math.min((ticket.quantity_2_sell ?? Number.MAX_SAFE_INTEGER) - ticket.quantity_sold, (ticket.max_quantity_per_order ?? Number.MAX_SAFE_INTEGER));\n if (remainingQuantityPerAccount != null) {\n max = Math.min(max, remainingQuantityPerAccount);\n }\n return max;\n}\n\n","export * from './capitalizeFirstLetter';\nexport * from './formatCurrency';\nexport * from './formatErrorMessage';\nexport * from './getTicketMaxQuantity';\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 AUTH_ERROR_MESSAGE = 'Missing Auth info';\nexport const AUTH_ERROR_MISSING_REFRESH_TOKEN = \"missing Refresh Token\";\nexport const AUTH_ERROR_REQUEST_FAILED = 'Request failed';\nexport const VirtualAccessLevel = 'VIRTUAL';\nexport const DefaultBGColor = '#000000';\nexport const DefaultTextColor = '#FFFFFF';\nexport const DefaultHintColor = 'rgb(58, 63, 65)';\n\nexport const EMAIL_REGEXP = /(([^<>()\\[\\]\\\\.,;:\\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\nexport const TICKET_OWNER_MYSELF = 'myself';\nexport const TICKET_OWNER_SOMEONE = 'someoneElse';\nexport const TICKET_OWNER_UNASSIGNED = 'unassigned';\n\nexport const TICKET_TYPE_SUBTYPE_PREPAID = 'PrePaid';\nexport const ORDER_STATUS_PAID = 'Paid';\nexport const ORDER_PAYMENT_METHOD_OFFLINE = 'Offline';\n\nexport const STEP_SELECT_TICKET_TYPE = 0;\nexport const STEP_PERSONAL_INFO = 1;\nexport const STEP_PAYMENT = 2;\nexport const STEP_COMPLETE = 3;\n\nexport const RESEND_TIME = 60;\n\n// ANALYTICS\nexport const VIEW_ITEM = 'view_item';\nexport const ADD_TO_CART = 'add_to_cart';\nexport const BEGIN_CHECKOUT = 'begin_checkout';\nexport const PURCHASE_COMPLETE = 'purchase_complete';\n\n// ERRORS\nexport const ERROR_TYPE_ERROR= 'error_type_error';\nexport const ERROR_TYPE_VALIDATION = 'error_type_validation';\nexport const ERROR_TYPE_PAYMENT = 'error_type_payment';\n\n// PROMO CODE STATUS\nexport const PROMO_STATUS = {\n IDLE: 'idle',\n SUGGESTED: 'suggested',\n APPLYING: 'applying',\n VALIDATING: 'validating',\n VALID: 'valid',\n INVALID: 'invalid',\n};\n\n// PROVIDERS\nexport const PAYMENT_PROVIDER_STRIPE = 'Stripe';\nexport const PAYMENT_PROVIDER_LAWPAY = 'LawPay';\n\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 \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);\n\nexport const avoidTooltipOverflow = ({ left, top }, _e, _t, node) => {\n return {\n top,\n left: typeof node === 'string' ? left : Math.max(left, 0),\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, 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\" dangerouslySetInnerHTML={{ __html: loginError }} />}\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","remainingQuantityPerAccount","max","Math","min","quantity_2_sell","Number","MAX_SAFE_INTEGER","quantity_sold","max_quantity_per_order","AUTH_ERROR_MESSAGE","AUTH_ERROR_MISSING_REFRESH_TOKEN","AUTH_ERROR_REQUEST_FAILED","VirtualAccessLevel","DefaultBGColor","DefaultTextColor","DefaultHintColor","EMAIL_REGEXP","TICKET_OWNER_MYSELF","TICKET_OWNER_SOMEONE","TICKET_OWNER_UNASSIGNED","TICKET_TYPE_SUBTYPE_PREPAID","ORDER_STATUS_PAID","ORDER_PAYMENT_METHOD_OFFLINE","STEP_SELECT_TICKET_TYPE","STEP_PERSONAL_INFO","STEP_PAYMENT","STEP_COMPLETE","RESEND_TIME","VIEW_ITEM","ADD_TO_CART","BEGIN_CHECKOUT","PURCHASE_COMPLETE","ERROR_TYPE_ERROR","ERROR_TYPE_VALIDATION","ERROR_TYPE_PAYMENT","PROMO_STATUS","IDLE","SUGGESTED","APPLYING","VALIDATING","VALID","INVALID","PAYMENT_PROVIDER_STRIPE","PAYMENT_PROVIDER_LAWPAY","formatCurrency","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","avoidTooltipOverflow","left","top","_e","_t","node","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","__html","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":""}
|