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B,6ICtExC,SAASR,EACdN,EACAoC,GAEA,IAAMC,EAAiBrC,EAAUsC,QAC/B,gBAAGnE,EAAH,EAAGA,MAAH,OAAgBiE,EAAoBX,SAAStD,MAGzCqC,EAAmB4B,EACtBrE,KACC,SAACwE,GAAD,OACEvC,EAAUwC,MAAK,SAAC9B,GAAD,OAAaA,EAAQvC,QAAUoE,QAEjDD,QAAO,SAAC5B,GAAD,YAAyBvB,IAAZuB,KAEvB,wBAAWF,IAAX,OAAgC6B,IAG3B,IAAMI,EAA4B,CAAC,KAAM,KAAM,MACzCC,EAAwB,CAAC,KAAM,KAAM,MACrClC,EAAmB,CAAC,KAAM,KAAM,O,sDCnBtC,IAAMmC,EAAmB,SAC9B3B,EACA4B,EACAC,GAEA,IACIC,EADc9B,EAAE+B,OAAZ5E,MACmB6E,QAAQ,UAAW,IAAIC,UAAU,EAAG,GAE3DH,EAAepJ,OAAS,EAC1BoJ,EAAiBA,EAAeE,QAAQ,sBAAuB,YACtDF,EAAepJ,OAAS,IACjCoJ,EAAiBA,EAAeE,QAAQ,eAAgB,UAG1DJ,EAASC,EAAWC,EAAgB,CAAEI,gBAAgB","sources":["webpack://_N_E/./node_modules/date-fns/esm/_lib/requiredArgs/index.js","webpack://_N_E/./node_modules/date-fns/esm/_lib/toInteger/index.js","webpack://_N_E/./node_modules/date-fns/esm/addDays/index.js","webpack://_N_E/./node_modules/date-fns/esm/addMonths/index.js","webpack://_N_E/./node_modules/date-fns/esm/isPast/index.js","webpack://_N_E/./node_modules/date-fns/esm/subDays/index.js","webpack://_N_E/./node_modules/date-fns/esm/subMonths/index.js","webpack://_N_E/./node_modules/date-fns/esm/sub/index.js","webpack://_N_E/./node_modules/date-fns/esm/toDate/index.js","webpack://_N_E/./src/api/lookupClient.tsx","webpack://_N_E/./src/components/FormButtons.tsx","webpack://_N_E/./src/api/getCountries.ts","webpack://_N_E/./src/api/getStates.ts","webpack://_N_E/./src/hooks/useGetLocales.ts","webpack://_N_E/./src/utils/apiErrorMessages.tsx","webpack://_N_E/./src/utils/countries.ts","webpack://_N_E/./src/utils/handleDateChange.ts"],"sourcesContent":["export default function requiredArgs(required, args) {\n if (args.length < required) {\n throw new TypeError(required + ' argument' + (required > 1 ? 's' : '') + ' required, but only ' + args.length + ' present');\n }\n}","export default function toInteger(dirtyNumber) {\n if (dirtyNumber === null || dirtyNumber === true || dirtyNumber === false) {\n return NaN;\n }\n\n var number = Number(dirtyNumber);\n\n if (isNaN(number)) {\n return number;\n }\n\n return number < 0 ? Math.ceil(number) : Math.floor(number);\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name addDays\n * @category Day Helpers\n * @summary Add the specified number of days to the given date.\n *\n * @description\n * Add the specified number of days to the given date.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of days to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} - the new date with the days added\n * @throws {TypeError} - 2 arguments required\n *\n * @example\n * // Add 10 days to 1 September 2014:\n * const result = addDays(new Date(2014, 8, 1), 10)\n * //=> Thu Sep 11 2014 00:00:00\n */\n\nexport default function addDays(dirtyDate, dirtyAmount) {\n requiredArgs(2, arguments);\n var date = toDate(dirtyDate);\n var amount = toInteger(dirtyAmount);\n\n if (isNaN(amount)) {\n return new Date(NaN);\n }\n\n if (!amount) {\n // If 0 days, no-op to avoid changing times in the hour before end of DST\n return date;\n }\n\n date.setDate(date.getDate() + amount);\n return date;\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name addMonths\n * @category Month Helpers\n * @summary Add the specified number of months to the given date.\n *\n * @description\n * Add the specified number of months to the given date.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of months to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} the new date with the months added\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Add 5 months to 1 September 2014:\n * const result = addMonths(new Date(2014, 8, 1), 5)\n * //=> Sun Feb 01 2015 00:00:00\n */\n\nexport default function addMonths(dirtyDate, dirtyAmount) {\n requiredArgs(2, arguments);\n var date = toDate(dirtyDate);\n var amount = toInteger(dirtyAmount);\n\n if (isNaN(amount)) {\n return new Date(NaN);\n }\n\n if (!amount) {\n // If 0 months, no-op to avoid changing times in the hour before end of DST\n return date;\n }\n\n var dayOfMonth = date.getDate(); // The JS Date object supports date math by accepting out-of-bounds values for\n // month, day, etc. For example, new Date(2020, 0, 0) returns 31 Dec 2019 and\n // new Date(2020, 13, 1) returns 1 Feb 2021. This is *almost* the behavior we\n // want except that dates will wrap around the end of a month, meaning that\n // new Date(2020, 13, 31) will return 3 Mar 2021 not 28 Feb 2021 as desired. So\n // we'll default to the end of the desired month by adding 1 to the desired\n // month and using a date of 0 to back up one day to the end of the desired\n // month.\n\n var endOfDesiredMonth = new Date(date.getTime());\n endOfDesiredMonth.setMonth(date.getMonth() + amount + 1, 0);\n var daysInMonth = endOfDesiredMonth.getDate();\n\n if (dayOfMonth >= daysInMonth) {\n // If we're already at the end of the month, then this is the correct date\n // and we're done.\n return endOfDesiredMonth;\n } else {\n // Otherwise, we now know that setting the original day-of-month value won't\n // cause an overflow, so set the desired day-of-month. Note that we can't\n // just set the date of `endOfDesiredMonth` because that object may have had\n // its time changed in the unusual case where where a DST transition was on\n // the last day of the month and its local time was in the hour skipped or\n // repeated next to a DST transition. So we use `date` instead which is\n // guaranteed to still have the original time.\n date.setFullYear(endOfDesiredMonth.getFullYear(), endOfDesiredMonth.getMonth(), dayOfMonth);\n return date;\n }\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name isPast\n * @category Common Helpers\n * @summary Is the given date in the past?\n * @pure false\n *\n * @description\n * Is the given date in the past?\n *\n * > ⚠️ Please note that this function is not present in the FP submodule as\n * > it uses `Date.now()` internally hence impure and can't be safely curried.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the date to check\n * @returns {Boolean} the date is in the past\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // If today is 6 October 2014, is 2 July 2014 in the past?\n * var result = isPast(new Date(2014, 6, 2))\n * //=> true\n */\n\nexport default function isPast(dirtyDate) {\n requiredArgs(1, arguments);\n return toDate(dirtyDate).getTime() < Date.now();\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport addDays from \"../addDays/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name subDays\n * @category Day Helpers\n * @summary Subtract the specified number of days from the given date.\n *\n * @description\n * Subtract the specified number of days from the given date.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of days to be subtracted. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} the new date with the days subtracted\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Subtract 10 days from 1 September 2014:\n * const result = subDays(new Date(2014, 8, 1), 10)\n * //=> Fri Aug 22 2014 00:00:00\n */\n\nexport default function subDays(dirtyDate, dirtyAmount) {\n requiredArgs(2, arguments);\n var amount = toInteger(dirtyAmount);\n return addDays(dirtyDate, -amount);\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport addMonths from \"../addMonths/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name subMonths\n * @category Month Helpers\n * @summary Subtract the specified number of months from the given date.\n *\n * @description\n * Subtract the specified number of months from the given date.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of months to be subtracted. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} the new date with the months subtracted\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Subtract 5 months from 1 February 2015:\n * const result = subMonths(new Date(2015, 1, 1), 5)\n * //=> Mon Sep 01 2014 00:00:00\n */\n\nexport default function subMonths(dirtyDate, dirtyAmount) {\n requiredArgs(2, arguments);\n var amount = toInteger(dirtyAmount);\n return addMonths(dirtyDate, -amount);\n}","import subDays from \"../subDays/index.js\";\nimport subMonths from \"../subMonths/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\nimport toInteger from \"../_lib/toInteger/index.js\";\n/**\n * @name sub\n * @category Common Helpers\n * @summary Subtract the specified years, months, weeks, days, hours, minutes and seconds from the given date.\n *\n * @description\n * Subtract the specified years, months, weeks, days, hours, minutes and seconds from the given date.\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Duration} duration - the object with years, months, weeks, days, hours, minutes and seconds to be subtracted\n *\n * | Key | Description |\n * |---------|------------------------------------|\n * | years | Amount of years to be subtracted |\n * | months | Amount of months to be subtracted |\n * | weeks | Amount of weeks to be subtracted |\n * | days | Amount of days to be subtracted |\n * | hours | Amount of hours to be subtracted |\n * | minutes | Amount of minutes to be subtracted |\n * | seconds | Amount of seconds to be subtracted |\n *\n * All values default to 0\n *\n * @returns {Date} the new date with the seconds subtracted\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Subtract the following duration from 15 June 2017 15:29:20\n * const result = sub(new Date(2017, 5, 15, 15, 29, 20), {\n * years: 2,\n * months: 9,\n * weeks: 1,\n * days: 7,\n * hours: 5,\n * minutes: 9,\n * seconds: 30\n * })\n * //=> Mon Sep 1 2014 10:19:50\n */\n\nexport default function sub(dirtyDate, duration) {\n requiredArgs(2, arguments);\n if (!duration || typeof duration !== 'object') return new Date(NaN);\n var years = duration.years ? toInteger(duration.years) : 0;\n var months = duration.months ? toInteger(duration.months) : 0;\n var weeks = duration.weeks ? toInteger(duration.weeks) : 0;\n var days = duration.days ? toInteger(duration.days) : 0;\n var hours = duration.hours ? toInteger(duration.hours) : 0;\n var minutes = duration.minutes ? toInteger(duration.minutes) : 0;\n var seconds = duration.seconds ? toInteger(duration.seconds) : 0; // Subtract years and months\n\n var dateWithoutMonths = subMonths(toDate(dirtyDate), months + years * 12); // Subtract weeks and days\n\n var dateWithoutDays = subDays(dateWithoutMonths, days + weeks * 7); // Subtract hours, minutes and seconds\n\n var minutestoSub = minutes + hours * 60;\n var secondstoSub = seconds + minutestoSub * 60;\n var mstoSub = secondstoSub * 1000;\n var finalDate = new Date(dateWithoutDays.getTime() - mstoSub);\n return finalDate;\n}","import requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name toDate\n * @category Common Helpers\n * @summary Convert the given argument to an instance of Date.\n *\n * @description\n * Convert the given argument to an instance of Date.\n *\n * If the argument is an instance of Date, the function returns its clone.\n *\n * If the argument is a number, it is treated as a timestamp.\n *\n * If the argument is none of the above, the function returns Invalid Date.\n *\n * **Note**: *all* Date arguments passed to any *date-fns* function is processed by `toDate`.\n *\n * @param {Date|Number} argument - the value to convert\n * @returns {Date} the parsed date in the local time zone\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // Clone the date:\n * const result = toDate(new Date(2014, 1, 11, 11, 30, 30))\n * //=> Tue Feb 11 2014 11:30:30\n *\n * @example\n * // Convert the timestamp to date:\n * const result = toDate(1392098430000)\n * //=> Tue Feb 11 2014 11:30:30\n */\n\nexport default function toDate(argument) {\n requiredArgs(1, arguments);\n var argStr = Object.prototype.toString.call(argument); // Clone the date\n\n if (argument instanceof Date || typeof argument === 'object' && argStr === '[object Date]') {\n // Prevent the date to lose the milliseconds when passed to new Date() in IE10\n return new Date(argument.getTime());\n } else if (typeof argument === 'number' || argStr === '[object Number]') {\n return new Date(argument);\n } else {\n if ((typeof argument === 'string' || argStr === '[object String]') && typeof console !== 'undefined') {\n // eslint-disable-next-line no-console\n console.warn(\"Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://git.io/fjule\"); // eslint-disable-next-line no-console\n\n console.warn(new Error().stack);\n }\n\n return new Date(NaN);\n }\n}","import { getXCLEARCorrelationInfo } from '@api/utils'\n\nexport const baseLookup = async (\n key: string\n): Promise<{ label: string; value: any }[]> => {\n const response = await fetch(\n `${process.env.NEXT_PUBLIC_LOOKUP_API_ENDPOINT}/lookup?categories=${key}`,\n {\n headers: {\n 'X-CLEAR-CorrelationInfo': getXCLEARCorrelationInfo(),\n },\n }\n )\n\n const data = await response.json()\n\n return data[0].values.map((x: any) => ({\n label: x.text,\n value: x.key,\n }))\n}\n","import React from 'react'\nimport useMedia from 'use-media'\n\nimport { Button, ButtonProps, theme } from '@clear/design-system'\n\nconst aboveMobile = theme?.breakpoints?.[0] as string\n\nexport const BackButton: React.FC = (props) => {\n const isAboveMobile = useMedia({ minWidth: aboveMobile })\n\n return (\n \n )\n}\n\nexport const ContinueButton: React.FC = ({\n text = 'Continue',\n id,\n ...props\n}) => {\n const isAboveMobile = useMedia({ minWidth: aboveMobile })\n\n return (\n \n )\n}\n","import { baseLookup } from './lookupClient'\nexport interface CountryOption {\n value: string\n label: string\n}\n\nconst getCountries = () => baseLookup('countries')\n\nexport default getCountries\n","const US = [\n {\n text: 'Alabama',\n key: 'AL',\n },\n {\n text: 'Alaska',\n key: 'AK',\n },\n {\n text: 'American Samoa',\n key: 'AS',\n },\n {\n text: 'Arizona',\n key: 'AZ',\n },\n {\n text: 'Arkansas',\n key: 'AR',\n },\n {\n text: 'California',\n key: 'CA',\n },\n {\n text: 'Colorado',\n key: 'CO',\n },\n {\n text: 'Connecticut',\n key: 'CT',\n },\n {\n text: 'Delaware',\n key: 'DE',\n },\n {\n text: 'District Of Columbia',\n key: 'DC',\n },\n {\n text: 'Federated States Of Micronesia',\n key: 'FM',\n },\n {\n text: 'Florida',\n key: 'FL',\n },\n {\n text: 'Georgia',\n key: 'GA',\n },\n {\n text: 'Guam',\n key: 'GU',\n },\n {\n text: 'Hawaii',\n key: 'HI',\n },\n {\n text: 'Idaho',\n key: 'ID',\n },\n {\n text: 'Illinois',\n key: 'IL',\n },\n {\n text: 'Indiana',\n key: 'IN',\n },\n {\n text: 'Iowa',\n key: 'IA',\n },\n {\n text: 'Kansas',\n key: 'KS',\n },\n {\n text: 'Kentucky',\n key: 'KY',\n },\n {\n text: 'Louisiana',\n key: 'LA',\n },\n {\n text: 'Maine',\n key: 'ME',\n },\n {\n text: 'Marshall Islands',\n key: 'MH',\n },\n {\n text: 'Maryland',\n key: 'MD',\n },\n {\n text: 'Massachusetts',\n key: 'MA',\n },\n {\n text: 'Michigan',\n key: 'MI',\n },\n {\n text: 'Minnesota',\n key: 'MN',\n },\n {\n text: 'Mississippi',\n key: 'MS',\n },\n {\n text: 'Missouri',\n key: 'MO',\n },\n {\n text: 'Montana',\n key: 'MT',\n },\n {\n text: 'Nebraska',\n key: 'NE',\n },\n {\n text: 'Nevada',\n key: 'NV',\n },\n {\n text: 'New Hampshire',\n key: 'NH',\n },\n {\n text: 'New Jersey',\n key: 'NJ',\n },\n {\n text: 'New Mexico',\n key: 'NM',\n },\n {\n text: 'New York',\n key: 'NY',\n },\n {\n text: 'North Carolina',\n key: 'NC',\n },\n {\n text: 'North Dakota',\n key: 'ND',\n },\n {\n text: 'Northern Mariana Islands',\n key: 'MP',\n },\n {\n text: 'Ohio',\n key: 'OH',\n },\n {\n text: 'Oklahoma',\n key: 'OK',\n },\n {\n text: 'Oregon',\n key: 'OR',\n },\n {\n text: 'Palau',\n key: 'PW',\n },\n {\n text: 'Pennsylvania',\n key: 'PA',\n },\n {\n text: 'Puerto Rico',\n key: 'PR',\n },\n {\n text: 'Rhode Island',\n key: 'RI',\n },\n {\n text: 'South Carolina',\n key: 'SC',\n },\n {\n text: 'South Dakota',\n key: 'SD',\n },\n {\n text: 'Tennessee',\n key: 'TN',\n },\n {\n text: 'Texas',\n key: 'TX',\n },\n {\n text: 'Utah',\n key: 'UT',\n },\n {\n text: 'Vermont',\n key: 'VT',\n },\n {\n text: 'Virgin Islands',\n key: 'VI',\n },\n {\n text: 'Virginia',\n key: 'VA',\n },\n {\n text: 'Washington',\n key: 'WA',\n },\n {\n text: 'West Virginia',\n key: 'WV',\n },\n {\n text: 'Wisconsin',\n key: 'WI',\n },\n {\n text: 'Wyoming',\n key: 'WY',\n },\n]\n\nconst MX = [\n {\n key: 'AG',\n text: 'Aguascalientes',\n },\n {\n key: 'BC',\n text: 'Baja California',\n },\n {\n key: 'BS',\n text: 'Baja California Sur',\n },\n {\n key: 'CH',\n text: 'Chihuahua',\n },\n {\n key: 'CL',\n text: 'Colima',\n },\n {\n key: 'CM',\n text: 'Campeche',\n },\n {\n key: 'CO',\n text: 'Coahuila',\n },\n {\n key: 'CS',\n text: 'Chiapas',\n },\n {\n key: 'DF',\n text: 'Federal District',\n },\n {\n key: 'DG',\n text: 'Durango',\n },\n {\n key: 'GR',\n text: 'Guerrero',\n },\n {\n key: 'GT',\n text: 'Guanajuato',\n },\n {\n key: 'HG',\n text: 'Hidalgo',\n },\n {\n key: 'JA',\n text: 'Jalisco',\n },\n {\n key: 'ME',\n text: 'México State',\n },\n {\n key: 'MI',\n text: 'Michoacán',\n },\n {\n key: 'MO',\n text: 'Morelos',\n },\n {\n key: 'NA',\n text: 'Nayarit',\n },\n {\n key: 'NL',\n text: 'Nuevo León',\n },\n {\n key: 'OA',\n text: 'Oaxaca',\n },\n {\n key: 'PB',\n text: 'Puebla',\n },\n {\n key: 'QE',\n text: 'Querétaro',\n },\n {\n key: 'QR',\n text: 'Quintana Roo',\n },\n {\n key: 'SI',\n text: 'Sinaloa',\n },\n {\n key: 'SL',\n text: 'San Luis Potosí',\n },\n {\n key: 'SO',\n text: 'Sonora',\n },\n {\n key: 'TB',\n text: 'Tabasco',\n },\n {\n key: 'TL',\n text: 'Tlaxcala',\n },\n {\n key: 'TM',\n text: 'Tamaulipas',\n },\n {\n key: 'VE',\n text: 'Veracruz',\n },\n {\n key: 'YU',\n text: 'Yucatán',\n },\n {\n key: 'ZA',\n text: 'Zacatecas',\n },\n]\n\nconst CA = [\n {\n text: 'Alberta',\n key: 'AB',\n },\n {\n text: 'British Columbia',\n key: 'BC',\n },\n {\n text: 'Manitoba',\n key: 'MB',\n },\n {\n text: 'New Brunswick',\n key: 'NB',\n },\n {\n text: 'Newfoundland and Labrador',\n key: 'NL',\n },\n {\n text: 'Northwest Territories',\n key: 'NT',\n },\n {\n text: 'Nova Scotia',\n key: 'NS',\n },\n {\n text: 'Nunavut',\n key: 'NU',\n },\n {\n text: 'Ontario',\n key: 'ON',\n },\n {\n text: 'Prince Edward Island',\n key: 'PE',\n },\n {\n text: 'Quebec',\n key: 'QC',\n },\n {\n text: 'Saskatchewan',\n key: 'SK',\n },\n {\n text: 'Yukon Territory',\n key: 'YT',\n },\n]\n\nexport interface StateOption {\n value: string\n label: string\n}\n\nexport interface StateIndex {\n [key: string]: StateOption[]\n}\n\nconst getStates = (): Promise =>\n Promise.resolve({\n US: US.map((x) => ({\n label: x.text,\n value: x.key,\n })),\n MX: MX.map((x) => ({\n label: x.text,\n value: x.key,\n })),\n CA: CA.map((x) => ({\n label: x.text,\n value: x.key,\n })),\n })\n\nexport default getStates\n","import getCountries, { CountryOption } from '@api/getCountries'\nimport getStates, { StateOption, StateIndex } from '@api/getStates'\nimport { useState, useEffect } from 'react'\nimport { sortCountries, popularCountries } from '../utils/countries'\n\nlet stateCache: StateIndex | null = null\nlet countryCache: CountryOption[] | null = null\n\nexport default function useGetLocales(): [\n CountryOption[],\n (country: string) => StateOption[],\n boolean\n] {\n const [states, setStates] = useState(stateCache || {})\n const [countries, setCountries] = useState(\n countryCache || []\n )\n const [isLoading, setIsLoading] = useState(false)\n useEffect(() => {\n const fetchData = async () => {\n if (!stateCache) {\n setIsLoading(true)\n stateCache = await getStates()\n }\n if (!countryCache) {\n setIsLoading(true)\n countryCache = sortCountries(await getCountries(), popularCountries)\n }\n setStates(stateCache)\n setCountries(countryCache)\n setIsLoading(false)\n }\n fetchData()\n }, [])\n const getStatesByCountry = (country: string) => {\n return states[country] || []\n }\n return [countries, getStatesByCountry, isLoading]\n}\n","import { Enrollment } from '@clear-denver/tpc-openapi-typescript'\n\ninterface ErrorMessage {\n key: string\n errorMessage: string\n}\n\nexport const getGlobalErrorMessage = (errors: any) => {\n return errors?.global?.length ? errors?.global[0].errorMessage : undefined\n}\n\nexport const createGlobalErrorMessage = (e: any) => {\n const globalError = {\n global: [\n {\n key: 'global',\n errorMessage: e.message,\n },\n ],\n }\n return globalError\n}\n\nexport interface ErrorsByProperty {\n [key: string]: Array\n}\n\nexport const getApiErrorsByProperty = (\n errors: Array,\n formState: { [key: string]: any }\n): ErrorsByProperty => {\n const errorsByProperty = errors.reduce((acc: any, err: any) => {\n const formKeys = Object.keys(formState)\n const errorKey = formKeys.includes(err.property) ? err.property : 'global'\n if (!acc[errorKey]) acc[errorKey] = []\n acc[errorKey].push({\n key: err.property,\n errorMessage: err.message,\n })\n return acc\n }, {})\n\n return errorsByProperty\n}\n\nexport async function extractErrors(\n error: Response,\n data: any\n): Promise\nexport async function extractErrors(\n error: Error,\n data: any\n): Promise\nexport async function extractErrors(error: any, data: any) {\n try {\n const errorBody = await error.json()\n return getApiErrorsByProperty(\n errorBody.errors || errorBody.businessErrors,\n data\n )\n } catch {\n return createGlobalErrorMessage(error)\n }\n}\n\nexport function setFormErrors(\n errorsByProperty: ErrorsByProperty,\n setError: T\n) {\n Object.keys(errorsByProperty).forEach((errorKey) => {\n typeof setError === 'function' &&\n setError(errorKey, {\n message: errorsByProperty[errorKey][0].errorMessage,\n })\n })\n}\n","import { CountryOption } from '@api/getCountries'\n\nexport function sortCountries(\n countries: CountryOption[],\n popularCountryCodes: string[]\n) {\n const otherCountries = countries.filter(\n ({ value }) => !popularCountryCodes.includes(value)\n )\n\n const popularCountries = popularCountryCodes\n .map(\n (popularCountryCode) =>\n countries.find((country) => country.value === popularCountryCode)!\n )\n .filter((country) => country !== undefined)\n\n return [...popularCountries, ...otherCountries]\n}\n\nexport const countriesWithSubdivisions = ['US', 'CA', 'MX']\nexport const countriesWithZipCodes = ['US', 'CA', 'MX']\nexport const popularCountries = ['US', 'CA', 'MX']\n","import { ChangeEvent } from 'react'\nimport { UseFormSetValue } from 'react-hook-form'\n\nexport const handleDataChange = (\n e: ChangeEvent,\n setValue: UseFormSetValue,\n fieldName: string\n): void => {\n const { value } = e.target\n let formattedValue = value.replace(/[^0-9]/g, '').substring(0, 8)\n\n if (formattedValue.length > 4) {\n formattedValue = formattedValue.replace(/(\\d{2})(\\d{2})(\\d+)/, '$1/$2/$3')\n } else if (formattedValue.length > 2) {\n formattedValue = formattedValue.replace(/(\\d{2})(\\d+)/, '$1/$2')\n }\n\n setValue(fieldName, formattedValue, { shouldValidate: true })\n}\n"],"names":["requiredArgs","required","args","length","TypeError","toInteger","dirtyNumber","NaN","number","Number","isNaN","Math","ceil","floor","addDays","dirtyDate","dirtyAmount","arguments","date","amount","Date","setDate","getDate","addMonths","dayOfMonth","endOfDesiredMonth","getTime","setMonth","getMonth","daysInMonth","setFullYear","getFullYear","isPast","now","subDays","subMonths","sub","duration","years","months","weeks","days","hours","minutes","seconds","dateWithoutMonths","toDate","dateWithoutDays","minutestoSub","secondstoSub","mstoSub","finalDate","argument","argStr","Object","prototype","toString","call","console","warn","Error","stack","baseLookup","key","fetch","process","headers","getXCLEARCorrelationInfo","response","json","data","values","map","x","label","text","value","aboveMobile","theme","BackButton","props","isAboveMobile","useMedia","minWidth","textProps","display","variant","size","icon","iconPosition","ContinueButton","id","undefined","type","US","MX","CA","Promise","resolve","stateCache","countryCache","useGetLocales","useState","states","setStates","countries","setCountries","isLoading","setIsLoading","useEffect","getStates","sortCountries","getCountries","popularCountries","fetchData","country","getGlobalErrorMessage","errors","global","errorMessage","createGlobalErrorMessage","e","message","getApiErrorsByProperty","formState","reduce","acc","err","errorKey","keys","includes","property","push","extractErrors","error","errorBody","businessErrors","setFormErrors","errorsByProperty","setError","forEach","popularCountryCodes","otherCountries","filter","popularCountryCode","find","countriesWithSubdivisions","countriesWithZipCodes","handleDataChange","setValue","fieldName","formattedValue","target","replace","substring","shouldValidate"],"sourceRoot":""}