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,IAAWE,EAAAA,EAAKuG,QAASvG,EAAAA,EAAKwG,QAASxG,EAAAA,EAAKyG,WAAWvG,SAC3D,OAATuE,QAAS,IAATA,OAAS,EAATA,EAAWrE,KAAI,CAACM,EAAUgG,KACzBvG,EAAAA,EAAAA,KAACwG,EAAQ,IAAyBjG,EAAUE,iBAAkB8F,EAAOrH,aAAc0G,GAApExF,IAAIG,eAMxBiE,IACDxE,EAAAA,EAAAA,KAACyG,EAAAA,EAAkB,CACjBjC,OAAQM,EACR4B,OAAQ,CACN,CAACnH,EAAAA,GAAUC,WAA0B,OAAd+E,QAAc,IAAdA,OAAc,EAAdA,EAAgBoC,oBAI5CjB,IACkB,EChGzBkB,EAAAA,EAAOC,MAAQA,EACfD,EAAAA,EAAOE,SAAWA,EAClBF,EAAAA,EAAOG,eAAiBA,EAExBH,EAAAA,EAAOI,cAAgBA,C","sources":["webpack://tig-front/./src/pages/ContactUsPage/components/Location/Office/Office.module.scss?80fc","pages/ContactUsPage/components/Location/Office/Office.tsx","webpack://tig-front/./src/pages/ContactUsPage/components/Location/Location.module.scss?630b","pages/ContactUsPage/components/Location/Location.tsx","pages/ContactUsPage/components/ContactUsModal/ContactUsModal.tsx","webpack://tig-front/./src/pages/ContactUsPage/ContactUsPage.module.scss?34eb","pages/ContactUsPage/ContactUsPage.tsx","../temp/ContactUsPage.js"],"sourcesContent":["// extracted by mini-css-extract-plugin\nexport default {\"container\":\"cm_g\",\"name\":\"cm_jZ\",\"address\":\"cm_j0\",\"phone\":\"cm_j1\",\"email\":\"cm_j2\"};","import React, { FC, useCallback } from 'react';\nimport key from 'weak-key';\nimport classNames from 'classnames';\nimport { ModalName, useToggleModalsContext } from '@/common/contexts/globalModalContext';\nimport grid from '@/common/css/grid.module.scss';\nimport styles from './Office.module.scss';\n\nexport interface OfficeInfo {\n name: string;\n address: string;\n phones: string[];\n email: string;\n}\n\ninterface OfficeInfoComponentProps extends OfficeInfo {\n onEmailClick: (officeName: string) => void;\n}\n\nconst Office: FC = ({\n name, address, phones, email, onEmailClick,\n}) => {\n const toggleModal = useToggleModalsContext();\n\n const showContactUsModal = useCallback((): void => {\n onEmailClick(name);\n toggleModal({ [ModalName.contactUs]: true });\n }, [\n name, onEmailClick, toggleModal,\n ]);\n\n return (\n
\n
\n {name}\n
\n
\n {address}\n
\n {phones?.map((phone) => (\n {phone}\n ))}\n
\n {email}\n
\n
\n );\n};\nOffice.displayName = 'Office';\n\nexport default Office;\n","// extracted by mini-css-extract-plugin\nexport default {\"container\":\"R_g\",\"isClosed\":\"R_fv\",\"title\":\"R_cX\",\"titleIcon\":\"R_fw\",\"contentContainer\":\"R_cN\"};","import React, { FC, useState } from 'react';\nimport classNames from 'classnames';\nimport Breakpoints from '@/common/constants/breakpoints';\nimport Office, { OfficeInfo } from '@/pages/ContactUsPage/components/Location/Office/Office';\nimport { ReactComponent as ArrowIcon } from '@/assets/icons/arrow.svg';\nimport grid from '@/common/css/grid.module.scss';\nimport key from 'weak-key';\nimport styles from './Location.module.scss';\n\nexport interface LocationProps {\n location: string;\n offices: OfficeInfo[];\n}\n\ninterface LocationComponentProps extends LocationProps {\n isOpenByDefault?: boolean;\n onEmailClick: (officeName: string) => void;\n}\n\nconst Location: FC = ({\n location, offices, isOpenByDefault, onEmailClick,\n}: LocationComponentProps) => {\n const [isOpen, setIsOpen] = useState(!!isOpenByDefault);\n\n const toggleContent = (): void => {\n const viewportWidth = window.innerWidth;\n if (viewportWidth < Breakpoints.sm) {\n setIsOpen((prevIsOpen) => !prevIsOpen);\n }\n };\n\n return (\n
\n \n {location}\n \n
\n
\n {offices?.map((office) => (\n \n ))}\n
\n \n );\n};\n\nexport default Location;\n","import React, { FC, ReactNode, useMemo } from 'react';\nimport TickIconSuccess, {\n TickIconSuccessProps,\n} from '@/common/components/Modal/successSteps/TickIconSuccess/TickIconSuccess';\nimport ModalForm from '@/common/components/Modal/ModalForm/ModalForm';\nimport {\n FieldType,\n FormColumn,\n FormField,\n ModalFormBaseProps,\n} from '@/common/components/Modal/ModalForm/ModalForm.types';\nimport { SelectProps } from '@/common/components/Form/Select/Select';\nimport { RegExpValidator, RequiredValidator, ValidatorType } from '@/helpers/validation';\nimport { ModalName } from '@/common/contexts/globalModalContext';\n\nexport interface ContactUsModalProps extends ModalFormBaseProps, TickIconSuccessProps {\n requiredErrorMessage: string;\n officeLabel: string;\n offices: SelectProps;\n nameLabel: string;\n emailLabel: string;\n emailRegex: string;\n emailErrorMessage: string;\n companyLabel: string;\n phoneLabel: string;\n phoneRegex: string;\n phoneErrorMessage: string;\n messageLabel: string;\n countryLabel: string;\n countrySelect: SelectProps;\n}\n\nconst ContactUsModal: FC = ({\n conversionId,\n officeLabel,\n offices,\n nameLabel,\n emailLabel,\n emailRegex,\n emailErrorMessage,\n companyLabel,\n phoneLabel,\n countryLabel,\n countrySelect,\n phoneRegex,\n phoneErrorMessage,\n messageLabel,\n requiredErrorMessage,\n ...formProps\n}) => {\n const fields: FormField[] = [\n {\n name: 'office',\n fieldType: FieldType.SELECT,\n fieldData: {\n label: officeLabel,\n ...offices,\n },\n validationSchema: [],\n },\n {\n name: 'name',\n fieldType: FieldType.INPUT,\n fieldData: {\n label: nameLabel,\n },\n validationSchema: [],\n },\n {\n name: 'company',\n fieldType: FieldType.INPUT,\n fieldData: {\n label: companyLabel,\n },\n validationSchema: [],\n },\n {\n name: 'email',\n fieldType: FieldType.INPUT,\n fieldData: {\n label: emailLabel,\n },\n validationSchema: [],\n },\n {\n name: 'phone',\n fieldType: FieldType.INPUT,\n fieldData: {\n label: phoneLabel,\n },\n validationSchema: [],\n },\n {\n name: 'country',\n fieldType: FieldType.SELECT,\n fieldData: {\n label: countryLabel,\n ...countrySelect,\n },\n validationSchema: [],\n },\n {\n name: 'message',\n fieldType: FieldType.TEXT_AREA,\n fieldData: {\n label: messageLabel,\n },\n validationSchema: [],\n },\n ];\n\n fields.forEach((field: FormField): void => {\n if (field.name === 'country') {\n return;\n }\n\n field.validationSchema.push({\n type: ValidatorType.REQUIRED,\n isRequired: true,\n errorMessage: requiredErrorMessage,\n } as RequiredValidator);\n\n if (field.name === 'email') {\n field.validationSchema.push({\n type: ValidatorType.REGEXP,\n regExp: new RegExp(emailRegex),\n errorMessage: emailErrorMessage,\n } as RegExpValidator);\n }\n\n if (field.name === 'phone') {\n field.validationSchema.push({\n type: ValidatorType.REGEXP,\n regExp: new RegExp(phoneRegex),\n errorMessage: phoneErrorMessage,\n } as RegExpValidator);\n }\n });\n\n const columns: FormColumn[] = [\n {\n fields: fields.slice(0, 4),\n },\n {\n fields: fields.slice(4),\n },\n ];\n\n const renderSuccessMessage = useMemo((): ReactNode => (\n \n ), [\n conversionId, formProps.successSubtitle, formProps.successTitle,\n ]);\n\n return (\n \n );\n};\nContactUsModal.displayName = 'ContactUsModal';\n\nexport default ContactUsModal;\n","// extracted by mini-css-extract-plugin\nexport default {\"container\":\"l_g\",\"description\":\"l_c\"};","import React, {\n FC, useCallback, useMemo, useState,\n} from 'react';\nimport classNames from 'classnames';\nimport key from 'weak-key';\nimport { hasExternalForm } from '@/helpers/externalForm';\nimport { ModalName } from '@/common/contexts/globalModalContext';\nimport ParallaxPageLayout, { ParallaxPageLayoutProps } from '@/common/layouts/ParallaxPageLayout/ParallaxPageLayout';\nimport Location, { LocationProps } from '@/pages/ContactUsPage/components/Location/Location';\nimport ContactUsModal, { ContactUsModalProps } from '@/pages/ContactUsPage/components/ContactUsModal/ContactUsModal';\nimport ExternalModalForms from '@/common/components/Modal/ExternalModalForms/ExternalModalForms';\nimport grid from '@/common/css/grid.module.scss';\nimport styles from './ContactUsPage.module.scss';\n\nexport interface ContactUsPageProps extends ParallaxPageLayoutProps {\n description?: string;\n locations?: LocationProps[];\n contactUsPopup?: ContactUsModalProps;\n}\n\nconst ContactUsPage: FC = ({\n description,\n locations,\n contactUsPopup,\n pardot,\n ...pageLayoutProps\n}) => {\n const [officeToEmail, setOfficeToEmail] = useState();\n\n const officesSelect = useMemo(() => (\n contactUsPopup?.offices && { ...contactUsPopup.offices, defaultValue: officeToEmail }\n ), [contactUsPopup, officeToEmail]);\n\n const pardotWithSelectedOffice = useMemo(() => {\n if (!officeToEmail || !pardot?.forms) {\n return pardot;\n }\n\n const forms = pardot.forms.map((form) => {\n if ((form.name === ModalName.contactUs) && form.url) {\n const url = new URL(form.url);\n const query = new URLSearchParams(url.search);\n query.set('officeName', officeToEmail);\n\n return { ...form, url: `${url.origin}${url.pathname}?${query.toString()}` };\n }\n\n return form;\n });\n\n return { ...pardot, forms };\n }, [pardot, officeToEmail]);\n\n const modal = useMemo(() => {\n if (!contactUsPopup || !officesSelect || hasExternalForm({ pardot, modalName: ModalName.contactUs })) {\n return null;\n }\n\n return (\n \n );\n }, [\n contactUsPopup, pardot, officesSelect,\n ]);\n\n const handleEmailClick = useCallback((officeName: string): void => {\n setOfficeToEmail(officeName);\n }, []);\n\n return (\n \n
\n
\n
\n {description}\n
\n
\n
\n
\n {locations?.map((location, index) => (\n \n ))}\n
\n
\n
\n\n {!!pardot && (\n \n )}\n {modal}\n
\n );\n};\n\nexport default ContactUsPage;\n","import 'react-app-polyfill/stable';\nimport * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport * as ReactDOMServer from 'react-dom/server';\nimport ContactUsPage from '@/pages/ContactUsPage/ContactUsPage';\n\nglobal.React = React;\nglobal.ReactDOM = ReactDOM;\nglobal.ReactDOMServer = ReactDOMServer;\n\nglobal.ContactUsPage = ContactUsPage;\n"],"names":["Office","_ref","name","address","phones","email","onEmailClick","toggleModal","useToggleModalsContext","showContactUsModal","useCallback","ModalName","contactUs","_jsxs","className","classNames","styles","grid","colSm6","children","_jsx","map","phone","href","key","onClick","displayName","location","offices","isOpenByDefault","isOpen","setIsOpen","useState","toggleContent","window","innerWidth","Breakpoints","sm","prevIsOpen","ArrowIcon","row","office","ContactUsModal","conversionId","officeLabel","nameLabel","emailLabel","emailRegex","emailErrorMessage","companyLabel","phoneLabel","countryLabel","countrySelect","phoneRegex","phoneErrorMessage","messageLabel","requiredErrorMessage","formProps","fields","fieldType","FieldType","SELECT","fieldData","label","validationSchema","INPUT","TEXT_AREA","forEach","field","push","type","ValidatorType","REQUIRED","isRequired","errorMessage","REGEXP","regExp","RegExp","columns","slice","renderSuccessMessage","useMemo","TickIconSuccess","successSubtitle","successTitle","ModalForm","endpoint","modalName","successMessage","description","locations","contactUsPopup","pardot","pageLayoutProps","officeToEmail","setOfficeToEmail","officesSelect","defaultValue","pardotWithSelectedOffice","forms","form","url","URL","query","URLSearchParams","search","set","origin","pathname","toString","modal","hasExternalForm","handleEmailClick","officeName","ParallaxPageLayout","container","colSm10","colMd8","offsetSm1","offsetMd2","colMd11","colLg10","offsetMd1","index","Location","ExternalModalForms","titles","modalWindowTitle","global","React","ReactDOM","ReactDOMServer","ContactUsPage"],"sourceRoot":""}