{"version":3,"file":"static/js/index.3ea4b6b3.js","sources":["webpack://@jotforminc/form-builder/./src/assets/icons/accessibility-count.svg","webpack://@jotforminc/form-builder/./src/assets/icons/accessibilityWarning.svg","webpack://@jotforminc/form-builder/./src/assets/icons/copilot.svg","webpack://@jotforminc/form-builder/./src/assets/icons/drag_icon.svg","webpack://@jotforminc/form-builder/./src/assets/icons/duplicateBottom.svg","webpack://@jotforminc/form-builder/./src/assets/icons/duplicateMid.svg","webpack://@jotforminc/form-builder/./src/assets/icons/duplicateTop.svg","webpack://@jotforminc/form-builder/./src/assets/icons/fav_icon_avg.svg","webpack://@jotforminc/form-builder/./src/assets/icons/formWarnings.svg","webpack://@jotforminc/form-builder/./src/assets/icons/iconSalesforce.svg","webpack://@jotforminc/form-builder/./src/assets/icons/iconSalesforceReverse.svg","webpack://@jotforminc/form-builder/./src/assets/icons/pdfImport_arrow.svg","webpack://@jotforminc/form-builder/./src/assets/icons/pdfImport_cancel.svg","webpack://@jotforminc/form-builder/./src/assets/icons/pdfImport_duplicate.svg","webpack://@jotforminc/form-builder/./src/assets/icons/pdfImport_error.svg","webpack://@jotforminc/form-builder/./src/assets/icons/pdfImport_lock.svg","webpack://@jotforminc/form-builder/./src/assets/icons/pdfImport_pdfLoadError.svg","webpack://@jotforminc/form-builder/./src/assets/icons/pdfImport_pdfUploader.svg","webpack://@jotforminc/form-builder/./src/assets/icons/pdfImport_plus.svg","webpack://@jotforminc/form-builder/./src/assets/icons/pdfImport_trash.svg","webpack://@jotforminc/form-builder/./src/assets/icons/pdfImport_zoom_in.svg","webpack://@jotforminc/form-builder/./src/assets/icons/pdfImport_zoom_out.svg","webpack://@jotforminc/form-builder/./src/assets/icons/protected_switch.svg","webpack://@jotforminc/form-builder/./src/assets/icons/searchBranding21.svg","webpack://@jotforminc/form-builder/./src/assets/icons/searchBranding21Focus.svg","webpack://@jotforminc/form-builder/./src/assets/icons/textAlignCenter.svg","webpack://@jotforminc/form-builder/./src/assets/icons/textAlignLeft.svg","webpack://@jotforminc/form-builder/./src/assets/icons/textAlignRight.svg","webpack://@jotforminc/form-builder/../../libs/ai-builder/src/assets/svg/AILogo.svg","webpack://@jotforminc/form-builder/../../libs/enterprise-promotions/src/assets/svg/enterpriseRocketMini.svg","webpack://@jotforminc/form-builder/../../configs/tracking-config/src/index.js","webpack://@jotforminc/form-builder/../../libs/colorscheme/src/utils/styles.js","webpack://@jotforminc/form-builder/./src/assets/svg/roboto.svg","webpack://@jotforminc/form-builder/./src/assets/svg/opensans.svg","webpack://@jotforminc/form-builder/./src/assets/svg/helvetica.svg","webpack://@jotforminc/form-builder/./src/assets/svg/inter.svg","webpack://@jotforminc/form-builder/./src/assets/svg/tahoma.svg","webpack://@jotforminc/form-builder/./src/assets/svg/couriernew.svg","webpack://@jotforminc/form-builder/./src/assets/svg/trebuchetms.svg","webpack://@jotforminc/form-builder/./src/assets/svg/lucidagrande.svg","webpack://@jotforminc/form-builder/./src/assets/svg/timesnewroman.svg","webpack://@jotforminc/form-builder/./src/components/quicksearchpanel/Utils.js","webpack://@jotforminc/form-builder/./src/libs/image_to_cache.js","webpack://@jotforminc/form-builder/./src/constants/widget_properties_NDT.js","webpack://@jotforminc/form-builder/./src/constants/extend_inline_defaults.js","webpack://@jotforminc/form-builder/./src/actions/upsertInlineField.js","webpack://@jotforminc/form-builder/./src/actions/withOrder.js","webpack://@jotforminc/form-builder/./src/actions/commonShareActions.js","webpack://@jotforminc/form-builder/./src/constants/AI.js","webpack://@jotforminc/form-builder/./src/actions/AI.js","webpack://@jotforminc/form-builder/./src/actions/payment.js","webpack://@jotforminc/form-builder/./src/actions/index.js","webpack://@jotforminc/form-builder/./src/actions/normalizeInlineOptions.js","webpack://@jotforminc/form-builder/./src/libs/pdfImport/fieldOptionsDiff.js","webpack://@jotforminc/form-builder/./src/libs/pdfImport/matrix.js","webpack://@jotforminc/form-builder/./src/libs/pdfImport/getQuestionFields.js","webpack://@jotforminc/form-builder/./src/libs/pdfImport/generateAnnotationIdAndName.js","webpack://@jotforminc/form-builder/./src/libs/pdfImport/buildAnnotation.js","webpack://@jotforminc/form-builder/./src/libs/pdfImport/buildAnnotations.js","webpack://@jotforminc/form-builder/./src/libs/pdfImport/getAnnotationSizes.js","webpack://@jotforminc/form-builder/./src/libs/pdfImport/getSelectedField.js","webpack://@jotforminc/form-builder/./src/libs/pdfImport/cloneAnnotation.js","webpack://@jotforminc/form-builder/./src/actions/pdfImport.js","webpack://@jotforminc/form-builder/../../libs/enterprise-promotions/src/assets/svg/addCollaboratorBanner/rocket.svg","webpack://@jotforminc/form-builder/./src/components/CollaborationPanel/CollaboratorAvatars/constants.js","webpack://@jotforminc/form-builder/./src/components/CollaborationPanel/CollaboratorAvatars/CollaboratorAvatar.js","webpack://@jotforminc/form-builder/./src/components/CollaborationPanel/CollaboratorAvatars/SingleCollaborator.js","webpack://@jotforminc/form-builder/./src/components/CollaborationPanel/CollaboratorAvatars/CollaboratorsListItem.js","webpack://@jotforminc/form-builder/./src/components/CollaborationPanel/CollaboratorAvatars/CollaboratorsList.js","webpack://@jotforminc/form-builder/./src/components/CollaborationPanel/CollaboratorAvatars/CollaboratorAvatars.js","webpack://@jotforminc/form-builder/../../libs/enterprise-promotions/src/components/Modals/Product/AddCollaboratorModal/AddCollaboratorModal.js","webpack://@jotforminc/form-builder/../../libs/enterprise-promotions/src/components/Banners/Product/AddCollaboratorBanner.js","webpack://@jotforminc/form-builder/../../libs/enterprise-promotions/src/components/AbTesters/AddAndManageUsersAbTester.js","webpack://@jotforminc/form-builder/./src/components/CollaborationPanel/CollaborationLinkDialog.js","webpack://@jotforminc/form-builder/./src/components/CollaborationPanel/CollaborationInputPanel.js","webpack://@jotforminc/form-builder/./src/components/CollaborationPanel/CollaborationPanel.js","webpack://@jotforminc/form-builder/./src/components/DeleteActionButtonsDialog.js","webpack://@jotforminc/form-builder/./src/components/Icon.js","webpack://@jotforminc/form-builder/./src/components/IconSVG.js","webpack://@jotforminc/form-builder/./src/components/SwitchAnotherGateway/Utils.js","webpack://@jotforminc/form-builder/./src/components/form/EmptyLine.js","webpack://@jotforminc/form-builder/./src/components/form/contenteditable.js","webpack://@jotforminc/form-builder/./src/components/form/InlineEditor.js","webpack://@jotforminc/form-builder/../../libs/zoom-control/src/components/index.js","webpack://@jotforminc/form-builder/./src/components/pdfImporter/Zoom.js","webpack://@jotforminc/form-builder/./src/components/pdfImporter/PageSignupWarning.js","webpack://@jotforminc/form-builder/../../libs/document-viewer/src/utils/helpers.js","webpack://@jotforminc/form-builder/../../libs/selectable/src/index.js","webpack://@jotforminc/form-builder/../../libs/document-viewer/src/utils/constants.js","webpack://@jotforminc/form-builder/../../libs/document-viewer/src/Annotation.js","webpack://@jotforminc/form-builder/../../libs/document-viewer/src/Annotations.js","webpack://@jotforminc/form-builder/../../libs/document-viewer/src/utils/calcYCoordinateOnDragStop.js","webpack://@jotforminc/form-builder/../../libs/document-viewer/src/utils/getDeltaRectOnDragStop.js","webpack://@jotforminc/form-builder/../../libs/document-viewer/src/utils/getDeltaRectOnResizeStop.js","webpack://@jotforminc/form-builder/../../libs/document-viewer/src/utils/setRNDHandlers.js","webpack://@jotforminc/form-builder/../../libs/document-viewer/src/utils/setRNDGuides.js","webpack://@jotforminc/form-builder/../../libs/document-viewer/src/RndGuides.js","webpack://@jotforminc/form-builder/../../libs/document-viewer/src/utils/getSnapDistance.js","webpack://@jotforminc/form-builder/../../libs/document-viewer/src/utils/calcCoordinatesForRnd.js","webpack://@jotforminc/form-builder/../../libs/document-viewer/src/utils/resizeMultipleAnnotationsAtOnce.js","webpack://@jotforminc/form-builder/../../libs/document-viewer/src/RndWrapper.js","webpack://@jotforminc/form-builder/../../libs/document-viewer/src/AnnotationsWithRND.js","webpack://@jotforminc/form-builder/../../libs/document-viewer/src/HoveredAnnotation.js","webpack://@jotforminc/form-builder/../../libs/document-viewer/src/Pages.js","webpack://@jotforminc/form-builder/../../libs/document-viewer/src/AnnotationSelection.js","webpack://@jotforminc/form-builder/../../libs/document-viewer/src/PageNavigation.js","webpack://@jotforminc/form-builder/../../libs/document-viewer/src/index.js","webpack://@jotforminc/form-builder/./src/components/pdfImporter/AnnotationButtons.js","webpack://@jotforminc/form-builder/./src/components/pdfImporter/AnnotationNavigation.js","webpack://@jotforminc/form-builder/./src/containers/PDFImporter/DocumentViewerContainer.js","webpack://@jotforminc/form-builder/./src/components/pdfImporter/DocumentViewer.js","webpack://@jotforminc/form-builder/./src/components/pdfImporter/Modal.js","webpack://@jotforminc/form-builder/./src/components/pdfImporter/PDFLoading.js","webpack://@jotforminc/form-builder/./src/components/pdfImporter/PDFNotifier.js","webpack://@jotforminc/form-builder/../../../../src/icons/arrows/arrow-flip-left.svg","webpack://@jotforminc/form-builder/../../../../src/icons/editor/crop.svg","webpack://@jotforminc/form-builder/./src/components/pdfImporter/PDFPasswordModal.js","webpack://@jotforminc/form-builder/./src/components/pdfImporter/ImageUploader/Utils.js","webpack://@jotforminc/form-builder/./src/components/pdfImporter/ImageUploader/CropTrapezoid.js","webpack://@jotforminc/form-builder/./src/components/pdfImporter/ImageUploader/Menu.js","webpack://@jotforminc/form-builder/./src/components/pdfImporter/ImageUploader/MagnifierGlass.js","webpack://@jotforminc/form-builder/./src/components/pdfImporter/ImageUploader/ImageProcess.js","webpack://@jotforminc/form-builder/./src/components/pdfImporter/PDFUploader.js","webpack://@jotforminc/form-builder/./src/libs/pdfImport/findPageIndexFromViewport.js","webpack://@jotforminc/form-builder/./src/components/pdfImporter/geometryFieldRect.js","webpack://@jotforminc/form-builder/./src/components/pdfImporter/helpers.js","webpack://@jotforminc/form-builder/./src/components/revisionhistory/constants.js","webpack://@jotforminc/form-builder/./src/components/thankYouPage/index.js","webpack://@jotforminc/form-builder/../../../../src/logos/payment/iyzico-light.svg","webpack://@jotforminc/form-builder/./src/constants/Fields.js","webpack://@jotforminc/form-builder/./src/constants/actionTypes.js","webpack://@jotforminc/form-builder/./src/constants/cardFormFields.js","webpack://@jotforminc/form-builder/./src/constants/default_tips.js","webpack://@jotforminc/form-builder/./src/constants/limitDefaults.js","webpack://@jotforminc/form-builder/./src/constants/notificationMessages.js","webpack://@jotforminc/form-builder/./src/constants/payment_types.js","webpack://@jotforminc/form-builder/./src/constants/specialOptions.js","webpack://@jotforminc/form-builder/./src/constants/team.js","webpack://@jotforminc/form-builder/./src/components/Spinner.js","webpack://@jotforminc/form-builder/./src/containers/Themes.js","webpack://@jotforminc/form-builder/../../libs/builder/src/modules/thankyou/PreviewIframe.js","webpack://@jotforminc/form-builder/../../libs/builder/src/modules/common-panel-header/Headers/ThankYouPanel.js","webpack://@jotforminc/form-builder/../../libs/builder/src/modules/thankyou/constants/thankYouInjectCss.js","webpack://@jotforminc/form-builder/../../libs/builder/src/modules/thankyou/index.js","webpack://@jotforminc/form-builder/./src/containers/settings/Thankyou/index.js","webpack://@jotforminc/form-builder/../../libs/account-box/src/components/HOCs/OnClickOutside/index.js","webpack://@jotforminc/form-builder/./src/middlewares/signupPromptMiddleware.js","webpack://@jotforminc/form-builder/./src/middlewares/uiHelperMiddleware.js","webpack://@jotforminc/form-builder/../../../../src/icons/arrows/arrow-reverse-left.svg","webpack://@jotforminc/form-builder/../../../../src/icons/general/square-filled.svg","webpack://@jotforminc/form-builder/../../../../src/icons/technology/microphone-filled.svg","webpack://@jotforminc/form-builder/../../libs/ai-builder/src/assets/svg/guest-podo.svg","webpack://@jotforminc/form-builder/../../libs/ai-builder/src/assets/svg/PromptLoader.svg","webpack://@jotforminc/form-builder/../../libs/ai-builder/src/assets/svg/roboto.svg","webpack://@jotforminc/form-builder/../../libs/ai-builder/src/assets/svg/opensans.svg","webpack://@jotforminc/form-builder/../../libs/ai-builder/src/assets/svg/helvetica.svg","webpack://@jotforminc/form-builder/../../libs/ai-builder/src/assets/svg/inter.svg","webpack://@jotforminc/form-builder/../../libs/ai-builder/src/assets/svg/tahoma.svg","webpack://@jotforminc/form-builder/../../libs/ai-builder/src/assets/svg/couriernew.svg","webpack://@jotforminc/form-builder/../../libs/ai-builder/src/assets/svg/trebuchetms.svg","webpack://@jotforminc/form-builder/../../libs/ai-builder/src/assets/svg/lucidagrande.svg","webpack://@jotforminc/form-builder/../../libs/ai-builder/src/assets/svg/timesnewroman.svg","webpack://@jotforminc/form-builder/../../../../src/icons/arrows/arrow-left-to-line.svg","webpack://@jotforminc/form-builder/../../../../src/icons/arrows/arrow-up-rectangles.svg","webpack://@jotforminc/form-builder/../../../../src/icons/arrows/arrow-down-rectangles.svg","webpack://@jotforminc/form-builder/../../../../src/icons/arrows/arrow-up-to-line-rectangles.svg","webpack://@jotforminc/form-builder/../../../../src/icons/arrows/arrow-down-to-line-rectangles.svg","webpack://@jotforminc/form-builder/../../../../src/icons/editor/paint-roller-diagonal-filled.svg","webpack://@jotforminc/form-builder/../../../../src/icons/technology/screencast.svg","webpack://@jotforminc/form-builder/./src/assets/icons/information-icon.svg","webpack://@jotforminc/form-builder/../../../../src/icons/editor/flow-fork-horizontal-radius-line.svg","webpack://@jotforminc/form-builder/../../../../src/icons/finance/credit-card-plus-filled.svg","webpack://@jotforminc/form-builder/../../../../src/icons/arrows/chevron-up.svg","webpack://@jotforminc/form-builder/../../libs/enterprise-promotions/src/assets/svg/approvalWhiteLabelingBanner/visual.svg","webpack://@jotforminc/form-builder/../../../../src/icons/arrows/arrow-rotate-left.svg","webpack://@jotforminc/form-builder/../../../../src/icons/editor/print-xmark.svg","webpack://@jotforminc/form-builder/../../libs/ep-account-box/src/assets/iconEnterprise.svg","webpack://@jotforminc/form-builder/../../libs/ep-account-box/src/assets/graph.svg","webpack://@jotforminc/form-builder/../../libs/ep-account-box/src/assets/enterpriseRocketMini.svg","webpack://@jotforminc/form-builder/../../libs/ep-account-box/src/assets/enterpriseRocket.svg","webpack://@jotforminc/form-builder/../../../../src/icons/products/product-pages-color.svg","webpack://@jotforminc/form-builder/../../../../src/icons/products/product-pages-mono.svg","webpack://@jotforminc/form-builder/../../libs/header-components/src/assets/svg/iconAppAnalytics.svg","webpack://@jotforminc/form-builder/../../libs/header-components/src/assets/svg/iconAppBuilder.svg","webpack://@jotforminc/form-builder/../../libs/header-components/src/assets/svg/iconAppCards.svg","webpack://@jotforminc/form-builder/../../libs/header-components/src/assets/svg/iconAppForm.svg","webpack://@jotforminc/form-builder/../../libs/header-components/src/assets/svg/iconAppInbox.svg","webpack://@jotforminc/form-builder/../../libs/header-components/src/assets/svg/iconAppPdfEditor.svg","webpack://@jotforminc/form-builder/../../libs/header-components/src/assets/svg/iconAppReports.svg","webpack://@jotforminc/form-builder/../../libs/header-components/src/assets/svg/iconAppSheets.svg","webpack://@jotforminc/form-builder/../../libs/header-components/src/assets/svg/iconAppUploads.svg","webpack://@jotforminc/form-builder/../../libs/header-components/src/assets/svg/iconAppMyApps.svg","webpack://@jotforminc/form-builder/../../libs/header-components/src/assets/svg/iconAppAiAgentBuilder1.svg","webpack://@jotforminc/form-builder/../../libs/header-components/src/assets/svg/iconAppAiAgentBuilder2.svg","webpack://@jotforminc/form-builder/../../libs/header-components/src/assets/svg/iconConversationsv1.svg","webpack://@jotforminc/form-builder/../../libs/header-components/src/assets/svg/iconAppMyKiosks.svg","webpack://@jotforminc/form-builder/../../libs/header-components/src/assets/svg/iconAppMyForms.svg","webpack://@jotforminc/form-builder/../../libs/header-components/src/assets/svg/iconAppMyTasks.svg","webpack://@jotforminc/form-builder/../../libs/header-components/src/assets/svg/iconAppSign.svg","webpack://@jotforminc/form-builder/../../libs/header-components/src/assets/svg/iconAppApprovals.svg","webpack://@jotforminc/form-builder/../../libs/header-components/src/assets/svg/iconAppMyContacts.svg","webpack://@jotforminc/form-builder/../../libs/header-components/src/assets/svg/appIcons/boards_selected.svg","webpack://@jotforminc/form-builder/../../../../src/icons/products/product-form-builder-magnifying-glass-mono.svg","webpack://@jotforminc/form-builder/../../../../src/icons/products/product-form-builder-magnifying-glass-color.svg","webpack://@jotforminc/form-builder/../../../../src/icons/products/product-form-builder-mono.svg","webpack://@jotforminc/form-builder/../../../../src/icons/products/product-form-builder-color.svg","webpack://@jotforminc/form-builder/../../../../src/icons/products/product-pdf-editor-mono.svg","webpack://@jotforminc/form-builder/../../../../src/icons/products/product-pdf-editor-color.svg","webpack://@jotforminc/form-builder/../../../../src/icons/products/product-tables-color.svg","webpack://@jotforminc/form-builder/../../../../src/icons/products/product-inbox-mono.svg","webpack://@jotforminc/form-builder/../../../../src/icons/products/product-inbox-color.svg","webpack://@jotforminc/form-builder/../../../../src/icons/products/product-report-builder-filled.svg","webpack://@jotforminc/form-builder/../../../../src/icons/products/product-report-builder-color.svg","webpack://@jotforminc/form-builder/../../../../src/icons/products/product-apps-color.svg","webpack://@jotforminc/form-builder/../../../../src/icons/products/product-form-analytics-mono.svg","webpack://@jotforminc/form-builder/../../../../src/icons/products/product-form-analytics-color.svg","webpack://@jotforminc/form-builder/../../../../src/icons/products/product-teams-mono.svg","webpack://@jotforminc/form-builder/../../../../src/icons/products/product-teams-color.svg","webpack://@jotforminc/form-builder/../../libs/header-components/src/assets/svg/appIcons/contacts_default.svg","webpack://@jotforminc/form-builder/../../libs/header-components/src/assets/svg/appIcons/contacts_selected.svg","webpack://@jotforminc/form-builder/../../libs/header-components/src/assets/svg/appIcons/boards_default.svg","webpack://@jotforminc/form-builder/../../libs/header-components/src/assets/svg/iconConversationsv2.svg","webpack://@jotforminc/form-builder/../../libs/header-components/src/components/Navigation/navigationConstants.js","webpack://@jotforminc/form-builder/../../libs/header-components/src/assets/svg/teamselection-noteam.svg","webpack://@jotforminc/form-builder/../../libs/header-components/src/assets/svg/emptyFormList.svg","webpack://@jotforminc/form-builder/../../libs/header-components/src/assets/svg/iconHipaa.svg","webpack://@jotforminc/form-builder/../../../../src/icons/general/graduation-cap-filled.svg","webpack://@jotforminc/form-builder/../../../../src/icons/media/video-filled.svg","webpack://@jotforminc/form-builder/../../../../src/icons/technology/keyboard.svg","webpack://@jotforminc/form-builder/../../../../src/icons/finance/tag-filled.svg","webpack://@jotforminc/form-builder/../../../../src/icons/brand/zoom-circle-filled.svg","webpack://@jotforminc/form-builder/../../libs/enterprise-promotions/src/assets/svg/close_revised.svg","webpack://@jotforminc/form-builder/../../../../src/icons/arrows/arrows-switch-horizontal.svg","webpack://@jotforminc/form-builder/../../libs/share-panel/src/assets/svg/faq.svg","webpack://@jotforminc/form-builder/../../../../src/icons/users/user-plus-filled.svg","webpack://@jotforminc/form-builder/./src/components/ShareButton.js","webpack://@jotforminc/form-builder/../../../../src/icons/forms-files/form-card-filled.svg","webpack://@jotforminc/form-builder/./src/components/SettingsPanel.js","webpack://@jotforminc/form-builder/../../../../src/icons/general/bars-progress-filled.svg","webpack://@jotforminc/form-builder/./src/assets/icons/form-copilot-logo.svg","webpack://@jotforminc/form-builder/../../libs/router-bridge/src/init.js","webpack://@jotforminc/form-builder/../../libs/tracking/src/init.ts","webpack://@jotforminc/form-builder/../../libs/timezonepicker/src/index.js","webpack://@jotforminc/form-builder/../../libs/widgets-js-sdk/src/utils/getStyle.js","webpack://@jotforminc/form-builder/../../libs/widgets-js-sdk/src/utils/postmessage.js","webpack://@jotforminc/form-builder/../../libs/widgets-js-sdk/src/translations/index.js","webpack://@jotforminc/form-builder/../../libs/widgets-js-sdk/src/utils/loadWidgetImageAsBase64.js","webpack://@jotforminc/form-builder/../../libs/widgets-js-sdk/src/widgetsServer/builder.js","webpack://@jotforminc/form-builder/../../libs/widgets-js-sdk/src/index.js","webpack://@jotforminc/form-builder/./src/components/form/JotFormQuillTheme.js","webpack://@jotforminc/form-builder/./src/containers/Notification.js","webpack://@jotforminc/form-builder/../../libs/builder/src/modules/intentional-publish/PreviewWarningBar.js","webpack://@jotforminc/form-builder/./src/components/form/PreviewIframe.js","webpack://@jotforminc/form-builder/./src/libs/extract_url_value.js","webpack://@jotforminc/form-builder/../../libs/voice-button/src/SpeechRecognition.js","webpack://@jotforminc/form-builder/../../libs/voice-button/src/index.js","webpack://@jotforminc/form-builder/../../libs/ai-builder/src/components/ChatInput/index.tsx","webpack://@jotforminc/form-builder/../../libs/ai-builder/src/components/Message/index.tsx","webpack://@jotforminc/form-builder/../../libs/ai-builder/src/components/SVG/index.tsx","webpack://@jotforminc/form-builder/../../libs/ai-builder/src/components/ActionGroup/index.tsx","webpack://@jotforminc/form-builder/../../libs/ai-builder/src/components/Chat/index.tsx","webpack://@jotforminc/form-builder/../../libs/feature-flag/src/components/FeatureFlag/useFeatureValue.js","webpack://@jotforminc/form-builder/../../libs/feature-flag/src/components/FeatureFlag/Feature.js","webpack://@jotforminc/form-builder/../../libs/zoom-socket/src/libs/zoomSocketAdapter.js","webpack://@jotforminc/form-builder/../../libs/zoom-socket/src/libs/zoomSocket.js","webpack://@jotforminc/form-builder/../../libs/zoom-socket/src/components/ZoomWidget/RequestHelp.js","webpack://@jotforminc/form-builder/../../libs/zoom-socket/src/components/ZoomWidget/ConnectSection.js","webpack://@jotforminc/form-builder/../../libs/zoom-socket/src/components/ZoomWidget/WaitingAgentResponse.js","webpack://@jotforminc/form-builder/../../libs/zoom-socket/src/components/ZoomWidget/MeetingReady.js","webpack://@jotforminc/form-builder/../../libs/zoom-socket/src/components/ZoomWidget/NotAvailableScreen.js","webpack://@jotforminc/form-builder/../../libs/zoom-socket/src/components/ZoomWidget/DeclinedScreen.js","webpack://@jotforminc/form-builder/../../libs/zoom-socket/src/components/ZoomWidget/steps.js","webpack://@jotforminc/form-builder/../../libs/zoom-socket/src/components/ZoomWidget/ZoomWidget.js","webpack://@jotforminc/form-builder/../../libs/zoom-socket/src/components/ZoomSocketLayer.js","webpack://@jotforminc/form-builder/../../libs/limit-assets/src/components/BuilderBrandingRemoveBtn/index.js","webpack://@jotforminc/form-builder/../../libs/common/src/utils/lib.js","webpack://@jotforminc/form-builder/./src/components/HipaaWarnings.js","webpack://@jotforminc/form-builder/./src/components/InlineWarnings.js","webpack://@jotforminc/form-builder/./src/components/HiddenIndicator.js","webpack://@jotforminc/form-builder/./src/components/form/AddOtherOption.js","webpack://@jotforminc/form-builder/./src/components/form/SortableOptions.js","webpack://@jotforminc/form-builder/./src/components/form/EditOptionImage.js","webpack://@jotforminc/form-builder/./src/components/CardQuestionWrapper.js","webpack://@jotforminc/form-builder/./src/components/form/EditDropdown.js","webpack://@jotforminc/form-builder/./src/components/form/RemoveOtherOption.js","webpack://@jotforminc/form-builder/./src/components/form/EditMatrixOptions/ColumnEditContext.js","webpack://@jotforminc/form-builder/./src/components/form/EditMatrixOptions/index.js","webpack://@jotforminc/form-builder/./src/components/SalesforceInformation.js","webpack://@jotforminc/form-builder/./src/components/form/Label.js","webpack://@jotforminc/form-builder/./src/constants/widgets.js","webpack://@jotforminc/form-builder/./src/components/LegacyQuestionWrapper.js","webpack://@jotforminc/form-builder/./src/components/form/EditEmailVerification.js","webpack://@jotforminc/form-builder/./src/components/form/AddCheckboxRadioOption.js","webpack://@jotforminc/form-builder/./src/components/form/RemoveCheckboxRadioOption.js","webpack://@jotforminc/form-builder/./src/components/form/multilinequestioncontrols/AddFieldToMixed.js","webpack://@jotforminc/form-builder/./src/components/form/multilinequestioncontrols/MixedQuestionSortableOptions.js","webpack://@jotforminc/form-builder/./src/components/form/multilinequestioncontrols/MixedQuestionSelectedControls.js","webpack://@jotforminc/form-builder/./src/libs/FormPageUtils.js","webpack://@jotforminc/form-builder/./src/components/form/FormPageFooter/FormPageFooterStatic.js","webpack://@jotforminc/form-builder/./src/components/form/FormPageFooter/Popper.js","webpack://@jotforminc/form-builder/./src/components/form/FormPageFooter/FormPageFooter.js","webpack://@jotforminc/form-builder/./src/components/form/FormPageFooter/index.js","webpack://@jotforminc/form-builder/./src/libs/get_drag_target.js","webpack://@jotforminc/form-builder/./src/components/form/PureLine.js","webpack://@jotforminc/form-builder/./src/constants/primary_question_controls.js","webpack://@jotforminc/form-builder/./src/components/form/selectedcontrolsvertical/Remove.js","webpack://@jotforminc/form-builder/./src/components/form/selectedcontrolsvertical/Duplicate.js","webpack://@jotforminc/form-builder/./src/libs/generate_label_align_rules.js","webpack://@jotforminc/form-builder/./src/components/form/selectedcontrolsvertical/LabelAlign.js","webpack://@jotforminc/form-builder/./src/components/form/selectedcontrolsvertical/TextAlign.js","webpack://@jotforminc/form-builder/./src/components/form/selectedcontrolsvertical/ButtonAlign.js","webpack://@jotforminc/form-builder/./src/components/form/selectedcontrolsvertical/Required.js","webpack://@jotforminc/form-builder/./src/components/form/selectedcontrolsvertical/Conditions.js","webpack://@jotforminc/form-builder/./src/components/form/selectedcontrolsvertical/Shrink.js","webpack://@jotforminc/form-builder/./src/components/form/selectedcontrolsvertical/Properties.js","webpack://@jotforminc/form-builder/./src/components/form/selectedcontrolsvertical/Payments.js","webpack://@jotforminc/form-builder/./src/components/form/selectedcontrolsvertical/AddAndRemovePaymentIntegration.js","webpack://@jotforminc/form-builder/./src/components/form/selectedcontrolsvertical/ProductList.js","webpack://@jotforminc/form-builder/./src/components/form/selectedcontrolsvertical/SubscriptionList.js","webpack://@jotforminc/form-builder/./src/components/form/selectedcontrolsvertical/PaymentSettings.js","webpack://@jotforminc/form-builder/./src/components/form/selectedcontrolsvertical/Visibility.js","webpack://@jotforminc/form-builder/./src/components/form/selectedcontrolsvertical/Order.js","webpack://@jotforminc/form-builder/./src/components/form/selectedcontrolsvertical/WidgetSettings.js","webpack://@jotforminc/form-builder/./src/components/form/selectedcontrolsvertical/ImageSettings.js","webpack://@jotforminc/form-builder/./src/components/form/selectedcontrolsvertical/RichText.js","webpack://@jotforminc/form-builder/./src/components/form/selectedcontrolsvertical/SignAutomationSettings.js","webpack://@jotforminc/form-builder/./src/components/form/selectedcontrols/index.js","webpack://@jotforminc/form-builder/./src/components/form/ProtectedToggle.js","webpack://@jotforminc/form-builder/./src/components/form/SelectedControlMenu.js","webpack://@jotforminc/form-builder/./src/components/form/makeHighlightable.js","webpack://@jotforminc/form-builder/./src/components/pdfImporter/Mappable.js","webpack://@jotforminc/form-builder/./src/containers/PDFImporter/MappableContainer.js","webpack://@jotforminc/form-builder/./src/components/form/Line.js","webpack://@jotforminc/form-builder/./src/components/AddField.js","webpack://@jotforminc/form-builder/./src/components/QuestionLine.js","webpack://@jotforminc/form-builder/./src/selectors/uiSelectors.js","webpack://@jotforminc/form-builder/./src/components/FormPage.js","webpack://@jotforminc/form-builder/./src/components/Stage/HIPAAWarning.js","webpack://@jotforminc/form-builder/./src/components/Stage/MobileAccessibilityErrorCountWrapper.js","webpack://@jotforminc/form-builder/./src/components/Stage/FormAccessibilityWrapper.js","webpack://@jotforminc/form-builder/./src/components/Stage/FieldsLimitMessage.js","webpack://@jotforminc/form-builder/./src/components/Stage/stageUtils.js","webpack://@jotforminc/form-builder/./src/components/Stage/FormLogoWrapper.js","webpack://@jotforminc/form-builder/../../libs/builder/src/modules/card-welcome-wizard/index.js","webpack://@jotforminc/form-builder/./src/components/welcomePage/index.js","webpack://@jotforminc/form-builder/./src/components/Stage/WelcomePageWrapper.js","webpack://@jotforminc/form-builder/./src/components/Stage/ThankYouPageWrapper.js","webpack://@jotforminc/form-builder/../../libs/ep-utils/src/utils/renderAsset.js","webpack://@jotforminc/form-builder/../../libs/enterprise-promotions/src/components/Banners/AbTest/WhiteLabelingTooltip.js","webpack://@jotforminc/form-builder/../../libs/enterprise-promotions/src/helpers/renderEnterpriseLogoTooltip.js","webpack://@jotforminc/form-builder/../../libs/enterprise-promotions/src/helpers/initEpBuilderTooltipFirstLogoUpload.js","webpack://@jotforminc/form-builder/./src/components/form/AddNewLogo.js","webpack://@jotforminc/form-builder/./src/components/Stage/AddNewLogoModalWrapper.js","webpack://@jotforminc/form-builder/./src/components/Stage/FieldsLimitMessageNew.js","webpack://@jotforminc/form-builder/./src/components/Stage/Stage.js","webpack://@jotforminc/form-builder/./src/components/Stage/index.js","webpack://@jotforminc/form-builder/./src/components/revisionhistory/RevisionFrame.js","webpack://@jotforminc/form-builder/./src/components/KeyEventHandler.js","webpack://@jotforminc/form-builder/./src/containers/Builder.js","webpack://@jotforminc/form-builder/../../libs/enterprise-promotions/src/components/Banners/Product/ApprovalWhiteLabelingBanner.js","webpack://@jotforminc/form-builder/./src/components/Workflow/PreviewImage.js","webpack://@jotforminc/form-builder/./src/components/Workflow/Header.js","webpack://@jotforminc/form-builder/./src/libs/workflow/constants.js","webpack://@jotforminc/form-builder/./src/libs/workflow/utils.js","webpack://@jotforminc/form-builder/./src/libs/workflow/index.js","webpack://@jotforminc/form-builder/./src/libs/workflow/incomingListeners.js","webpack://@jotforminc/form-builder/./src/libs/workflow/outgoingListeners.js","webpack://@jotforminc/form-builder/./src/containers/WorkflowFormBuilder.js","webpack://@jotforminc/form-builder/./src/containers/Settings.js","webpack://@jotforminc/form-builder/./src/components/pdfImporter/RemovePDFModal.js","webpack://@jotforminc/form-builder/./src/components/pdfImporter/PDFUploaderView.js","webpack://@jotforminc/form-builder/./src/containers/PDFImporter/Main.js","webpack://@jotforminc/form-builder/./src/routes/RouteWrapper.js","webpack://@jotforminc/form-builder/./src/routes/Routes.js","webpack://@jotforminc/form-builder/./src/components/CollapsePanel/index.js","webpack://@jotforminc/form-builder/../../libs/product-walkthrough/src/api/index.js","webpack://@jotforminc/form-builder/../../libs/product-walkthrough/src/utils/FormBuilderWalkthroughManager.js","webpack://@jotforminc/form-builder/../../libs/header-components/src/components/SiteNav/SiteNavWrapper.js","webpack://@jotforminc/form-builder/../../libs/header-components/src/components/SiteNav/SiteNavListItem.js","webpack://@jotforminc/form-builder/../../libs/header-components/src/components/PreviewMode/PreviewModeWrapper.js","webpack://@jotforminc/form-builder/../../libs/header-components/src/components/PreviewMode/PreviewModeListItem.js","webpack://@jotforminc/form-builder/../../libs/header-components/src/components/PreviewToggle/index.js","webpack://@jotforminc/form-builder/./src/components/form/multiselect/index.js","webpack://@jotforminc/form-builder/./src/components/SecondaryHeader.js","webpack://@jotforminc/form-builder/../../libs/activity-logger/src/utils/ActivityLogger.js","webpack://@jotforminc/form-builder/../../libs/account-box/src/components/HOCs/OnClickOutside/dom-helpers.js","webpack://@jotforminc/form-builder/../../libs/account-box/src/components/HOCs/OnClickOutside/detect-passive-events.js","webpack://@jotforminc/form-builder/../../libs/account-box/src/components/HOCs/OnClickOutside/uid.js","webpack://@jotforminc/form-builder/../../libs/account-box/src/constants/texts.js","webpack://@jotforminc/form-builder/../../libs/account-box/src/components/FormUserAccountBox.js","webpack://@jotforminc/form-builder/../../libs/account-box/src/constants/constants.js","webpack://@jotforminc/form-builder/../../libs/limit-assets/src/components/UI/Button.js","webpack://@jotforminc/form-builder/../../libs/limit-assets/src/components/LimitEstimationWarning/index.js","webpack://@jotforminc/form-builder/../../libs/limit-assets/src/components/AccountBoxLimitWarnings/index.js","webpack://@jotforminc/form-builder/../../libs/account-box/src/utils/utils.js","webpack://@jotforminc/form-builder/../../libs/account-box/src/constants/tracking.js","webpack://@jotforminc/form-builder/../../libs/ep-account-box/src/components/LimitBanner/LimitBanner.js","webpack://@jotforminc/form-builder/../../libs/account-box/src/components/AccountBoxStandalone/EnterpriseInlineLimitAlert.js","webpack://@jotforminc/form-builder/../../libs/account-box/src/components/AccountBoxStandalone/InlineLimitAlert.js","webpack://@jotforminc/form-builder/../../libs/account-box/src/components/AccountBoxStandalone/AlertRenderer.js","webpack://@jotforminc/form-builder/../../libs/account-box/src/components/AccountBoxStandalone/InlineLimitAlertWithTrackings.js","webpack://@jotforminc/form-builder/../../libs/account-box/src/components/AccountBoxStandalone/InvoiceWarning.js","webpack://@jotforminc/form-builder/../../libs/ep-account-box/src/components/AdminConsoleDarkModal/Renderers.js","webpack://@jotforminc/form-builder/../../libs/ep-account-box/src/components/AdminConsoleDarkModal/AdminConsoleDarkModal.js","webpack://@jotforminc/form-builder/../../libs/ep-utils/src/constants/adminConsoleDescriptiveSliderItems.js","webpack://@jotforminc/form-builder/../../libs/ep-utils/src/hooks/useSlider.js","webpack://@jotforminc/form-builder/../../libs/ep-account-box/src/components/AbTest/AdminConsoleDescriptiveSliderModal/Renderers.js","webpack://@jotforminc/form-builder/../../libs/ep-account-box/src/components/AbTest/AdminConsoleDescriptiveSliderModal/Navigation.js","webpack://@jotforminc/form-builder/../../libs/ep-account-box/src/components/AbTest/AdminConsoleDescriptiveSliderModal/Slide.js","webpack://@jotforminc/form-builder/../../libs/ep-account-box/src/components/AbTest/AdminConsoleDescriptiveSliderModal/AdminConsoleDescriptiveSliderModal.js","webpack://@jotforminc/form-builder/../../libs/ep-account-box/src/components/AdminConsolePromotionButton/AdminConsolePromotionButton.js","webpack://@jotforminc/form-builder/../../libs/account-box/src/components/AccountBoxStandalone/MenuItems.js","webpack://@jotforminc/form-builder/../../libs/account-box/src/components/AccountBoxStandalone/UploadUsageInfo.js","webpack://@jotforminc/form-builder/../../libs/account-box/src/components/AccountBoxStandalone/UsageInfo.js","webpack://@jotforminc/form-builder/../../libs/account-box/src/components/AccountBoxStandalone/Limit.js","webpack://@jotforminc/form-builder/../../libs/account-box/src/components/AccountBoxStandalone/SaveBagde.js","webpack://@jotforminc/form-builder/../../libs/account-box/src/components/AccountBoxStandalone/UpgradeButton.js","webpack://@jotforminc/form-builder/../../libs/account-box/src/components/AccountBoxStandalone/Limits.js","webpack://@jotforminc/form-builder/../../libs/account-box/src/components/AccountBoxStandalone/Header.js","webpack://@jotforminc/form-builder/../../libs/account-box/src/components/AccountBoxStandalone/AccountBoxStandalone.js","webpack://@jotforminc/form-builder/../../libs/account-box/src/components/Content.js","webpack://@jotforminc/form-builder/../../libs/account-box/src/components/AccountBox.js","webpack://@jotforminc/form-builder/../../libs/header-components/src/assets/svg/iconAppMyTeams.svg","webpack://@jotforminc/form-builder/../../libs/header-components/src/assets/svg/iconAppMyWorkspace.svg","webpack://@jotforminc/form-builder/../../libs/header-components/src/components/Navigation/appIcons.js","webpack://@jotforminc/form-builder/../../libs/header-components/src/utils/api.js","webpack://@jotforminc/form-builder/../../libs/header-components/src/constants/index.js","webpack://@jotforminc/form-builder/../../libs/header-components/src/utils/utils.js","webpack://@jotforminc/form-builder/../../libs/picker-modal/src/styles/ScRB.js","webpack://@jotforminc/form-builder/../../libs/picker-modal/src/components/PickerModal.js","webpack://@jotforminc/form-builder/../../libs/header-components/src/components/Navigation/ScPickerModal.js","webpack://@jotforminc/form-builder/../../libs/header-components/src/components/Navigation/ScButton.js","webpack://@jotforminc/form-builder/../../libs/header-components/src/components/Navigation/ResourcePickerModal.js","webpack://@jotforminc/form-builder/../../libs/header-components/src/components/Navigation/NavigationItemBadge.js","webpack://@jotforminc/form-builder/../../libs/header-components/src/components/Navigation/NavigationItem.js","webpack://@jotforminc/form-builder/../../libs/enterprise-components/src/components/CreateNewTeamModal/CreateTeamButton.tsx","webpack://@jotforminc/form-builder/../../libs/header-components/src/components/Navigation/TeamSection.js","webpack://@jotforminc/form-builder/../../libs/header-components/src/components/Navigation/index.js","webpack://@jotforminc/form-builder/../../libs/header-components/src/components/Navigation/NavigationTrigger.js","webpack://@jotforminc/form-builder/../../libs/header-components/src/components/Navigation/NavigationWrapper.js","webpack://@jotforminc/form-builder/../../libs/header-components/src/components/Logo/index.js","webpack://@jotforminc/form-builder/../../libs/header-components/src/components/Title/index.js","webpack://@jotforminc/form-builder/../../libs/header-components/src/components/SubTitle/index.js","webpack://@jotforminc/form-builder/../../libs/header-components/src/components/ProductHeader/IconGovernment.js","webpack://@jotforminc/form-builder/../../libs/header-components/src/components/ProductHeader/HeaderBadge.js","webpack://@jotforminc/form-builder/../../libs/header-components/src/components/ProductHeader/index.js","webpack://@jotforminc/form-builder/../../libs/header-components/src/components/Header/index.js","webpack://@jotforminc/form-builder/../../libs/help/src/context/ActionLoggerContext.js","webpack://@jotforminc/form-builder/../../libs/help/src/hooks/useFirstOpen.js","webpack://@jotforminc/form-builder/../../libs/product-walkthrough/src/steps/informative.js","webpack://@jotforminc/form-builder/../../libs/product-walkthrough/src/components/form-builder-walkthrough/sc/scWrapper.js","webpack://@jotforminc/form-builder/../../libs/product-walkthrough/src/components/form-builder-walkthrough/sc/scFooter.js","webpack://@jotforminc/form-builder/../../libs/product-walkthrough/src/components/form-builder-walkthrough/sc/scContinuePopover.js","webpack://@jotforminc/form-builder/../../libs/product-walkthrough/src/components/form-builder-walkthrough/ContinuePopover.js","webpack://@jotforminc/form-builder/../../libs/product-walkthrough/src/components/form-builder-walkthrough/ButtonPopover.js","webpack://@jotforminc/form-builder/../../libs/product-walkthrough/src/components/form-builder-walkthrough/Preload.js","webpack://@jotforminc/form-builder/../../libs/product-walkthrough/src/components/form-builder-walkthrough/ButtonProgressRenderer.js","webpack://@jotforminc/form-builder/../../libs/product-walkthrough/src/components/form-builder-walkthrough/Footer.js","webpack://@jotforminc/form-builder/../../libs/product-walkthrough/src/components/form-builder-walkthrough/sc/scModal.js","webpack://@jotforminc/form-builder/../../libs/product-walkthrough/src/components/form-builder-walkthrough/StandardModal.js","webpack://@jotforminc/form-builder/../../libs/product-walkthrough/src/utils/utils.js","webpack://@jotforminc/form-builder/../../libs/product-walkthrough/src/context/context.js","webpack://@jotforminc/form-builder/../../libs/product-walkthrough/src/components/form-builder-walkthrough/InitialModal.js","webpack://@jotforminc/form-builder/../../libs/product-walkthrough/src/components/form-builder-walkthrough/sc/scPopover.js","webpack://@jotforminc/form-builder/../../libs/product-walkthrough/src/components/form-builder-walkthrough/Overlay.js","webpack://@jotforminc/form-builder/../../libs/product-walkthrough/src/components/form-builder-walkthrough/Popover.js","webpack://@jotforminc/form-builder/../../libs/product-walkthrough/src/components/form-builder-walkthrough/sc/scVisualSection.js","webpack://@jotforminc/form-builder/../../libs/product-walkthrough/src/components/form-builder-walkthrough/Video.js","webpack://@jotforminc/form-builder/../../libs/product-walkthrough/src/components/form-builder-walkthrough/VisualSection.js","webpack://@jotforminc/form-builder/../../libs/product-walkthrough/src/components/form-builder-walkthrough/DefaultPopover.js","webpack://@jotforminc/form-builder/../../libs/product-walkthrough/src/components/form-builder-walkthrough/StepPopover.js","webpack://@jotforminc/form-builder/../../libs/product-walkthrough/src/components/form-builder-walkthrough/sc/scEndingPopover.js","webpack://@jotforminc/form-builder/../../libs/product-walkthrough/src/components/form-builder-walkthrough/EndingPopover.js","webpack://@jotforminc/form-builder/../../libs/product-walkthrough/src/components/form-builder-walkthrough/FinalPopover.js","webpack://@jotforminc/form-builder/../../libs/product-walkthrough/src/components/form-builder-walkthrough/StepByStepWithContinue.js","webpack://@jotforminc/form-builder/../../libs/product-walkthrough/src/components/form-builder-walkthrough/StepByStep.js","webpack://@jotforminc/form-builder/../../libs/product-walkthrough/src/components/form-builder-walkthrough/InformativeStepPopover.js","webpack://@jotforminc/form-builder/../../libs/product-walkthrough/src/components/form-builder-walkthrough/StandaloneOverlay.js","webpack://@jotforminc/form-builder/../../libs/product-walkthrough/src/components/form-builder-walkthrough/Informative.js","webpack://@jotforminc/form-builder/../../libs/product-walkthrough/src/components/form-builder-walkthrough/FormBuidlerWalkthrough.js","webpack://@jotforminc/form-builder/../../libs/help/src/constants/index.js","webpack://@jotforminc/form-builder/../../libs/help/src/hooks/useWalkthrough.js","webpack://@jotforminc/form-builder/../../libs/enterprise-promotions/src/components/Modals/Product/ScheduleZoomModal/Renderers.js","webpack://@jotforminc/form-builder/../../libs/enterprise-promotions/src/components/Modals/Product/ScheduleZoomModal/Aside.js","webpack://@jotforminc/form-builder/../../libs/enterprise-promotions/src/components/Modals/Product/ScheduleZoomModal/ScheduleZoomModal.js","webpack://@jotforminc/form-builder/../../libs/enterprise-promotions/src/components/Banners/AbTest/ScheduleZoomBanner.js","webpack://@jotforminc/form-builder/../../libs/enterprise-promotions/src/components/Modals/Product/DedicatedSupportModal/Renderers.js","webpack://@jotforminc/form-builder/../../libs/enterprise-promotions/src/components/Modals/Product/DedicatedSupportModal/SupportModal.js","webpack://@jotforminc/form-builder/../../libs/enterprise-promotions/src/components/Modals/Product/DedicatedSupportModal/HelpDedicatedSupportModal.js","webpack://@jotforminc/form-builder/../../libs/enterprise-promotions/src/components/Banners/Product/DedicatedSupportBanner.js","webpack://@jotforminc/form-builder/../../libs/enterprise-promotions/src/components/AbTesters/DedicatedSupportAbTester.js","webpack://@jotforminc/form-builder/../../libs/help/src/utils/generateRequestKey.js","webpack://@jotforminc/form-builder/../../libs/help/src/api/index.js","webpack://@jotforminc/form-builder/../../libs/help/src/components/SearchInput.js","webpack://@jotforminc/form-builder/../../libs/help/src/components/HelpMenuItem.js","webpack://@jotforminc/form-builder/../../libs/help/src/components/HelpMenuButton.js","webpack://@jotforminc/form-builder/../../libs/help/src/utils/index.js","webpack://@jotforminc/form-builder/../../libs/help/src/components/StaticMenuItems.js","webpack://@jotforminc/form-builder/../../libs/help/src/components/SearchResultsFooter.js","webpack://@jotforminc/form-builder/../../libs/help/src/components/SearchResults.js","webpack://@jotforminc/form-builder/../../libs/help/src/components/PopularArticles.js","webpack://@jotforminc/form-builder/../../libs/help/src/components/HelpMenu.js","webpack://@jotforminc/form-builder/../../libs/help/src/components/ShortcutModal.js","webpack://@jotforminc/form-builder/../../libs/help/src/components/Help.js","webpack://@jotforminc/form-builder/./src/components/form/Title.js","webpack://@jotforminc/form-builder/./src/components/PrimaryStatusBar.js","webpack://@jotforminc/form-builder/../../libs/login-flow/src/components/LoginFlowWithStyles.js","webpack://@jotforminc/form-builder/./src/components/SignupSlider.js","webpack://@jotforminc/form-builder/./src/components/SignupSliderModal.js","webpack://@jotforminc/form-builder/./src/components/ExitIntentSurveyModal.js","webpack://@jotforminc/form-builder/../../libs/share-panel/src/components/SharePanelTabs.js","webpack://@jotforminc/form-builder/../../libs/share-panel/src/components/ShareButton.js","webpack://@jotforminc/form-builder/./src/libs/useShareButtonTracking.js","webpack://@jotforminc/form-builder/./src/components/PrimaryHeader.js","webpack://@jotforminc/form-builder/./src/components/LeftPanel.js","webpack://@jotforminc/form-builder/../../libs/builder/src/modules/image-cover-wizard/index.js","webpack://@jotforminc/form-builder/../../libs/builder/src/modules/welcome-wizard/index.js","webpack://@jotforminc/form-builder/../../libs/builder/src/modules/card-designer/viewData.js","webpack://@jotforminc/form-builder/../../libs/builder/src/modules/card-designer/constants.js","webpack://@jotforminc/form-builder/../../libs/builder/src/modules/card-designer/themes/ThemeItem.js","webpack://@jotforminc/form-builder/../../libs/builder/src/modules/card-designer/themes/index.js","webpack://@jotforminc/form-builder/../../libs/builder/src/modules/card-designer/admin/index.js","webpack://@jotforminc/form-builder/../../libs/builder/src/modules/card-designer/custom/panels.js","webpack://@jotforminc/form-builder/../../libs/builder/src/components/Title.js","webpack://@jotforminc/form-builder/../../libs/builder/src/components/FontPicker.js","webpack://@jotforminc/form-builder/../../libs/builder/src/modules/card-designer/customComponents/colorNames.js","webpack://@jotforminc/form-builder/../../libs/builder/src/modules/card-designer/customComponents/backgroundEffects.js","webpack://@jotforminc/form-builder/../../libs/builder/src/components/VideoUrlValidPicker.js","webpack://@jotforminc/form-builder/../../libs/builder/src/modules/card-designer/custom/ThemePublishPanel.js","webpack://@jotforminc/form-builder/../../libs/builder/src/modules/card-designer/custom/index.js","webpack://@jotforminc/form-builder/../../libs/builder/src/modules/card-designer/index.js","webpack://@jotforminc/form-builder/./src/components/RightPanel.js","webpack://@jotforminc/form-builder/./src/components/Footer.js","webpack://@jotforminc/form-builder/../../libs/panel-components/src/components/SettingsPanel/SettingsPanelWrapper.js","webpack://@jotforminc/form-builder/../../libs/panel-components/src/components/SettingsPanel/SettingsPanelListItem.js","webpack://@jotforminc/form-builder/../../libs/panel-components/src/components/SettingsPanel/SettingsPanelListNavigation.js","webpack://@jotforminc/form-builder/./src/components/PublishPanel.js","webpack://@jotforminc/form-builder/../../libs/panel-components/src/components/Panel/Panel.js","webpack://@jotforminc/form-builder/../../libs/panel-components/src/components/FieldList/FieldCategory.js","webpack://@jotforminc/form-builder/../../libs/panel-components/src/components/Panel/PanelSearch.js","webpack://@jotforminc/form-builder/../../libs/panel-components/src/components/Panel/PanelTabs.js","webpack://@jotforminc/form-builder/../../libs/panel-components/src/components/Panel/panelTabs.cva.js","webpack://@jotforminc/form-builder/../../libs/panel-components/src/components/Panel/PanelTabItem.js","webpack://@jotforminc/form-builder/../../libs/panel-components/src/components/Panel/PanelContent.js","webpack://@jotforminc/form-builder/./src/components/Limitation/Badge.js","webpack://@jotforminc/form-builder/./src/components/Limitation/Progress.js","webpack://@jotforminc/form-builder/../../libs/panel-components/src/components/FieldList/fieldItem.cva.js","webpack://@jotforminc/form-builder/../../libs/panel-components/src/components/FieldList/FieldItem.js","webpack://@jotforminc/form-builder/./src/components/FieldsPanelItem.js","webpack://@jotforminc/form-builder/./src/components/FieldsPanel.js","webpack://@jotforminc/form-builder/./src/components/Feedback.js","webpack://@jotforminc/form-builder/./src/components/form/Styles.js","webpack://@jotforminc/form-builder/./src/components/form/CardStyles.js","webpack://@jotforminc/form-builder/./src/libs/create_style_link.js","webpack://@jotforminc/form-builder/./src/libs/remove_style_link.js","webpack://@jotforminc/form-builder/./src/components/socket/index.js","webpack://@jotforminc/form-builder/./src/libs/user_select.js","webpack://@jotforminc/form-builder/./src/components/form/selectable/index.js","webpack://@jotforminc/form-builder/./src/components/ContextMenu.js","webpack://@jotforminc/form-builder/./src/components/NewFormDialog.js","webpack://@jotforminc/form-builder/./src/components/FormCountDialog.js","webpack://@jotforminc/form-builder/./src/components/NdtSwitchToOldModal.js","webpack://@jotforminc/form-builder/./src/components/NdtPromotionModal.js","webpack://@jotforminc/form-builder/./src/components/PaymentModal.js","webpack://@jotforminc/form-builder/./src/components/FeedbackModal/Renderers.js","webpack://@jotforminc/form-builder/./src/components/FeedbackModal/PreRenderedModal.js","webpack://@jotforminc/form-builder/./src/components/FeedbackModal/Main.js","webpack://@jotforminc/form-builder/./src/components/pdfImporter/AutoScrollHandler.js","webpack://@jotforminc/form-builder/./src/components/pdfImporter/Path.js","webpack://@jotforminc/form-builder/./src/containers/PDFImporter/PathContainer.js","webpack://@jotforminc/form-builder/./src/components/pdfImporter/Paths.js","webpack://@jotforminc/form-builder/./src/containers/PDFImporter/PathsContainer.js","webpack://@jotforminc/form-builder/./src/components/SignupPromptNewVersion.js","webpack://@jotforminc/form-builder/./src/components/Limitation/LimitMessageTooltip.js","webpack://@jotforminc/form-builder/./src/components/Limitation/LimitPopover.js","webpack://@jotforminc/form-builder/./src/libs/pdfImport/abtests.js","webpack://@jotforminc/form-builder/./src/components/AccessExpiredDialog.js","webpack://@jotforminc/form-builder/./src/components/AssetMoveDialog.js","webpack://@jotforminc/form-builder/./src/containers/Editor.js","webpack://@jotforminc/form-builder/./src/components/IntegrationFormSelection.js","webpack://@jotforminc/form-builder/./src/containers/App.js","webpack://@jotforminc/form-builder/./src/middlewares/undoStackMiddleware.js","webpack://@jotforminc/form-builder/./src/middlewares/socketMiddleware.js","webpack://@jotforminc/form-builder/./src/middlewares/inlineButtonIfEmptyMiddleware.js","webpack://@jotforminc/form-builder/./src/middlewares/pdfImporter.js","webpack://@jotforminc/form-builder/./src/reducers/formProperties.js","webpack://@jotforminc/form-builder/./src/reducers/questions.js","webpack://@jotforminc/form-builder/./src/reducers/user.js","webpack://@jotforminc/form-builder/./src/reducers/form.js","webpack://@jotforminc/form-builder/./src/reducers/AI.js","webpack://@jotforminc/form-builder/./src/reducers/ui.js","webpack://@jotforminc/form-builder/./src/reducers/revisions.js","webpack://@jotforminc/form-builder/./src/reducers/cdnconfig.js","webpack://@jotforminc/form-builder/./src/reducers/widgets.js","webpack://@jotforminc/form-builder/./src/reducers/notification.js","webpack://@jotforminc/form-builder/./src/reducers/themes.js","webpack://@jotforminc/form-builder/./src/reducers/users.js","webpack://@jotforminc/form-builder/./src/reducers/clipboard.js","webpack://@jotforminc/form-builder/./src/reducers/search.js","webpack://@jotforminc/form-builder/./src/reducers/paymentConnection.js","webpack://@jotforminc/form-builder/./src/reducers/paymentConnectionBackup.js","webpack://@jotforminc/form-builder/./src/reducers/productStock.js","webpack://@jotforminc/form-builder/./src/reducers/formOwner.js","webpack://@jotforminc/form-builder/./src/reducers/team.js","webpack://@jotforminc/form-builder/./src/reducers/emailSettings.js","webpack://@jotforminc/form-builder/./src/reducers/salesforce.js","webpack://@jotforminc/form-builder/./src/reducers/serverPayments.js","webpack://@jotforminc/form-builder/./src/reducers/serverBuilderCustomization.js","webpack://@jotforminc/form-builder/./src/reducers/paymentStockRevision.js","webpack://@jotforminc/form-builder/./src/reducers/share.js","webpack://@jotforminc/form-builder/./src/reducers/stagedQuestions.js","webpack://@jotforminc/form-builder/./src/reducers/index.js","webpack://@jotforminc/form-builder/./src/middlewares/accessibilityCheckerMiddleware.js","webpack://@jotforminc/form-builder/./src/middlewares/themesMiddleware.js","webpack://@jotforminc/form-builder/./src/middlewares/limitMiddleware.js","webpack://@jotforminc/form-builder/./src/middlewares/useJotformSignMiddleware.js","webpack://@jotforminc/form-builder/./src/middlewares/workflowMiddleware.js","webpack://@jotforminc/form-builder/./src/store/configureStore.js","webpack://@jotforminc/form-builder/./src/libs/isEdge.js","webpack://@jotforminc/form-builder/./src/feature-flags/EnterpriseFeatureFlags.js","webpack://@jotforminc/form-builder/./src/feature-flags/utils.js","webpack://@jotforminc/form-builder/./src/index.js","webpack://@jotforminc/form-builder/./src/libs/DateTimeHelper.js","webpack://@jotforminc/form-builder/./src/libs/PaymentUtils.js","webpack://@jotforminc/form-builder/./src/libs/extract_text.js","webpack://@jotforminc/form-builder/./src/constants/accessibilityWarnings.js","webpack://@jotforminc/form-builder/./src/libs/Utils.js","webpack://@jotforminc/form-builder/./src/libs/formUserInterceptor.js","webpack://@jotforminc/form-builder/./src/libs/api.js","webpack://@jotforminc/form-builder/./src/libs/api_key_extractor.js","webpack://@jotforminc/form-builder/./src/libs/logger.js","webpack://@jotforminc/form-builder/./src/libs/paymentDataCollector.js","webpack://@jotforminc/form-builder/./src/libs/pdfImport/constants.js","webpack://@jotforminc/form-builder/./src/libs/pdfImport/index.js","webpack://@jotforminc/form-builder/./src/libs/pdfImport/rectFinder.js","webpack://@jotforminc/form-builder/./src/libs/pdfImport/sanctuary.js","webpack://@jotforminc/form-builder/./src/libs/socketAdapter.js","webpack://@jotforminc/form-builder/./src/libs/socket.js","webpack://@jotforminc/form-builder/./src/libs/strip_tags.js","webpack://@jotforminc/form-builder/./src/libs/styleAndInject.js","webpack://@jotforminc/form-builder/./src/reducers/pdfImport.js","webpack://@jotforminc/form-builder/../../libs/abtest-manager/src/utils/ABTestVariantCache.js","webpack://@jotforminc/form-builder/../../libs/abtest-manager/src/utils/ABTestManager.js","webpack://@jotforminc/form-builder/../../libs/abtest-manager/src/utils/ActionManager.js","webpack://@jotforminc/form-builder/../../libs/abtest-manager/src/utils/layer.js","webpack://@jotforminc/form-builder/../../libs/abtest-manager/src/utils/utils.js","webpack://@jotforminc/form-builder/../../libs/answer-utils/src/constants/index.js","webpack://@jotforminc/form-builder/../../libs/answer-utils/src/utils/index.js","webpack://@jotforminc/form-builder/../../libs/apploaders/src/Container/index.js","webpack://@jotforminc/form-builder/../../libs/apploaders/src/Dots/index.js","webpack://@jotforminc/form-builder/../../libs/builder/src/actions/APIActions.js","webpack://@jotforminc/form-builder/../../libs/builder/src/actions/PaymentActions.js","webpack://@jotforminc/form-builder/../../libs/builder/src/actions/ViewActions.js","webpack://@jotforminc/form-builder/../../libs/builder/src/components/Button.js","webpack://@jotforminc/form-builder/../../libs/builder/src/components/ColorPicker.js","webpack://@jotforminc/form-builder/../../libs/builder/src/components/Column.js","webpack://@jotforminc/form-builder/../../libs/builder/src/components/Dropdown.js","webpack://@jotforminc/form-builder/../../libs/builder/src/libs/createLayoutRenderer.js","webpack://@jotforminc/form-builder/../../libs/builder/src/components/Forms/LayoutForm.js","webpack://@jotforminc/form-builder/../../libs/builder/src/components/Icon.js","webpack://@jotforminc/form-builder/../../libs/builder/src/components/IconSVG.js","webpack://@jotforminc/form-builder/../../libs/builder/src/components/IconSelector/index.js","webpack://@jotforminc/form-builder/../../libs/builder/src/components/PageBackgroundStyles/IconTab.js","webpack://@jotforminc/form-builder/../../libs/builder/src/components/IconTabList.js","webpack://@jotforminc/form-builder/../../../../src/icons/media/image-plus-filled.svg","webpack://@jotforminc/form-builder/../../libs/builder/src/components/ImageUpload/TabbedPanel.js","webpack://@jotforminc/form-builder/../../libs/builder/src/components/ImageUpload/TetheredPanel.js","webpack://@jotforminc/form-builder/../../libs/builder/src/components/ImageUpload/ImageSlider.js","webpack://@jotforminc/form-builder/../../libs/builder/src/components/ImageUpload/index.js","webpack://@jotforminc/form-builder/../../libs/builder/src/components/Line.js","webpack://@jotforminc/form-builder/../../libs/builder/src/components/LoadingIndicator.js","webpack://@jotforminc/form-builder/../../libs/builder/src/components/Panel.js","webpack://@jotforminc/form-builder/../../libs/builder/src/components/PlatformNewBadge.js","webpack://@jotforminc/form-builder/../../libs/radio-group/src/index.js","webpack://@jotforminc/form-builder/../../libs/builder/src/components/RadioGroup.js","webpack://@jotforminc/form-builder/../../libs/builder/src/components/TinyMCEEditor.js","webpack://@jotforminc/form-builder/../../libs/builder/src/components/RichTextEditor.js","webpack://@jotforminc/form-builder/../../libs/builder/src/components/SaveButton.js","webpack://@jotforminc/form-builder/../../libs/builder/src/components/Tabs2/Tab.js","webpack://@jotforminc/form-builder/../../libs/builder/src/components/Tabs2/Tabs.js","webpack://@jotforminc/form-builder/../../libs/builder/src/components/Tethered.js","webpack://@jotforminc/form-builder/../../libs/builder/src/components/TextInput.js","webpack://@jotforminc/form-builder/../../libs/builder/src/components/Textarea.js","webpack://@jotforminc/form-builder/../../libs/builder/src/components/Toggle.js","webpack://@jotforminc/form-builder/../../libs/builder/src/components/Tooltip.js","webpack://@jotforminc/form-builder/../../libs/builder/src/constants/constants.js","webpack://@jotforminc/form-builder/../../libs/builder/src/dispatchers/AppDispatcher.js","webpack://@jotforminc/form-builder/../../libs/builder/src/libs/LegacyUtils.js","webpack://@jotforminc/form-builder/../../libs/builder/src/libs/StoreObserver.js","webpack://@jotforminc/form-builder/../../libs/builder/src/libs/WebAPIUtils.js","webpack://@jotforminc/form-builder/../../libs/builder/src/libs/jf_js_sortable.js","webpack://@jotforminc/form-builder/../../libs/builder/src/libs/jf_sortable.js","webpack://@jotforminc/form-builder/../../libs/builder/src/mixins/Translation.js","webpack://@jotforminc/form-builder/../../libs/builder/src/modules/card-thankyou-wizard/index.js","webpack://@jotforminc/form-builder/../../libs/builder/src/modules/common-panel-header/components/HeaderClassIcon.js","webpack://@jotforminc/form-builder/../../libs/builder/src/modules/form-properties-editor/PropertyUtils.js","webpack://@jotforminc/form-builder/../../libs/builder/src/modules/intentional-publish/utils.js","webpack://@jotforminc/form-builder/../../libs/builder/src/modules/minidesigner/customs/LayoutPicker/viewData.js","webpack://@jotforminc/form-builder/../../libs/builder/src/modules/minidesigner/customs/LayoutPicker/index.js","webpack://@jotforminc/form-builder/../../libs/builder/src/modules/payments/PaymentConstants.js","webpack://@jotforminc/form-builder/../../libs/builder/src/modules/payments/PaymentUtils.js","webpack://@jotforminc/form-builder/../../libs/builder/src/modules/question-properties-editor/customs/DimensionPicker.js","webpack://@jotforminc/form-builder/../../libs/builder/src/modules/question-properties-editor/fields/Appointment.js","webpack://@jotforminc/form-builder/../../libs/builder/src/modules/question-properties-editor/fields/Control.js","webpack://@jotforminc/form-builder/../../libs/builder/src/modules/question-properties-editor/fields/Address.js","webpack://@jotforminc/form-builder/../../libs/builder/src/modules/question-properties-editor/fields/Time.js","webpack://@jotforminc/form-builder/../../libs/builder/src/modules/question-properties-editor/fields/Timev2.js","webpack://@jotforminc/form-builder/../../libs/builder/src/modules/question-properties-editor/fields/Textbox.js","webpack://@jotforminc/form-builder/../../libs/builder/src/modules/question-properties-editor/fields/Head.js","webpack://@jotforminc/form-builder/../../libs/builder/src/modules/question-properties-editor/fields/Image.js","webpack://@jotforminc/form-builder/../../libs/builder/src/modules/question-properties-editor/fields/Email.js","webpack://@jotforminc/form-builder/../../libs/builder/src/modules/question-properties-editor/fields/FullName.js","webpack://@jotforminc/form-builder/../../libs/builder/src/modules/question-properties-editor/fields/Number.js","webpack://@jotforminc/form-builder/../../libs/builder/src/modules/question-properties-editor/fields/Phone.js","webpack://@jotforminc/form-builder/../../libs/builder/src/modules/question-properties-editor/fields/Spinner.js","webpack://@jotforminc/form-builder/../../libs/builder/src/modules/question-properties-editor/fields/Scale.js","webpack://@jotforminc/form-builder/../../libs/builder/src/modules/question-properties-editor/fields/Captcha.js","webpack://@jotforminc/form-builder/../../libs/builder/src/modules/question-properties-editor/fields/Matrix.js","webpack://@jotforminc/form-builder/../../libs/builder/src/modules/question-properties-editor/fields/Rating.js","webpack://@jotforminc/form-builder/../../libs/builder/src/modules/question-properties-editor/fields/Textarea.js","webpack://@jotforminc/form-builder/../../libs/builder/src/modules/question-properties-editor/fields/Textarea2.js","webpack://@jotforminc/form-builder/../../libs/builder/src/modules/question-properties-editor/fields/Dropdown.js","webpack://@jotforminc/form-builder/../../libs/builder/src/modules/question-properties-editor/fields/Checkbox.js","webpack://@jotforminc/form-builder/../../libs/builder/src/modules/question-properties-editor/fields/FileUpload.js","webpack://@jotforminc/form-builder/../../libs/builder/src/modules/question-properties-editor/fields/PageBreak.js","webpack://@jotforminc/form-builder/../../libs/builder/src/modules/question-properties-editor/fields/Collapse.js","webpack://@jotforminc/form-builder/../../libs/builder/src/modules/question-properties-editor/fields/Button.js","webpack://@jotforminc/form-builder/../../libs/builder/src/modules/question-properties-editor/fields/Radio.js","webpack://@jotforminc/form-builder/../../libs/builder/src/modules/question-properties-editor/fields/DateTime.js","webpack://@jotforminc/form-builder/../../libs/builder/src/modules/question-properties-editor/fields/Hidden.js","webpack://@jotforminc/form-builder/../../libs/builder/src/modules/question-properties-editor/fields/Slider.js","webpack://@jotforminc/form-builder/../../libs/builder/src/modules/question-properties-editor/fields/Payment.js","webpack://@jotforminc/form-builder/../../libs/builder/src/modules/question-properties-editor/fields/ImageChoice.js","webpack://@jotforminc/form-builder/../../libs/builder/src/modules/question-properties-editor/fields/Mixed.js","webpack://@jotforminc/form-builder/../../libs/builder/src/modules/question-properties-editor/fields/YesNo.js","webpack://@jotforminc/form-builder/../../libs/builder/src/modules/question-properties-editor/fields/Ratingv2.js","webpack://@jotforminc/form-builder/../../libs/builder/src/modules/question-properties-editor/fields/EmojiSlider.js","webpack://@jotforminc/form-builder/../../libs/builder/src/modules/question-properties-editor/fields/FileUploadv2.js","webpack://@jotforminc/form-builder/../../libs/builder/src/modules/question-properties-editor/fields/Inline.js","webpack://@jotforminc/form-builder/../../libs/builder/src/modules/question-properties-editor/fields/AutoIncrement.js","webpack://@jotforminc/form-builder/../../libs/builder/src/modules/question-properties-editor/fields/Signature.js","webpack://@jotforminc/form-builder/../../libs/builder/src/modules/question-properties-editor/fields/index.js","webpack://@jotforminc/form-builder/../../libs/builder/src/modules/question-properties-editor/constants/card_properties.js","webpack://@jotforminc/form-builder/../../libs/builder/src/modules/question-properties-editor/constants/widget_properties_v2.js","webpack://@jotforminc/form-builder/../../libs/builder/src/modules/question-properties-editor/utils.js","webpack://@jotforminc/form-builder/../../libs/builder/src/modules/thankyou-wizard/constants.js","webpack://@jotforminc/form-builder/../../libs/builder/src/components/SelectPDFList.js","webpack://@jotforminc/form-builder/../../libs/builder/src/modules/thankyou-wizard/index.js","webpack://@jotforminc/form-builder/../../libs/builder/src/stores/PaymentStore.js","webpack://@jotforminc/form-builder/../../libs/builder/src/stores/UserUploads.js","webpack://@jotforminc/form-builder/../../libs/builder/src/utils/Utils.js","webpack://@jotforminc/form-builder/../../libs/builder/src/utils/apiKeyExtractor.js","webpack://@jotforminc/form-builder/../../libs/builder/src/utils/index.js","webpack://@jotforminc/form-builder/../../libs/builder/src/utils/requestLayer.js","webpack://@jotforminc/form-builder/../../libs/checkbox/src/components/Checkbox.js","webpack://@jotforminc/form-builder/../../libs/checkbox/src/components/CheckboxItem.js","webpack://@jotforminc/form-builder/../../libs/colorscheme/src/utils/actions.js","webpack://@jotforminc/form-builder/../../libs/colorscheme/src/utils/colorSchemes.js","webpack://@jotforminc/form-builder/../../libs/common-button/src/components/Button.js","webpack://@jotforminc/form-builder/../../libs/step-wizard/src/assets/svg/stepWizardInProgress.svg","webpack://@jotforminc/form-builder/../../libs/step-wizard/src/assets/svg/stepWizardDone.svg","webpack://@jotforminc/form-builder/../../../../src/icons/editor/arrow-pointer-click-filled.svg","webpack://@jotforminc/form-builder/../../../../src/icons/brand/facebook-circle-filled.svg","webpack://@jotforminc/form-builder/../../../../src/icons/brand/twitter.svg","webpack://@jotforminc/form-builder/../../../../src/icons/brand/linkedin-filled.svg","webpack://@jotforminc/form-builder/../../../../src/icons/communication/phone-arrow-down-left-filled.svg","webpack://@jotforminc/form-builder/../../libs/common/src/assets/svg/actionButtonsWizard/fillAnotherIcon.svg","webpack://@jotforminc/form-builder/../../libs/common/src/assets/svg/actionButtonsWizard/viewAllSubmissions.svg","webpack://@jotforminc/form-builder/../../libs/common/src/components/ActionButtonsWizard/steps/emails/temp/IconWhatsappCircle.svg","webpack://@jotforminc/form-builder/../../../../src/icons/products/product-payment-form-color-border.svg","webpack://@jotforminc/form-builder/../../../../src/icons/products/product-payment-card-form-border.svg","webpack://@jotforminc/form-builder/../../libs/button-field/src/assets/svg/iconDropdownArrow.svg","webpack://@jotforminc/form-builder/../../libs/common/src/assets/svg/actionButtonsWizard/setPrefillIcon.svg","webpack://@jotforminc/form-builder/../../libs/step-wizard/src/sc/scStepWizard.js","webpack://@jotforminc/form-builder/../../libs/step-wizard/src/components/SidePanel/index.js","webpack://@jotforminc/form-builder/../../libs/step-wizard/src/components/StepWizard/index.js","webpack://@jotforminc/form-builder/../../libs/uikit/src/components/Rating/defaults/DefaultItemRenderer.js","webpack://@jotforminc/form-builder/../../libs/uikit/src/components/Rating/defaults/DefaultContainerRenderer.js","webpack://@jotforminc/form-builder/../../libs/uikit/src/components/Rating/index.js","webpack://@jotforminc/form-builder/../../libs/give-feedback/src/components/GiveFeedbackModal.js","webpack://@jotforminc/form-builder/../../libs/common/src/components/ActionButtonsWizard/utils/constants.js","webpack://@jotforminc/form-builder/../../libs/common/src/components/ActionButtonsWizard/scWizard.js","webpack://@jotforminc/form-builder/../../libs/common/src/components/ActionButtonsWizard/utils/index.js","webpack://@jotforminc/form-builder/../../libs/common/src/components/ActionButtonsWizard/utils/thankyou.js","webpack://@jotforminc/form-builder/../../libs/common/src/components/ActionButtonsWizard/components/MenuItem.js","webpack://@jotforminc/form-builder/../../libs/common/src/components/ActionButtonsWizard/components/ButtonList/ButtonListItem.js","webpack://@jotforminc/form-builder/../../libs/common/src/components/ActionButtonsWizard/components/ButtonList/index.js","webpack://@jotforminc/form-builder/../../libs/common/src/components/ActionButtonsWizard/steps/ButtonGrid.js","webpack://@jotforminc/form-builder/../../libs/common/src/components/Banner/PrefillFormFields/Form.js","webpack://@jotforminc/form-builder/../../libs/common/src/components/Banner/PrefillFormFields/Demo/Input.js","webpack://@jotforminc/form-builder/../../libs/common/src/components/Banner/PrefillFormFields/Demo/Selection.js","webpack://@jotforminc/form-builder/../../libs/common/src/components/Banner/PrefillFormFields/Demo/Select.js","webpack://@jotforminc/form-builder/../../libs/common/src/components/Banner/PrefillFormFields/FillAgain.js","webpack://@jotforminc/form-builder/../../libs/common/src/components/PrefillSettings/constants.js","webpack://@jotforminc/form-builder/../../libs/common/src/components/PrefillSettings/utils.js","webpack://@jotforminc/form-builder/../../libs/common/src/components/ResourcePickerDropdown/index.js","webpack://@jotforminc/form-builder/../../libs/common/src/components/ActionButtonsWizard/components/ActionButtonNameInput.js","webpack://@jotforminc/form-builder/../../libs/common/src/components/ActionButtonsWizard/steps/thankyou/FillAgainStep.js","webpack://@jotforminc/form-builder/../../libs/common/src/components/PrefillSettings/components/PrefillMatchDropdown.js","webpack://@jotforminc/form-builder/../../libs/common/src/components/PrefillSettings/components/PrefillFieldMatcher.js","webpack://@jotforminc/form-builder/../../libs/common/src/components/Banner/PrefillFormFields/index.js","webpack://@jotforminc/form-builder/../../libs/common/src/components/ActionButtonsWizard/api/index.js","webpack://@jotforminc/form-builder/../../libs/common/src/components/ActionButtonsWizard/steps/thankyou/FillAnotherForm.js","webpack://@jotforminc/form-builder/../../libs/common/src/components/ActionButtonsWizard/steps/thankyou/DownloadPDF.js","webpack://@jotforminc/form-builder/../../libs/common/src/components/ActionButtonsWizard/steps/thankyou/EditSubmission.js","webpack://@jotforminc/form-builder/../../libs/step-wizard/src/components/WizardButton/index.js","webpack://@jotforminc/form-builder/../../libs/common/src/components/ActionButtonsWizard/components/PreviewButton.js","webpack://@jotforminc/form-builder/../../libs/common/src/components/ActionButtonsWizard/components/ColorPickerRow.js","webpack://@jotforminc/form-builder/../../libs/common/src/components/ActionButtonsWizard/steps/emails/ViewSubmission.js","webpack://@jotforminc/form-builder/../../libs/common/src/components/ActionButtonsWizard/steps/emails/CustomLink.js","webpack://@jotforminc/form-builder/../../libs/common/src/components/ActionButtonsWizard/steps/emails/SendMessage.js","webpack://@jotforminc/form-builder/../../libs/common/src/components/ActionButtonsWizard/steps/emails/EditSubmission.js","webpack://@jotforminc/form-builder/../../libs/button-field/src/utils/index.js","webpack://@jotforminc/form-builder/../../libs/button-field/src/components/ButtonField.js","webpack://@jotforminc/form-builder/../../libs/common/src/components/ActionButtonsWizard/steps/emails/FillAnotherForm/FormSettings.js","webpack://@jotforminc/form-builder/../../libs/common/src/components/ActionButtonsWizard/steps/emails/FillAnotherForm/PrefillSettings.js","webpack://@jotforminc/form-builder/../../libs/common/src/components/ActionButtonsWizard/steps/emails/FillAnotherForm/index.js","webpack://@jotforminc/form-builder/../../libs/common/src/components/ActionButtonsWizard/steps/emails/FillAgain.js","webpack://@jotforminc/form-builder/../../libs/common/src/components/ActionButtonsWizard/steps/emails/DownloadPDF.js","webpack://@jotforminc/form-builder/../../libs/common/src/components/ActionButtonsWizard/steps/emails/ViewAllSubmissions.js","webpack://@jotforminc/form-builder/../../libs/common/src/components/ActionButtonsWizard/steps/emails/CallUs.js","webpack://@jotforminc/form-builder/../../libs/common/src/utils/hooks/index.js","webpack://@jotforminc/form-builder/../../libs/common/src/components/ActionButtonsWizard/steps/thankyou/VisitURL.js","webpack://@jotforminc/form-builder/../../libs/common/src/components/ActionButtonsWizard/steps/thankyou/ViewCompletedTask.js","webpack://@jotforminc/form-builder/../../libs/common/src/components/ActionButtonsWizard/steps.js","webpack://@jotforminc/form-builder/../../libs/common/src/components/ActionButtonsWizard/components/Header.js","webpack://@jotforminc/form-builder/../../libs/common/src/components/ActionButtonsWizard/components/DeleteDialog.js","webpack://@jotforminc/form-builder/../../libs/common/src/components/ActionButtonsWizard/index.js","webpack://@jotforminc/form-builder/../../libs/common/src/components/ImageUploadModal/ImageUploadModal.js","webpack://@jotforminc/form-builder/../../libs/common/src/components/ImageUploadModal/index.js","webpack://@jotforminc/form-builder/../../libs/common/src/components/PanelHeader/index.js","webpack://@jotforminc/form-builder/../../libs/common/src/components/TextEditor/helpers/constants.js","webpack://@jotforminc/form-builder/../../libs/common/src/components/TextEditor/helpers/IO.js","webpack://@jotforminc/form-builder/../../libs/common/src/components/TextEditor/helpers/pointfree-utils.js","webpack://@jotforminc/form-builder/../../libs/common/src/components/TextEditor/helpers/utils.js","webpack://@jotforminc/form-builder/../../libs/common/src/components/TextEditor/Blots/Textbox.js","webpack://@jotforminc/form-builder/../../libs/common/src/components/TextEditor/Blots/Checkbox.js","webpack://@jotforminc/form-builder/../../libs/common/src/components/TextEditor/Blots/Radiobox.js","webpack://@jotforminc/form-builder/../../libs/common/src/components/TextEditor/Blots/Datebox.js","webpack://@jotforminc/form-builder/../../libs/common/src/components/TextEditor/Blots/Timebox.js","webpack://@jotforminc/form-builder/../../libs/common/src/components/TextEditor/Blots/SmartBreak.js","webpack://@jotforminc/form-builder/../../libs/common/src/components/TextEditor/Blots/Signaturebox.js","webpack://@jotforminc/form-builder/../../libs/common/src/components/TextEditor/Blots/Selectbox.js","webpack://@jotforminc/form-builder/../../libs/common/src/components/TextEditor/helpers/getDiffBetweenDeltaOpsByBlotId.js","webpack://@jotforminc/form-builder/../../libs/common/src/components/TextEditor/helpers/nextOptionIndex.js","webpack://@jotforminc/form-builder/../../libs/common/src/components/TextEditor/helpers/eventHandlers.js","webpack://@jotforminc/form-builder/../../libs/common/src/components/TextEditor/helpers/htmlParser.js","webpack://@jotforminc/form-builder/../../libs/common/src/components/TextEditor/helpers/blotReplacer.js","webpack://@jotforminc/form-builder/../../libs/common/src/components/TextEditor/helpers/setContent.js","webpack://@jotforminc/form-builder/../../libs/common/src/components/TextEditor/helpers/fontHandler.js","webpack://@jotforminc/form-builder/../../libs/common/src/components/TextEditor/helpers/getHtmlContent.js","webpack://@jotforminc/form-builder/../../libs/common/src/components/TextEditor/helpers/createBlots.js","webpack://@jotforminc/form-builder/../../libs/common/src/components/TextEditor/helpers/setIndexToBlots.js","webpack://@jotforminc/form-builder/../../libs/common/src/components/TextEditor/helpers/updateDeltaWithNewBlotIds.js","webpack://@jotforminc/form-builder/../../libs/common/src/components/TextEditor/helpers/setGroupToCreateBlotsByDelta.js","webpack://@jotforminc/form-builder/../../libs/common/src/components/TextEditor/index.js","webpack://@jotforminc/form-builder/../../libs/common/src/utils/text/index.js","webpack://@jotforminc/form-builder/../../libs/constants/src/countries/index.js","webpack://@jotforminc/form-builder/../../libs/constants/src/days/index.js","webpack://@jotforminc/form-builder/../../libs/constants/src/email/index.js","webpack://@jotforminc/form-builder/../../libs/constants/src/genders/index.js","webpack://@jotforminc/form-builder/../../libs/constants/src/months/index.js","webpack://@jotforminc/form-builder/../../libs/constants/src/propTypes/index.js","webpack://@jotforminc/form-builder/../../libs/constants/src/questions/index.js","webpack://@jotforminc/form-builder/../../libs/constants/src/states/index.js","webpack://@jotforminc/form-builder/../../libs/constants/src/texts/index.js","webpack://@jotforminc/form-builder/../../libs/constants/src/time/index.js","webpack://@jotforminc/form-builder/../../libs/constants/src/widgets/index.js","webpack://@jotforminc/form-builder/../../libs/drawer/src/utils/index.js","webpack://@jotforminc/form-builder/../../libs/drawer/src/components/MenuComponents/MenuItemSubheader.js","webpack://@jotforminc/form-builder/../../libs/drawer/src/components/MenuComponents/MenuItemButton.js","webpack://@jotforminc/form-builder/../../libs/drawer/src/components/MenuComponents/MenuItemIcon.js","webpack://@jotforminc/form-builder/../../libs/drawer/src/components/MenuComponents/MenuItemTitle.js","webpack://@jotforminc/form-builder/../../libs/drawer/src/components/MenuComponents/MenuItemBadge.js","webpack://@jotforminc/form-builder/../../libs/drawer/src/components/MenuComponents/MenuItemShortcut.js","webpack://@jotforminc/form-builder/../../libs/drawer/src/components/MenuComponents/MenuItem.js","webpack://@jotforminc/form-builder/../../libs/drawer/src/components/MenuComponents/MenuList.js","webpack://@jotforminc/form-builder/../../libs/drawer/src/components/MenuComponents/MenuDivider.js","webpack://@jotforminc/form-builder/../../libs/context-menu/src/components/ContextMenu.js","webpack://@jotforminc/form-builder/../../libs/custom-reqwest/src/utils/TeamsHelper.js","webpack://@jotforminc/form-builder/../../libs/custom-reqwest/src/index.js","webpack://@jotforminc/form-builder/../../libs/custom-socket-client/src/CustomWebSocket.js","webpack://@jotforminc/form-builder/../../libs/custom-socket-client/src/utils/index.js","webpack://@jotforminc/form-builder/../../libs/date-picker/src/index.js","webpack://@jotforminc/form-builder/../../../../src/icons/general/link-diagonal-broken.svg","webpack://@jotforminc/form-builder/../../libs/dialog/src/assets/svg/iconHipaaWarning.svg","webpack://@jotforminc/form-builder/../../libs/dialog/src/components/Dialog.js","webpack://@jotforminc/form-builder/../../libs/dialog/src/components/MagnetDialog.js","webpack://@jotforminc/form-builder/../../libs/dropdown/src/GroupOptionRenderer.js","webpack://@jotforminc/form-builder/../../libs/dropdown/src/index.js","webpack://@jotforminc/form-builder/../../libs/editable-pill/src/assets/svg/icon_cross.svg","webpack://@jotforminc/form-builder/../../libs/editable-pill/src/assets/svg/icon_pill.svg","webpack://@jotforminc/form-builder/../../libs/editable-pill/src/index.js","webpack://@jotforminc/form-builder/../../libs/editable/src/components/Editable.js","webpack://@jotforminc/form-builder/../../libs/email-input/src/components/Pill/index.js","webpack://@jotforminc/form-builder/../../libs/email-input/src/utils/index.js","webpack://@jotforminc/form-builder/../../libs/email-input/src/styles/index.js","webpack://@jotforminc/form-builder/../../libs/email-input/src/index.js","webpack://@jotforminc/form-builder/../../libs/empty-list/src/assets/svg/noFormsIcon.svg","webpack://@jotforminc/form-builder/../../libs/empty-list/src/assets/svg/noAppsIcon.svg","webpack://@jotforminc/form-builder/../../libs/empty-list/src/assets/svg/noTablesIcon.svg","webpack://@jotforminc/form-builder/../../libs/empty-list/src/assets/svg/noReportsIcon.svg","webpack://@jotforminc/form-builder/../../libs/empty-list/src/assets/svg/noApprovalsIcon.svg","webpack://@jotforminc/form-builder/../../libs/empty-list/src/assets/svg/noSignDocumentsIcon.svg","webpack://@jotforminc/form-builder/../../libs/empty-list/src/assets/svg/noTeamFormsIcon.svg","webpack://@jotforminc/form-builder/../../libs/empty-list/src/assets/svg/noDocumentIcon.svg","webpack://@jotforminc/form-builder/../../libs/empty-list/src/components/EmptyList.js","webpack://@jotforminc/form-builder/../../libs/empty-list/src/components/EmptyListBase.js","webpack://@jotforminc/form-builder/../../libs/empty-list/src/assets/svg/noFormsFoundIcon.svg","webpack://@jotforminc/form-builder/../../libs/empty-list/src/assets/svg/noAppsFoundIcon.svg","webpack://@jotforminc/form-builder/../../libs/empty-list/src/assets/svg/noTablesFoundIcon.svg","webpack://@jotforminc/form-builder/../../libs/empty-list/src/assets/svg/noReportsFoundIcon.svg","webpack://@jotforminc/form-builder/../../libs/empty-list/src/assets/svg/noApprovalsFoundIcon.svg","webpack://@jotforminc/form-builder/../../libs/empty-list/src/assets/svg/noSignDocumentsFoundIcon.svg","webpack://@jotforminc/form-builder/../../libs/empty-list/src/components/NotFoundList.js","webpack://@jotforminc/form-builder/../../libs/enterprise-utils/src/helpers.js","webpack://@jotforminc/form-builder/../../libs/ep-utils/src/api/index.js","webpack://@jotforminc/form-builder/../../libs/ep-utils/src/assets/icon.svg","webpack://@jotforminc/form-builder/../../libs/ep-utils/src/components/CollaborationModal/Renderers.js","webpack://@jotforminc/form-builder/../../libs/ep-utils/src/components/CollaborationModal/CollaborationModal.js","webpack://@jotforminc/form-builder/../../libs/ep-utils/src/hooks/useHubspotTracker.js","webpack://@jotforminc/form-builder/../../libs/ep-utils/src/components/FeedbackForm.js","webpack://@jotforminc/form-builder/../../libs/ep-utils/src/components/PrefilledLeadFormAside.js","webpack://@jotforminc/form-builder/../../libs/ep-utils/src/constants/assetIdentifier/index.js","webpack://@jotforminc/form-builder/../../libs/ep-utils/src/constants/assetIdentifier/abTest.js","webpack://@jotforminc/form-builder/../../libs/ep-utils/src/constants/assetIdentifier/campaign.js","webpack://@jotforminc/form-builder/../../libs/ep-utils/src/constants/assetIdentifier/product.js","webpack://@jotforminc/form-builder/../../libs/ep-utils/src/constants/assetIdentifier/automation.js","webpack://@jotforminc/form-builder/../../libs/ep-utils/src/constants/assetIdentifier/webinar.js","webpack://@jotforminc/form-builder/../../libs/ep-utils/src/constants/constants.js","webpack://@jotforminc/form-builder/../../libs/ep-utils/src/constants/gaAdFormTrackingItems .js","webpack://@jotforminc/form-builder/../../libs/ep-utils/src/constants/gaFormTrackingItems.js","webpack://@jotforminc/form-builder/../../libs/ep-utils/src/constants/leadFormMap.js","webpack://@jotforminc/form-builder/../../libs/ep-utils/src/constants/propTypes.js","webpack://@jotforminc/form-builder/../../libs/ep-utils/src/constants/sdrSources.js","webpack://@jotforminc/form-builder/../../libs/ep-utils/src/constants/texts.js","webpack://@jotforminc/form-builder/../../libs/ep-utils/src/constants/urls.js","webpack://@jotforminc/form-builder/../../libs/ep-utils/src/utils/googleAnalyticsTracking.js","webpack://@jotforminc/form-builder/../../libs/ep-utils/src/constants/leadFormModifiers.js","webpack://@jotforminc/form-builder/../../libs/ep-utils/src/utils/prefilledFormUtils.js","webpack://@jotforminc/form-builder/../../libs/ep-utils/src/utils/renderModal.js","webpack://@jotforminc/form-builder/../../libs/ep-utils/src/utils/utils.js","webpack://@jotforminc/form-builder/../../libs/feature-flag/src/components/FeatureFlag/FeatureFlag.js","webpack://@jotforminc/form-builder/../../libs/feature-toggle/src/components/Feature.js","webpack://@jotforminc/form-builder/../../libs/feature-toggle/src/components/FeatureToggle.js","webpack://@jotforminc/form-builder/../../libs/form-common/src/constants.js","webpack://@jotforminc/form-builder/../../libs/form-common/src/utils.js","webpack://@jotforminc/form-builder/../../libs/form-common/src/appointment.js","webpack://@jotforminc/form-builder/../../libs/form-common/src/components/FormLogo.js","webpack://@jotforminc/form-builder/../../libs/form-fields-menu/src/components/SelectionGroup.js","webpack://@jotforminc/form-builder/../../libs/form-fields-menu/src/components/ProtectedTag.js","webpack://@jotforminc/form-builder/../../libs/form-fields-menu/src/components/EncryptedTag.js","webpack://@jotforminc/form-builder/../../libs/form-fields-menu/src/components/Option.js","webpack://@jotforminc/form-builder/../../libs/form-fields-menu/src/components/MultipleForms.js","webpack://@jotforminc/form-builder/../../libs/form-fields-menu/src/components/SingleForm.js","webpack://@jotforminc/form-builder/../../libs/form-fields-menu/src/index.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/fields/Range.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/fields/Rating.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/fields/Ratingv2.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/fields/Separator.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/fields/Slider.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/fields/Spinner.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/fields/Textarea.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/fields/Textbox.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/fields/Widget.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/helpers/BaseInput.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/helpers/QuestionProps.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/helpers/SubLabel.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/helpers/Utils.js","webpack://@jotforminc/form-builder/../../../../src/icons/editor/text-color.svg","webpack://@jotforminc/form-builder/../../libs/form-fields/src/fields/Address.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/helpers/FormatPrice.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/helpers/MakeProductText.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/helpers/PaymentUtils.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/helpers/ImageOverlay.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/helpers/MultiSelectDropdown.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/helpers/PaymentDropdown.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/helpers/Payment/WarningMessage.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/helpers/ProductContainer.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/helpers/PaymentAPMList.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/helpers/PaymentCreditCardAndAddress.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/fields/Authnet.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/fields/Autocomp.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/fields/Autoincrement.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/fields/Appointment.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/fields/Birthdate.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/fields/Bluepay.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/fields/Bluesnap.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/fields/Braintree.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/helpers/BaseButton.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/fields/Pagebreak.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/fields/Button.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/fields/Calculation.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/fields/JotCaptcha.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/fields/ReCaptcha.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/fields/HCaptcha.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/fields/Captcha.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/fields/Cardconnect.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/fields/Chargify.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/helpers/OptionsBase.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/fields/Checkbox.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/fields/Clear.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/fields/Clickbank.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/fields/Collapse.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/fields/Timev2.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/fields/Datetime.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/fields/Dropdown.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/fields/Dwolla.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/fields/Email.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/fields/Echeck.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/fields/Eway.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/fields/Firstdata.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/fields/PaypalInvoicing.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/fields/Payu.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/fields/PayuMoney.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/fields/Pagseguro.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/fields/Moneris.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/helpers/MollieApmLists.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/fields/Mollie.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/fields/FilepickerIO.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/helpers/IconSVG.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/fields/Fileuploadv2.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/fields/Fileupload.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/fields/Footer.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/fields/Fullname.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/fields/Geolocation.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/fields/Gocardless.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/fields/Googleco.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/fields/Grading.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/fields/Head.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/fields/Helper.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/fields/Hidden.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/helpers/Link.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/helpers/DivWrapper.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/fields/Image.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/fields/Inline.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/fields/Location.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/fields/Matrix.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/fields/Number.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/fields/Onebip.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/fields/Passwordbox.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/fields/Payjunction.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/fields/Payment.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/fields/Paymentwall.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/fields/Sensepass.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/fields/Paypal.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/fields/Paypalexpress.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/helpers/PaymentTypeContainer.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/fields/Paypalpro.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/fields/Paypalcomplete.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/fields/Cybersource.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/helpers/PaypalMessages.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/helpers/PaypalSPBButtons.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/fields/PaypalSPB.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/fields/Paysafe.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/fields/Iyzico.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/fields/Phone.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/fields/Radio.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/fields/Scalev2.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/fields/Scale.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/fields/Screenshot.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/fields/Signature.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/fields/Sofort.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/fields/Skrill.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/fields/Square.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/fields/Stripe.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/fields/StripeCheckout.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/fields/StripeACH.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/fields/StripeACHManual.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/fields/Payfast.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/fields/Text.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/fields/Time.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/fields/2co.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/fields/Wepay.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/fields/Worldpay.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/fields/Worldpayus.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/fields/Divider.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/fields/Mixed.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/fields/Imagechoice.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/helpers/PaypalCommercePlatform.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/fields/Paymentmethods.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/fields/PortalPayment.js","webpack://@jotforminc/form-builder/../../libs/form-fields/src/index.js","webpack://@jotforminc/form-builder/../../../src/components/GrowthAssetManager.js","webpack://@jotforminc/form-builder/../../../src/components/GrowthAssetRenderer.js","webpack://@jotforminc/form-builder/../../../src/context/AssetManagerContext.js","webpack://@jotforminc/form-builder/../../../src/utils/namings.js","webpack://@jotforminc/form-builder/../../../../../src/components/assets/assetList/_46__46__47__46__46__47_assets_47_campaigns_47__42__42__47__42__46_js","webpack://@jotforminc/form-builder/../../../../../src/components/assets/assetList/_46__46__47__46__46__47_assets_47_promotions_47__42__42__47__42__46_js","webpack://@jotforminc/form-builder/../../../../../src/components/assets/assetList/_46__46__47__46__46__47_assets_47_launches_47__42__42__47__42__46_js","webpack://@jotforminc/form-builder/../../../../../src/components/assets/assetList/_46__46__47__46__46__47_assets_47_announcements_47__42__42__47__42__46_js","webpack://@jotforminc/form-builder/../../../src/utils/campaign.js","webpack://@jotforminc/form-builder/../../libs/hooks/src/useResize.js","webpack://@jotforminc/form-builder/../../libs/hooks/src/index.js","webpack://@jotforminc/form-builder/../../libs/icon-selector/src/components/SVGIcon/index.js","webpack://@jotforminc/form-builder/../../libs/image-upload/src/assets/svg/unsplash_icon.svg","webpack://@jotforminc/form-builder/../../libs/image-upload/src/components/IconSelector.js","webpack://@jotforminc/form-builder/../../libs/image-upload/src/components/UploadedImagesPanel.js","webpack://@jotforminc/form-builder/../../libs/image-upload/src/components/ImagePreview.js","webpack://@jotforminc/form-builder/../../libs/image-upload/src/components/LoadingScreen.js","webpack://@jotforminc/form-builder/../../libs/upload-fields/src/utils/index.js","webpack://@jotforminc/form-builder/../../libs/upload-fields/src/index.js","webpack://@jotforminc/form-builder/../../libs/image-upload/src/utils/index.js","webpack://@jotforminc/form-builder/../../libs/image-upload/src/actions/index.js","webpack://@jotforminc/form-builder/../../libs/image-upload/src/constants/index.js","webpack://@jotforminc/form-builder/../../libs/image-upload/src/components/ImageUpload.js","webpack://@jotforminc/form-builder/../../libs/limit-assets/src/constants/texts.js","webpack://@jotforminc/form-builder/../../libs/limit-assets/src/api/index.js","webpack://@jotforminc/form-builder/../../libs/limit-assets/src/constants/index.js","webpack://@jotforminc/form-builder/../../libs/limit-assets/src/utils/index.js","webpack://@jotforminc/form-builder/../../libs/loading/src/components/Loading.js","webpack://@jotforminc/form-builder/../../libs/login-flow/src/components/ErrorAlert.js","webpack://@jotforminc/form-builder/../../libs/login-flow/src/assets/close.svg","webpack://@jotforminc/form-builder/../../libs/login-flow/src/temporary-duplicate/assets/svg/icon_fb.svg","webpack://@jotforminc/form-builder/../../libs/login-flow/src/temporary-duplicate/assets/svg/icon_gl.svg","webpack://@jotforminc/form-builder/../../libs/login-flow/src/assets/icon_ms.svg","webpack://@jotforminc/form-builder/../../libs/login-flow/src/temporary-duplicate/assets/svg/icon_em.svg","webpack://@jotforminc/form-builder/../../libs/login-flow/src/assets/icon_gl_36.svg","webpack://@jotforminc/form-builder/../../libs/login-flow/src/assets/icon_fb_36.svg","webpack://@jotforminc/form-builder/../../libs/login-flow/src/temporary-duplicate/assets/svg/icon_apple_white.svg","webpack://@jotforminc/form-builder/../../libs/login-flow/src/assets/icon_ms_36.svg","webpack://@jotforminc/form-builder/../../libs/login-flow/src/assets/icon_ap_36.svg","webpack://@jotforminc/form-builder/../../libs/login-flow/src/temporary-duplicate/assets/svg/icon_back3.svg","webpack://@jotforminc/form-builder/../../libs/login-flow/src/temporary-duplicate/assets/svg/icon_back.svg","webpack://@jotforminc/form-builder/../../libs/login-flow/src/assets/idp-icons/auth0-logo-icon.svg","webpack://@jotforminc/form-builder/../../libs/login-flow/src/assets/idp-icons/azure-logo-icon.svg","webpack://@jotforminc/form-builder/../../libs/login-flow/src/assets/idp-icons/google-logo-icon.svg","webpack://@jotforminc/form-builder/../../libs/login-flow/src/assets/idp-icons/microsoft-logo-icon.svg","webpack://@jotforminc/form-builder/../../libs/login-flow/src/assets/idp-icons/okta-logo-icon.svg","webpack://@jotforminc/form-builder/../../../../src/icons/security/scan-filled.svg","webpack://@jotforminc/form-builder/../../libs/two-factor-settings/src/assets/svg/icon_gl.svg","webpack://@jotforminc/form-builder/../../libs/two-factor-settings/src/assets/svg/icon_fb.svg","webpack://@jotforminc/form-builder/../../libs/two-factor-settings/src/assets/svg/icon_apple_white.svg","webpack://@jotforminc/form-builder/../../libs/login-flow/src/assets/icon_sf_36.svg","webpack://@jotforminc/form-builder/../../libs/login-flow/src/temporary-duplicate/assets/svg/closeWithCircle.svg","webpack://@jotforminc/form-builder/../../../../src/icons/general/flag-filled.svg","webpack://@jotforminc/form-builder/../../libs/utils/src/loginSignup.js","webpack://@jotforminc/form-builder/../../libs/login-flow/src/components/OFACModal/OFACModal.js","webpack://@jotforminc/form-builder/../../libs/login-flow/src/components/OFACModal/index.js","webpack://@jotforminc/form-builder/../../libs/login-flow/src/utils/loginSignup.js","webpack://@jotforminc/form-builder/../../libs/login-flow/src/components/SalesforceButton.js","webpack://@jotforminc/form-builder/../../libs/login-flow/src/components/FacebookButton.js","webpack://@jotforminc/form-builder/../../libs/login-flow/src/components/GoogleButton.js","webpack://@jotforminc/form-builder/../../libs/login-flow/src/components/TermsAndConditionsUrls.js","webpack://@jotforminc/form-builder/../../libs/login-flow/src/components/MicrosoftButton.js","webpack://@jotforminc/form-builder/../../libs/login-flow/src/components/AppleButton.js","webpack://@jotforminc/form-builder/../../libs/login-flow/src/components/SocialButtons.js","webpack://@jotforminc/form-builder/../../libs/constants/src/initiators/index.js","webpack://@jotforminc/form-builder/../../libs/login-flow/src/api/manager.js","webpack://@jotforminc/form-builder/../../libs/login-flow/src/api/index.js","webpack://@jotforminc/form-builder/../../libs/login-flow/src/components/SignupOptions.js","webpack://@jotforminc/form-builder/../../libs/login-flow/src/constants/index.js","webpack://@jotforminc/form-builder/../../libs/login-flow/src/components/SignupWithEmail.js","webpack://@jotforminc/form-builder/../../libs/login-flow/src/assets/idp-icons/onelogin-logo-icon.svg","webpack://@jotforminc/form-builder/../../libs/login-flow/src/assets/idp-icons/private-logo-icon.svg","webpack://@jotforminc/form-builder/../../libs/login-flow/src/assets/idp-icons/icons.js","webpack://@jotforminc/form-builder/../../libs/login-flow/src/components/SSOLoginOptions.js","webpack://@jotforminc/form-builder/../../libs/login-flow/src/components/LoginOptions.js","webpack://@jotforminc/form-builder/../../libs/login-flow/src/components/SSOOptions.js","webpack://@jotforminc/form-builder/../../libs/login-flow/src/components/ForgotPassword.js","webpack://@jotforminc/form-builder/../../libs/pie-timer/src/sc/scPieTimer.js","webpack://@jotforminc/form-builder/../../libs/pie-timer/src/index.js","webpack://@jotforminc/form-builder/../../libs/verification-input/src/index.js","webpack://@jotforminc/form-builder/../../libs/two-factor-settings/src/helpers/constants.js","webpack://@jotforminc/form-builder/../../libs/two-factor-settings/src/components/styled.js","webpack://@jotforminc/form-builder/../../libs/two-factor-settings/src/sc/scTwoFactorSettings.js","webpack://@jotforminc/form-builder/../../libs/two-factor-settings/src/components/InfoBox.js","webpack://@jotforminc/form-builder/../../libs/login-flow/src/components/Checkbox.js","webpack://@jotforminc/form-builder/../../libs/login-flow/src/components/TwoFactorLogin.js","webpack://@jotforminc/form-builder/../../libs/login-flow/src/components/EmailAuthLogin.js","webpack://@jotforminc/form-builder/../../libs/login-flow/src/components/TwoFactorMethods.js","webpack://@jotforminc/form-builder/../../libs/login-flow/src/components/SocialInit.js","webpack://@jotforminc/form-builder/../../libs/login-flow/src/components/LoginError.js","webpack://@jotforminc/form-builder/../../libs/login-flow/src/components/DeleteAccountModal/DeleteAccountModalStep1.js","webpack://@jotforminc/form-builder/../../libs/login-flow/src/components/DeleteAccountModal/SocialsContainer.js","webpack://@jotforminc/form-builder/../../libs/login-flow/src/components/DeleteAccountModal/ModalHeader.js","webpack://@jotforminc/form-builder/../../libs/login-flow/src/components/DeleteAccountModal/ErrorMessage.js","webpack://@jotforminc/form-builder/../../libs/login-flow/src/components/DeleteAccountModal/DeleteAccountModalStep2.js","webpack://@jotforminc/form-builder/../../libs/login-flow/src/components/DeleteAccountModal/DeleteAccountModalStep3.js","webpack://@jotforminc/form-builder/../../libs/login-flow/src/components/DeleteAccountModal/DeleteAccountModal.js","webpack://@jotforminc/form-builder/../../libs/login-flow/src/components/DeleteAccountModal/index.js","webpack://@jotforminc/form-builder/../../libs/login-flow/src/components/ResetSuccess.js","webpack://@jotforminc/form-builder/../../libs/login-flow/src/components/SocialTermsStep.js","webpack://@jotforminc/form-builder/../../libs/login-flow/src/components/SocialTermsModal.js","webpack://@jotforminc/form-builder/../../libs/login-flow/src/utils/renderStandaloneSocialTermsModal.js","webpack://@jotforminc/form-builder/../../libs/login-flow/src/components/EmailAuthLoginModal.js","webpack://@jotforminc/form-builder/../../libs/login-flow/src/utils/renderStandaloneEmailAuthModal.js","webpack://@jotforminc/form-builder/../../libs/login-flow/src/components/VerifyAccountModal/Verification.js","webpack://@jotforminc/form-builder/../../libs/login-flow/src/components/VerifyAccountModal/index.js","webpack://@jotforminc/form-builder/../../libs/login-flow/src/components/UnusualSignup/index.js","webpack://@jotforminc/form-builder/../../libs/login-flow/src/components/SignupWithSocialOpts.js","webpack://@jotforminc/form-builder/../../libs/login-flow/src/components/RecoverAccountPage.js","webpack://@jotforminc/form-builder/../../libs/login-flow/src/components/RecoverAccountNotification.js","webpack://@jotforminc/form-builder/../../libs/login-flow/src/components/AccountRecoveryViewTicket.js","webpack://@jotforminc/form-builder/../../libs/login-flow/src/components/LoginFlow.js","webpack://@jotforminc/form-builder/../../libs/login-flow/src/components/Password/RequirementsList.js","webpack://@jotforminc/form-builder/../../libs/login-flow/src/components/Password/scPassword.js","webpack://@jotforminc/form-builder/../../libs/login-flow/src/components/Password/constants.js","webpack://@jotforminc/form-builder/../../libs/login-flow/src/components/Password/index.js","webpack://@jotforminc/form-builder/../../libs/login-flow/src/components/PasswordWithToggle/index.js","webpack://@jotforminc/form-builder/../../libs/login-flow/src/utils/helper.js","webpack://@jotforminc/form-builder/../../libs/login-flow/src/utils/layer.js","webpack://@jotforminc/form-builder/../../libs/multiselect-with-search/src/components/MultiSelectWithSearch/scMultipleSelection.js","webpack://@jotforminc/form-builder/../../libs/multiselect-with-search/src/components/MultiSelectWithSearch/index.js","webpack://@jotforminc/form-builder/../../libs/option-group/src/components/StyledComponents.js","webpack://@jotforminc/form-builder/../../libs/option-group/src/components/OptionGroup.js","webpack://@jotforminc/form-builder/../../../../src/icons/general/info.svg","webpack://@jotforminc/form-builder/../../libs/panel-components/src/components/PanelToggle/PanelToggleButton.js","webpack://@jotforminc/form-builder/../../libs/panel-components/src/components/PanelToggle/PanelToggleWrapper.js","webpack://@jotforminc/form-builder/../../libs/panel-components/src/components/PanelToggle/panelToggle.cva.js","webpack://@jotforminc/form-builder/../../libs/question-props/src/index.js","webpack://@jotforminc/form-builder/../../libs/resource-picker/src/components/FormPicker/CheckBox.js","webpack://@jotforminc/form-builder/../../libs/resource-picker/src/components/FormPicker/helpers/propTypes.js","webpack://@jotforminc/form-builder/../../libs/resource-picker/src/components/FormPicker/FormItem/index.js","webpack://@jotforminc/form-builder/../../libs/resource-picker/src/components/FormPicker/FormItem/styled.js","webpack://@jotforminc/form-builder/../../libs/resource-picker/src/components/FormPicker/helpers/defaultTheme.js","webpack://@jotforminc/form-builder/../../libs/resource-picker/src/components/PortalPicker/defaults/scPortalItem.js","webpack://@jotforminc/form-builder/../../libs/resource-picker/src/components/PortalPicker/defaults/PortalItemDefaults/TitleRenderer.js","webpack://@jotforminc/form-builder/../../libs/resource-picker/src/components/PortalPicker/defaults/PortalItemDefaults/DescriptionRenderer.js","webpack://@jotforminc/form-builder/../../libs/resource-picker/src/components/PortalPicker/defaults/PortalItemDefaults/ItemContentRenderer.js","webpack://@jotforminc/form-builder/../../libs/search-filter/src/components/constants.js","webpack://@jotforminc/form-builder/../../libs/search-filter/src/utils/index.js","webpack://@jotforminc/form-builder/../../libs/resource-picker/src/components/PortalPicker/defaults/PortalItemDefaults/constants.js","webpack://@jotforminc/form-builder/../../libs/resource-picker/src/components/PortalPicker/defaults/PortalItemDefaults/IconRenderer.js","webpack://@jotforminc/form-builder/../../libs/resource-picker/src/components/PortalPicker/defaults/PortalItem.js","webpack://@jotforminc/form-builder/../../libs/resource-picker/src/components/PortalPicker/defaults/PortalItemDefaults/commonCss.js","webpack://@jotforminc/form-builder/../../libs/resource-picker/src/assets/svg/resourcePickerIcons/noFormsFoundIcon.svg","webpack://@jotforminc/form-builder/../../libs/resource-picker/src/assets/svg/resourcePickerIcons/noAppsFoundIcon.svg","webpack://@jotforminc/form-builder/../../libs/resource-picker/src/assets/svg/resourcePickerIcons/noTablesFoundIcon.svg","webpack://@jotforminc/form-builder/../../libs/resource-picker/src/assets/svg/resourcePickerIcons/noReportsFoundIcon.svg","webpack://@jotforminc/form-builder/../../libs/resource-picker/src/assets/svg/resourcePickerIcons/noApprovalsFoundIcon.svg","webpack://@jotforminc/form-builder/../../libs/resource-picker/src/assets/svg/resourcePickerIcons/noSignDocumentsFoundIcon.svg","webpack://@jotforminc/form-builder/../../libs/resource-picker/src/assets/svg/resourcePickerIcons/noBoardsFoundIcon.svg","webpack://@jotforminc/form-builder/../../libs/resource-picker/src/assets/svg/resourcePickerIcons/noFormsIcon.svg","webpack://@jotforminc/form-builder/../../libs/resource-picker/src/assets/svg/resourcePickerIcons/noAppsIcon.svg","webpack://@jotforminc/form-builder/../../libs/resource-picker/src/assets/svg/resourcePickerIcons/noTablesIcon.svg","webpack://@jotforminc/form-builder/../../libs/resource-picker/src/assets/svg/resourcePickerIcons/noReportsIcon.svg","webpack://@jotforminc/form-builder/../../libs/resource-picker/src/assets/svg/resourcePickerIcons/noApprovalsIcon.svg","webpack://@jotforminc/form-builder/../../libs/resource-picker/src/assets/svg/resourcePickerIcons/noSignDocumentsIcon.svg","webpack://@jotforminc/form-builder/../../libs/resource-picker/src/assets/svg/resourcePickerIcons/noBoardsIcon.svg","webpack://@jotforminc/form-builder/../../libs/resource-picker/src/components/PortalPicker/defaults/scPortalOption.js","webpack://@jotforminc/form-builder/../../libs/resource-picker/src/components/PortalPicker/defaults/PortalOption.js","webpack://@jotforminc/form-builder/../../libs/resource-picker/src/components/ResourcePicker/items/Sheet/index.js","webpack://@jotforminc/form-builder/../../libs/resource-picker/src/components/ResourcePicker/items/Reports/index.js","webpack://@jotforminc/form-builder/../../libs/resource-picker/src/components/ResourcePicker/items/Approval/index.js","webpack://@jotforminc/form-builder/../../libs/resource-picker/src/components/ResourcePicker/items/Sign/styles.js","webpack://@jotforminc/form-builder/../../libs/resource-picker/src/components/ResourcePicker/items/Sign/index.js","webpack://@jotforminc/form-builder/../../libs/resource-picker/src/components/ResourcePicker/items/Operation/index.js","webpack://@jotforminc/form-builder/../../libs/resource-picker/src/components/ResourcePicker/items/Board/index.js","webpack://@jotforminc/form-builder/../../libs/resource-picker/src/components/ResourcePicker/constants.js","webpack://@jotforminc/form-builder/../../libs/resource-picker/src/components/FormPicker/FormList/index.js","webpack://@jotforminc/form-builder/../../libs/resource-picker/src/components/FormPicker/ConditionalModal.js","webpack://@jotforminc/form-builder/../../libs/resource-picker/src/components/ResourcePicker/index.js","webpack://@jotforminc/form-builder/../../libs/resource-picker/src/constants/index.js","webpack://@jotforminc/form-builder/../../libs/resource-picker/src/utils/moment.js","webpack://@jotforminc/form-builder/../../libs/resource-picker/src/utils/hooks.js","webpack://@jotforminc/form-builder/../../libs/resource-picker/src/utils/utils.js","webpack://@jotforminc/form-builder/../../libs/submission-table-modal/src/components/SubmissionTableModal.js","webpack://@jotforminc/form-builder/../../libs/image-upload-modal/src/index.js","webpack://@jotforminc/form-builder/../../libs/rich-text-editor/src/components/DeleteSubmissionTableDialog.js","webpack://@jotforminc/form-builder/../../libs/rich-text-editor/src/editorHelpers.js","webpack://@jotforminc/form-builder/../../libs/rich-text-editor/src/index.js","webpack://@jotforminc/form-builder/../../libs/router-bridge/src/jfrouter.js","webpack://@jotforminc/form-builder/../../libs/safe-lazy-import/src/components/ErrorPage.js","webpack://@jotforminc/form-builder/../../libs/safe-lazy-import/src/utils/safeLazy.js","webpack://@jotforminc/form-builder/../../libs/schedule-panel/src/components/Dropdown.js","webpack://@jotforminc/form-builder/../../libs/schedule-panel/src/scIndex.js","webpack://@jotforminc/form-builder/../../libs/schedule-panel/src/components/Toggle.js","webpack://@jotforminc/form-builder/../../libs/schedule-panel/src/index.js","webpack://@jotforminc/form-builder/../../libs/search-input/src/index.js","webpack://@jotforminc/form-builder/../../libs/share-panel/src/components/Dropdown.js","webpack://@jotforminc/form-builder/../../libs/share-panel/src/components/ResourcePicker.js","webpack://@jotforminc/form-builder/../../libs/ep-share-panel/src/assets/ssoAdLegacy.svg","webpack://@jotforminc/form-builder/../../../../src/icons/documents/document-csv-filled.svg","webpack://@jotforminc/form-builder/../../libs/share-panel/src/assets/svg/iconPrefillEdit.svg","webpack://@jotforminc/form-builder/../../libs/share-panel/src/assets/svg/iconPrefillEditWhite.svg","webpack://@jotforminc/form-builder/../../libs/share-panel/src/assets/svg/assign_to_organization.svg","webpack://@jotforminc/form-builder/../../../../src/icons/communication/envelope-closed-check-filled.svg","webpack://@jotforminc/form-builder/../../../../src/icons/communication/envelope-closed-xmark-filled.svg","webpack://@jotforminc/form-builder/../../../../src/icons/products/product-tables-filled.svg","webpack://@jotforminc/form-builder/../../libs/share-panel/src/assets/svg/iconManage.svg","webpack://@jotforminc/form-builder/../../libs/share-panel/src/assets/svg/icon_scheduleReminder.svg","webpack://@jotforminc/form-builder/../../libs/share-panel/src/assets/svg/icon_scheduledReminderIndicator.svg","webpack://@jotforminc/form-builder/../../libs/share-panel/src/assets/svg/actionRequired.svg","webpack://@jotforminc/form-builder/../../libs/share-panel/src/assets/svg/icon_shared_with_no_one.svg","webpack://@jotforminc/form-builder/../../libs/share-panel/src/components/Section.js","webpack://@jotforminc/form-builder/../../libs/share-panel/src/containers/sections/Permission.js","webpack://@jotforminc/form-builder/../../libs/share-panel/src/containers/sections/LinkExpire.js","webpack://@jotforminc/form-builder/../../libs/share-panel/src/containers/sections/LinkSettings.js","webpack://@jotforminc/form-builder/../../libs/ep-share-panel/src/components/SsoAccessLegacyBanner/SsoAccessLegacyBanner.js","webpack://@jotforminc/form-builder/../../libs/share-panel/src/components/SSOAccess.js","webpack://@jotforminc/form-builder/../../libs/share-panel/src/components/CompanyTextBox.js","webpack://@jotforminc/form-builder/../../libs/share-panel/src/components/OrganizationAccess.js","webpack://@jotforminc/form-builder/../../libs/share-panel/src/components/CompanyAccess.js","webpack://@jotforminc/form-builder/../../libs/share-panel/src/containers/sections/AccessSettings.js","webpack://@jotforminc/form-builder/../../libs/share-panel/src/sc/scSettings.js","webpack://@jotforminc/form-builder/../../libs/share-panel/src/containers/sections/ResourceSection.js","webpack://@jotforminc/form-builder/../../libs/share-panel/src/containers/modals/Settings.js","webpack://@jotforminc/form-builder/../../libs/share-panel/src/containers/sections/Header.js","webpack://@jotforminc/form-builder/../../libs/share-panel/src/components/AvatarHolder.js","webpack://@jotforminc/form-builder/../../libs/dropdown-with-extra-elements/src/components/OptionRenderer.js","webpack://@jotforminc/form-builder/../../libs/dropdown-with-extra-elements/src/components/ContainerRenderer.js","webpack://@jotforminc/form-builder/../../libs/dropdown-with-extra-elements/src/index.js","webpack://@jotforminc/form-builder/../../libs/share-panel/src/components/DropdownWithDetails.js","webpack://@jotforminc/form-builder/../../libs/share-panel/src/containers/modals/AssignToOrganizationModal.js","webpack://@jotforminc/form-builder/../../libs/share-panel/src/containers/sections/Invite.js","webpack://@jotforminc/form-builder/../../libs/share-panel/src/sc/scUserList.js","webpack://@jotforminc/form-builder/../../libs/share-panel/src/components/UserListItemRenderer.js","webpack://@jotforminc/form-builder/../../libs/share-panel/src/components/WarningMessage.js","webpack://@jotforminc/form-builder/../../libs/share-panel/src/containers/sections/InviteByAppUserList.js","webpack://@jotforminc/form-builder/../../libs/share-panel/src/containers/sections/InviteByAppPrefill.js","webpack://@jotforminc/form-builder/../../libs/share-panel/src/components/DropdownButton.js","webpack://@jotforminc/form-builder/../../libs/share-panel/src/helpers/FetchAppUsersWithCache.js","webpack://@jotforminc/form-builder/../../libs/share-panel/src/containers/sections/InviteByApp.js","webpack://@jotforminc/form-builder/../../libs/share-panel/src/containers/modals/RevokeAccess.js","webpack://@jotforminc/form-builder/../../libs/share-panel/src/containers/modals/RemoveScheduledReminder.js","webpack://@jotforminc/form-builder/../../libs/share-panel/src/sc/scScheduleReminder.js","webpack://@jotforminc/form-builder/../../libs/share-panel/src/containers/modals/ScheduleReminder.js","webpack://@jotforminc/form-builder/../../libs/share-panel/src/containers/modals/ActionRequired.js","webpack://@jotforminc/form-builder/../../libs/share-panel/src/components/AssigneeModalControlBar.js","webpack://@jotforminc/form-builder/../../libs/share-panel/src/containers/modals/AssigneeResources.js","webpack://@jotforminc/form-builder/../../libs/share-panel/src/containers/Assignee.js","webpack://@jotforminc/form-builder/../../libs/share-panel/src/containers/AssigneeRow.js","webpack://@jotforminc/form-builder/../../libs/share-panel/src/sc/scSharedWithNoOne.js","webpack://@jotforminc/form-builder/../../libs/share-panel/src/containers/modals/AssigneeList.js","webpack://@jotforminc/form-builder/../../libs/ep-share-panel/src/components/AssignToOrganizationModal.js","webpack://@jotforminc/form-builder/../../libs/ep-share-panel/src/testers/AssignToEveryoneAbTester.js","webpack://@jotforminc/form-builder/../../libs/share-panel/src/containers/modals/RevokeFromOrganizationModal.js","webpack://@jotforminc/form-builder/../../libs/share-panel/src/containers/sections/AssignToOrganization.js","webpack://@jotforminc/form-builder/../../libs/share-panel/src/sc/scInvitePredefinedUsersSection.js","webpack://@jotforminc/form-builder/../../libs/share-panel/src/containers/sections/InvitePredefinedUsersSection.js","webpack://@jotforminc/form-builder/../../libs/share-panel/src/helpers/apps.js","webpack://@jotforminc/form-builder/../../libs/share-panel/src/components/index.js","webpack://@jotforminc/form-builder/../../libs/ep-share-panel/src/components/CustomDomainTooltip/CustomDomainTooltipAlt.js","webpack://@jotforminc/form-builder/../../libs/ep-share-panel/src/components/CustomDomainTooltip/WhiteLabelingModal.js","webpack://@jotforminc/form-builder/../../libs/ep-share-panel/src/components/CustomDomainTooltip/FormWhiteLabelingModal.js","webpack://@jotforminc/form-builder/../../libs/ep-share-panel/src/components/CustomDomainTooltip/FormCustomDomainTooltip.js","webpack://@jotforminc/form-builder/../../libs/ep-share-panel/src/testers/CustomDomainTooltipAbTester.js","webpack://@jotforminc/form-builder/../../libs/share-panel/src/sc/scGenerateNewLink.js","webpack://@jotforminc/form-builder/../../libs/share-panel/src/containers/modals/GenerateNewLink.js","webpack://@jotforminc/form-builder/../../libs/modals/src/components/UserSlugModal/components/ModalHeader.js","webpack://@jotforminc/form-builder/../../libs/modals/src/components/UserSlugModal/components/ModalFooter.js","webpack://@jotforminc/form-builder/../../libs/modals/src/components/UserSlugModal/components/ModalDialog.js","webpack://@jotforminc/form-builder/../../libs/modals/src/components/UserSlugModal/components/ModalContent.js","webpack://@jotforminc/form-builder/../../libs/modals/src/components/UserSlugModal/components/FormModal.js","webpack://@jotforminc/form-builder/../../libs/modals/src/components/UserSlugModal/components/ThankYouModal.js","webpack://@jotforminc/form-builder/../../libs/modals/src/components/UserSlugModal/components/UpdateModal.js","webpack://@jotforminc/form-builder/../../libs/modals/src/components/UserSlugModal/index.js","webpack://@jotforminc/form-builder/../../libs/share-panel/src/components/ShareLinkRenderer.js","webpack://@jotforminc/form-builder/../../libs/share-panel/src/components/SettingsButton.js","webpack://@jotforminc/form-builder/../../libs/share-panel/src/sc/scAccessType.js","webpack://@jotforminc/form-builder/../../libs/share-panel/src/components/AccessType.js","webpack://@jotforminc/form-builder/../../libs/share-panel/src/containers/sections/Link.js","webpack://@jotforminc/form-builder/../../libs/share-panel/src/helpers/constants.js","webpack://@jotforminc/form-builder/../../libs/share-panel/src/helpers/hooks.js","webpack://@jotforminc/form-builder/../../libs/share-panel/src/helpers/layer.js","webpack://@jotforminc/form-builder/../../libs/share-panel/src/helpers/texts.js","webpack://@jotforminc/form-builder/../../libs/share-panel/src/helpers/utils.js","webpack://@jotforminc/form-builder/../../libs/share-panel/src/sc/scAssigneeList.js","webpack://@jotforminc/form-builder/../../libs/share-panel/src/sc/scIndex.js","webpack://@jotforminc/form-builder/../../libs/share-panel/src/sc/scRevokeAccess.js","webpack://@jotforminc/form-builder/../../../../src/icons/arrows/caret-down-bars.svg","webpack://@jotforminc/form-builder/../../../../src/icons/products/product-payment-form-filled.svg","webpack://@jotforminc/form-builder/../../libs/smart-list/src/components/SmartList/helpers/defaultTheme.js","webpack://@jotforminc/form-builder/../../libs/smart-list/src/components/SmartList/ControlBar/scControlBar.js","webpack://@jotforminc/form-builder/../../libs/smart-list/src/components/SmartList/ControlBar/CheckBox.js","webpack://@jotforminc/form-builder/../../libs/smart-list/src/components/SmartList/ControlBar/SearchInput.js","webpack://@jotforminc/form-builder/../../libs/smart-list/src/components/SmartList/utils.js","webpack://@jotforminc/form-builder/../../libs/smart-list/src/components/SmartList/ControlBar/Dropdown.js","webpack://@jotforminc/form-builder/../../libs/smart-list/src/components/SmartList/ControlBar/SortMenu.js","webpack://@jotforminc/form-builder/../../libs/smart-list/src/components/SmartList/ControlBar/FilterForm.js","webpack://@jotforminc/form-builder/../../libs/smart-list/src/components/SmartList/ControlBar/index.js","webpack://@jotforminc/form-builder/../../libs/smart-list/src/components/SmartList/FormLoadingSkeleton.js","webpack://@jotforminc/form-builder/../../libs/smart-list/src/components/SmartList/hooks.js","webpack://@jotforminc/form-builder/../../libs/smart-list/src/components/SmartList/index.js","webpack://@jotforminc/form-builder/../../libs/storage-helper/src/constants.js","webpack://@jotforminc/form-builder/../../libs/storage-helper/src/index.js","webpack://@jotforminc/form-builder/../../libs/styled-copy-button/src/index.js","webpack://@jotforminc/form-builder/../../libs/styled-modal/src/components/StyledModal/styled.js","webpack://@jotforminc/form-builder/../../libs/styled-modal/src/components/StyledModal/index.js","webpack://@jotforminc/form-builder/../../../../src/icons/alert-feedback/thumbs-up-down.svg","webpack://@jotforminc/form-builder/../../../../src/icons/arrows/angle-down.svg","webpack://@jotforminc/form-builder/../../../../src/icons/arrows/angle-left.svg","webpack://@jotforminc/form-builder/../../../../src/icons/arrows/angle-right.svg","webpack://@jotforminc/form-builder/../../../../src/icons/arrows/angle-up.svg","webpack://@jotforminc/form-builder/../../../../src/icons/arrows/angles-selector-slash-horizontal.svg","webpack://@jotforminc/form-builder/../../../../src/icons/arrows/arrow-down-to-line.svg","webpack://@jotforminc/form-builder/../../../../src/icons/arrows/arrow-right.svg","webpack://@jotforminc/form-builder/../../../../src/icons/arrows/arrow-rotate-right.svg","webpack://@jotforminc/form-builder/../../../../src/icons/arrows/arrow-up-from-bracket.svg","webpack://@jotforminc/form-builder/../../../../src/icons/arrows/arrow-up-right-from-square-sm.svg","webpack://@jotforminc/form-builder/../../../../src/icons/arrows/arrow-up-to-line.svg","webpack://@jotforminc/form-builder/../../../../src/icons/arrows/arrows-rotate.svg","webpack://@jotforminc/form-builder/../../../../src/icons/arrows/chevron-down.svg","webpack://@jotforminc/form-builder/../../../../src/icons/arrows/chevron-left.svg","webpack://@jotforminc/form-builder/../../../../src/icons/arrows/chevron-right.svg","webpack://@jotforminc/form-builder/../../../../src/icons/arrows/turn-arrow-short-right-filled.svg","webpack://@jotforminc/form-builder/../../../../src/icons/brand/salesforce-filled.svg","webpack://@jotforminc/form-builder/../../../../src/icons/communication/annotation-info-filled.svg","webpack://@jotforminc/form-builder/../../../../src/icons/communication/envelope-closed-filled.svg","webpack://@jotforminc/form-builder/../../../../src/icons/communication/message-ellipsis-pencil-filled.svg","webpack://@jotforminc/form-builder/../../../../src/icons/communication/message-filled.svg","webpack://@jotforminc/form-builder/../../../../src/icons/communication/message-star-filled.svg","webpack://@jotforminc/form-builder/../../../../src/icons/communication/paper-plane-filled.svg","webpack://@jotforminc/form-builder/../../../../src/icons/communication/phone-filled.svg","webpack://@jotforminc/form-builder/../../../../src/icons/documents/document-pdf-filled.svg","webpack://@jotforminc/form-builder/../../../../src/icons/editor/arrow-pointer-box-filled.svg","webpack://@jotforminc/form-builder/../../../../src/icons/editor/heading-square-filled.svg","webpack://@jotforminc/form-builder/../../../../src/icons/editor/list-check.svg","webpack://@jotforminc/form-builder/../../../../src/icons/editor/palette-filled.svg","webpack://@jotforminc/form-builder/../../../../src/icons/editor/pen-sign-filled.svg","webpack://@jotforminc/form-builder/../../../../src/icons/editor/pencil-filled.svg","webpack://@jotforminc/form-builder/../../../../src/icons/editor/pencil-line-filled.svg","webpack://@jotforminc/form-builder/../../../../src/icons/editor/type-square-filled.svg","webpack://@jotforminc/form-builder/../../../../src/icons/editor/wand-magic-filled.svg","webpack://@jotforminc/form-builder/../../../../src/icons/finance/cart-shopping-filled.svg","webpack://@jotforminc/form-builder/../../../../src/icons/finance/coins-filled.svg","webpack://@jotforminc/form-builder/../../../../src/icons/finance/coins-stacked-filled.svg","webpack://@jotforminc/form-builder/../../../../src/icons/finance/credit-card-filled.svg","webpack://@jotforminc/form-builder/../../../../src/icons/finance/credit-card-xmark-filled.svg","webpack://@jotforminc/form-builder/../../../../src/icons/finance/tag-percent-filled.svg","webpack://@jotforminc/form-builder/../../../../src/icons/forms-files/clipboard-plus-filled.svg","webpack://@jotforminc/form-builder/../../../../src/icons/forms-files/file-filled.svg","webpack://@jotforminc/form-builder/../../../../src/icons/forms-files/folder-caret-up-filled.svg","webpack://@jotforminc/form-builder/../../../../src/icons/forms-files/form-arrow-right-filled.svg","webpack://@jotforminc/form-builder/../../../../src/icons/forms-files/form-filled.svg","webpack://@jotforminc/form-builder/../../../../src/icons/forms-files/form-plus-filled.svg","webpack://@jotforminc/form-builder/../../../../src/icons/general/asterisk.svg","webpack://@jotforminc/form-builder/../../../../src/icons/general/buildings.svg","webpack://@jotforminc/form-builder/../../../../src/icons/general/captcha-filled.svg","webpack://@jotforminc/form-builder/../../../../src/icons/general/caret-up-1-9.svg","webpack://@jotforminc/form-builder/../../../../src/icons/general/chart-bar-filled.svg","webpack://@jotforminc/form-builder/../../../../src/icons/general/check-circle-filled.svg","webpack://@jotforminc/form-builder/../../../../src/icons/general/check-circle.svg","webpack://@jotforminc/form-builder/../../../../src/icons/general/check-sm.svg","webpack://@jotforminc/form-builder/../../../../src/icons/general/check-square-filled.svg","webpack://@jotforminc/form-builder/../../../../src/icons/general/check.svg","webpack://@jotforminc/form-builder/../../../../src/icons/general/circle-lg.svg","webpack://@jotforminc/form-builder/../../../../src/icons/general/conditional-branch-filled.svg","webpack://@jotforminc/form-builder/../../../../src/icons/general/copy-filled.svg","webpack://@jotforminc/form-builder/../../../../src/icons/general/divider-filled.svg","webpack://@jotforminc/form-builder/../../../../src/icons/general/dropdown-filled.svg","webpack://@jotforminc/form-builder/../../../../src/icons/general/ellipsis-vertical.svg","webpack://@jotforminc/form-builder/../../../../src/icons/general/exclamation-circle-filled.svg","webpack://@jotforminc/form-builder/../../../../src/icons/general/exclamation-circle.svg","webpack://@jotforminc/form-builder/../../../../src/icons/general/exclamation-triangle-filled.svg","webpack://@jotforminc/form-builder/../../../../src/icons/general/exclamation-triangle.svg","webpack://@jotforminc/form-builder/../../../../src/icons/general/exclamation.svg","webpack://@jotforminc/form-builder/../../../../src/icons/general/eye-filled.svg","webpack://@jotforminc/form-builder/../../../../src/icons/general/eye-slash-filled.svg","webpack://@jotforminc/form-builder/../../../../src/icons/general/fill-in-the-blank.svg","webpack://@jotforminc/form-builder/../../../../src/icons/general/gear-filled.svg","webpack://@jotforminc/form-builder/../../../../src/icons/general/grid-dots-vertical.svg","webpack://@jotforminc/form-builder/../../../../src/icons/general/heart-filled.svg","webpack://@jotforminc/form-builder/../../../../src/icons/general/info-circle-filled.svg","webpack://@jotforminc/form-builder/../../../../src/icons/general/info-circle.svg","webpack://@jotforminc/form-builder/../../../../src/icons/general/input-text-long.svg","webpack://@jotforminc/form-builder/../../../../src/icons/general/input-text-short.svg","webpack://@jotforminc/form-builder/../../../../src/icons/general/label-send-filled.svg","webpack://@jotforminc/form-builder/../../../../src/icons/general/link-diagonal.svg","webpack://@jotforminc/form-builder/../../../../src/icons/general/location-pin-filled.svg","webpack://@jotforminc/form-builder/../../../../src/icons/general/magnifying-glass.svg","webpack://@jotforminc/form-builder/../../../../src/icons/general/minus.svg","webpack://@jotforminc/form-builder/../../../../src/icons/general/number-square-filled.svg","webpack://@jotforminc/form-builder/../../../../src/icons/general/pencil-to-square.svg","webpack://@jotforminc/form-builder/../../../../src/icons/general/plus-circle-filled.svg","webpack://@jotforminc/form-builder/../../../../src/icons/general/plus-sm.svg","webpack://@jotforminc/form-builder/../../../../src/icons/general/plus.svg","webpack://@jotforminc/form-builder/../../../../src/icons/general/puzzle-piece-filled.svg","webpack://@jotforminc/form-builder/../../../../src/icons/general/question-circle-filled.svg","webpack://@jotforminc/form-builder/../../../../src/icons/general/rocket-filled.svg","webpack://@jotforminc/form-builder/../../../../src/icons/general/rocket-square-broken-filled.svg","webpack://@jotforminc/form-builder/../../../../src/icons/general/single-selection-filled.svg","webpack://@jotforminc/form-builder/../../../../src/icons/general/star-filled.svg","webpack://@jotforminc/form-builder/../../../../src/icons/general/star-plus-filled.svg","webpack://@jotforminc/form-builder/../../../../src/icons/general/table.svg","webpack://@jotforminc/form-builder/../../../../src/icons/general/text.svg","webpack://@jotforminc/form-builder/../../../../src/icons/general/trash-exclamation-filled.svg","webpack://@jotforminc/form-builder/../../../../src/icons/general/trash-filled.svg","webpack://@jotforminc/form-builder/../../../../src/icons/general/xmark-sm.svg","webpack://@jotforminc/form-builder/../../../../src/icons/general/xmark.svg","webpack://@jotforminc/form-builder/../../../../src/icons/layout/arrows-up-down-to-line.svg","webpack://@jotforminc/form-builder/../../../../src/icons/layout/layers-filled.svg","webpack://@jotforminc/form-builder/../../../../src/icons/media/bolt-filled.svg","webpack://@jotforminc/form-builder/../../../../src/icons/media/image-check-filled.svg","webpack://@jotforminc/form-builder/../../../../src/icons/media/image-filled.svg","webpack://@jotforminc/form-builder/../../../../src/icons/media/triangle-circle-filled.svg","webpack://@jotforminc/form-builder/../../../../src/icons/products/ai-color.svg","webpack://@jotforminc/form-builder/../../../../src/icons/products/ai-filled.svg","webpack://@jotforminc/form-builder/../../../../src/icons/products/product-approvals-color.svg","webpack://@jotforminc/form-builder/../../../../src/icons/products/product-approvals-filled.svg","webpack://@jotforminc/form-builder/../../../../src/icons/products/product-approvals-mono.svg","webpack://@jotforminc/form-builder/../../../../src/icons/products/product-apps-mono.svg","webpack://@jotforminc/form-builder/../../../../src/icons/products/product-form-builder-color-border.svg","webpack://@jotforminc/form-builder/../../../../src/icons/products/product-form-card-color-border.svg","webpack://@jotforminc/form-builder/../../../../src/icons/products/product-sign-color-border.svg","webpack://@jotforminc/form-builder/../../../../src/icons/products/product-sign-color.svg","webpack://@jotforminc/form-builder/../../../../src/icons/products/product-sign-mono.svg","webpack://@jotforminc/form-builder/../../../../src/icons/products/product-tables-mono.svg","webpack://@jotforminc/form-builder/../../../../src/icons/security/hipaa-filled.svg","webpack://@jotforminc/form-builder/../../../../src/icons/security/key-filled.svg","webpack://@jotforminc/form-builder/../../../../src/icons/security/lock-filled.svg","webpack://@jotforminc/form-builder/../../../../src/icons/security/shield-lock.svg","webpack://@jotforminc/form-builder/../../../../src/icons/security/unlock-filled.svg","webpack://@jotforminc/form-builder/../../../../src/icons/technology/desktop.svg","webpack://@jotforminc/form-builder/../../../../src/icons/technology/mobile-bell.svg","webpack://@jotforminc/form-builder/../../../../src/icons/technology/mobile.svg","webpack://@jotforminc/form-builder/../../../../src/icons/technology/tablet.svg","webpack://@jotforminc/form-builder/../../../../src/icons/time-date/calendar-check-filled.svg","webpack://@jotforminc/form-builder/../../../../src/icons/time-date/calendar-filled.svg","webpack://@jotforminc/form-builder/../../../../src/icons/time-date/clock-filled.svg","webpack://@jotforminc/form-builder/../../../../src/icons/users/circle-user-filled.svg","webpack://@jotforminc/form-builder/../../../../src/icons/users/face-smile-filled.svg","webpack://@jotforminc/form-builder/../../../../src/icons/users/face-smile.svg","webpack://@jotforminc/form-builder/../../../../src/icons/users/square-user-filled.svg","webpack://@jotforminc/form-builder/../../../../src/icons/users/user-filled.svg","webpack://@jotforminc/form-builder/../../../../src/icons/users/user-woman-filled.svg","webpack://@jotforminc/form-builder/../../../../src/icons/users/users-filled.svg","webpack://@jotforminc/form-builder/../../../../src/logos/integration/salesforce-logomark-color.svg","webpack://@jotforminc/form-builder/../../../../src/logos/payment/2checkout-logomark-light.svg","webpack://@jotforminc/form-builder/../../../../src/logos/payment/afterpay-logomark-color.svg","webpack://@jotforminc/form-builder/../../../../src/logos/payment/afterpay-logomark-dark.svg","webpack://@jotforminc/form-builder/../../../../src/logos/payment/applegooglepay-color.svg","webpack://@jotforminc/form-builder/../../../../src/logos/payment/applepay-logomark-color.svg","webpack://@jotforminc/form-builder/../../../../src/logos/payment/authorizenet-logomark-light.svg","webpack://@jotforminc/form-builder/../../../../src/logos/payment/bluepay-logomark-light.svg","webpack://@jotforminc/form-builder/../../../../src/logos/payment/bluesnap-logomark-light.svg","webpack://@jotforminc/form-builder/../../../../src/logos/payment/braintree-logomark-light.svg","webpack://@jotforminc/form-builder/../../../../src/logos/payment/cardconnect-logomark-light.svg","webpack://@jotforminc/form-builder/../../../../src/logos/payment/cashapp-logomark-color.svg","webpack://@jotforminc/form-builder/../../../../src/logos/payment/chargify-logomark-light.svg","webpack://@jotforminc/form-builder/../../../../src/logos/payment/clickbank-logomark-light.svg","webpack://@jotforminc/form-builder/../../../../src/logos/payment/cybersource-logomark-light.svg","webpack://@jotforminc/form-builder/../../../../src/logos/payment/echeck-logomark-light.svg","webpack://@jotforminc/form-builder/../../../../src/logos/payment/eway-logomark-light.svg","webpack://@jotforminc/form-builder/../../../../src/logos/payment/firstdata-logomark-light.svg","webpack://@jotforminc/form-builder/../../../../src/logos/payment/gocardless-logomark-color.svg","webpack://@jotforminc/form-builder/../../../../src/logos/payment/googlepay-logomark-color.svg","webpack://@jotforminc/form-builder/../../../../src/logos/payment/klarna-logomark-dark.svg","webpack://@jotforminc/form-builder/../../../../src/logos/payment/mollie-logomark-light.svg","webpack://@jotforminc/form-builder/../../../../src/logos/payment/moneris-logomark-light.svg","webpack://@jotforminc/form-builder/../../../../src/logos/payment/onebip-logomark-light.svg","webpack://@jotforminc/form-builder/../../../../src/logos/payment/pagseguro-logomark-color.svg","webpack://@jotforminc/form-builder/../../../../src/logos/payment/payfast-dark.svg","webpack://@jotforminc/form-builder/../../../../src/logos/payment/payjunction-logomark-light.svg","webpack://@jotforminc/form-builder/../../../../src/logos/payment/paymentwall-logomark-light.svg","webpack://@jotforminc/form-builder/../../../../src/logos/payment/paypal-business-logomark-color.svg","webpack://@jotforminc/form-builder/../../../../src/logos/payment/paypal-checkout-logomark-color.svg","webpack://@jotforminc/form-builder/../../../../src/logos/payment/paypal-invoicing-logomark-color.svg","webpack://@jotforminc/form-builder/../../../../src/logos/payment/paypal-personal-logomark-color.svg","webpack://@jotforminc/form-builder/../../../../src/logos/payment/paypal-pro-logomark-color.svg","webpack://@jotforminc/form-builder/../../../../src/logos/payment/paysafe-logomark-light.svg","webpack://@jotforminc/form-builder/../../../../src/logos/payment/payu-india-logomark-color.svg","webpack://@jotforminc/form-builder/../../../../src/logos/payment/payu-logomark-light.svg","webpack://@jotforminc/form-builder/../../../../src/logos/payment/purchaseorder-logomark-dark.svg","webpack://@jotforminc/form-builder/../../../../src/logos/payment/sensepass-logomark-color.svg","webpack://@jotforminc/form-builder/../../../../src/logos/payment/skrill-logomark-light.svg","webpack://@jotforminc/form-builder/../../../../src/logos/payment/square-ach-logomark-dark.svg","webpack://@jotforminc/form-builder/../../../../src/logos/payment/square-logomark-light.svg","webpack://@jotforminc/form-builder/../../../../src/logos/payment/stripe-ach-logomark-light.svg","webpack://@jotforminc/form-builder/../../../../src/logos/payment/stripe-achm-logomark-light.svg","webpack://@jotforminc/form-builder/../../../../src/logos/payment/stripe-checkout-logomark-light.svg","webpack://@jotforminc/form-builder/../../../../src/logos/payment/stripe-logomark-light.svg","webpack://@jotforminc/form-builder/../../../../src/logos/payment/venmo-logomark-light.svg","webpack://@jotforminc/form-builder/../../../../src/logos/payment/worldpay-uk-logomark-light.svg","webpack://@jotforminc/form-builder/../../../../src/logos/payment/worldpay-us-logomark-light.svg","webpack://@jotforminc/form-builder/../../libs/tabs/src/tab-list/Tab.js","webpack://@jotforminc/form-builder/../../libs/tabs/src/tab-list/TabList.js","webpack://@jotforminc/form-builder/../../libs/tabs/src/tab-list/components/Wrapper.js","webpack://@jotforminc/form-builder/../../libs/tabs/src/tab-list/components/TabListContainer.js","webpack://@jotforminc/form-builder/../../libs/tabs/src/tab-list/components/TabButtonContainer.js","webpack://@jotforminc/form-builder/../../libs/tabs/src/tab-list/components/TabButton.js","webpack://@jotforminc/form-builder/../../libs/tabs/src/tab-list/TabListWithStyles.js","webpack://@jotforminc/form-builder/../../libs/toggle/src/index.js","webpack://@jotforminc/form-builder/../../libs/tooltip/src/components/index.js","webpack://@jotforminc/form-builder/../../libs/translation/src/domHelper.js","webpack://@jotforminc/form-builder/../../libs/translation/src/Translation.js","webpack://@jotforminc/form-builder/../../libs/translation/src/constants/index.js","webpack://@jotforminc/form-builder/../../libs/translation/src/utils.js","webpack://@jotforminc/form-builder/../../libs/translation/src/hof.js","webpack://@jotforminc/form-builder/../../libs/translation/src/global.js","webpack://@jotforminc/form-builder/../../libs/translation/src/index.js","webpack://@jotforminc/form-builder/../../libs/two-button-popup/src/components/TwoButtonPopup.js","webpack://@jotforminc/form-builder/../../libs/uikit/src/components/Button/index.js","webpack://@jotforminc/form-builder/../../libs/uikit/src/components/ColorPicker/defaults/Color.js","webpack://@jotforminc/form-builder/../../libs/uikit/src/components/ColorPicker/defaults/Wrapper.js","webpack://@jotforminc/form-builder/../../libs/uikit/src/components/ColorPicker/index.js","webpack://@jotforminc/form-builder/../../libs/uikit/src/components/Dropdown/index.js","webpack://@jotforminc/form-builder/../../libs/uikit/src/components/FileUpload/defaults/DragContainer.js","webpack://@jotforminc/form-builder/../../libs/uikit/src/components/FileUpload/defaults/ErrorText.js","webpack://@jotforminc/form-builder/../../libs/uikit/src/components/FileUpload/defaults/FileInput.js","webpack://@jotforminc/form-builder/../../libs/uikit/src/components/FileUpload/defaults/FilePreview.js","webpack://@jotforminc/form-builder/../../libs/uikit/src/components/FileUpload/defaults/Form.js","webpack://@jotforminc/form-builder/../../libs/uikit/src/components/FileUpload/defaults/LoadingScreen.js","webpack://@jotforminc/form-builder/../../libs/uikit/src/components/FileUpload/defaults/Text.js","webpack://@jotforminc/form-builder/../../libs/uikit/src/components/FileUpload/defaults/TextWrapper.js","webpack://@jotforminc/form-builder/../../libs/uikit/src/components/FileUpload/defaults/Thumbnail.js","webpack://@jotforminc/form-builder/../../libs/uikit/src/components/FileUpload/defaults/Wrapper.js","webpack://@jotforminc/form-builder/../../libs/uikit/src/components/HiddenFrame/index.js","webpack://@jotforminc/form-builder/../../libs/uikit/src/components/DragContainer/index.js","webpack://@jotforminc/form-builder/../../libs/uikit/src/components/FileUpload/index.js","webpack://@jotforminc/form-builder/../../libs/uikit/src/components/Modal/index.js","webpack://@jotforminc/form-builder/../../libs/uikit/src/components/Option/index.js","webpack://@jotforminc/form-builder/../../libs/uikit/src/components/OptionGroup/index.js","webpack://@jotforminc/form-builder/../../libs/uikit/src/components/Pillbox/index.js","webpack://@jotforminc/form-builder/../../libs/uikit/src/components/Popover/index.js","webpack://@jotforminc/form-builder/../../libs/uikit/src/components/Portal/index.js","webpack://@jotforminc/form-builder/../../libs/uikit/src/components/RichTextEditor/defaults/Container.js","webpack://@jotforminc/form-builder/../../libs/uikit/src/components/RichTextEditor/defaults/ErrorWrapper.js","webpack://@jotforminc/form-builder/../../libs/uikit/src/components/RichTextEditor/defaults/LoadingWrapper.js","webpack://@jotforminc/form-builder/../../libs/uikit/src/components/RichTextEditor/defaults/ImageUploadPanel.js","webpack://@jotforminc/form-builder/../../libs/uikit/src/components/RichTextEditor/constants/index.js","webpack://@jotforminc/form-builder/../../libs/uikit/src/components/RichTextEditor/utils/popoverButtonUtils.js","webpack://@jotforminc/form-builder/../../libs/uikit/src/components/RichTextEditor/utils/index.js","webpack://@jotforminc/form-builder/../../libs/uikit/src/utils/observers.js","webpack://@jotforminc/form-builder/../../libs/uikit/src/components/RichTextEditor/index.js","webpack://@jotforminc/form-builder/../../libs/uikit/src/components/SelectionGroup/index.js","webpack://@jotforminc/form-builder/../../libs/uikit/src/components/TextInput/index.js","webpack://@jotforminc/form-builder/../../libs/uikit/src/components/Tooltip/index.js","webpack://@jotforminc/form-builder/../../libs/uikit/src/utils/constants.js","webpack://@jotforminc/form-builder/../../libs/uikit/src/utils/hooks.js","webpack://@jotforminc/form-builder/../../libs/uikit/src/utils/index.js","webpack://@jotforminc/form-builder/../../libs/user-list/src/styles/index.js","webpack://@jotforminc/form-builder/../../libs/user-list/src/index.js","webpack://@jotforminc/form-builder/../../libs/utils/src/a11y.js","webpack://@jotforminc/form-builder/../../libs/utils/src/addressFields.js","webpack://@jotforminc/form-builder/../../libs/utils/src/color.js","webpack://@jotforminc/form-builder/../../libs/utils/src/cookies.js","webpack://@jotforminc/form-builder/../../libs/utils/src/data.js","webpack://@jotforminc/form-builder/../../libs/utils/src/dom.js","webpack://@jotforminc/form-builder/../../libs/utils/src/emailUtils.js","webpack://@jotforminc/form-builder/../../libs/utils/src/htmlTools.js","webpack://@jotforminc/form-builder/../../libs/utils/src/limitUtils.js","webpack://@jotforminc/form-builder/../../libs/utils/src/misc.js","webpack://@jotforminc/form-builder/../../libs/utils/src/mobileUtils.js","webpack://@jotforminc/form-builder/../../libs/utils/src/moment.js","webpack://@jotforminc/form-builder/../../libs/utils/src/pdfjsworker.js","webpack://@jotforminc/form-builder/../../libs/constants/src/platforms/index.js","webpack://@jotforminc/form-builder/../../libs/utils/src/platform/platform.js","webpack://@jotforminc/form-builder/../../libs/utils/src/questions.js","webpack://@jotforminc/form-builder/../../libs/utils/src/sanitize.js","webpack://@jotforminc/form-builder/../../libs/utils/src/strings.js","webpack://@jotforminc/form-builder/../../libs/utils/src/time.js","webpack://@jotforminc/form-builder/../../libs/utils/src/validation.js","webpack://@jotforminc/form-builder/../../libs/warning-box/src/index.js","webpack://@jotforminc/form-builder/../../libs/ai-builder/src/constants/index.ts","webpack://@jotforminc/form-builder/../../libs/ai-builder/src/utils/index.ts","webpack://@jotforminc/form-builder/../../libs/emoji-mart/src/components/Picker.js","webpack://@jotforminc/form-builder/../../libs/icon-selector/src/components/IconEmojiSelector/index.js","webpack://@jotforminc/form-builder/../../libs/enterprise-components/src/components/Cover/api.ts","webpack://@jotforminc/form-builder/../../libs/enterprise-components/src/components/Cover/utils.ts","webpack://@jotforminc/form-builder/../../libs/enterprise-components/src/components/Cover/ColorRenderer.tsx","webpack://@jotforminc/form-builder/../../libs/enterprise-components/src/components/Cover/constants.ts","webpack://@jotforminc/form-builder/../../libs/enterprise-components/src/components/Cover/StyledElements.tsx","webpack://@jotforminc/form-builder/../../libs/enterprise-components/src/components/Cover/CustomizeTeamAvatar.tsx","webpack://@jotforminc/form-builder/../../libs/enterprise-components/src/components/Cover/CustomizeCover.tsx","webpack://@jotforminc/form-builder/../../libs/enterprise-components/src/components/Cover/CustomizationButton.tsx","webpack://@jotforminc/form-builder/../../libs/emoji-mart/src/components/Emoji.js","webpack://@jotforminc/form-builder/../../libs/icon-selector/src/components/EmojiRenderer/index.js","webpack://@jotforminc/form-builder/../../libs/enterprise-components/src/components/Image/StyledElements.tsx","webpack://@jotforminc/form-builder/../../libs/enterprise-components/src/components/Image/index.tsx","webpack://@jotforminc/form-builder/../../libs/enterprise-components/src/components/Image/ImageWithWrapper.tsx","webpack://@jotforminc/form-builder/../../libs/enterprise-components/src/components/TeamBadge/index.tsx","webpack://@jotforminc/form-builder/../../libs/enterprise-components/src/utils/api.ts","webpack://@jotforminc/form-builder/../../libs/enterprise-components/src/utils/index.ts","webpack://@jotforminc/form-builder/../../libs/integrations/src/actions/actionTypes.ts","webpack://@jotforminc/form-builder/../../libs/integrations/src/context/initialState.ts","webpack://@jotforminc/form-builder/../../libs/integrations/src/context/reducers/index.ts","webpack://@jotforminc/form-builder/../../libs/integrations/src/context/index.tsx","webpack://@jotforminc/form-builder/../../libs/integrations/src/types/enums.ts","webpack://@jotforminc/form-builder/../../libs/integrations/src/utils/IntegrationHelper.ts","webpack://@jotforminc/form-builder/../../libs/magnet/src/components/Badge/badge.cva.ts","webpack://@jotforminc/form-builder/../../libs/magnet/src/components/Badge/badge.types.ts","webpack://@jotforminc/form-builder/../../libs/magnet/src/components/Badge/Badge.tsx","webpack://@jotforminc/form-builder/../../libs/magnet/src/components/Button/button.cva.ts","webpack://@jotforminc/form-builder/../../libs/magnet/src/components/Button/button.types.ts","webpack://@jotforminc/form-builder/../../libs/magnet/src/components/Button/ButtonContent.tsx","webpack://@jotforminc/form-builder/../../libs/magnet/src/components/Button/Button.tsx","webpack://@jotforminc/form-builder/../../libs/magnet/src/components/Checkbox/checkbox.cva.ts","webpack://@jotforminc/form-builder/../../libs/magnet/src/components/Checkbox/checkbox.types.ts","webpack://@jotforminc/form-builder/../../libs/magnet/src/components/Checkbox/Checkbox.tsx","webpack://@jotforminc/form-builder/../../libs/magnet/src/components/ColorPicker/color-picker.types.ts","webpack://@jotforminc/form-builder/../../libs/magnet/src/components/Dialog/Dialog.tsx","webpack://@jotforminc/form-builder/../../libs/magnet/src/components/Dialog/DialogActions.tsx","webpack://@jotforminc/form-builder/../../libs/magnet/src/components/Dialog/DialogBody.tsx","webpack://@jotforminc/form-builder/../../libs/magnet/src/components/Dialog/DialogCloseButton.tsx","webpack://@jotforminc/form-builder/../../libs/magnet/src/components/Dialog/DialogContent.tsx","webpack://@jotforminc/form-builder/../../libs/magnet/src/components/Dialog/DialogDescription.tsx","webpack://@jotforminc/form-builder/../../libs/magnet/src/components/Dialog/DialogIcon.tsx","webpack://@jotforminc/form-builder/../../libs/magnet/src/components/Dialog/DialogTitle.tsx","webpack://@jotforminc/form-builder/../../libs/magnet/src/components/Dialog/dialog.cva.ts","webpack://@jotforminc/form-builder/../../libs/magnet/src/components/Dialog/dialog.types.ts","webpack://@jotforminc/form-builder/../../libs/magnet/src/components/FormControl/form-control.cva.ts","webpack://@jotforminc/form-builder/../../libs/magnet/src/components/FormControl/FormControl.tsx","webpack://@jotforminc/form-builder/../../libs/magnet/src/components/Indicator/indicator.cva.ts","webpack://@jotforminc/form-builder/../../libs/magnet/src/components/Indicator/indicator.types.ts","webpack://@jotforminc/form-builder/../../libs/magnet/src/components/Indicator/Indicator.tsx","webpack://@jotforminc/form-builder/../../libs/magnet/src/components/Input/BaseInput.tsx","webpack://@jotforminc/form-builder/../../libs/magnet/src/components/Input/InputText.tsx","webpack://@jotforminc/form-builder/../../libs/magnet/src/components/Input/input.cva.ts","webpack://@jotforminc/form-builder/../../libs/magnet/src/components/Input/input.types.ts","webpack://@jotforminc/form-builder/../../libs/magnet/src/components/Link/link.cva.ts","webpack://@jotforminc/form-builder/../../libs/magnet/src/components/Link/link.types.ts","webpack://@jotforminc/form-builder/../../libs/magnet/src/components/Link/Link.tsx","webpack://@jotforminc/form-builder/../../libs/magnet/src/components/Loader/loader.cva.ts","webpack://@jotforminc/form-builder/../../libs/magnet/src/components/Loader/loader.types.ts","webpack://@jotforminc/form-builder/../../libs/magnet/src/components/Loader/Loader.tsx","webpack://@jotforminc/form-builder/../../libs/magnet/src/components/Modal/Modal.tsx","webpack://@jotforminc/form-builder/../../libs/magnet/src/components/Modal/ModalActions.tsx","webpack://@jotforminc/form-builder/../../libs/magnet/src/components/Modal/ModalBody.tsx","webpack://@jotforminc/form-builder/../../libs/magnet/src/components/Modal/ModalHeader.tsx","webpack://@jotforminc/form-builder/../../libs/magnet/src/components/Modal/modal.cva.ts","webpack://@jotforminc/form-builder/../../libs/magnet/src/components/Modal/modal.types.ts","webpack://@jotforminc/form-builder/../../libs/magnet/src/components/Radio/radio.cva.ts","webpack://@jotforminc/form-builder/../../libs/magnet/src/components/Radio/radio.types.ts","webpack://@jotforminc/form-builder/../../libs/magnet/src/components/Radio/Radio.tsx","webpack://@jotforminc/form-builder/../../libs/magnet/src/components/Textarea/textarea.cva.ts","webpack://@jotforminc/form-builder/../../libs/magnet/src/components/Textarea/textarea.types.ts","webpack://@jotforminc/form-builder/../../libs/magnet/src/components/Textarea/Textarea.tsx","webpack://@jotforminc/form-builder/../../libs/magnet/src/constants/common.cva.ts","webpack://@jotforminc/form-builder/../../libs/magnet/src/constants/common.values.ts","webpack://@jotforminc/form-builder/../../libs/magnet/src/contexts/index.tsx","webpack://@jotforminc/form-builder/../../libs/magnet/src/layouts/Flex/Flex.tsx","webpack://@jotforminc/form-builder/../../libs/magnet/src/layouts/Flex/flex.cva.ts","webpack://@jotforminc/form-builder/../../libs/magnet/src/shared/ChoiceLabel/choice-label.types.ts","webpack://@jotforminc/form-builder/../../libs/magnet/src/shared/ChoiceLabel/choice-label.cva.ts","webpack://@jotforminc/form-builder/../../libs/magnet/src/shared/ChoiceLabel/ChoiceLabel.tsx","webpack://@jotforminc/form-builder/../../libs/magnet/src/tokens/colors/primary.ts","webpack://@jotforminc/form-builder/../../libs/magnet/src/tokens/colors/secondary.ts","webpack://@jotforminc/form-builder/../../libs/magnet/src/utils/index.ts","webpack://@jotforminc/form-builder/../../libs/payment-constants/src/gatewayResourceProps/control2co.tsx","webpack://@jotforminc/form-builder/../../libs/payment-constants/src/gatewayResourceProps/controlAfterpay.ts","webpack://@jotforminc/form-builder/../../libs/payment-constants/src/gatewayResourceProps/controlApplePayGooglePay.ts","webpack://@jotforminc/form-builder/../../libs/payment-constants/src/gatewayResourceProps/controlAuthnet.ts","webpack://@jotforminc/form-builder/../../libs/payment-constants/src/gatewayResourceProps/controlBluepay.ts","webpack://@jotforminc/form-builder/../../libs/payment-constants/src/gatewayResourceProps/controlBluesnap.tsx","webpack://@jotforminc/form-builder/../../libs/payment-constants/src/gatewayResourceProps/controlBraintree.tsx","webpack://@jotforminc/form-builder/../../libs/payment-constants/src/gatewayResourceProps/controlCardconnect.ts","webpack://@jotforminc/form-builder/../../libs/payment-constants/src/gatewayResourceProps/controlCashApp.ts","webpack://@jotforminc/form-builder/../../libs/payment-constants/src/gatewayResourceProps/controlChargify.ts","webpack://@jotforminc/form-builder/../../libs/payment-constants/src/gatewayResourceProps/controlClearpay.ts","webpack://@jotforminc/form-builder/../../libs/payment-constants/src/gatewayResourceProps/controlCybersource.ts","webpack://@jotforminc/form-builder/../../libs/payment-constants/src/gatewayResourceProps/controlEcheck.ts","webpack://@jotforminc/form-builder/../../libs/payment-constants/src/gatewayResourceProps/controlEway.ts","webpack://@jotforminc/form-builder/../../libs/payment-constants/src/gatewayResourceProps/controlFirstdata.ts","webpack://@jotforminc/form-builder/../../libs/payment-constants/src/gatewayResourceProps/controlGocardless.ts","webpack://@jotforminc/form-builder/../../libs/payment-constants/src/gatewayResourceProps/controlIyzico.tsx","webpack://@jotforminc/form-builder/../../libs/payment-constants/src/gatewayResourceProps/controlMollie.ts","webpack://@jotforminc/form-builder/../../libs/payment-constants/src/gatewayResourceProps/controlMoneris.ts","webpack://@jotforminc/form-builder/../../libs/payment-constants/src/gatewayResourceProps/controlPagseguro.ts","webpack://@jotforminc/form-builder/../../libs/payment-constants/src/gatewayResourceProps/controlPayfast.ts","webpack://@jotforminc/form-builder/../../libs/payment-constants/src/gatewayResourceProps/controlPayjunction.ts","webpack://@jotforminc/form-builder/../../libs/payment-constants/src/gatewayResourceProps/controlPaymentwall.ts","webpack://@jotforminc/form-builder/../../libs/payment-constants/src/gatewayResourceProps/controlPaypal.ts","webpack://@jotforminc/form-builder/../../libs/payment-constants/src/gatewayResourceProps/controlPaypalComplete.ts","webpack://@jotforminc/form-builder/../../libs/payment-constants/src/gatewayResourceProps/controlPaypalExpress.ts","webpack://@jotforminc/form-builder/../../libs/payment-constants/src/gatewayResourceProps/controlPaypalInvoicing.ts","webpack://@jotforminc/form-builder/../../libs/payment-constants/src/gatewayResourceProps/controlPaypalPro.ts","webpack://@jotforminc/form-builder/../../libs/payment-constants/src/gatewayResourceProps/controlPaypalSPB.tsx","webpack://@jotforminc/form-builder/../../libs/payment-constants/src/gatewayResourceProps/controlPaysafe.ts","webpack://@jotforminc/form-builder/../../libs/payment-constants/src/gatewayResourceProps/controlPayu.ts","webpack://@jotforminc/form-builder/../../libs/payment-constants/src/gatewayResourceProps/controlPayuMoney.ts","webpack://@jotforminc/form-builder/../../libs/payment-constants/src/gatewayResourceProps/controlSensepass.ts","webpack://@jotforminc/form-builder/../../libs/payment-constants/src/gatewayResourceProps/controlSkrill.ts","webpack://@jotforminc/form-builder/../../libs/payment-constants/src/gatewayResourceProps/controlSofort.ts","webpack://@jotforminc/form-builder/../../libs/payment-constants/src/gatewayResourceProps/controlSquare.ts","webpack://@jotforminc/form-builder/../../libs/payment-constants/src/gatewayResourceProps/controlStripe.tsx","webpack://@jotforminc/form-builder/../../libs/payment-constants/src/gatewayResourceProps/controlstripeACH.tsx","webpack://@jotforminc/form-builder/../../libs/payment-constants/src/gatewayResourceProps/controlStripeACHManual.ts","webpack://@jotforminc/form-builder/../../libs/payment-constants/src/gatewayResourceProps/controlStripeCheckout.ts","webpack://@jotforminc/form-builder/../../libs/payment-constants/src/gatewayResourceProps/controlVenmo.ts","webpack://@jotforminc/form-builder/../../libs/payment-constants/src/gatewayResourceProps/controlWorldpay.tsx","webpack://@jotforminc/form-builder/../../libs/payment-constants/src/gatewayResourceProps/index.ts","webpack://@jotforminc/form-builder/../../libs/payment-constants/src/gatewayResourceProps/controlWorldpayus.ts","webpack://@jotforminc/form-builder/../../libs/payment-constants/src/unsupportedDecimalCurrencies.ts","webpack://@jotforminc/form-builder/../../libs/payment-gateways/src/gatewayRequestModal/index.tsx","webpack://@jotforminc/form-builder/../../libs/payment-gateways/src/utils/functions/getGatewayType.ts","webpack://@jotforminc/form-builder/../../libs/payment-gateways/src/utils/functions/isDevelopment.ts","webpack://@jotforminc/form-builder/../../libs/request-layer/src/request-cache/constants.ts","webpack://@jotforminc/form-builder/../../libs/request-layer/src/request-cache/utils.ts","webpack://@jotforminc/form-builder/../../libs/request-layer/src/request-cache/index.ts","webpack://@jotforminc/form-builder/../../libs/request-layer/src/utils/argumentParser.ts","webpack://@jotforminc/form-builder/../../libs/request-layer/src/utils/constructInterceptorConfig.ts","webpack://@jotforminc/form-builder/../../libs/request-layer/src/layer/interceptors/index.ts","webpack://@jotforminc/form-builder/../../libs/request-layer/src/layer/interceptors/defaultInterceptors/index.ts","webpack://@jotforminc/form-builder/../../libs/request-layer/src/utils/setInterceptors.ts","webpack://@jotforminc/form-builder/../../libs/request-layer/src/layer/engines/utils.ts","webpack://@jotforminc/form-builder/../../libs/request-layer/src/layer/engines/AxiosEngine.ts","webpack://@jotforminc/form-builder/../../libs/request-layer/src/layer/engines/constants.ts","webpack://@jotforminc/form-builder/../../libs/request-layer/src/layer/utils.ts","webpack://@jotforminc/form-builder/../../libs/request-layer/src/layer/index.ts","webpack://@jotforminc/form-builder/../../libs/request-layer/src/layer/interceptors/customInterceptors/index.ts","webpack://@jotforminc/form-builder/../../libs/request-layer/src/layer/interceptors/defaultInterceptors/utils.ts","webpack://@jotforminc/form-builder/../../libs/request-layer/src/layer/interceptors/defaultInterceptors/platform/salesforceInterceptors.ts","webpack://@jotforminc/form-builder/../../libs/request-layer/src/layer/interceptors/defaultInterceptors/defaultInterceptors.ts","webpack://@jotforminc/form-builder/../../libs/request-layer/src/utils/managerUtils.ts","webpack://@jotforminc/form-builder/../../libs/tracking/src/utils/FullStoryManager.ts","webpack://@jotforminc/form-builder/../../libs/tracking/src/constants/index.ts","webpack://@jotforminc/form-builder/../../libs/tracking/src/utils/SentryManager.ts","webpack://@jotforminc/form-builder/../../libs/tracking/src/utils/TrackingManager.ts","webpack://@jotforminc/form-builder/../../libs/tracking/src/index.ts"],"sourcesContent":["var _g;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nconst SvgAccessibilityCount = props => /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 20 20\"\n}, props), _g || (_g = /*#__PURE__*/React.createElement(\"g\", {\n transform: \"translate(-7 -6)\",\n fill: \"none\",\n fillRule: \"evenodd\"\n}, /*#__PURE__*/React.createElement(\"rect\", {\n fill: \"#FF4E5D\",\n width: 177,\n height: 32,\n rx: 4\n}), /*#__PURE__*/React.createElement(\"g\", {\n transform: \"translate(7 6)\",\n fillRule: \"nonzero\"\n}, /*#__PURE__*/React.createElement(\"circle\", {\n fill: \"#FFF\",\n cx: 10,\n cy: 10,\n r: 10\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M11.667 6.747a31.413 31.413 0 00.04 3.92c.227 1.133.539 2.247.933 3.333.28.947.587 1.893.853 2.84.174.587 0 .987-.466 1.12-.467.133-.76-.107-.96-.68-.574-1.707-1.16-3.413-1.72-5.133-.12-.387-.294-.6-.787-.44-.227.76-.48 1.573-.733 2.373-.307 1.053-.627 2.093-.934 3.133-.213.667-.56.934-1.04.774-.48-.16-.613-.56-.453-1.187.493-1.84 1.013-3.68 1.453-5.533.107-.639.156-1.286.147-1.934V6.747l-3.24-.44a2.213 2.213 0 01-.293 0c-.494-.094-.747-.387-.667-.8a.693.693 0 01.84-.56c1.133.093 2.28.253 3.413.28 1.547 0 3.094 0 4.64-.067.907 0 1.8-.147 2.667-.213a.667.667 0 01.813.586.653.653 0 01-.64.76l-3.866.454zM9.867 2a1.333 1.333 0 110 2.667 1.333 1.333 0 010-2.667z\",\n fill: \"#FF4E5D\"\n})))));\nexport default SvgAccessibilityCount;","var _rect, _circle, _path;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nconst SvgAccessibilityWarning = props => /*#__PURE__*/React.createElement(\"svg\", _extends({\n viewBox: \"0 0 20 20\",\n xmlns: \"http://www.w3.org/2000/svg\"\n}, props), _rect || (_rect = /*#__PURE__*/React.createElement(\"rect\", {\n stroke: \"#E62636\",\n fill: \"#FFF\",\n x: -0.5,\n y: -0.5,\n rx: 4\n})), _circle || (_circle = /*#__PURE__*/React.createElement(\"circle\", {\n fill: \"#FF4E5D\",\n cx: 10,\n cy: 10,\n r: 10\n})), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M11.667 6.747a31.413 31.413 0 00.04 3.92A23.05 23.05 0 0012.64 14c.28.947.587 1.893.853 2.84.174.587 0 .987-.466 1.12-.467.133-.76-.107-.96-.68-.574-1.707-1.16-3.413-1.72-5.133-.12-.387-.294-.6-.787-.44-.227.76-.48 1.573-.733 2.373-.307 1.053-.627 2.093-.934 3.133-.213.667-.56.934-1.04.774-.48-.16-.613-.56-.453-1.187.493-1.84 1.013-3.68 1.453-5.533A10.8 10.8 0 008 9.333V6.747l-3.24-.44a2.213 2.213 0 01-.293 0c-.494-.094-.747-.387-.667-.8a.693.693 0 01.84-.56c1.133.093 2.28.253 3.413.28 1.547 0 3.094 0 4.64-.067.907 0 1.8-.147 2.667-.213a.667.667 0 01.813.586.653.653 0 01-.64.76l-3.866.454zM9.867 2a1.333 1.333 0 110 2.667 1.333 1.333 0 010-2.667z\",\n fill: \"#FFF\"\n})));\nexport default SvgAccessibilityWarning;","var _path, _path2, _path3, _rect, _path4, _path5;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nconst SvgCopilot = props => /*#__PURE__*/React.createElement(\"svg\", _extends({\n viewBox: \"12 0 146 24\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n}, props), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n className: \"ai-star-fade fade-1\",\n d: \"M6.73111 7.35704C7.08963 7.48363 7.08963 7.96752 6.73111 8.09412L6.20344 8.28045C5.45199 8.54579 4.85952 9.11116 4.58146 9.82824L4.38621 10.3318C4.25354 10.6739 3.74646 10.6739 3.61379 10.3318L3.41854 9.82824C3.14048 9.11116 2.54801 8.54579 1.79656 8.28045L1.26889 8.09412C0.910371 7.96752 0.910371 7.48363 1.26889 7.35704L1.79656 7.17071C2.54801 6.90537 3.14048 6.34 3.41854 5.62292L3.61379 5.11938C3.74646 4.77726 4.25354 4.77726 4.38621 5.11938L4.58146 5.62292C4.85952 6.34 5.45199 6.90537 6.20344 7.17071L6.73111 7.35704Z\",\n fill: \"white\"\n})), _path2 || (_path2 = /*#__PURE__*/React.createElement(\"path\", {\n className: \"ai-star-fade fade-2\",\n d: \"M15.4622 14.6228C16.1793 14.876 16.1793 15.8437 15.4622 16.0969L14.4069 16.4696C12.904 17.0003 11.719 18.131 11.1629 19.5652L10.7724 20.5722C10.5071 21.2565 9.49292 21.2565 9.22759 20.5722L8.83708 19.5652C8.28096 18.131 7.09602 17.0003 5.59312 16.4696L4.53778 16.0969C3.82074 15.8437 3.82074 14.876 4.53778 14.6228L5.59312 14.2501C7.09602 13.7194 8.28096 12.5887 8.83708 11.1545L9.22759 10.1475C9.49292 9.46322 10.5071 9.46322 10.7724 10.1475L11.1629 11.1545C11.719 12.5887 12.904 13.7194 14.4069 14.2501L15.4622 14.6228Z\",\n fill: \"white\"\n})), _path3 || (_path3 = /*#__PURE__*/React.createElement(\"path\", {\n className: \"ai-star-fade fade-3\",\n d: \"M14.4851 3.34212C14.6619 2.88596 15.3381 2.88596 15.5149 3.34212L15.7753 4.0135C16.146 4.96961 16.936 5.72344 17.9379 6.07723L18.6415 6.32566C19.1195 6.49445 19.1195 7.13964 18.6415 7.30844L17.9379 7.55687C16.936 7.91066 16.146 8.66449 15.7753 9.62059L15.5149 10.292C15.3381 10.7481 14.6619 10.7481 14.4851 10.292L14.2247 9.62059C13.854 8.66449 13.064 7.91066 12.0621 7.55687L11.3585 7.30844C10.8805 7.13964 10.8805 6.49445 11.3585 6.32566L12.0621 6.07723C13.064 5.72344 13.854 4.96961 14.2247 4.0135L14.4851 3.34212Z\",\n fill: \"white\"\n})), _rect || (_rect = /*#__PURE__*/React.createElement(\"rect\", {\n x: 104,\n y: 3,\n width: 42,\n height: 20,\n rx: 10,\n fill: \"white\",\n fillOpacity: 0.3\n})), _path4 || (_path4 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M114.032 8.492C114.448 8.492 114.816 8.552 115.136 8.672C115.456 8.784 115.724 8.944 115.94 9.152C116.164 9.352 116.332 9.592 116.444 9.872C116.564 10.152 116.624 10.456 116.624 10.784C116.624 11.224 116.508 11.608 116.276 11.936C116.044 12.264 115.748 12.488 115.388 12.608C115.596 12.656 115.788 12.74 115.964 12.86C116.148 12.98 116.308 13.128 116.444 13.304C116.58 13.472 116.688 13.668 116.768 13.892C116.848 14.116 116.888 14.36 116.888 14.624C116.888 14.968 116.824 15.288 116.696 15.584C116.576 15.872 116.4 16.12 116.168 16.328C115.944 16.536 115.668 16.7 115.34 16.82C115.02 16.94 114.66 17 114.26 17H110.972V8.492H114.032ZM113.78 12.008C114.164 12.008 114.46 11.912 114.668 11.72C114.884 11.528 114.992 11.268 114.992 10.94C114.992 10.612 114.888 10.356 114.68 10.172C114.48 9.98 114.176 9.884 113.768 9.884H112.604V12.008H113.78ZM113.948 15.62C114.356 15.62 114.672 15.524 114.896 15.332C115.12 15.132 115.232 14.86 115.232 14.516C115.232 14.18 115.124 13.908 114.908 13.7C114.7 13.484 114.388 13.376 113.972 13.376H112.604V15.62H113.948ZM118.296 17V8.492H123.624V10.052H119.952V11.996H123.276V13.472H119.952V15.44H123.624V17H118.296ZM128.997 10.064V17H127.329V10.064H124.641V8.492H131.685V10.064H128.997ZM137.13 15.056H133.674L132.966 17H131.214L134.478 8.492H136.398L139.638 17H137.838L137.13 15.056ZM134.226 13.544H136.578L135.402 10.328L134.226 13.544Z\",\n fill: \"white\"\n})), _path5 || (_path5 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M39.2 19.4009C38.336 19.4009 37.514 19.2509 36.734 18.9509C35.966 18.6509 35.282 18.2189 34.682 17.6549C34.094 17.0789 33.626 16.3829 33.278 15.5669C32.93 14.7389 32.756 13.8029 32.756 12.7589C32.756 11.7149 32.936 10.7849 33.296 9.96886C33.656 9.14086 34.13 8.44486 34.718 7.88086C35.318 7.30486 36.002 6.86686 36.77 6.56686C37.55 6.25486 38.354 6.09886 39.182 6.09886C39.986 6.09886 40.712 6.21286 41.36 6.44086C42.008 6.65686 42.572 6.95686 43.052 7.34086C43.532 7.71286 43.928 8.15086 44.24 8.65486C44.552 9.15886 44.78 9.68686 44.924 10.2389L42.89 10.9229C42.794 10.5389 42.644 10.1789 42.44 9.84286C42.248 9.49486 41.996 9.19486 41.684 8.94286C41.384 8.69086 41.024 8.49286 40.604 8.34886C40.196 8.20486 39.722 8.13286 39.182 8.13286C38.654 8.13286 38.138 8.22886 37.634 8.42086C37.13 8.61286 36.68 8.90086 36.284 9.28486C35.888 9.66886 35.57 10.1549 35.33 10.7429C35.09 11.3189 34.97 11.9909 34.97 12.7589C34.97 13.5029 35.084 14.1629 35.312 14.7389C35.552 15.3029 35.87 15.7769 36.266 16.1609C36.662 16.5449 37.112 16.8389 37.616 17.0429C38.132 17.2349 38.66 17.3309 39.2 17.3309C39.74 17.3309 40.22 17.2529 40.64 17.0969C41.06 16.9409 41.426 16.7309 41.738 16.4669C42.05 16.2029 42.308 15.9029 42.512 15.5669C42.728 15.2309 42.89 14.8829 42.998 14.5229L44.978 15.1709C44.834 15.7109 44.606 16.2389 44.294 16.7549C43.982 17.2589 43.58 17.7089 43.088 18.1049C42.608 18.4889 42.044 18.8009 41.396 19.0409C40.748 19.2809 40.016 19.4009 39.2 19.4009ZM50.5262 17.5289C50.8502 17.5289 51.1562 17.4689 51.4442 17.3489C51.7442 17.2289 52.0082 17.0549 52.2362 16.8269C52.4642 16.5869 52.6442 16.2929 52.7762 15.9449C52.9082 15.5969 52.9742 15.1949 52.9742 14.7389C52.9742 14.2829 52.9082 13.8869 52.7762 13.5509C52.6442 13.2029 52.4642 12.9149 52.2362 12.6869C52.0082 12.4469 51.7442 12.2729 51.4442 12.1649C51.1562 12.0449 50.8502 11.9849 50.5262 11.9849C50.2022 11.9849 49.8902 12.0449 49.5902 12.1649C49.3022 12.2729 49.0442 12.4469 48.8162 12.6869C48.6002 12.9149 48.4202 13.2029 48.2762 13.5509C48.1442 13.8869 48.0782 14.2829 48.0782 14.7389C48.0782 15.1949 48.1442 15.5969 48.2762 15.9449C48.4202 16.2929 48.6002 16.5869 48.8162 16.8269C49.0442 17.0549 49.3022 17.2289 49.5902 17.3489C49.8902 17.4689 50.2022 17.5289 50.5262 17.5289ZM50.5262 10.0949C51.1862 10.0949 51.7922 10.2149 52.3442 10.4549C52.8962 10.6829 53.3762 11.0069 53.7842 11.4269C54.1922 11.8349 54.5102 12.3209 54.7382 12.8849C54.9662 13.4489 55.0802 14.0669 55.0802 14.7389C55.0802 15.4109 54.9662 16.0349 54.7382 16.6109C54.5102 17.1749 54.1922 17.6669 53.7842 18.0869C53.3762 18.4949 52.8962 18.8189 52.3442 19.0589C51.7922 19.2869 51.1862 19.4009 50.5262 19.4009C49.8782 19.4009 49.2722 19.2869 48.7082 19.0589C48.1562 18.8189 47.6762 18.4949 47.2682 18.0869C46.8722 17.6669 46.5602 17.1749 46.3322 16.6109C46.1042 16.0349 45.9902 15.4109 45.9902 14.7389C45.9902 14.0669 46.1042 13.4489 46.3322 12.8849C46.5602 12.3209 46.8722 11.8349 47.2682 11.4269C47.6762 11.0069 48.1562 10.6829 48.7082 10.4549C49.2722 10.2149 49.8782 10.0949 50.5262 10.0949ZM57.098 22.5509V10.3649H59.114V11.5529C59.33 11.1689 59.678 10.8449 60.158 10.5809C60.638 10.3049 61.22 10.1669 61.904 10.1669C62.552 10.1669 63.128 10.2869 63.632 10.5269C64.136 10.7549 64.556 11.0729 64.892 11.4809C65.24 11.8889 65.504 12.3749 65.684 12.9389C65.864 13.4909 65.954 14.0909 65.954 14.7389C65.954 15.3989 65.858 16.0109 65.666 16.5749C65.474 17.1269 65.198 17.6129 64.838 18.0329C64.478 18.4409 64.04 18.7649 63.524 19.0049C63.02 19.2329 62.456 19.3469 61.832 19.3469C61.196 19.3469 60.65 19.2329 60.194 19.0049C59.738 18.7649 59.396 18.4769 59.168 18.1409V22.5509H57.098ZM63.866 14.7389C63.866 13.9109 63.65 13.2509 63.218 12.7589C62.786 12.2669 62.216 12.0209 61.508 12.0209C61.16 12.0209 60.842 12.0869 60.554 12.2189C60.266 12.3509 60.02 12.5369 59.816 12.7769C59.612 13.0049 59.45 13.2869 59.33 13.6229C59.21 13.9589 59.15 14.3309 59.15 14.7389C59.15 15.5789 59.372 16.2509 59.816 16.7549C60.26 17.2469 60.824 17.4929 61.508 17.4929C62.204 17.4929 62.768 17.2469 63.2 16.7549C63.644 16.2509 63.866 15.5789 63.866 14.7389ZM67.9613 19.1309V10.3649H70.0313V19.1309H67.9613ZM67.6373 7.28686C67.6373 6.90286 67.7693 6.57886 68.0333 6.31486C68.2973 6.05086 68.6153 5.91886 68.9873 5.91886C69.3713 5.91886 69.6953 6.05086 69.9593 6.31486C70.2233 6.57886 70.3553 6.90286 70.3553 7.28686C70.3553 7.67086 70.2233 7.99486 69.9593 8.25886C69.6953 8.51086 69.3713 8.63686 68.9873 8.63686C68.6153 8.63686 68.2973 8.51086 68.0333 8.25886C67.7693 7.99486 67.6373 7.67086 67.6373 7.28686ZM72.725 19.1309V6.09886H74.813V19.1309H72.725ZM81.3583 17.5289C81.6823 17.5289 81.9883 17.4689 82.2763 17.3489C82.5763 17.2289 82.8403 17.0549 83.0683 16.8269C83.2963 16.5869 83.4763 16.2929 83.6083 15.9449C83.7403 15.5969 83.8063 15.1949 83.8063 14.7389C83.8063 14.2829 83.7403 13.8869 83.6083 13.5509C83.4763 13.2029 83.2963 12.9149 83.0683 12.6869C82.8403 12.4469 82.5763 12.2729 82.2763 12.1649C81.9883 12.0449 81.6823 11.9849 81.3583 11.9849C81.0343 11.9849 80.7223 12.0449 80.4223 12.1649C80.1343 12.2729 79.8763 12.4469 79.6483 12.6869C79.4323 12.9149 79.2523 13.2029 79.1083 13.5509C78.9763 13.8869 78.9103 14.2829 78.9103 14.7389C78.9103 15.1949 78.9763 15.5969 79.1083 15.9449C79.2523 16.2929 79.4323 16.5869 79.6483 16.8269C79.8763 17.0549 80.1343 17.2289 80.4223 17.3489C80.7223 17.4689 81.0343 17.5289 81.3583 17.5289ZM81.3583 10.0949C82.0183 10.0949 82.6243 10.2149 83.1763 10.4549C83.7283 10.6829 84.2083 11.0069 84.6163 11.4269C85.0243 11.8349 85.3423 12.3209 85.5703 12.8849C85.7983 13.4489 85.9123 14.0669 85.9123 14.7389C85.9123 15.4109 85.7983 16.0349 85.5703 16.6109C85.3423 17.1749 85.0243 17.6669 84.6163 18.0869C84.2083 18.4949 83.7283 18.8189 83.1763 19.0589C82.6243 19.2869 82.0183 19.4009 81.3583 19.4009C80.7103 19.4009 80.1043 19.2869 79.5403 19.0589C78.9883 18.8189 78.5083 18.4949 78.1003 18.0869C77.7043 17.6669 77.3923 17.1749 77.1643 16.6109C76.9363 16.0349 76.8223 15.4109 76.8223 14.7389C76.8223 14.0669 76.9363 13.4489 77.1643 12.8849C77.3923 12.3209 77.7043 11.8349 78.1003 11.4269C78.5083 11.0069 78.9883 10.6829 79.5403 10.4549C80.1043 10.2149 80.7103 10.0949 81.3583 10.0949ZM90.5233 10.3649H92.3413V12.2189H90.5233V16.2869C90.5233 16.6709 90.6133 16.9529 90.7933 17.1329C90.9733 17.3009 91.2553 17.3849 91.6393 17.3849C91.7833 17.3849 91.9273 17.3789 92.0713 17.3669C92.2153 17.3429 92.3113 17.3249 92.3593 17.3129V19.0409C92.2993 19.0649 92.1673 19.1009 91.9633 19.1489C91.7593 19.2089 91.4653 19.2389 91.0813 19.2389C90.2653 19.2389 89.6233 19.0109 89.1553 18.5549C88.6873 18.0989 88.4533 17.4569 88.4533 16.6289V12.2189H86.8333V10.3649H87.2833C87.7513 10.3649 88.0933 10.2329 88.3093 9.96886C88.5253 9.70486 88.6333 9.38086 88.6333 8.99686V7.68286H90.5233V10.3649Z\",\n fill: \"white\"\n})));\nexport default SvgCopilot;","var _style, _g, _g2, _g3, _g4, _g5, _g6, _g7, _g8, _g9, _polygon;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nconst SvgDragIcon = props => /*#__PURE__*/React.createElement(\"svg\", _extends({\n id: \"Layer_1\",\n xmlns: \"http://www.w3.org/2000/svg\",\n xmlnsXlink: \"http://www.w3.org/1999/xlink\",\n x: \"0px\",\n y: \"0px\",\n viewBox: \"0 0 105 76\",\n style: {\n enableBackground: \"new 0 0 105 76\"\n },\n xmlSpace: \"preserve\"\n}, props), _style || (_style = /*#__PURE__*/React.createElement(\"style\", {\n type: \"text/css\"\n}, \".st0{fill:#B4CDEB;}\\n\\t.st1{fill:#217DD8;}\")), _g || (_g = /*#__PURE__*/React.createElement(\"g\", null, /*#__PURE__*/React.createElement(\"path\", {\n className: \"st0\",\n d: \"M33.5,67.6H3.1V58h30.4V67.6z M5.1,65.6h26.4V60H5.1V65.6z\"\n}))), _g2 || (_g2 = /*#__PURE__*/React.createElement(\"g\", null, /*#__PURE__*/React.createElement(\"path\", {\n className: \"st0\",\n d: \"M33.5,55.5H3.1v-9.6h30.4V55.5z M5.1,53.5h26.4v-5.6H5.1V53.5z\"\n}))), _g3 || (_g3 = /*#__PURE__*/React.createElement(\"g\", null, /*#__PURE__*/React.createElement(\"path\", {\n className: \"st0\",\n d: \"M33.5,30.1H3.1v-9.6h30.4V30.1z M5.1,28.1h26.4v-5.6H5.1V28.1z\"\n}))), _g4 || (_g4 = /*#__PURE__*/React.createElement(\"g\", null, /*#__PURE__*/React.createElement(\"path\", {\n className: \"st0\",\n d: \"M33.5,18H3.1V8.4h30.4V18z M5.1,16h26.4v-5.6H5.1V16z\"\n}))), _g5 || (_g5 = /*#__PURE__*/React.createElement(\"g\", null, /*#__PURE__*/React.createElement(\"path\", {\n className: \"st0\",\n d: \"M101.9,26.4H59.2V8.4h42.7V26.4z M61.2,24.4h38.7V10.4H61.2V24.4z\"\n}))), _g6 || (_g6 = /*#__PURE__*/React.createElement(\"g\", null, /*#__PURE__*/React.createElement(\"g\", null, /*#__PURE__*/React.createElement(\"rect\", {\n x: 99.9,\n y: 45,\n className: \"st1\",\n width: 2,\n height: 2\n})), /*#__PURE__*/React.createElement(\"g\", null, /*#__PURE__*/React.createElement(\"path\", {\n className: \"st1\",\n d: \"M97.9,47h-2v-2h2V47z M93.8,47h-2v-2h2V47z M89.7,47h-2v-2h2V47z M85.6,47h-2v-2h2V47z M81.5,47h-2v-2h2V47z M77.5,47h-2v-2h2V47z M73.4,47h-2v-2h2V47z M69.3,47h-2v-2h2V47z M65.2,47h-2v-2h2V47z\"\n})), /*#__PURE__*/React.createElement(\"g\", null, /*#__PURE__*/React.createElement(\"rect\", {\n x: 59.2,\n y: 45,\n className: \"st1\",\n width: 2,\n height: 2\n})), /*#__PURE__*/React.createElement(\"g\", null, /*#__PURE__*/React.createElement(\"path\", {\n className: \"st1\",\n d: \"M61.2,43h-2v-2h2V43z M61.2,39h-2v-2h2V39z M61.2,35h-2v-2h2V35z\"\n})), /*#__PURE__*/React.createElement(\"g\", null, /*#__PURE__*/React.createElement(\"rect\", {\n x: 59.2,\n y: 29,\n className: \"st1\",\n width: 2,\n height: 2\n})), /*#__PURE__*/React.createElement(\"g\", null, /*#__PURE__*/React.createElement(\"path\", {\n className: \"st1\",\n d: \"M97.9,31h-2v-2h2V31z M93.8,31h-2v-2h2V31z M89.7,31h-2v-2h2V31z M85.6,31h-2v-2h2V31z M81.5,31h-2v-2h2V31z M77.5,31h-2v-2h2V31z M73.4,31h-2v-2h2V31z M69.3,31h-2v-2h2V31z M65.2,31h-2v-2h2V31z\"\n})), /*#__PURE__*/React.createElement(\"g\", null, /*#__PURE__*/React.createElement(\"rect\", {\n x: 99.9,\n y: 29,\n className: \"st1\",\n width: 2,\n height: 2\n})), /*#__PURE__*/React.createElement(\"g\", null, /*#__PURE__*/React.createElement(\"path\", {\n className: \"st1\",\n d: \"M101.9,43h-2v-2h2V43z M101.9,39h-2v-2h2V39z M101.9,35h-2v-2h2V35z\"\n})))), _g7 || (_g7 = /*#__PURE__*/React.createElement(\"g\", null, /*#__PURE__*/React.createElement(\"path\", {\n className: \"st0\",\n d: \"M101.9,67.6H59.2V49.6h42.7V67.6z M61.2,65.6h38.7V51.6H61.2V65.6z\"\n}))), _g8 || (_g8 = /*#__PURE__*/React.createElement(\"g\", null, /*#__PURE__*/React.createElement(\"g\", null, /*#__PURE__*/React.createElement(\"rect\", {\n x: 25,\n y: 39.8,\n className: \"st0\",\n width: 1,\n height: 2\n})), /*#__PURE__*/React.createElement(\"g\", null, /*#__PURE__*/React.createElement(\"path\", {\n className: \"st0\",\n d: \"M22.8,41.8h-2.2v-2h2.2V41.8z M18.4,41.8h-2.2v-2h2.2V41.8z M13.9,41.8h-2.2v-2h2.2V41.8z M9.5,41.8H7.3v-2 h2.2V41.8z\"\n})), /*#__PURE__*/React.createElement(\"g\", null, /*#__PURE__*/React.createElement(\"rect\", {\n x: 3.1,\n y: 39.8,\n className: \"st0\",\n width: 2,\n height: 2\n})), /*#__PURE__*/React.createElement(\"g\", null, /*#__PURE__*/React.createElement(\"rect\", {\n x: 3.1,\n y: 36.1,\n className: \"st0\",\n width: 2,\n height: 1.9\n})), /*#__PURE__*/React.createElement(\"g\", null, /*#__PURE__*/React.createElement(\"rect\", {\n x: 3.1,\n y: 32.2,\n className: \"st0\",\n width: 2,\n height: 2\n})), /*#__PURE__*/React.createElement(\"g\", null, /*#__PURE__*/React.createElement(\"path\", {\n className: \"st0\",\n d: \"M29.5,34.2h-2v-2h2V34.2z M25.4,34.2h-2v-2h2V34.2z M21.4,34.2h-2v-2h2V34.2z M17.3,34.2h-2v-2h2V34.2z M13.2,34.2h-2v-2h2V34.2z M9.2,34.2h-2v-2h2V34.2z\"\n})), /*#__PURE__*/React.createElement(\"g\", null, /*#__PURE__*/React.createElement(\"rect\", {\n x: 31.5,\n y: 32.2,\n className: \"st0\",\n width: 2,\n height: 2\n})), /*#__PURE__*/React.createElement(\"g\", null, /*#__PURE__*/React.createElement(\"rect\", {\n x: 31.5,\n y: 36,\n className: \"st0\",\n width: 2,\n height: 1\n})))), _g9 || (_g9 = /*#__PURE__*/React.createElement(\"g\", null, /*#__PURE__*/React.createElement(\"path\", {\n className: \"st1\",\n d: \"M55.4,47.9H25V36h30.4V47.9z M27,45.9h26.4V38H27V45.9z\"\n}))), _polygon || (_polygon = /*#__PURE__*/React.createElement(\"polygon\", {\n className: \"st1\",\n points: \"47.4,42 43.2,39.8 43.2,41.5 34.7,41.5 34.7,42.5 43.2,42.5 43.2,44.2 \"\n})));\nexport default SvgDragIcon;","var _title, _rect, _polygon, _polygon2, _rect2, _rect3, _rect4, _rect5, _rect6, _rect7, _rect8, _rect9, _rect10, _rect11, _rect12;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nconst SvgDuplicateBottom = props => /*#__PURE__*/React.createElement(\"svg\", _extends({\n id: \"Layer_1\",\n \"data-name\": \"Layer 1\",\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 24 24\"\n}, props), _title || (_title = /*#__PURE__*/React.createElement(\"title\", null, \"align-icons\")), _rect || (_rect = /*#__PURE__*/React.createElement(\"rect\", {\n x: 2,\n y: 3,\n width: 20,\n height: 4\n})), _polygon || (_polygon = /*#__PURE__*/React.createElement(\"polygon\", {\n points: \"2 17 2 21 3 21 4 21 4 20 3 20 3 18 4 18 4 17 3 17 2 17\"\n})), _polygon2 || (_polygon2 = /*#__PURE__*/React.createElement(\"polygon\", {\n points: \"21 17 20 17 20 18 21 18 21 20 20 20 20 21 21 21 22 21 22 17 21 17\"\n})), _rect2 || (_rect2 = /*#__PURE__*/React.createElement(\"rect\", {\n x: 5,\n y: 20,\n width: 2,\n height: 1\n})), _rect3 || (_rect3 = /*#__PURE__*/React.createElement(\"rect\", {\n x: 5,\n y: 17,\n width: 2,\n height: 1\n})), _rect4 || (_rect4 = /*#__PURE__*/React.createElement(\"rect\", {\n x: 8,\n y: 20,\n width: 2,\n height: 1\n})), _rect5 || (_rect5 = /*#__PURE__*/React.createElement(\"rect\", {\n x: 8,\n y: 17,\n width: 2,\n height: 1\n})), _rect6 || (_rect6 = /*#__PURE__*/React.createElement(\"rect\", {\n x: 11,\n y: 20,\n width: 2,\n height: 1\n})), _rect7 || (_rect7 = /*#__PURE__*/React.createElement(\"rect\", {\n x: 11,\n y: 17,\n width: 2,\n height: 1\n})), _rect8 || (_rect8 = /*#__PURE__*/React.createElement(\"rect\", {\n x: 14,\n y: 20,\n width: 2,\n height: 1\n})), _rect9 || (_rect9 = /*#__PURE__*/React.createElement(\"rect\", {\n x: 14,\n y: 17,\n width: 2,\n height: 1\n})), _rect10 || (_rect10 = /*#__PURE__*/React.createElement(\"rect\", {\n x: 17,\n y: 20,\n width: 2,\n height: 1\n})), _rect11 || (_rect11 = /*#__PURE__*/React.createElement(\"rect\", {\n x: 17,\n y: 17,\n width: 2,\n height: 1\n})), _rect12 || (_rect12 = /*#__PURE__*/React.createElement(\"rect\", {\n x: 2,\n y: 10,\n width: 20,\n height: 4\n})));\nexport default SvgDuplicateBottom;","var _title, _rect, _polygon, _polygon2, _rect2, _rect3, _rect4, _rect5, _rect6, _rect7, _rect8, _rect9, _rect10, _rect11, _rect12;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nconst SvgDuplicateMid = props => /*#__PURE__*/React.createElement(\"svg\", _extends({\n id: \"Layer_1\",\n \"data-name\": \"Layer 1\",\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 24 24\"\n}, props), _title || (_title = /*#__PURE__*/React.createElement(\"title\", null, \"align-icons\")), _rect || (_rect = /*#__PURE__*/React.createElement(\"rect\", {\n x: 2,\n y: 3,\n width: 20,\n height: 4\n})), _polygon || (_polygon = /*#__PURE__*/React.createElement(\"polygon\", {\n points: \"2 10 2 14 3 14 4 14 4 13 3 13 3 11 4 11 4 10 3 10 2 10\"\n})), _polygon2 || (_polygon2 = /*#__PURE__*/React.createElement(\"polygon\", {\n points: \"21 10 20 10 20 11 21 11 21 13 20 13 20 14 21 14 22 14 22 10 21 10\"\n})), _rect2 || (_rect2 = /*#__PURE__*/React.createElement(\"rect\", {\n x: 5,\n y: 13,\n width: 2,\n height: 1\n})), _rect3 || (_rect3 = /*#__PURE__*/React.createElement(\"rect\", {\n x: 5,\n y: 10,\n width: 2,\n height: 1\n})), _rect4 || (_rect4 = /*#__PURE__*/React.createElement(\"rect\", {\n x: 8,\n y: 13,\n width: 2,\n height: 1\n})), _rect5 || (_rect5 = /*#__PURE__*/React.createElement(\"rect\", {\n x: 8,\n y: 10,\n width: 2,\n height: 1\n})), _rect6 || (_rect6 = /*#__PURE__*/React.createElement(\"rect\", {\n x: 11,\n y: 13,\n width: 2,\n height: 1\n})), _rect7 || (_rect7 = /*#__PURE__*/React.createElement(\"rect\", {\n x: 11,\n y: 10,\n width: 2,\n height: 1\n})), _rect8 || (_rect8 = /*#__PURE__*/React.createElement(\"rect\", {\n x: 14,\n y: 13,\n width: 2,\n height: 1\n})), _rect9 || (_rect9 = /*#__PURE__*/React.createElement(\"rect\", {\n x: 14,\n y: 10,\n width: 2,\n height: 1\n})), _rect10 || (_rect10 = /*#__PURE__*/React.createElement(\"rect\", {\n x: 17,\n y: 13,\n width: 2,\n height: 1\n})), _rect11 || (_rect11 = /*#__PURE__*/React.createElement(\"rect\", {\n x: 17,\n y: 10,\n width: 2,\n height: 1\n})), _rect12 || (_rect12 = /*#__PURE__*/React.createElement(\"rect\", {\n x: 2,\n y: 17,\n width: 20,\n height: 4\n})));\nexport default SvgDuplicateMid;","var _title, _rect, _polygon, _polygon2, _rect2, _rect3, _rect4, _rect5, _rect6, _rect7, _rect8, _rect9, _rect10, _rect11, _rect12;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nconst SvgDuplicateTop = props => /*#__PURE__*/React.createElement(\"svg\", _extends({\n id: \"Layer_1\",\n \"data-name\": \"Layer 1\",\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 24 24\"\n}, props), _title || (_title = /*#__PURE__*/React.createElement(\"title\", null, \"align-icons\")), _rect || (_rect = /*#__PURE__*/React.createElement(\"rect\", {\n x: 2,\n y: 10,\n width: 20,\n height: 4\n})), _polygon || (_polygon = /*#__PURE__*/React.createElement(\"polygon\", {\n points: \"2 3 2 7 3 7 4 7 4 6 3 6 3 4 4 4 4 3 3 3 2 3\"\n})), _polygon2 || (_polygon2 = /*#__PURE__*/React.createElement(\"polygon\", {\n points: \"21 3 20 3 20 4 21 4 21 6 20 6 20 7 21 7 22 7 22 3 21 3\"\n})), _rect2 || (_rect2 = /*#__PURE__*/React.createElement(\"rect\", {\n x: 5,\n y: 6,\n width: 2,\n height: 1\n})), _rect3 || (_rect3 = /*#__PURE__*/React.createElement(\"rect\", {\n x: 5,\n y: 3,\n width: 2,\n height: 1\n})), _rect4 || (_rect4 = /*#__PURE__*/React.createElement(\"rect\", {\n x: 8,\n y: 6,\n width: 2,\n height: 1\n})), _rect5 || (_rect5 = /*#__PURE__*/React.createElement(\"rect\", {\n x: 8,\n y: 3,\n width: 2,\n height: 1\n})), _rect6 || (_rect6 = /*#__PURE__*/React.createElement(\"rect\", {\n x: 11,\n y: 6,\n width: 2,\n height: 1\n})), _rect7 || (_rect7 = /*#__PURE__*/React.createElement(\"rect\", {\n x: 11,\n y: 3,\n width: 2,\n height: 1\n})), _rect8 || (_rect8 = /*#__PURE__*/React.createElement(\"rect\", {\n x: 14,\n y: 6,\n width: 2,\n height: 1\n})), _rect9 || (_rect9 = /*#__PURE__*/React.createElement(\"rect\", {\n x: 14,\n y: 3,\n width: 2,\n height: 1\n})), _rect10 || (_rect10 = /*#__PURE__*/React.createElement(\"rect\", {\n x: 17,\n y: 6,\n width: 2,\n height: 1\n})), _rect11 || (_rect11 = /*#__PURE__*/React.createElement(\"rect\", {\n x: 17,\n y: 3,\n width: 2,\n height: 1\n})), _rect12 || (_rect12 = /*#__PURE__*/React.createElement(\"rect\", {\n x: 2,\n y: 17,\n width: 20,\n height: 4\n})));\nexport default SvgDuplicateTop;","var _g;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nconst SvgFavIconAvg = props => /*#__PURE__*/React.createElement(\"svg\", _extends({\n id: \"Layer_1\",\n xmlns: \"http://www.w3.org/2000/svg\",\n xmlnsXlink: \"http://www.w3.org/1999/xlink\",\n x: \"0px\",\n y: \"0px\",\n viewBox: \"0 0 96 96\",\n style: {\n enableBackground: \"new 0 0 96 96\"\n },\n xmlSpace: \"preserve\"\n}, props), _g || (_g = /*#__PURE__*/React.createElement(\"g\", null, /*#__PURE__*/React.createElement(\"polygon\", {\n points: \"77.7,93.6 48,78 18.3,93.6 24,60.7 0,37.2 0,96 96,96 96,37.2 72,60.7 \"\n}), /*#__PURE__*/React.createElement(\"polygon\", {\n points: \"0,0 0,37.2 33.2,32.4 48,2.4 62.8,32.4 96,37.2 96,0 \"\n}))));\nexport default SvgFavIconAvg;","var _path, _path2, _path3, _path4;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nconst SvgFormWarnings = props => /*#__PURE__*/React.createElement(\"svg\", _extends({\n id: \"Layer_1\",\n xmlns: \"http://www.w3.org/2000/svg\",\n xmlnsXlink: \"http://www.w3.org/1999/xlink\",\n x: \"0px\",\n y: \"0px\",\n viewBox: \"0 0 100 100\",\n enableBackground: \"new 0 0 100 100\",\n xmlSpace: \"preserve\"\n}, props), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M50.4,10.483c-21.824,0-39.517,17.693-39.517,39.517c0,21.825,17.693,39.517,39.517,39.517 c21.825,0,39.517-17.689,39.517-39.517C89.917,28.176,72.225,10.483,50.4,10.483z M50.4,82.108 c-17.734,0-32.108-14.374-32.108-32.108c0-17.734,14.374-32.108,32.108-32.108S82.508,32.266,82.508,50 C82.508,67.733,68.133,82.108,50.4,82.108z\"\n})), _path2 || (_path2 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M50.501,25C47.384,25,45,26.497,45,28.915v22.174C45,53.508,47.384,55,50.501,55C53.542,55,56,53.447,56,51.089V28.915 C56,26.554,53.542,25,50.501,25L50.501,25z\"\n})), _path3 || (_path3 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M50.002,62.78c-3.034,0-5.502,2.468-5.502,5.503c0,3.031,2.468,5.5,5.502,5.5c3.032,0,5.498-2.469,5.498-5.5 C55.5,65.248,53.034,62.78,50.002,62.78L50.002,62.78z\"\n})), _path4 || (_path4 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M50.402,62.349\"\n})));\nexport default SvgFormWarnings;","var _path, _path2, _path3, _path4, _path5, _path6, _path7, _path8, _path9, _path10, _path11;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nconst SvgIconSalesforce = props => /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n fill: \"none\",\n viewBox: \"0 0 18 12\"\n}, props), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M7.77472 1.38221C8.04946 1.09316 8.38 0.862914 8.74631 0.705423C9.11262 0.547931 9.50708 0.466474 9.90579 0.465985C11.0154 0.465985 11.9833 1.08472 12.4989 2.00358C12.96 1.79765 13.4594 1.69152 13.9644 1.69214C15.9654 1.69214 17.588 3.32891 17.588 5.3495C17.588 7.3701 15.9673 9.00686 13.9644 9.00686C13.7246 9.00697 13.4855 8.9831 13.2505 8.9356C12.9207 9.52639 12.3773 9.96851 11.732 10.1713C11.0866 10.374 10.3882 10.3221 9.7799 10.026C9.54305 10.5834 9.1443 11.0567 8.63534 11.3847C8.12637 11.7126 7.53067 11.8801 6.92544 11.8653C6.32021 11.8506 5.73336 11.6543 5.24097 11.3019C4.74857 10.9496 4.37334 10.4574 4.1639 9.88915C3.97431 9.92937 3.78103 9.94959 3.58722 9.94948C2.03811 9.94948 0.782236 8.67996 0.782236 7.11408C0.780984 6.61778 0.909827 6.12981 1.15591 5.69886C1.402 5.2679 1.75673 4.90902 2.18473 4.658C1.86991 3.9265 1.83319 3.10513 2.08149 2.34845C2.32978 1.59176 2.84596 0.951943 3.5329 0.549393C4.21983 0.146842 5.03016 0.00931735 5.81138 0.162698C6.5926 0.316078 7.29084 0.749788 7.77472 1.38221Z\",\n fill: \"#0D9DDA\"\n})), _path2 || (_path2 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M3.25192 6.28918C3.24121 6.3175 3.25575 6.32324 3.25919 6.32745C3.43802 6.45016 3.65126 6.51275 3.86804 6.50617C4.2182 6.50617 4.43556 6.3198 4.43556 6.02014V6.0144C4.43556 5.73732 4.19026 5.63629 3.96027 5.56358L3.93004 5.55401C3.7563 5.49775 3.60667 5.44915 3.60667 5.33472V5.32898C3.60667 5.23101 3.6943 5.15906 3.82977 5.15906C3.98488 5.16246 4.13708 5.20176 4.27445 5.27387C4.27445 5.27387 4.30889 5.29568 4.32114 5.26277C4.32765 5.24478 4.38581 5.08826 4.39232 5.07142C4.39443 5.06403 4.39386 5.05614 4.3907 5.04914C4.38755 5.04213 4.38202 5.03647 4.3751 5.03315C4.22285 4.94468 4.04986 4.89819 3.87378 4.89844H3.83857C3.51827 4.89844 3.2944 5.09209 3.2944 5.36955V5.37529C3.2944 5.66729 3.54123 5.76258 3.77237 5.82841L3.81064 5.83989C3.9794 5.89155 4.12444 5.93633 4.12444 6.05458V6.06071C4.12444 6.16901 4.02992 6.24976 3.87799 6.24976C3.71832 6.25118 3.56168 6.2061 3.42719 6.12003C3.40231 6.10548 3.38892 6.09515 3.3694 6.08367C3.36564 6.08043 3.3611 6.07823 3.35622 6.0773C3.35135 6.07636 3.34631 6.07673 3.34162 6.07836C3.33693 6.07999 3.33275 6.08282 3.3295 6.08657C3.32625 6.09033 3.32404 6.09487 3.3231 6.09974L3.25192 6.28918Z\",\n fill: \"white\"\n})), _path3 || (_path3 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M8.37399 6.29148C8.36328 6.3198 8.37782 6.32554 8.38126 6.32975C8.41251 6.35123 8.44497 6.37091 8.47846 6.38868C8.63567 6.47134 8.8114 6.51244 8.98896 6.50809C9.33912 6.50809 9.55648 6.32171 9.55648 6.02205V6.01631C9.55648 5.73924 9.3108 5.6382 9.08081 5.56549L9.05096 5.55592C8.87722 5.49966 8.72759 5.45106 8.72759 5.33663V5.33089C8.72759 5.23292 8.81523 5.16097 8.9507 5.16097C9.10579 5.16442 9.25799 5.20371 9.39537 5.27578C9.39537 5.27578 9.42943 5.2976 9.44206 5.26468C9.44857 5.2467 9.50674 5.09017 9.51324 5.07333C9.51535 5.06595 9.51478 5.05805 9.51163 5.05105C9.50848 5.04404 9.50295 5.03838 9.49602 5.03506C9.34368 4.9456 9.17022 4.89844 8.99356 4.89844H8.95873C8.63843 4.89844 8.41456 5.09209 8.41456 5.36954V5.37529C8.41456 5.66729 8.66177 5.76258 8.89253 5.82841L8.9308 5.83989C9.09956 5.89155 9.24498 5.93633 9.24498 6.05458V6.06071C9.24498 6.16901 9.15046 6.24976 8.99815 6.24976C8.83848 6.25113 8.68186 6.20606 8.54735 6.12003C8.52247 6.10548 8.50908 6.09592 8.48956 6.08367C8.48568 6.08092 8.48119 6.07914 8.47647 6.07847C8.47176 6.07781 8.46695 6.07828 8.46245 6.07986C8.45796 6.08143 8.45391 6.08406 8.45063 6.08752C8.44736 6.09098 8.44496 6.09517 8.44364 6.09974L8.37399 6.29148Z\",\n fill: \"white\"\n})), _path4 || (_path4 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M12.1649 5.38599C12.1385 5.29309 12.0933 5.20661 12.0321 5.13187C11.9708 5.05914 11.8941 5.00097 11.8075 4.96157C11.7083 4.9199 11.6018 4.89844 11.4943 4.89844C11.3867 4.89844 11.2802 4.9199 11.1811 4.96157C11.0945 5.00098 11.0178 5.05931 10.9568 5.13226C10.8956 5.20681 10.8504 5.29318 10.824 5.38599C10.7663 5.59136 10.7663 5.80864 10.824 6.014C10.8505 6.10675 10.8957 6.19309 10.9568 6.26774C11.0178 6.34054 11.0946 6.39841 11.1814 6.43689C11.3821 6.51854 11.6068 6.51854 11.8075 6.43689C11.8942 6.3982 11.971 6.34037 12.0321 6.26774C12.0932 6.19309 12.1384 6.10675 12.1649 6.014C12.2226 5.80864 12.2226 5.59136 12.1649 5.38599ZM11.8729 5.69981C11.8729 5.86896 11.8412 6.00291 11.7788 6.09705C11.7164 6.1912 11.6257 6.23597 11.4945 6.23597C11.3632 6.23597 11.2721 6.19043 11.2113 6.09705C11.1504 6.00367 11.1191 5.86743 11.1191 5.69981C11.1191 5.53218 11.1501 5.39747 11.2113 5.30409C11.2725 5.21071 11.3644 5.1667 11.4945 5.1667C11.6246 5.1667 11.7172 5.21186 11.7788 5.30409C11.8404 5.39632 11.8729 5.53065 11.8729 5.69981Z\",\n fill: \"white\"\n})), _path5 || (_path5 = /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M14.5639 6.19213C14.5628 6.1883 14.5608 6.18475 14.5582 6.18174C14.5556 6.17872 14.5524 6.17632 14.5487 6.17468C14.5451 6.17304 14.5411 6.17221 14.5372 6.17225C14.5332 6.17229 14.5292 6.1732 14.5256 6.17491C14.4818 6.19238 14.4363 6.20521 14.3898 6.21318C14.3368 6.22114 14.2833 6.22498 14.2298 6.22466C14.0886 6.22466 13.9761 6.18256 13.8953 6.09952C13.8146 6.01647 13.7694 5.88176 13.7702 5.69997C13.7702 5.53465 13.8085 5.41027 13.8823 5.31497C13.9562 5.21968 14.0622 5.17223 14.2065 5.17223C14.3111 5.17038 14.4154 5.18537 14.5153 5.21662C14.5153 5.21662 14.5382 5.22657 14.549 5.19634C14.575 5.12515 14.5937 5.07464 14.6209 4.99695C14.6222 4.99352 14.6228 4.98985 14.6225 4.98619C14.6223 4.98252 14.6213 4.97895 14.6196 4.97569C14.6179 4.97244 14.6156 4.96958 14.6127 4.96731C14.6098 4.96504 14.6065 4.9634 14.6029 4.9625C14.5395 4.94031 14.4741 4.92379 14.4078 4.91314C14.3353 4.90287 14.2621 4.898 14.1889 4.89859C14.0771 4.89638 13.9661 4.91777 13.8632 4.96136C13.7732 5.00014 13.6928 5.05829 13.6278 5.13166C13.5636 5.20559 13.5153 5.29196 13.4859 5.38539C13.4532 5.48701 13.437 5.59323 13.438 5.69997C13.438 5.94222 13.5031 6.13817 13.6324 6.2813C13.7618 6.42443 13.9558 6.49867 14.2091 6.49867C14.3505 6.49891 14.4907 6.4739 14.6232 6.42481C14.6293 6.42163 14.6338 6.41621 14.636 6.40972C14.6381 6.40322 14.6377 6.39615 14.6347 6.38999L14.5639 6.19213Z\",\n fill: \"white\"\n})), _path6 || (_path6 = /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M16.0581 5.33076C16.0332 5.24537 15.9901 5.16639 15.9318 5.09922C15.8798 5.03895 15.8158 4.9902 15.7439 4.95609C15.6544 4.91789 15.558 4.89835 15.4607 4.89868C15.3485 4.89585 15.2369 4.91753 15.1339 4.96221C15.0453 5.00225 14.9669 5.06162 14.9043 5.13596C14.8428 5.21166 14.7972 5.299 14.7703 5.39275C14.7409 5.49526 14.7264 5.60146 14.7271 5.7081C14.726 5.815 14.7411 5.92146 14.7719 6.02383C14.7999 6.11921 14.85 6.20664 14.9182 6.27899C14.9863 6.35134 15.0706 6.40658 15.1641 6.44021C15.2792 6.48163 15.4009 6.50136 15.5231 6.49838C15.809 6.49838 15.9593 6.43371 16.0206 6.39926C16.0313 6.39314 16.0416 6.38242 16.029 6.35219L15.9639 6.17079C15.9627 6.16706 15.9607 6.16364 15.958 6.16074C15.9553 6.15784 15.9521 6.15552 15.9485 6.15393C15.9449 6.15235 15.941 6.15153 15.9371 6.15154C15.9332 6.15154 15.9293 6.15236 15.9257 6.15395C15.7973 6.2077 15.6587 6.23253 15.5196 6.22666C15.3666 6.22666 15.2518 6.1815 15.1814 6.11185C15.1109 6.0422 15.0723 5.93351 15.0665 5.78311H16.0554C16.0626 5.78316 16.0695 5.78057 16.0748 5.77584C16.0802 5.77111 16.0836 5.76457 16.0845 5.75747C16.1033 5.61493 16.0932 5.47004 16.0546 5.33152L16.0581 5.33076ZM15.0711 5.53818C15.0807 5.45552 15.108 5.3759 15.1511 5.30473C15.1814 5.25796 15.2235 5.22004 15.2732 5.19483C15.3228 5.16963 15.3783 5.15803 15.4339 5.16122C15.4887 5.1581 15.5434 5.16978 15.5921 5.19503C15.6409 5.22028 15.6819 5.25817 15.711 5.30473C15.7521 5.37594 15.7748 5.45634 15.7768 5.53856L15.0711 5.53818Z\",\n fill: \"white\"\n})), _path7 || (_path7 = /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M8.13853 5.33076C8.11347 5.24544 8.07041 5.16648 8.01224 5.09922C7.96026 5.03895 7.89626 4.9902 7.82435 4.95609C7.73481 4.91797 7.63847 4.89844 7.54116 4.89868C7.4289 4.89585 7.31737 4.91753 7.21435 4.96221C7.12572 5.00213 7.04724 5.06152 6.98474 5.13596C6.92297 5.21147 6.87738 5.29888 6.8508 5.39275C6.82104 5.4952 6.80635 5.60143 6.80717 5.7081C6.80618 5.81502 6.82141 5.92147 6.85233 6.02383C6.88032 6.11916 6.93038 6.20654 6.99847 6.27889C7.06656 6.35123 7.15075 6.4065 7.2442 6.44021C7.35935 6.48166 7.48119 6.50139 7.60354 6.49838C7.88902 6.49838 8.03942 6.43371 8.10103 6.39926C8.11212 6.39314 8.12246 6.38242 8.10945 6.35219L8.04477 6.17079C8.04351 6.16706 8.04149 6.16364 8.03883 6.16074C8.03618 6.15783 8.03295 6.15552 8.02935 6.15393C8.02575 6.15235 8.02186 6.15153 8.01792 6.15154C8.01399 6.15154 8.0101 6.15236 8.0065 6.15395C7.87811 6.2076 7.73951 6.23243 7.60048 6.22666C7.4474 6.22666 7.3326 6.1815 7.26218 6.11185C7.19177 6.0422 7.15274 5.93351 7.14738 5.78311H8.13623C8.14334 5.78315 8.15021 5.78055 8.15552 5.77581C8.16082 5.77108 8.16418 5.76454 8.16493 5.75747C8.18424 5.61496 8.17421 5.47001 8.13547 5.33152L8.13853 5.33076ZM7.15159 5.53818C7.16135 5.45556 7.18862 5.37598 7.23157 5.30473C7.26192 5.25805 7.30404 5.22019 7.3537 5.19499C7.40335 5.1698 7.45878 5.15815 7.51437 5.16122C7.56924 5.15803 7.62396 5.16967 7.67277 5.19493C7.72159 5.22018 7.76271 5.25811 7.79182 5.30473C7.83285 5.37597 7.85535 5.45637 7.85726 5.53856L7.15159 5.53818Z\",\n fill: \"white\"\n})), _path8 || (_path8 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M5.41096 5.49278C5.37078 5.48971 5.31912 5.48857 5.25789 5.48857C5.17563 5.4882 5.09367 5.49862 5.01412 5.51956C4.94025 5.53902 4.87042 5.57142 4.80785 5.61524C4.7454 5.65917 4.69478 5.71788 4.66053 5.78612C4.62627 5.85437 4.60944 5.93003 4.61153 6.00636C4.60933 6.08407 4.62477 6.16127 4.65669 6.23216C4.68598 6.29384 4.73033 6.34714 4.78566 6.38715C4.84615 6.42956 4.91464 6.45925 4.98695 6.47441C5.07307 6.49297 5.16098 6.50196 5.24908 6.5012C5.34976 6.50131 5.45025 6.49286 5.54949 6.47594C5.64669 6.45948 5.76571 6.43537 5.79862 6.42772C5.83153 6.42006 5.86789 6.41011 5.86789 6.41011C5.87481 6.40811 5.88084 6.40379 5.88495 6.39786C5.88906 6.39194 5.89101 6.38478 5.89046 6.37758V5.47211C5.89046 5.27349 5.83727 5.12768 5.73318 5.03545C5.62909 4.94321 5.4764 4.89844 5.27893 4.89844C5.19002 4.89946 5.10133 4.90765 5.01374 4.92293C5.01374 4.92293 4.7979 4.96465 4.70759 5.03468C4.70186 5.03901 4.69782 5.04519 4.69614 5.05217C4.69447 5.05915 4.69527 5.06649 4.6984 5.07295L4.76843 5.26086C4.76942 5.26411 4.77107 5.26713 4.77326 5.26972C4.77546 5.27232 4.77817 5.27443 4.78122 5.27594C4.78427 5.27744 4.78759 5.27831 4.79099 5.27848C4.79438 5.27865 4.79778 5.27812 4.80096 5.27693C4.80665 5.27454 4.81215 5.27172 4.81742 5.26851C5.00876 5.16518 5.24832 5.16824 5.24832 5.16824C5.33459 5.16266 5.42035 5.18508 5.49285 5.23215C5.54681 5.27387 5.57398 5.33625 5.57398 5.4679V5.51C5.48941 5.49775 5.41096 5.49048 5.41096 5.49048V5.49278ZM5.01756 6.18547C4.99456 6.17028 4.97511 6.15031 4.96054 6.12691C4.93847 6.0878 4.92811 6.04316 4.93069 5.99833C4.92791 5.96154 4.93458 5.92466 4.95005 5.89117C4.96552 5.85768 4.98928 5.8287 5.01909 5.80697C5.01909 5.80697 5.10443 5.73273 5.3061 5.73541C5.39581 5.73708 5.4853 5.74475 5.57398 5.75837V6.20805C5.48558 6.22576 5.39608 6.23752 5.3061 6.24326C5.10481 6.2555 5.01527 6.18547 5.01603 6.18547\",\n fill: \"white\"\n})), _path9 || (_path9 = /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M13.3853 4.98887C13.3881 4.98212 13.3881 4.97454 13.3853 4.96779C13.3825 4.96105 13.3771 4.95569 13.3703 4.9529C13.3161 4.93854 13.2606 4.92906 13.2046 4.92457C13.1174 4.91541 13.0293 4.92968 12.9494 4.96591C12.8848 4.99318 12.8276 5.03542 12.7825 5.08914V4.96859C12.7827 4.96475 12.7821 4.96093 12.7807 4.95734C12.7794 4.95375 12.7773 4.95046 12.7747 4.94768C12.772 4.9449 12.7689 4.94267 12.7654 4.94114C12.7619 4.9396 12.7581 4.93878 12.7542 4.93874H12.5005C12.4967 4.93878 12.4929 4.9396 12.4894 4.94114C12.4859 4.94267 12.4827 4.9449 12.48 4.94768C12.4774 4.95046 12.4754 4.95375 12.474 4.95734C12.4727 4.96093 12.472 4.96475 12.4722 4.96859V6.44429C12.4722 6.44824 12.473 6.45215 12.4745 6.4558C12.476 6.45945 12.4783 6.46276 12.4811 6.46553C12.4839 6.46831 12.4872 6.4705 12.4909 6.47198C12.4945 6.47346 12.4985 6.47419 12.5024 6.47414H12.7623C12.7702 6.47414 12.7778 6.47099 12.7834 6.4654C12.789 6.4598 12.7921 6.45221 12.7921 6.44429V5.70682C12.7899 5.61916 12.801 5.53167 12.825 5.44735C12.8423 5.39289 12.8719 5.34313 12.9115 5.30192C12.9458 5.26788 12.9878 5.24266 13.034 5.22844C13.077 5.21597 13.1216 5.20966 13.1664 5.20969C13.203 5.21057 13.2394 5.21505 13.2751 5.22308C13.2942 5.22538 13.3049 5.21352 13.3133 5.19629C13.3302 5.15114 13.3784 5.01566 13.3876 4.98887\",\n fill: \"white\"\n})), _path10 || (_path10 = /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M10.9479 4.29937C10.8728 4.27602 10.7944 4.26466 10.7157 4.26569C10.5369 4.26569 10.3957 4.31621 10.297 4.41609C10.1983 4.51598 10.1317 4.66638 10.098 4.86462L10.0858 4.93159H9.8615C9.85341 4.93152 9.84557 4.93439 9.83945 4.93967C9.83332 4.94495 9.82932 4.95228 9.82821 4.9603L9.78994 5.16619C9.78726 5.18571 9.79568 5.19795 9.82209 5.19795H10.0406L9.81864 6.436C9.80551 6.5187 9.7858 6.60022 9.75971 6.67978C9.74416 6.73007 9.72078 6.7776 9.69044 6.82062C9.66843 6.85277 9.63682 6.87715 9.60013 6.89027C9.563 6.90194 9.52424 6.90762 9.48532 6.90711C9.45871 6.90647 9.43221 6.90353 9.40611 6.8983C9.38763 6.8947 9.36965 6.88892 9.35253 6.88108C9.34568 6.87844 9.33806 6.87861 9.33133 6.88155C9.32459 6.88448 9.31929 6.88995 9.31656 6.89677C9.30852 6.91782 9.25036 7.07817 9.24347 7.09807C9.24051 7.10519 9.24046 7.11318 9.24332 7.12033C9.24618 7.12749 9.25173 7.13323 9.25878 7.13634C9.28832 7.14695 9.31848 7.15576 9.34909 7.16275C9.39669 7.17326 9.4454 7.17789 9.49413 7.17653C9.5766 7.17777 9.65866 7.16483 9.73675 7.13826C9.80722 7.11156 9.87005 7.06792 9.91967 7.0112C9.9765 6.94645 10.0201 6.87116 10.0479 6.78962C10.0869 6.68174 10.1161 6.57056 10.1351 6.45743L10.3578 5.19642H10.6835C10.6916 5.1965 10.6994 5.19363 10.7056 5.18835C10.7117 5.18307 10.7157 5.17573 10.7168 5.16772L10.7551 4.96183C10.7577 4.94231 10.7493 4.93006 10.7229 4.93006H10.4068C10.4177 4.85433 10.4351 4.77969 10.4589 4.70695C10.474 4.66702 10.4978 4.63094 10.5285 4.60132C10.5516 4.57783 10.5799 4.56013 10.6112 4.54966C10.6452 4.54022 10.6804 4.53597 10.7157 4.53703C10.7429 4.53704 10.7701 4.53973 10.7968 4.54506C10.8274 4.55157 10.8396 4.55501 10.8477 4.55731C10.8798 4.56726 10.884 4.55731 10.8905 4.54238L10.9671 4.33458C10.9683 4.33114 10.9688 4.32749 10.9686 4.32384C10.9683 4.3202 10.9673 4.31665 10.9656 4.31341C10.9639 4.31017 10.9616 4.30732 10.9588 4.30504C10.9559 4.30275 10.9526 4.30108 10.9491 4.30013\",\n fill: \"white\"\n})), _path11 || (_path11 = /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M6.5316 6.44591C6.53175 6.44974 6.53114 6.45357 6.52979 6.45716C6.52844 6.46075 6.52639 6.46403 6.52375 6.46682C6.52111 6.4696 6.51793 6.47182 6.51442 6.47336C6.5109 6.4749 6.50712 6.47571 6.50328 6.47576H6.24076C6.23691 6.47577 6.2331 6.47499 6.22956 6.47347C6.22602 6.47195 6.22283 6.46973 6.22018 6.46693C6.21753 6.46414 6.21547 6.46083 6.21414 6.45722C6.21281 6.4536 6.21224 6.44976 6.21244 6.44591V4.33454C6.21224 4.33069 6.21281 4.32684 6.21414 4.32323C6.21547 4.31962 6.21753 4.31631 6.22018 4.31352C6.22283 4.31072 6.22602 4.3085 6.22956 4.30698C6.2331 4.30546 6.23691 4.30468 6.24076 4.30469H6.5029C6.50673 4.30474 6.51052 4.30555 6.51404 4.30709C6.51755 4.30862 6.52072 4.31085 6.52336 4.31363C6.526 4.31642 6.52806 4.3197 6.52941 4.32329C6.53076 4.32688 6.53137 4.33071 6.53122 4.33454L6.5316 6.44591Z\",\n fill: \"white\"\n})));\nexport default SvgIconSalesforce;","var _path, _path2, _path3, _path4, _path5, _path6, _path7, _path8, _path9, _path10, _path11;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nconst SvgIconSalesforceReverse = props => /*#__PURE__*/React.createElement(\"svg\", _extends({\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 32 22\"\n}, props), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M13.7454 3.6484C14.1844 3.18663 14.7124 2.81881 15.2976 2.56722C15.8829 2.31562 16.513 2.18549 17.15 2.18471C18.9228 2.18471 20.4691 3.17315 21.2929 4.64106C22.0295 4.31207 22.8273 4.14252 23.634 4.14352C26.8309 4.14352 29.4232 6.75828 29.4232 9.98623C29.4232 13.2142 26.8339 15.8289 23.634 15.8289C23.251 15.8291 22.869 15.791 22.4936 15.7151C21.9666 16.6589 21.0986 17.3652 20.0676 17.6891C19.0365 18.013 17.9207 17.93 16.9489 17.4571C16.5705 18.3474 15.9335 19.1036 15.1204 19.6275C14.3072 20.1514 13.3555 20.4189 12.3886 20.3954C11.4217 20.3718 10.4842 20.0583 9.69751 19.4954C8.91086 18.9325 8.31138 18.1462 7.97678 17.2384C7.67389 17.3027 7.36511 17.335 7.05548 17.3348C4.58062 17.3348 2.57423 15.3067 2.57423 12.8052C2.57223 12.0123 2.77807 11.2328 3.17122 10.5443C3.56437 9.85587 4.13109 9.28254 4.81486 8.88153C4.31191 7.71296 4.25325 6.4008 4.64992 5.19198C5.04659 3.98316 5.87125 2.96104 6.96869 2.31796C8.06614 1.67487 9.36072 1.45518 10.6088 1.7002C11.8569 1.94523 12.9724 2.63809 13.7454 3.6484Z\",\n fill: \"white\"\n})), _path2 || (_path2 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M6.52182 11.4913C6.5047 11.5365 6.52793 11.5457 6.53343 11.5524C6.81913 11.7484 7.15981 11.8484 7.50613 11.8379C8.06554 11.8379 8.4128 11.5402 8.4128 11.0615V11.0523C8.4128 10.6097 8.02091 10.4483 7.65347 10.3321L7.60517 10.3168C7.32761 10.2269 7.08856 10.1493 7.08856 9.9665V9.95733C7.08856 9.80082 7.22856 9.68588 7.44499 9.68588C7.69279 9.69132 7.93595 9.7541 8.15541 9.86929C8.15541 9.86929 8.21043 9.90414 8.23 9.85156C8.24039 9.82283 8.33332 9.57278 8.34371 9.54587C8.34708 9.53408 8.34617 9.52147 8.34114 9.51028C8.3361 9.49909 8.32727 9.49004 8.3162 9.48474C8.07298 9.3434 7.79661 9.26914 7.5153 9.26953H7.45905C6.94733 9.26953 6.58968 9.57889 6.58968 10.0221V10.0313C6.58968 10.4978 6.98401 10.65 7.35328 10.7552L7.41442 10.7735C7.68404 10.8561 7.91575 10.9276 7.91575 11.1165V11.1263C7.91575 11.2993 7.76474 11.4283 7.52202 11.4283C7.26693 11.4306 7.01669 11.3586 6.80182 11.221C6.76208 11.1978 6.74068 11.1813 6.7095 11.163C6.7035 11.1578 6.69624 11.1543 6.68845 11.1528C6.68066 11.1513 6.67261 11.1519 6.66511 11.1545C6.65762 11.1571 6.65094 11.1616 6.64575 11.1676C6.64056 11.1736 6.63703 11.1809 6.63553 11.1886L6.52182 11.4913Z\",\n fill: \"#0D9DDA\"\n})), _path3 || (_path3 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M14.7054 11.493C14.6883 11.5382 14.7115 11.5474 14.717 11.5541C14.767 11.5884 14.8188 11.6199 14.8723 11.6483C15.1235 11.7803 15.4042 11.846 15.6879 11.839C16.2473 11.839 16.5946 11.5413 16.5946 11.0626V11.0534C16.5946 10.6108 16.2021 10.4494 15.8346 10.3332L15.7869 10.3179C15.5094 10.228 15.2703 10.1504 15.2703 9.9676V9.95843C15.2703 9.80192 15.4103 9.68698 15.6268 9.68698C15.8745 9.69249 16.1177 9.75526 16.3372 9.87039C16.3372 9.87039 16.3916 9.90524 16.4118 9.85266C16.4221 9.82393 16.5151 9.57388 16.5255 9.54698C16.5288 9.53518 16.5279 9.52257 16.5229 9.51138C16.5179 9.50019 16.509 9.49114 16.498 9.48584C16.2546 9.34293 15.9775 9.26758 15.6952 9.26758H15.6396C15.1279 9.26758 14.7702 9.57693 14.7702 10.0202V10.0294C14.7702 10.4958 15.1652 10.6481 15.5338 10.7532L15.595 10.7716C15.8646 10.8541 16.0969 10.9256 16.0969 11.1145V11.1243C16.0969 11.2973 15.9459 11.4263 15.7026 11.4263C15.4475 11.4285 15.1973 11.3565 14.9824 11.2191C14.9426 11.1959 14.9212 11.1806 14.89 11.161C14.8838 11.1566 14.8767 11.1538 14.8691 11.1527C14.8616 11.1516 14.8539 11.1524 14.8467 11.1549C14.8396 11.1574 14.8331 11.1616 14.8279 11.1672C14.8226 11.1727 14.8188 11.1794 14.8167 11.1867L14.7054 11.493Z\",\n fill: \"#0D9DDA\"\n})), _path4 || (_path4 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M20.7621 10.0533C20.7199 9.90488 20.6477 9.76672 20.55 9.64733C20.452 9.53114 20.3294 9.43821 20.1911 9.37527C20.0327 9.3087 19.8626 9.27441 19.6907 9.27441C19.5188 9.27441 19.3487 9.3087 19.1903 9.37527C19.052 9.43823 18.9296 9.53141 18.832 9.64794C18.7342 9.76704 18.662 9.90503 18.6199 10.0533C18.5278 10.3814 18.5278 10.7285 18.6199 11.0566C18.6622 11.2047 18.7344 11.3426 18.832 11.4619C18.9294 11.5782 19.0522 11.6707 19.1909 11.7321C19.5115 11.8626 19.8705 11.8626 20.1911 11.7321C20.3296 11.6703 20.4523 11.5779 20.55 11.4619C20.6476 11.3427 20.7198 11.2047 20.7621 11.0566C20.8543 10.7285 20.8543 10.3814 20.7621 10.0533ZM20.2957 10.5546C20.2957 10.8248 20.2449 11.0388 20.1453 11.1892C20.0456 11.3396 19.9007 11.4112 19.691 11.4112C19.4813 11.4112 19.3358 11.3384 19.2386 11.1892C19.1414 11.04 19.0912 10.8224 19.0912 10.5546C19.0912 10.2868 19.1408 10.0716 19.2386 9.92245C19.3364 9.77328 19.4831 9.70297 19.691 9.70297C19.8989 9.70297 20.0468 9.77511 20.1453 9.92245C20.2437 10.0698 20.2957 10.2844 20.2957 10.5546Z\",\n fill: \"#0D9DDA\"\n})), _path5 || (_path5 = /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M24.5917 11.3392C24.5899 11.333 24.5868 11.3274 24.5827 11.3226C24.5785 11.3177 24.5733 11.3139 24.5675 11.3113C24.5617 11.3087 24.5554 11.3073 24.549 11.3074C24.5426 11.3075 24.5363 11.3089 24.5306 11.3116C24.4606 11.3396 24.3878 11.36 24.3135 11.3728C24.229 11.3855 24.1435 11.3916 24.058 11.3911C23.8324 11.3911 23.6526 11.3239 23.5236 11.1912C23.3946 11.0585 23.3225 10.8433 23.3237 10.5529C23.3237 10.2888 23.3849 10.0901 23.5028 9.93789C23.6208 9.78565 23.7902 9.70984 24.0207 9.70984C24.1879 9.7069 24.3545 9.73085 24.5141 9.78076C24.5141 9.78076 24.5507 9.79666 24.5679 9.74836C24.6094 9.63464 24.6394 9.55394 24.6828 9.42983C24.6849 9.42435 24.6858 9.41849 24.6854 9.41264C24.6851 9.40679 24.6835 9.40108 24.6808 9.39588C24.6781 9.39068 24.6743 9.38612 24.6697 9.38249C24.6651 9.37886 24.6598 9.37624 24.6541 9.37481C24.5527 9.33936 24.4483 9.31297 24.3423 9.29594C24.2264 9.27953 24.1095 9.27177 23.9926 9.27271C23.814 9.26917 23.6367 9.30334 23.4723 9.37298C23.3285 9.43494 23.2001 9.52783 23.0963 9.64504C22.9937 9.76315 22.9164 9.90113 22.8695 10.0504C22.8172 10.2127 22.7914 10.3824 22.793 10.5529C22.793 10.9399 22.897 11.253 23.1036 11.4816C23.3103 11.7103 23.6202 11.8289 24.025 11.8289C24.2507 11.8293 24.4748 11.7893 24.6865 11.7109C24.6961 11.7058 24.7035 11.6971 24.7069 11.6868C24.7103 11.6764 24.7096 11.6651 24.7048 11.6552L24.5917 11.3392Z\",\n fill: \"#0D9DDA\"\n})), _path6 || (_path6 = /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M26.978 9.96505C26.9382 9.82865 26.8694 9.70247 26.7763 9.59517C26.6932 9.49889 26.591 9.42101 26.4761 9.36651C26.3331 9.30549 26.1791 9.27428 26.0237 9.27481C25.8443 9.27027 25.6661 9.30491 25.5015 9.3763C25.3601 9.44026 25.2347 9.5351 25.1347 9.65386C25.0365 9.77479 24.9637 9.91433 24.9207 10.0641C24.8737 10.2278 24.8504 10.3975 24.8517 10.5679C24.8499 10.7386 24.874 10.9087 24.9232 11.0723C24.9679 11.2246 25.048 11.3643 25.1569 11.4799C25.2658 11.5955 25.4004 11.6837 25.5498 11.7374C25.7336 11.8036 25.9281 11.8351 26.1233 11.8304C26.58 11.8304 26.8203 11.727 26.9181 11.672C26.9352 11.6622 26.9517 11.6451 26.9316 11.5968L26.8276 11.307C26.8256 11.3011 26.8224 11.2956 26.8181 11.291C26.8139 11.2863 26.8087 11.2826 26.803 11.2801C26.7972 11.2776 26.791 11.2763 26.7847 11.2763C26.7784 11.2763 26.7722 11.2776 26.7665 11.2801C26.5614 11.366 26.3399 11.4056 26.1178 11.3963C25.8733 11.3963 25.6898 11.3241 25.5774 11.2129C25.4649 11.1016 25.4031 10.928 25.3939 10.6877H26.9737C26.9852 10.6878 26.9962 10.6836 27.0048 10.6761C27.0134 10.6685 27.0188 10.6581 27.0202 10.6467C27.0503 10.419 27.0341 10.1876 26.9725 9.96627L26.978 9.96505ZM25.4013 10.2964C25.4166 10.1644 25.4602 10.0372 25.5291 9.92348C25.5774 9.84876 25.6447 9.78819 25.724 9.74791C25.8034 9.70764 25.892 9.68911 25.9809 9.69421C26.0684 9.68923 26.1557 9.70789 26.2336 9.74822C26.3115 9.78856 26.377 9.84909 26.4235 9.92348C26.4893 10.0372 26.5254 10.1657 26.5287 10.297L25.4013 10.2964Z\",\n fill: \"#0D9DDA\"\n})), _path7 || (_path7 = /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M14.3263 9.96505C14.2862 9.82875 14.2174 9.70262 14.1245 9.59517C14.0415 9.49889 13.9392 9.42101 13.8243 9.36651C13.6813 9.30562 13.5274 9.27442 13.3719 9.27481C13.1926 9.27027 13.0144 9.30491 12.8498 9.3763C12.7082 9.44006 12.5828 9.53493 12.483 9.65386C12.3843 9.7745 12.3114 9.91413 12.269 10.0641C12.2214 10.2277 12.198 10.3975 12.1993 10.5679C12.1977 10.7387 12.222 10.9087 12.2714 11.0723C12.3161 11.2245 12.3961 11.3641 12.5049 11.4797C12.6137 11.5953 12.7482 11.6836 12.8975 11.7374C13.0814 11.8036 13.2761 11.8352 13.4716 11.8304C13.9276 11.8304 14.1679 11.727 14.2664 11.672C14.2841 11.6622 14.3006 11.6451 14.2798 11.5968L14.1765 11.307C14.1745 11.3011 14.1712 11.2956 14.167 11.291C14.1627 11.2863 14.1576 11.2826 14.1518 11.2801C14.1461 11.2776 14.1399 11.2763 14.1336 11.2763C14.1273 11.2763 14.1211 11.2776 14.1153 11.2801C13.9102 11.3658 13.6888 11.4055 13.4667 11.3963C13.2221 11.3963 13.0387 11.3241 12.9262 11.2129C12.8137 11.1016 12.7514 10.928 12.7428 10.6877H14.3226C14.334 10.6878 14.3449 10.6836 14.3534 10.676C14.3619 10.6685 14.3672 10.658 14.3685 10.6467C14.3993 10.4191 14.3833 10.1875 14.3214 9.96627L14.3263 9.96505ZM12.7495 10.2964C12.7651 10.1644 12.8087 10.0373 12.8773 9.92348C12.9258 9.8489 12.9931 9.78842 13.0724 9.74817C13.1517 9.70792 13.2403 9.6893 13.3291 9.69421C13.4168 9.68912 13.5042 9.70772 13.5822 9.74806C13.6602 9.7884 13.7259 9.84899 13.7724 9.92348C13.8379 10.0373 13.8739 10.1657 13.8769 10.297L12.7495 10.2964Z\",\n fill: \"#0D9DDA\"\n})), _path8 || (_path8 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M9.9689 10.2219C9.90471 10.217 9.82217 10.2152 9.72435 10.2152C9.59293 10.2146 9.462 10.2313 9.3349 10.2647C9.21689 10.2958 9.10533 10.3476 9.00537 10.4176C8.90559 10.4877 8.82473 10.5815 8.77001 10.6906C8.71528 10.7996 8.6884 10.9205 8.69174 11.0424C8.68822 11.1665 8.71288 11.2899 8.76388 11.4031C8.81067 11.5016 8.88153 11.5868 8.96991 11.6507C9.06656 11.7185 9.17597 11.7659 9.2915 11.7901C9.42909 11.8198 9.56954 11.8341 9.71029 11.8329C9.87112 11.8331 10.0317 11.8196 10.1902 11.7926C10.3455 11.7663 10.5356 11.7277 10.5882 11.7155C10.6408 11.7033 10.6989 11.6874 10.6989 11.6874C10.71 11.6842 10.7196 11.6773 10.7261 11.6678C10.7327 11.6584 10.7358 11.6469 10.735 11.6354V10.1889C10.735 9.87161 10.65 9.63867 10.4837 9.49133C10.3174 9.34399 10.0734 9.27246 9.75798 9.27246C9.61593 9.2741 9.47424 9.28718 9.33429 9.31159C9.33429 9.31159 8.98948 9.37823 8.84519 9.49011C8.83605 9.49703 8.82958 9.5069 8.82691 9.51805C8.82423 9.5292 8.82551 9.54093 8.83052 9.55125L8.9424 9.85143C8.94398 9.85663 8.9466 9.86145 8.95012 9.86559C8.95363 9.86974 8.95795 9.87312 8.96282 9.87552C8.96769 9.87793 8.97301 9.87931 8.97843 9.87959C8.98386 9.87986 8.98928 9.87902 8.99437 9.87711C9.00345 9.87329 9.01224 9.86879 9.02066 9.86366C9.32634 9.69859 9.70907 9.70348 9.70907 9.70348C9.84689 9.69456 9.9839 9.73037 10.0997 9.80558C10.1859 9.87222 10.2293 9.97187 10.2293 10.1822V10.2494C10.0942 10.2299 9.9689 10.2183 9.9689 10.2183V10.2219ZM9.34041 11.3285C9.30366 11.3043 9.27258 11.2724 9.24931 11.235C9.21405 11.1725 9.19749 11.1012 9.20162 11.0296C9.19719 10.9708 9.20783 10.9119 9.23254 10.8584C9.25726 10.8049 9.29523 10.7586 9.34285 10.7239C9.34285 10.7239 9.47919 10.6053 9.80138 10.6095C9.94469 10.6122 10.0877 10.6245 10.2293 10.6462V11.3646C10.0881 11.3929 9.94513 11.4117 9.80138 11.4208C9.4798 11.4404 9.33674 11.3285 9.33796 11.3285\",\n fill: \"#0D9DDA\"\n})), _path9 || (_path9 = /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M22.7088 9.40488C22.7132 9.39409 22.7132 9.38198 22.7087 9.37121C22.7043 9.36043 22.6957 9.35187 22.6849 9.34741C22.5982 9.32448 22.5096 9.30934 22.4202 9.30216C22.2808 9.28752 22.1401 9.31032 22.0124 9.36819C21.9092 9.41176 21.8179 9.47924 21.7459 9.56506V9.37247C21.7461 9.36635 21.7451 9.36024 21.743 9.3545C21.7408 9.34877 21.7375 9.34352 21.7333 9.33908C21.7291 9.33463 21.724 9.33108 21.7184 9.32862C21.7128 9.32617 21.7067 9.32486 21.7006 9.32479H21.2953C21.2892 9.32486 21.2831 9.32617 21.2775 9.32862C21.2719 9.33108 21.2668 9.33463 21.2626 9.33908C21.2584 9.34352 21.2551 9.34877 21.2529 9.3545C21.2508 9.36024 21.2498 9.36635 21.25 9.37247V11.7299C21.25 11.7363 21.2513 11.7425 21.2537 11.7483C21.2562 11.7542 21.2597 11.7594 21.2642 11.7639C21.2687 11.7683 21.274 11.7718 21.2799 11.7742C21.2858 11.7765 21.292 11.7777 21.2983 11.7776H21.7135C21.7261 11.7776 21.7382 11.7726 21.7472 11.7637C21.7561 11.7547 21.7611 11.7426 21.7611 11.7299V10.5518C21.7576 10.4118 21.7753 10.272 21.8137 10.1373C21.8414 10.0503 21.8887 9.97082 21.9519 9.90498C22.0066 9.8506 22.0738 9.81032 22.1475 9.7876C22.2163 9.76768 22.2875 9.75759 22.3591 9.75764C22.4175 9.75904 22.4757 9.76621 22.5327 9.77904C22.5633 9.78271 22.5804 9.76375 22.5938 9.73624C22.6207 9.6641 22.6978 9.44767 22.7124 9.40488\",\n fill: \"#0D9DDA\"\n})), _path10 || (_path10 = /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M18.8165 8.31172C18.6964 8.27442 18.5712 8.25626 18.4454 8.25792C18.1599 8.25792 17.9343 8.33862 17.7766 8.49819C17.6188 8.65776 17.5125 8.89803 17.4587 9.21472L17.4391 9.32171H17.0808C17.0679 9.32159 17.0554 9.32617 17.0456 9.33461C17.0358 9.34305 17.0294 9.35476 17.0276 9.36756L16.9665 9.69648C16.9622 9.72766 16.9757 9.74723 17.0179 9.74723H17.3669L17.0123 11.725C16.9914 11.8571 16.9599 11.9874 16.9182 12.1145C16.8934 12.1948 16.856 12.2707 16.8075 12.3395C16.7724 12.3908 16.7219 12.4298 16.6633 12.4507C16.6039 12.4694 16.542 12.4785 16.4798 12.4776C16.4373 12.4766 16.395 12.4719 16.3533 12.4636C16.3238 12.4578 16.295 12.4486 16.2677 12.4361C16.2567 12.4318 16.2446 12.4321 16.2338 12.4368C16.2231 12.4415 16.2146 12.4502 16.2102 12.4611C16.1974 12.4947 16.1045 12.7509 16.0935 12.7827C16.0887 12.7941 16.0886 12.8068 16.0932 12.8183C16.0978 12.8297 16.1066 12.8389 16.1179 12.8438C16.1651 12.8608 16.2133 12.8749 16.2622 12.886C16.3382 12.9028 16.4161 12.9102 16.4939 12.908C16.6257 12.91 16.7568 12.8893 16.8815 12.8469C16.9941 12.8042 17.0945 12.7345 17.1738 12.6439C17.2645 12.5405 17.3341 12.4202 17.3786 12.2899C17.4409 12.1176 17.4876 11.94 17.518 11.7593L17.8738 9.74478H18.3941C18.407 9.7449 18.4195 9.74032 18.4293 9.73188C18.4391 9.72344 18.4455 9.71173 18.4472 9.69893L18.5084 9.37001C18.5127 9.33883 18.4992 9.31926 18.457 9.31926H17.952C17.9695 9.19829 17.9973 9.07903 18.0352 8.96283C18.0593 8.89905 18.0973 8.84141 18.1464 8.79409C18.1834 8.75657 18.2286 8.72829 18.2785 8.71156C18.3328 8.69649 18.3891 8.68969 18.4454 8.69138C18.4889 8.6914 18.5323 8.6957 18.575 8.70422C18.6239 8.71461 18.6435 8.72012 18.6563 8.72378C18.7077 8.73968 18.7144 8.72378 18.7248 8.69994L18.8471 8.36796C18.8491 8.36247 18.8499 8.35664 18.8495 8.35082C18.8491 8.345 18.8475 8.33932 18.8448 8.33415C18.8421 8.32898 18.8383 8.32442 18.8338 8.32077C18.8292 8.31712 18.824 8.31445 18.8183 8.31294\",\n fill: \"#0D9DDA\"\n})), _path11 || (_path11 = /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M11.756 11.7312C11.7563 11.7373 11.7553 11.7434 11.7532 11.7492C11.751 11.7549 11.7477 11.7601 11.7435 11.7646C11.7393 11.769 11.7342 11.7726 11.7286 11.775C11.723 11.7775 11.7169 11.7788 11.7108 11.7789H11.2914C11.2852 11.7789 11.2792 11.7776 11.2735 11.7752C11.2678 11.7728 11.2627 11.7692 11.2585 11.7648C11.2543 11.7603 11.251 11.755 11.2489 11.7493C11.2468 11.7435 11.2458 11.7373 11.2462 11.7312V8.35823C11.2458 8.35209 11.2468 8.34594 11.2489 8.34017C11.251 8.33439 11.2543 8.32911 11.2585 8.32465C11.2627 8.32019 11.2678 8.31663 11.2735 8.31421C11.2792 8.31178 11.2852 8.31054 11.2914 8.31055H11.7102C11.7163 8.31062 11.7224 8.31193 11.728 8.31438C11.7336 8.31684 11.7387 8.32039 11.7429 8.32484C11.7471 8.32928 11.7504 8.33453 11.7525 8.34026C11.7547 8.346 11.7557 8.35211 11.7554 8.35823L11.756 11.7312Z\",\n fill: \"#0D9DDA\"\n})));\nexport default SvgIconSalesforceReverse;","var _path;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nconst SvgPdfImportArrow = props => /*#__PURE__*/React.createElement(\"svg\", _extends({\n viewBox: \"0 0 18 14\",\n xmlns: \"http://www.w3.org/2000/svg\"\n}, props), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M14.144 7.897H2.038c-.11 0-.219.002-.327-.012-.482-.06-.812-.6-.683-1.112.112-.441.41-.675.863-.675h12.273c-.083-.096-.126-.148-.17-.197l-2.9-3.218c-.076-.085-.155-.17-.218-.267-.34-.524-.075-1.264.498-1.395.352-.081.62.083.86.348 1.47 1.624 2.944 3.247 4.417 4.87.466.513.465 1.005 0 1.518l-3.59 3.956c-.331.364-.651.743-1.006 1.076-.412.386-1.024.218-1.251-.308-.155-.358-.079-.76.212-1.08a1931.66 1931.66 0 012.995-3.292c.05-.054.113-.093.17-.14-.013-.023-.025-.048-.037-.072z\"\n})));\nexport default SvgPdfImportArrow;","var _circle, _path;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nconst SvgPdfImportCancel = props => /*#__PURE__*/React.createElement(\"svg\", _extends({\n viewBox: \"0 0 14 14\",\n xmlns: \"http://www.w3.org/2000/svg\"\n}, props), _circle || (_circle = /*#__PURE__*/React.createElement(\"circle\", {\n fill: \"#D73026\",\n fillRule: \"nonzero\",\n cx: 7,\n cy: 7,\n r: 7\n})), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M4.135 9.868a.448.448 0 0 1-.002-.633l2.224-2.237L4.13 4.774a.448.448 0 0 1-.004-.63l.008-.007a.449.449 0 0 1 .64-.003l2.216 2.23L9.226 4.13a.449.449 0 0 1 .638.005l.009.008a.448.448 0 0 1-.005.63L7.643 6.998l2.223 2.237a.448.448 0 0 1 0 .633h-.002a.45.45 0 0 1-.634 0L6.99 7.633l-2.22 2.235a.45.45 0 0 1-.636 0\",\n stroke: \"#FFF\",\n strokeWidth: 0.4,\n fill: \"#FFF\"\n})));\nexport default SvgPdfImportCancel;","var _path, _path2;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nconst SvgPdfImportDuplicate = props => /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 8.4 10.29\"\n}, props), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n fill: \"#fff\",\n d: \"M7.72 0H2.8a.64.64 0 00-.45.19.59.59 0 00-.18.44v.66h4.1a.63.63 0 01.44.18.64.64 0 01.19.45v6.29h.82a.75.75 0 00.26 0A.71.71 0 008.2 8a.8.8 0 00.15-.21.74.74 0 00.05-.25v-7a.69.69 0 00-.22-.39.64.64 0 00-.46-.15\"\n})), _path2 || (_path2 = /*#__PURE__*/React.createElement(\"path\", {\n fill: \"#fff\",\n d: \"M5.6 10.29h-5a.63.63 0 01-.45-.18.67.67 0 01-.15-.45v-7a.67.67 0 01.18-.44A.64.64 0 01.63 2h5a.64.64 0 01.45.19.67.67 0 01.18.44v7a.67.67 0 01-.18.45.63.63 0 01-.48.21z\"\n})));\nexport default SvgPdfImportDuplicate;","var _circle, _path;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nconst SvgPdfImportError = props => /*#__PURE__*/React.createElement(\"svg\", _extends({\n viewBox: \"0 0 16 16\",\n xmlns: \"http://www.w3.org/2000/svg\"\n}, props), _circle || (_circle = /*#__PURE__*/React.createElement(\"circle\", {\n cx: 8,\n cy: 8,\n r: 8,\n fill: \"#DC2D2C\",\n fillRule: \"nonzero\"\n})), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n fill: \"#FFF\",\n d: \"M7.986 3c.506 0 .934.285.934.791 0 1.544-.182 3.762-.182 5.306 0 .402-.44.57-.752.57-.415 0-.765-.168-.765-.57 0-1.544-.182-3.762-.182-5.306 0-.506.415-.791.947-.791M7.999 12.56A1 1 0 0 1 7 11.562c0-.545.428-1 .999-1 .532 0 .986.455.986 1 0 .531-.454.998-.986.998\"\n})));\nexport default SvgPdfImportError;","var _path;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nconst SvgPdfImportLock = props => /*#__PURE__*/React.createElement(\"svg\", _extends({\n viewBox: \"0 0 40 53\",\n xmlns: \"http://www.w3.org/2000/svg\"\n}, props), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n fill: \"#A6A8C7\",\n d: \"M38.889 19.875h-3.333v-4.417C35.556 6.935 28.577 0 20 0 11.423 0 4.444 6.935 4.444 15.458v4.417H1.111c-.614 0-1.111.494-1.111 1.104v27.604C0 51.02 1.993 53 4.444 53h31.112C38.006 53 40 51.02 40 48.583V20.98c0-.61-.497-1.104-1.111-1.104zM23.327 42.941c.035.311-.066.624-.277.858-.21.234-.512.368-.828.368h-4.444c-.316 0-.618-.134-.828-.368a1.102 1.102 0 01-.277-.858l.701-6.264a4.36 4.36 0 01-1.818-3.552c0-2.436 1.993-4.417 4.444-4.417 2.451 0 4.445 1.981 4.445 4.417a4.36 4.36 0 01-1.819 3.552l.7 6.264zm5.562-23.066H11.11v-4.417c0-4.87 3.988-8.833 8.889-8.833s8.889 3.963 8.889 8.833v4.417z\"\n})));\nexport default SvgPdfImportLock;","var _rect, _path, _rect2, _rect3, _circle, _path2;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nconst SvgPdfImportPdfLoadError = props => /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n fill: \"#fff\",\n viewBox: \"0 0 72 69\"\n}, props), _rect || (_rect = /*#__PURE__*/React.createElement(\"rect\", {\n width: 58,\n height: 61,\n rx: 3\n})), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M13.08 17.66a2.4 2.4 0 100-4.77h-2.43v4.77zm-2.46 3.57V28H6.47V9.28h7c3.79 0 6.39 2.5 6.39 6s-2.6 6-6.39 6zM28.52 24c2.86 0 5.21-1.66 5.21-5.4s-2.35-5.42-5.21-5.42h-2.43V24zm-6.59 4V9.28h6.77c5.61 0 9.37 3.58 9.37 9.35S34.31 28 28.67 28zm18.45-.05V9.28h12.03v3.95h-7.88v3.95h6.93v3.79h-6.9v6.98h-4.18z\",\n fill: \"#4177ff\",\n fillRule: \"evenodd\"\n})), _rect2 || (_rect2 = /*#__PURE__*/React.createElement(\"rect\", {\n x: 6,\n y: 35,\n width: 32,\n height: 7,\n rx: 2,\n fill: \"#bdd5ff\"\n})), _rect3 || (_rect3 = /*#__PURE__*/React.createElement(\"rect\", {\n x: 6,\n y: 47,\n width: 46,\n height: 7,\n rx: 2,\n fill: \"#bdd5ff\"\n})), _circle || (_circle = /*#__PURE__*/React.createElement(\"circle\", {\n cx: 57,\n cy: 54,\n r: 15,\n fill: \"#ec5758\"\n})), _path2 || (_path2 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M62.63 58.64l-4.93-4.93 4.93-4.93a.7.7 0 10-1-1l-4.93 4.93-4.92-4.91a.69.69 0 00-1 1l4.93 4.93-4.91 4.91a.7.7 0 101 1l4.93-4.93 4.93 4.93a.7.7 0 101-1\",\n stroke: \"#fff\",\n strokeWidth: 0.6,\n fillRule: \"evenodd\"\n})));\nexport default SvgPdfImportPdfLoadError;","var _g, _defs;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nconst SvgPdfImportPdfUploader = props => /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 75 86\"\n}, props), _g || (_g = /*#__PURE__*/React.createElement(\"g\", {\n clipPath: \"url(#a)\"\n}, /*#__PURE__*/React.createElement(\"path\", {\n fill: \"#425CBD\",\n fillRule: \"evenodd\",\n d: \"M13.6102 74.5718c.8136.8136 2.1327.8136 2.9463 0l8.3333-8.3333c.8136-.8136.8136-2.1327 0-2.9463l-8.3333-8.3334c-.8136-.8136-2.1327-.8136-2.9463 0-.8136.8136-.8136 2.1327 0 2.9463l4.7769 4.7769h-3.3038c-2.7626 0-5.4122-1.0975-7.3657-3.051-1.9535-1.9535-3.0509-4.603-3.0509-7.3657 0-2.7627 1.0974-5.4122 3.0509-7.3657s4.6031-3.051 7.3657-3.051H19.25c1.1506 0 2.0833-.9327 2.0833-2.0833 0-1.1506-.9327-2.0833-2.0833-2.0833h-4.1667c-3.8677 0-7.577 1.5364-10.3119 4.2713C2.0365 44.6882.5 48.3976.5 52.2653c0 3.8677 1.5364 7.5771 4.2714 10.312 2.7349 2.7349 6.4442 4.2713 10.3119 4.2713h3.3038l-4.7769 4.7769c-.8136.8136-.8136 2.1327 0 2.9463Z\",\n clipRule: \"evenodd\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n fill: \"#425CBD\",\n fillRule: \"evenodd\",\n d: \"M13.3997 7.33331V44.6666c0 3.866 3.134 7 7 7h28c3.866 0 7-3.134 7-7V17.4132c0-1.226-.4825-2.4027-1.3431-3.2758L41.8216 1.7241C40.9446.834293 39.7474.333313 38.498.333313H20.3997c-3.866 0-7 3.134007-7 6.999997Zm28-2.33333V12c0 1.2886 1.0446 2.3333 2.3333 2.3333h7l-9.3333-9.33332Z\",\n clipRule: \"evenodd\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n fill: \"#fff\",\n d: \"M66.6001 30.5h-30c-4.1421 0-7.5 3.3579-7.5 7.5v40c0 4.1421 3.3579 7.5 7.5 7.5h30c4.1421 0 7.5-3.3579 7.5-7.5V38c0-4.1421-3.3579-7.5-7.5-7.5Z\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n fill: \"#C8CEED\",\n fillRule: \"evenodd\",\n d: \"M66.6001 33h-30c-2.7614 0-5 2.2386-5 5v40c0 2.7614 2.2386 5 5 5h30c2.7614 0 5-2.2386 5-5V38c0-2.7614-2.2386-5-5-5Zm-30-2.5h30c4.1421 0 7.5 3.3579 7.5 7.5v40c0 4.1421-3.3579 7.5-7.5 7.5h-30c-4.1421 0-7.5-3.3579-7.5-7.5V38c0-4.1421 3.3579-7.5 7.5-7.5Z\",\n clipRule: \"evenodd\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n fill: \"#09F\",\n d: \"M37.8501 48.3501c0-1.5741 1.276-2.85 2.85-2.85h21.8c1.574 0 2.85 1.2759 2.85 2.85 0 1.574-1.276 2.85-2.85 2.85h-21.8c-1.574 0-2.85-1.276-2.85-2.85Z\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n fill: \"#FF6100\",\n d: \"M37.8501 58.0002c0-1.574 1.276-2.85 2.85-2.85h21.8c1.574 0 2.85 1.276 2.85 2.85s-1.276 2.85-2.85 2.85h-21.8c-1.574 0-2.85-1.276-2.85-2.85Z\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n fill: \"#FFB629\",\n d: \"M37.8501 67.65c0-1.5741 1.276-2.85 2.85-2.85h21.8c1.574 0 2.85 1.2759 2.85 2.85 0 1.574-1.276 2.85-2.85 2.85h-21.8c-1.574 0-2.85-1.276-2.85-2.85Z\"\n}))), _defs || (_defs = /*#__PURE__*/React.createElement(\"defs\", null, /*#__PURE__*/React.createElement(\"clipPath\", {\n id: \"a\"\n}, /*#__PURE__*/React.createElement(\"path\", {\n fill: \"#fff\",\n d: \"M0 0h75v86H0z\"\n})))));\nexport default SvgPdfImportPdfUploader;","var _path;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nconst SvgPdfImportPlus = props => /*#__PURE__*/React.createElement(\"svg\", _extends({\n viewBox: \"0 0 18 18\",\n xmlns: \"http://www.w3.org/2000/svg\"\n}, props), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M16.333 8.333H9.667V1.667a.667.667 0 00-1.334 0v6.666H1.667a.667.667 0 000 1.334h6.666v6.666a.667.667 0 001.334 0V9.667h6.666a.667.667 0 000-1.334\",\n fillRule: \"evenodd\"\n})));\nexport default SvgPdfImportPlus;","var _path;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nconst SvgPdfImportTrash = props => /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 8.6 12.24\"\n}, props), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n fill: \"#fff\",\n fillRule: \"evenodd\",\n d: \"M7.88 2.88V11a1.23 1.23 0 01-1.23 1.29H2A1.23 1.23 0 01.72 11V2.88zM2.52 4.75v5.62h1c.15 0 .16 0 .17-.15V4.93a.25.25 0 000-.09s-.05-.08-.07-.08zm3.56 0h-1c-.16 0-.17 0-.17.15v5.46h1.17zM0 2.14V.72h2.33a.32.32 0 00.21-.1c.16-.17.3-.36.46-.53A.24.24 0 013.17 0h2.26a.28.28 0 01.18.09c.16.17.3.36.46.52a.3.3 0 00.21.1H8.6v1.43z\"\n})));\nexport default SvgPdfImportTrash;","var _g;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nconst SvgPdfImportZoomIn = props => /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 21.5 21.49\"\n}, props), _g || (_g = /*#__PURE__*/React.createElement(\"g\", {\n fill: \"#45506b\"\n}, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M21.18 19.57l-5.3-5.32A8.47 8.47 0 0 0 18 8.68 8.85 8.85 0 0 0 9 0a8.85 8.85 0 0 0-9 8.68 8.85 8.85 0 0 0 9 8.68 9.11 9.11 0 0 0 5.15-1.57l5.34 5.36a1.2 1.2 0 0 0 1.66 0 1.1 1.1 0 0 0 0-1.6M9 2.26a6.54 6.54 0 0 1 6.65 6.41A6.54 6.54 0 0 1 9 15.09a6.54 6.54 0 0 1-6.65-6.41A6.54 6.54 0 0 1 9 2.26\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M9.37 5.48V8.3h2.71V9H9.37v2.84H8.6V9H5.89v-.7H8.6V5.48z\"\n}))));\nexport default SvgPdfImportZoomIn;","var _g;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nconst SvgPdfImportZoomOut = props => /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 21.5 21.49\"\n}, props), _g || (_g = /*#__PURE__*/React.createElement(\"g\", {\n fill: \"#45506b\"\n}, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M21.18 19.57l-5.3-5.32A8.47 8.47 0 0 0 18 8.68 8.85 8.85 0 0 0 9 0a8.85 8.85 0 0 0-9 8.68 8.85 8.85 0 0 0 9 8.68 9.11 9.11 0 0 0 5.15-1.57l5.34 5.36a1.2 1.2 0 0 0 1.66 0 1.1 1.1 0 0 0 0-1.6M9 2.26a6.54 6.54 0 0 1 6.65 6.41A6.54 6.54 0 0 1 9 15.09a6.54 6.54 0 0 1-6.65-6.41A6.54 6.54 0 0 1 9 2.26\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M11.14 8.28v.78H6.6v-.78z\"\n}))));\nexport default SvgPdfImportZoomOut;","var _path;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nconst SvgProtectedSwitch = props => /*#__PURE__*/React.createElement(\"svg\", _extends({\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 14 14\"\n}, props), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M9.53764 1.20605C9.12187 0.862702 8.8208 0.948539 8.40503 1.69246C8.13263 2.19317 7.68818 2.2504 7.41578 2.23609V2.13595C7.73119 1.97858 7.96058 1.66385 7.96058 1.29189C7.96058 0.762559 7.53048 0.333374 7.00001 0.333374C6.46954 0.333374 6.03944 0.762559 6.03944 1.29189C6.03944 1.66385 6.26883 1.97858 6.58424 2.13595V2.23609C6.31184 2.2504 5.86739 2.19317 5.59499 1.69246C5.17922 0.934232 4.87815 0.862702 4.46238 1.20605C4.03227 1.5494 2.36919 3.53795 0.333344 3.35197C0.333344 3.35197 0.734777 4.26757 1.83872 4.06728C1.83872 4.06728 2.42653 4.68244 3.37277 4.25326C3.37277 4.25326 3.87456 4.69675 4.66309 4.29618C4.66309 4.29618 5.25091 4.73967 5.86739 4.3534C5.86739 4.3534 6.22582 4.61091 6.61291 4.53938L6.64159 6.84267C6.59858 6.82837 6.55557 6.82837 6.51255 6.81406C6.51255 6.81406 5.82438 6.671 5.10754 6.47071C4.41937 6.28473 3.65951 5.99861 3.54481 5.84124C3.55915 5.82694 3.57349 5.82694 3.58782 5.81263C3.64517 5.78402 3.75987 5.7411 3.87456 5.72679C4.13263 5.66957 4.47671 5.65526 4.8208 5.64096C5.50897 5.61234 5.638 5.64096 5.65234 5.65526C5.65234 5.62665 6.05377 5.69818 6.15413 5.29761C6.15413 5.29761 6.16847 5.2833 6.15413 5.269C6.12546 4.99718 5.9104 4.98287 5.73836 4.93996C5.45162 4.89704 5.59499 4.91134 5.22223 4.92565C4.59141 4.96857 2.64159 4.8112 2.39786 5.84124C2.39786 5.86985 2.39786 5.88416 2.39786 5.91277C2.48388 6.79975 4.31901 7.18602 5.66668 7.45784C5.20789 7.77257 4.96417 8.17315 4.87815 8.68817C4.83513 9.24611 5.27958 9.77543 6.2975 10.362C5.52331 10.9199 5.00718 11.4349 5.05019 12.0501C5.12187 12.5651 5.58065 13.2375 6.45521 13.6667C6.45521 13.6667 5.83872 12.7225 5.79571 12.2075C5.7527 11.9071 5.92474 11.4636 6.6846 10.9199L6.71327 12.8083C6.71327 12.9657 6.8423 13.0945 7.00001 13.0945C7.15772 13.0945 7.28675 12.9657 7.28675 12.8083L7.31542 10.9628C8.00359 11.4779 8.1613 11.9071 8.13263 12.1932C8.08962 12.7082 7.47313 13.6524 7.47313 13.6524C8.36202 13.2232 8.80646 12.5365 8.87815 12.0358C8.92116 11.4063 8.40503 10.8913 7.63083 10.3477C8.66309 9.76113 9.0932 9.2318 9.05019 8.67386C8.94983 8.15884 8.7061 7.74396 8.26166 7.44353C9.59499 7.17171 11.4445 6.78545 11.5305 5.89847C11.5305 5.86985 11.5305 5.85555 11.5305 5.82694C11.2867 4.8112 9.33693 4.96857 8.7061 4.91134C8.31901 4.91134 8.47671 4.89704 8.18997 4.92565C8.01793 4.95426 7.80288 4.96857 7.7742 5.25469C7.7742 5.269 7.7742 5.2833 7.7742 5.2833C7.8889 5.68387 8.276 5.61234 8.276 5.64096C8.29033 5.64096 8.40503 5.61234 9.10754 5.62665C9.45162 5.64096 9.79571 5.66957 10.0538 5.71249C10.1828 5.7411 10.2832 5.76971 10.3405 5.79832C10.3548 5.81263 10.3835 5.81263 10.3835 5.82694C10.2688 5.9843 9.50897 6.27043 8.8208 6.45641C8.10395 6.65669 7.41578 6.79975 7.41578 6.79975C7.40144 6.79975 7.38711 6.79976 7.37277 6.81406L7.40144 4.53938C7.80288 4.61091 8.14696 4.3534 8.14696 4.3534C8.76345 4.73967 9.35126 4.29618 9.35126 4.29618C10.1398 4.69675 10.6273 4.25326 10.6273 4.25326C11.5735 4.68244 12.1613 4.06728 12.1613 4.06728C13.2652 4.26757 13.6667 3.35197 13.6667 3.35197C11.6165 3.53795 9.95341 1.5494 9.53764 1.20605ZM6.08245 9.34625C5.82438 9.18888 5.70969 8.97429 5.73836 8.83123C5.7527 8.63094 5.68101 8.15884 6.62725 7.80118L6.65592 9.7039C6.46954 9.58945 6.28316 9.4607 6.08245 9.34625ZM8.14696 8.83123C8.17564 8.97429 8.0466 9.18888 7.80288 9.34625C7.63083 9.44639 7.47313 9.56084 7.31542 9.66098L7.3441 7.8441C8.18997 8.17315 8.13263 8.63094 8.14696 8.83123Z\"\n})));\nexport default SvgProtectedSwitch;","var _path;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nconst SvgSearchBranding21 = props => /*#__PURE__*/React.createElement(\"svg\", _extends({\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 16 16\"\n}, props), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M10.7747 12.8961C9.68558 13.5948 8.39011 14 7 14C3.13401 14 0 10.866 0 7C0 3.13401 3.13401 0 7 0C10.866 0 14 3.13401 14 7C14 8.39011 13.5948 9.68558 12.8961 10.7747L15.5607 13.4393C16.1464 14.0251 16.1464 14.9749 15.5607 15.5607C14.9749 16.1464 14.0251 16.1464 13.4393 15.5607L10.7747 12.8961ZM11 7C11 9.20914 9.20914 11 7 11C4.79086 11 3 9.20914 3 7C3 4.79086 4.79086 3 7 3C9.20914 3 11 4.79086 11 7Z\",\n fill: \"#C8CEED\"\n})));\nexport default SvgSearchBranding21;","var _path;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nconst SvgSearchBranding21Focus = props => /*#__PURE__*/React.createElement(\"svg\", _extends({\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 16 16\"\n}, props), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M10.7747 12.8961C9.68558 13.5948 8.39011 14 7 14C3.13401 14 0 10.866 0 7C0 3.13401 3.13401 0 7 0C10.866 0 14 3.13401 14 7C14 8.39011 13.5948 9.68558 12.8961 10.7747L15.5607 13.4393C16.1464 14.0251 16.1464 14.9749 15.5607 15.5607C14.9749 16.1464 14.0251 16.1464 13.4393 15.5607L10.7747 12.8961ZM11 7C11 9.20914 9.20914 11 7 11C4.79086 11 3 9.20914 3 7C3 4.79086 4.79086 3 7 3C9.20914 3 11 4.79086 11 7Z\",\n fill: \"#6F76A7\"\n})));\nexport default SvgSearchBranding21Focus;","var _defs, _title, _g;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nconst SvgTextAlignCenter = props => /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 24 24\"\n}, props), _defs || (_defs = /*#__PURE__*/React.createElement(\"defs\", null, /*#__PURE__*/React.createElement(\"style\", null, \".cls-1{opacity:0.5;}\"))), _title || (_title = /*#__PURE__*/React.createElement(\"title\", null, \"jif_expand\")), _g || (_g = /*#__PURE__*/React.createElement(\"g\", {\n id: \"_Layer_2\",\n \"data-name\": \"\"\n}, /*#__PURE__*/React.createElement(\"g\", {\n id: \"Layer_1\",\n \"data-name\": \"Layer 1\"\n}, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M7,9H17a1,1,0,0,0,0-2H7A1,1,0,0,0,7,9Z\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M19,11H5a1,1,0,0,0,0,2H19a1,1,0,0,0,0-2Z\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M16,15H8a1,1,0,0,0,0,2h8a1,1,0,0,0,0-2Z\"\n})))));\nexport default SvgTextAlignCenter;","var _defs, _title, _g;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nconst SvgTextAlignLeft = props => /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 24 24\"\n}, props), _defs || (_defs = /*#__PURE__*/React.createElement(\"defs\", null, /*#__PURE__*/React.createElement(\"style\", null, \".cls-1{opacity:0.5;}\"))), _title || (_title = /*#__PURE__*/React.createElement(\"title\", null, \"jif_expand\")), _g || (_g = /*#__PURE__*/React.createElement(\"g\", {\n id: \"_Layer_2\",\n \"data-name\": \"\"\n}, /*#__PURE__*/React.createElement(\"g\", {\n id: \"Layer_1\",\n \"data-name\": \"Layer 1\"\n}, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M5,9H15a1,1,0,0,0,0-2H5A1,1,0,0,0,5,9Z\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M19,11H5a1,1,0,0,0,0,2H19a1,1,0,0,0,0-2Z\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M13,15H5a1,1,0,0,0,0,2h8a1,1,0,0,0,0-2Z\"\n})))));\nexport default SvgTextAlignLeft;","var _defs, _title, _g;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nconst SvgTextAlignRight = props => /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 24 24\"\n}, props), _defs || (_defs = /*#__PURE__*/React.createElement(\"defs\", null, /*#__PURE__*/React.createElement(\"style\", null, \".cls-1{opacity:0.5;}\"))), _title || (_title = /*#__PURE__*/React.createElement(\"title\", null, \"jif_expand\")), _g || (_g = /*#__PURE__*/React.createElement(\"g\", {\n id: \"_Layer_2\",\n \"data-name\": \"\"\n}, /*#__PURE__*/React.createElement(\"g\", {\n id: \"Layer_1\",\n \"data-name\": \"Layer 1\"\n}, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M9,9H19a1,1,0,0,0,0-2H9A1,1,0,0,0,9,9Z\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M19,11H5a1,1,0,0,0,0,2H19a1,1,0,0,0,0-2Z\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M19,15H11a1,1,0,0,0,0,2h8a1,1,0,0,0,0-2Z\"\n})))));\nexport default SvgTextAlignRight;","var _path, _path2, _path3;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nconst SvgAiLogo = props => /*#__PURE__*/React.createElement(\"svg\", _extends({\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 20 20\"\n}, props), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n className: \"ai-star1\",\n d: \"M5.73111 5.61379C6.08963 5.74646 6.08963 6.25354 5.73111 6.38621L5.20344 6.58146C4.45199 6.85952 3.85952 7.45199 3.58146 8.20344L3.38621 8.73111C3.25354 9.08963 2.74646 9.08963 2.61379 8.73111L2.41854 8.20344C2.14048 7.45199 1.54801 6.85952 0.796562 6.58146L0.268889 6.38621C-0.0896293 6.25354 -0.0896293 5.74646 0.268889 5.61379L0.796561 5.41854C1.54801 5.14048 2.14048 4.54801 2.41854 3.79656L2.61379 3.26889C2.74646 2.91037 3.25354 2.91037 3.38621 3.26889L3.58146 3.79656C3.85952 4.54801 4.45199 5.14048 5.20344 5.41854L5.73111 5.61379Z\",\n fill: \"#0099FF\"\n})), _path2 || (_path2 = /*#__PURE__*/React.createElement(\"path\", {\n className: \"ai-star2\",\n d: \"M15.4622 13.2276C16.1793 13.4929 16.1793 14.5071 15.4622 14.7724L14.4069 15.1629C12.904 15.719 11.719 16.904 11.1629 18.4069L10.7724 19.4622C10.5071 20.1793 9.49292 20.1793 9.22759 19.4622L8.83708 18.4069C8.28096 16.904 7.09602 15.719 5.59312 15.1629L4.53778 14.7724C3.82074 14.5071 3.82074 13.4929 4.53778 13.2276L5.59312 12.8371C7.09602 12.281 8.28096 11.096 8.83708 9.59312L9.22759 8.53778C9.49292 7.82074 10.5071 7.82074 10.7724 8.53778L11.1629 9.59312C11.719 11.096 12.904 12.281 14.4069 12.8371L15.4622 13.2276Z\",\n fill: \"#FF6100\"\n})), _path3 || (_path3 = /*#__PURE__*/React.createElement(\"path\", {\n className: \"ai-star3\",\n d: \"M15.4851 0.358519C15.6619 -0.119506 16.3381 -0.119507 16.5149 0.358519L16.7753 1.06208C17.146 2.06401 17.936 2.85397 18.9379 3.22472L19.6415 3.48506C20.1195 3.66194 20.1195 4.33806 19.6415 4.51494L18.9379 4.77528C17.936 5.14603 17.146 5.93599 16.7753 6.93792L16.5149 7.64148C16.3381 8.11951 15.6619 8.11951 15.4851 7.64148L15.2247 6.93792C14.854 5.93599 14.064 5.14603 13.0621 4.77528L12.3585 4.51494C11.8805 4.33806 11.8805 3.66194 12.3585 3.48506L13.0621 3.22472C14.064 2.85397 14.854 2.06401 15.2247 1.06208L15.4851 0.358519Z\",\n fill: \"#FFB629\"\n})));\nexport default SvgAiLogo;","var _path, _path2;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nconst SvgEnterpriseRocketMini = props => /*#__PURE__*/React.createElement(\"svg\", _extends({\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 24 24\"\n}, props), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M13.4142 10.6274C13.8048 11.0179 14.4379 11.0179 14.8284 10.6274C15.219 10.2369 15.219 9.60373 14.8284 9.21321C14.4379 8.82269 13.8048 8.82269 13.4142 9.21321C13.0237 9.60373 13.0237 10.2369 13.4142 10.6274Z\",\n fill: \"#596ED7\"\n})), _path2 || (_path2 = /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M2 5C2 3.34315 3.34315 2 5 2H19C20.6569 2 22 3.34315 22 5V19C22 20.6569 20.6569 22 19 22H5L4.99095 22H7.65685C5.77994 21.5789 5.46721 19.0362 7.18615 18.1729L8.71751 17.4038L6.59619 15.2825L5.86581 16.7796C5.0139 18.5258 2.44117 18.2353 2 16.3431V5ZM13.0399 15.2028C17.3033 14.4749 20.1526 6.01043 19.0711 4.92894C17.9896 3.84745 9.52514 6.69671 8.79722 10.9602L7.20504 10.9759C6.8856 10.9791 6.5869 11.1347 6.40122 11.3947L5.09968 13.2168C5.0177 13.3316 5.07708 13.4929 5.21392 13.5271L7.75737 14.163L9.87869 16.2843L10.5146 18.8277C10.5488 18.9646 10.7101 19.024 10.8248 18.942L12.6369 17.6476C12.9025 17.4579 13.0588 17.1506 13.0556 16.8242L13.0399 15.2028Z\",\n fill: \"#596ED7\"\n})));\nexport default SvgEnterpriseRocketMini;","const { window } = global;\n\nconst getSheetsDSN = () => {\n if (window?.isReport) {\n return 'https://d69c7dc71f6243c19aa8f1466c32ab5c@o61806.ingest.sentry.io/5352078';\n }\n\n if (window?.isBoards) {\n return 'https://983ae60052ddc6cf8a60dca2bfaa3b8c@o61806.ingest.sentry.io/4507571577749504';\n }\n\n // Sheets\n return 'https://23de99eacf6c4a068ba11e1a39556e6a@o61806.ingest.sentry.io/1211430';\n};\n\nconst getFSEnabledForSignFiller = () => {\n try {\n return window?.parent?.fsEnabled;\n } catch (e) {\n return false;\n }\n};\n\nmodule.exports = {\n academy: {\n sentry: {\n enable: true,\n dsn: 'https://e21856d505644c643840103d8dbd250c@o61806.ingest.sentry.io/4506626385641472'\n // name: 'academy',\n }\n },\n checkout: {\n sentry: {\n enable: true,\n dsn: 'https://ca58c76e1157458f941020590eab787c@o61806.ingest.sentry.io/4505396476641280'\n },\n fullStory: {\n enable: true\n }\n },\n 'data-dashboards': {\n sentry: {\n enable: true,\n dsn: 'https://64a93c3dc440e48a9118dc2c169351ef@o61806.ingest.us.sentry.io/4507407451160576'\n }\n },\n 'email-builder': {\n sentry: {\n enable: true,\n dsn: 'https://6625f7b197c65a4d8e49bc8e7641c8c2@o61806.ingest.us.sentry.io/4507407576465408'\n }\n },\n 'email-details': {\n sentry: {\n enable: true,\n dsn: 'https://e0a74287bf15c46b981ddad77de5d7d7@o61806.ingest.sentry.io/4505822059823104'\n },\n fullStory: {\n enable: false\n }\n },\n 'form-builder': {\n sentry: {\n enable: true,\n dsn: 'https://7b39e767f39941dd89d9361cf50382dd@o61806.ingest.sentry.io/132624',\n name: 'jotform-40'\n }\n },\n inbox: {\n sentry: {\n enable: true,\n dsn: 'https://f5fc3cd88f0744df9e3c8a263cd00db1@o61806.ingest.sentry.io/1353659'\n // name: 'inbox'\n },\n fullStory: {\n enable: window?.isFullStoryEnabled\n }\n },\n 'interview-management': {\n sentry: {\n enable: true,\n dsn: 'https://f875f9d7646f4149a6bfff821534e23b@o61806.ingest.sentry.io/4504971807162368'\n }\n },\n listings: {\n sentry: {\n enable: true,\n dsn: 'https://2c715cb8ed4745c383ff6830ca885807@o61806.ingest.sentry.io/5975209',\n name: 'listings'\n },\n fullStory: {\n enable: window?.isFullStoryEnabled\n }\n },\n myaccount: {\n sentry: {\n enable: true,\n dsn: 'https://4048665e726d45eba296f250ad4d09bb@o61806.ingest.sentry.io/6396369'\n // name: 'myaccountv4'\n },\n fullStory: {\n enable: window?.fullstoryEnabled\n }\n },\n 'page-builder': {\n sentry: {\n enable: true,\n dsn: 'https://727c1f481e28485a97e8a4ddae1bdaab@o61806.ingest.sentry.io/6179928'\n // name: 'landing-builder'\n }\n },\n 'pdf-editor': {\n sentry: {\n enable: window?.location.href.indexOf('download') < 0,\n dsn: 'https://10dcd48960b74f9e84c93bee96ee2c9e@o61806.ingest.sentry.io/1234288'\n // name: 'pdf-designer'\n },\n fullStory: {\n enable: window?.isFullStoryEnabled\n }\n },\n portal: {\n sentry: {\n enable: true,\n dsn: 'https://36d29a013f8a4bd7adfe310f5fe4d75a@o61806.ingest.sentry.io/5223511',\n name: 'app-builder'\n },\n fullStory: {\n enable: window?.fullStoryActiveForPortal\n }\n },\n 'refund-request': {\n sentry: {\n enable: true,\n dsn: 'https://c2bf244d1db8d74e25fafaf1b8f70747@o61806.ingest.sentry.io/4505786346110976'\n },\n fullStory: {\n enable: true\n }\n },\n sheets: {\n sentry: {\n enable: true,\n dsn: getSheetsDSN()\n // name: ['reports', 'spreadsheets']\n }\n },\n sign: {\n sentry: {\n enable: true,\n dsn: 'https://9b0abbc9280c47c683b8a9067f61e88e@o61806.ingest.sentry.io/5680940'\n // name: 'sign'\n },\n fullStory: {\n enable: window?.fsEnabled\n }\n },\n 'sign-filler': {\n sentry: {\n enable: true,\n dsn: 'https://1e23807c9020c755e635a09392e97b22@o61806.ingest.us.sentry.io/4507339316985856'\n },\n fullStory: {\n enable: getFSEnabledForSignFiller()\n }\n },\n 'subscription-dashboard': {\n sentry: {\n enable: true,\n dsn: 'https://75f5c88aeffd4f54964275c0fba96d59@o61806.ingest.sentry.io/6190171'\n // name: 'subscription-dashboard'\n }\n },\n workflow: {\n sentry: {\n enable: true,\n dsn: 'https://15571fc5437e4368b4e2ed0e32c6d93f@o61806.ingest.sentry.io/5261296'\n // name: 'workflow'\n },\n fullStory: {\n enable: !window?.isTemplateMode\n }\n },\n 'ai-agent': {\n sentry: {\n enable: true,\n dsn: 'https://9595e22b6185cd8e2ff3ea2fc28cc68f@o61806.ingest.us.sentry.io/4507502561001472',\n name: 'ai-agent'\n }\n },\n 'ai-agent-builder': {\n sentry: {\n enable: true,\n dsn: 'https://59098a0cef7524a00cbc88db5b10e2f5@o61806.ingest.us.sentry.io/4507883422875648'\n },\n fullStory: {\n enable: window?.fsEnabled\n }\n }\n};\n","import React from 'react';\nimport { generateNewColorSchemeCSS } from './actions';\n\nconst styleProps = [\n 'alignment',\n 'lineSpacing',\n 'background',\n 'fontcolor',\n 'formWidth',\n 'labelWidth',\n // 'font',\n 'fontsize',\n 'colorScheme',\n 'pageColor',\n 'inputColor',\n 'pageBackgroundImage',\n 'formBackgroundImage',\n 'font',\n 'buttonStyle'\n];\n\nexport const Styles = {\n layout: {\n containers: [\n { id: 'properties', text: 'Properties' },\n { id: 'injectCSS', text: 'Custom CSS' }\n ],\n lines: [\n { id: 'line1', length: 'two', containerID: 'properties' },\n { id: 'line2', length: 'two', containerID: 'properties' },\n {\n id: 'line3',\n length: 'two',\n containerID: 'properties',\n children: [React.createElement('hr', {\n key: 'styles-layout-hr-1',\n style: {\n backgroundColor: '#ece9e6', height: '1px', border: 0, margin: '0'\n }\n })]\n },\n { id: 'line4', length: 'two', containerID: 'properties' },\n { id: 'line5', length: 'two', containerID: 'properties' },\n { id: 'line6', length: 'two', containerID: 'injectCSS' }\n ],\n columns: [\n {\n id: 'column1', length: 'one', lineID: 'line1', attributes: { style: { padding: '25px' } }\n },\n {\n id: 'column2', length: 'one', lineID: 'line1', attributes: { style: { padding: '25px' } }\n },\n {\n id: 'column3', length: 'one', lineID: 'line2', attributes: { style: { padding: '25px', paddingTop: 0 } }\n },\n {\n id: 'column4', length: 'one', lineID: 'line2', attributes: { style: { padding: '25px', paddingTop: 0 } }\n },\n {\n id: 'column5', length: 'one', lineID: 'line4', attributes: { style: { padding: '25px' } }\n },\n {\n id: 'column6', length: 'one', lineID: 'line4', attributes: { style: { padding: '25px' } }\n },\n {\n id: 'column7', length: 'one', lineID: 'line5', attributes: { style: { padding: '25px', paddingTop: 0 } }\n },\n {\n id: 'column8', length: 'one', lineID: 'line5', attributes: { style: { padding: '25px', paddingTop: 0 } }\n },\n {\n id: 'column9', length: 'two', lineID: 'line6', attributes: { style: { padding: '25px' } }\n }\n ]\n },\n elementsToLayout: {\n column1: ['formWidth'],\n column2: ['alignment'],\n column3: ['lineSpacing'],\n column4: ['labelWidth'],\n column5: ['background'],\n column6: ['fontcolor'],\n column7: ['font'],\n column8: ['fontsize'],\n column9: ['injectCSS']\n }\n};\n\nStyles.minidesignerStylesLayout = {\n layout: {\n containers: [\n { id: 'properties', text: 'Properties' },\n { id: 'colors', text: 'Custom CSS' },\n { id: 'layout', text: 'Layout' }\n ],\n lines: [\n { id: 'line1', length: 'two', containerID: 'properties' },\n { id: 'line2', length: 'two', containerID: 'properties' },\n {\n id: 'line3',\n length: 'two',\n containerID: 'properties',\n attributes: { className: 'line v4-hide' },\n children: [React.createElement('hr', {\n key: 'styles-layout-hr-1',\n style: {\n backgroundColor: '#ece9e6', height: '1px', border: 0, margin: '0'\n }\n })]\n },\n { id: 'line5', length: 'two', containerID: 'properties' },\n { id: 'line6', length: 'two', containerID: 'colors' },\n { id: 'line7', length: 'two', containerID: 'colors' },\n { id: 'line8', length: 'two', containerID: 'colors' },\n { id: 'line9', length: 'two', containerID: 'colors' },\n { id: 'line10', length: 'one', containerID: 'properties' },\n { id: 'line11', length: 'one', containerID: 'properties' },\n { id: 'line12', length: 'one', containerID: 'layout' }\n ],\n columns: [\n {\n id: 'column1', length: 'one', lineID: 'line1', attributes: { style: { padding: '25px' } }\n },\n {\n id: 'column2', length: 'one', lineID: 'line1', attributes: { style: { padding: '25px' } }\n },\n {\n id: 'column3', length: 'one', lineID: 'line2', attributes: { style: { padding: '25px', paddingTop: 0 } }\n },\n {\n id: 'column4', length: 'one', lineID: 'line2', attributes: { style: { padding: '25px', paddingTop: 0 } }\n },\n {\n id: 'column5', length: 'one', lineID: 'line7', attributes: { style: { padding: '25px' } }\n },\n {\n id: 'column6', length: 'one', lineID: 'line7', attributes: { style: { padding: '25px' } }\n },\n {\n id: 'column7', length: 'one', lineID: 'line5', attributes: { style: { padding: '25px', paddingTop: 0 } }\n },\n {\n id: 'column8', length: 'one', lineID: 'line5', attributes: { style: { padding: '25px', paddingTop: 0 } }\n },\n {\n id: 'column9', length: 'two', lineID: 'line6', attributes: { style: { padding: '25px' } }\n },\n {\n id: 'column10', length: 'one', lineID: 'line8', attributes: { style: { padding: '25px' } }\n },\n {\n id: 'column11', length: 'one', lineID: 'line8', attributes: { style: { padding: '25px' } }\n },\n {\n id: 'column12', length: 'one', lineID: 'line9', attributes: { style: { padding: '25px' } }\n },\n {\n id: 'column13', length: 'one', lineID: 'line9', attributes: { style: { padding: '25px' } }\n },\n {\n id: 'column14', length: 'one', lineID: 'line10', attributes: { style: { padding: '25px' } }\n },\n {\n id: 'column15', length: 'one', lineID: 'line11', attributes: { style: { padding: '25px' } }\n },\n {\n id: 'column16', length: 'one', lineID: 'line12', attributes: { style: { padding: '25px' } }\n }\n ]\n },\n elementsToLayout: {\n column1: ['formWidth'],\n column2: ['alignment'],\n column3: ['lineSpacing'],\n column4: ['labelWidth'],\n column5: ['pageColor'],\n column6: ['pageBackgroundImage'],\n column7: ['font'],\n column8: ['fontsize'],\n column9: ['colorScheme'],\n column10: ['background'],\n column11: ['formBackgroundImage'],\n column12: ['fontcolor'],\n column13: ['inputColor'],\n column14: ['buttonStyle'],\n column15: ['injectCSS'],\n column16: ['layoutPicker']\n }\n};\n\nlet styleJSON = {};\nlet formProperties;\n\n// LESS lighten function alternative\n// Example : less : lighten(#FFF, 10%) => (#FFF, 10)\nfunction lightenColor(color, percent) {\n try {\n let col = color;\n let usePound = false;\n if (col[0] === '#') {\n col = col.slice(1);\n usePound = true;\n }\n if (col.length === 3) { // Convert 3 digit to 6 digit hex\n col = `${col[0]}${col[0]}${col[1]}${col[1]}${col[2]}${col[2]}`;\n }\n const num = parseInt(col, 16);\n const amt = Math.round(2.55 * percent);\n const R = (num >> 16) + amt;\n const B = (num >> 8 & 0x00FF) + amt;\n const G = (num & 0x0000FF) + amt;\n const lighten = (0x1000000 + (R < 255 ? R < 1 ? 0 : R : 255) * 0x10000 + //eslint-disable-line\n (B < 255 ? B < 1 ? 0 : B : 255) * 0x100 + //eslint-disable-line\n (G < 255 ? G < 1 ? 0 : G : 255)).toString(16).slice(1); //eslint-disable-line\n if (usePound) {\n return `#${lighten}`;\n }\n return lighten;\n } catch (e) {\n return color;\n }\n}\n\nfunction generateAlignmentRule(name, newValue) {\n let value = formProperties.alignment;\n if (name === 'alignment') {\n value = newValue;\n }\n styleJSON['@labelAlign'] = value;\n const topRules = `\n display: block;\n float: none;\n text-align: left;\n width: 100%;\n `;\n const leftRightRules = `\n display: inline-block;\n float: left;\n text-align: ${value === 'Left' ? 'left' : 'right'};\n `;\n const alignmentRule = `\n .form-label.form-label-auto {\n ${value === 'Top' ? topRules : leftRightRules}\n }\n `;\n return alignmentRule;\n}\n\nfunction generateLineSpacingRule(name, newValue) {\n let value = formProperties.lineSpacing;\n if (name === 'lineSpacing') {\n value = newValue;\n }\n styleJSON['@lineSpacing'] = value;\n const rule = `\n .form-line {\n margin-top: ${value}px;\n margin-bottom: ${value}px;\n }\n `;\n return rule;\n}\n\n// unclosed paranthesis check for rgb, rgba\nfunction unclosedParanthesesCheck(str) {\n return /[()]/.test(str) && (str.match(/\\(/g) || '').length === (str.match(/\\)/g) || '').length;\n}\n// add missing paranthesis for rgb, rgba\nfunction addMissingParantheses(s) {\n let missedOpen = 0;\n const stack = [];\n for (let i = 0; i < s.length; i++) {\n if (s[i] === '(') {\n stack.push(s[i]);\n } else if (s[i] === ')') {\n if (!stack.pop()) {\n missedOpen++;\n }\n }\n }\n return Array(missedOpen + 1).join('(') + s + Array(stack.length + 1).join(')');\n}\n\nfunction generateBackgroundRule(name, newValue, schemeColor) {\n let value = schemeColor || formProperties.background;\n if (name === 'background') {\n value = schemeColor || newValue;\n }\n let clrFrame = typeof value === 'string' ? value.replace(new RegExp(/\\\"/gi), '\\'') : '';\n if (clrFrame.indexOf('rgb') > -1 && !unclosedParanthesesCheck(clrFrame)) {\n clrFrame = addMissingParantheses(clrFrame);\n }\n styleJSON['@clrFrame'] = clrFrame;\n const rule = `\n .supernova .form-all, .form-all {\n background-color: ${clrFrame};\n }\n `;\n return rule;\n}\n\nfunction generateFontColorRule(name, newValue, schemeColor) {\n let value = schemeColor || formProperties.fontcolor;\n if (name === 'fontcolor') {\n value = schemeColor || newValue;\n }\n styleJSON['@clrText'] = value;\n styleJSON['@clrLabel'] = value;\n // If header color is specified we mustn't change it.\n const headerColor = (styleJSON && styleJSON['@clrHeader'] && styleJSON['@clrHeader'].length > 0) ? styleJSON['@clrHeader'] : value;\n const rule = `\n .form-all {\n color: ${value};\n }\n .form-header-group .form-header {\n color: ${headerColor};\n }\n .form-header-group .form-subHeader {\n color: ${value};\n }\n .form-label-top,\n .form-label-left,\n .form-label-right,\n .form-html,\n .form-checkbox-item label,\n .form-radio-item label,\n span.FITB .qb-checkbox-label,\n span.FITB .qb-radiobox-label,\n span.FITB .form-radio label,\n span.FITB .form-checkbox label,\n [data-blotid][data-type=checkbox] [data-labelid],\n [data-blotid][data-type=radiobox] [data-labelid],\n span.FITB-inptCont[data-type=checkbox] label,\n span.FITB-inptCont[data-type=radiobox] label {\n color: ${value};\n }\n .form-sub-label {\n color: ${lightenColor(value, 10)};\n }\n `;\n return rule;\n}\n\nfunction generateWidthRule(name, newValue) {\n let value = formProperties.formWidth;\n if (name === 'formWidth') {\n value = newValue;\n }\n styleJSON['@formWidth'] = value;\n const rule = `\n .form-all {\n max-width: ${value}px;\n width: 100%;\n }\n `;\n return rule;\n}\n\nfunction generateLabelWidthRule(name, newValue) {\n let value = formProperties.labelWidth;\n if (name === 'labelWidth') {\n value = newValue;\n }\n styleJSON['@labelWidth'] = value;\n const rule = `\n .form-label.form-label-left,\n .form-label.form-label-right,\n .form-label.form-label-left.form-label-auto,\n .form-label.form-label-right.form-label-auto {\n width: ${value}px;\n }\n `;\n return rule;\n}\n\nfunction generateFontLink() {\n const fontFamilyString = ['@font', '@headerFont', '@buttonFont', '@pbButtonFont', '@labelFont']\n .filter(fontPropPrefix => ['jotform', 'google'].indexOf(styleJSON[`${fontPropPrefix}Type`]) !== -1 && styleJSON[`${fontPropPrefix}Family`])\n .map(fontPropPrefix => styleJSON[`${fontPropPrefix}Family`].replace(/ /g, '+'))\n .join('|');\n\n return fontFamilyString ? `//cdn.jotfor.ms/fonts/?family=${fontFamilyString}` : '';\n}\n\nfunction generateFontRule(name, newValue) {\n let fontFamily = formProperties.font;\n\n if (name === 'font') {\n fontFamily = newValue.value;\n\n styleJSON['@fontType'] = newValue.type;\n styleJSON['@fontFamily'] = fontFamily;\n styleJSON['@fontLink'] = generateFontLink() || '';\n\n // just for fixing forms already having @googleFontLink props\n delete styleJSON['@googleFontLink'];\n }\n // @fontFamily\n // @buttonFontFamily\n // @pbButtonFontFamily\n // @headerFontFamily\n // @labelFontFamily\n const rule = `\n .form-all {\n font-family: ${fontFamily}, sans-serif;\n }\n `;\n return rule;\n}\n\nfunction generateFontSizeRule(name, newValue) {\n let value = formProperties.fontsize;\n if (name === 'fontsize') {\n value = newValue;\n }\n const rule = `\n .form-all {\n font-size: ${value}px\n }\n `;\n return rule;\n}\n\nfunction generateWindowBackgroundRule(name, newValue, color) {\n let value = color || styleJSON['@clrBg'];\n if (name === 'pageColor') {\n value = color || newValue;\n }\n styleJSON['@clrBg'] = value;\n const rule = `\n .supernova {\n background-color: ${value};\n }\n .supernova body {\n background: transparent;\n }\n `;\n return rule;\n}\n\nfunction generateTextInputBackgroundRule(name, newValue, color) {\n let value = color || styleJSON['@clrTextInputBg'];\n if (name === 'inputColor') {\n value = color || newValue;\n }\n styleJSON['@clrTextInputBg'] = value;\n const rule = `\n .form-textbox,\n .form-textarea,\n .form-dropdown,\n .form-radio-other-input,\n .form-checkbox-other-input,\n .form-captcha input,\n .form-spinner input {\n background-color: ${value};\n }\n `;\n return rule;\n}\n\nfunction generateErrorBackgroundRule(color) {\n styleJSON['@clrErrorBg'] = color;\n const rule = `\n .form-line-error {\n overflow: hidden;\n transition: none;\n background-color: ${color};\n }\n\n .form-line-error .form-error-message {\n background-color: #DC2626;\n clear: both;\n float: none;\n }\n\n .form-line-error .form-error-arrow {\n border-bottom-color: #FF3200;\n }\n\n .form-line-error input:not(#coupon-input),\n .form-line-error textarea,\n .form-line-error .form-validation-error {\n border: 1px solid #c61515;\n box-shadow: 0 0 3px #c61515;\n }\n `;\n return rule;\n}\n\nfunction generatePageBackgroundImageRule(name, newValue) {\n let backgroundUrl = styleJSON['@bgURL'];\n if (name === 'pageBackgroundImage') {\n backgroundUrl = newValue;\n }\n\n const repeat = styleJSON['@bgRepeat'] === 'true' ? 'repeat' : 'no-repeat';\n const fixed = styleJSON['@bgAttach'] !== 'false' ? 'fixed' : 'scroll';\n const cover = styleJSON['@bgCover'] !== 'false' ? 'cover' : 'auto';\n\n styleJSON['@bgURL'] = backgroundUrl;\n\n const backgroundRules = `\n .supernova {\n background-repeat: ${repeat};\n background-size:${cover};\n background-attachment: ${fixed};\n background-position: center top;\n }`;\n\n if (!backgroundUrl || backgroundUrl === '|nobackground|') {\n return `\n ${backgroundRules}\n\n .supernova, #stage {\n background-image: none;\n }\n `;\n }\n\n return `\n ${backgroundRules}\n\n .supernova, #stage {\n background-image: url(\"${backgroundUrl}\");\n }`;\n}\n\nfunction generateFormBackgroundImageRule(name, newValue) {\n let backgroundUrl = styleJSON['@frameBgURL'];\n if (name === 'formBackgroundImage') {\n backgroundUrl = newValue;\n }\n\n styleJSON['@frameBgURL'] = backgroundUrl;\n\n if (!backgroundUrl || backgroundUrl === '|nobackground|') {\n return `\n .form-all {\n background-image: none;\n }\n `;\n }\n\n const repeat = styleJSON['@bgRepeat'] === 'true' ? 'repeat' : 'no-repeat';\n const fixed = styleJSON['@bgAttach'] !== 'false' ? 'fixed' : 'scroll';\n const cover = styleJSON['@bgCover'] !== 'false' ? 'cover' : 'auto';\n\n return `\n .form-all {\n background-image: url(\"${backgroundUrl}\");\n background-repeat: ${repeat};\n background-size:${cover};\n background-attachment: ${fixed};\n background-position: center top;\n }\n `;\n}\n\nStyles.generatePreferencesStyle = (name, newValue, formProps) => {\n formProperties = formProps;\n styleJSON = formProperties.styleJSON || {};\n let _injectCSS = formProperties.injectCSS;\n const isNewDefaultTheme = formProperties.defaultTheme && formProperties.defaultTheme === 'v2';\n const isCdnColorScheme = window.location.href.indexOf('cdnColorScheme') === -1;\n const advancedDesingerProps = [\n 'clrButtonBorder', 'clrTextInputBorder', 'clrDropdownBorder', 'okColor', 'clrButtonBg', 'clrErrorMsg', 'clrTextInputFont', 'clrDropdownBg', 'pbClrButtonBorder', 'collapseTextColor',\n 'collapseBgColor', 'clrDropdownFont', 'clrHeader', 'clrActive'];\n try {\n if (typeof styleJSON === typeof 'string') {\n styleJSON = JSON.parse(styleJSON);\n }\n } catch (e) {\n styleJSON = {};\n }\n\n function generateInjectCSS() {\n let result = '/*PREFERENCES STYLE*/';\n\n result += generateFontRule(name, newValue);\n result += generateAlignmentRule(name, newValue);\n result += generateLineSpacingRule(name, newValue);\n result += generateWidthRule(name, newValue);\n result += generateLabelWidthRule(name, newValue);\n result += generateFontSizeRule(name, newValue);\n\n if (name === 'colorScheme' || name === 'statelessColorScheme') {\n result += generateWindowBackgroundRule(name, newValue, newValue.clrBg);\n result += generateBackgroundRule(name, newValue, newValue.clrFrame);\n result += generateFontColorRule(name, newValue, newValue.clrText);\n result += generateTextInputBackgroundRule(name, newValue, newValue.clrTextInputBg);\n result += generateErrorBackgroundRule(newValue.clrErrorBg);\n } else {\n result += generateBackgroundRule(name, newValue);\n result += generateFontColorRule(name, newValue);\n result += generateWindowBackgroundRule(name, newValue);\n result += generateTextInputBackgroundRule(name, newValue);\n }\n result += generatePageBackgroundImageRule(name, newValue);\n result += generateFormBackgroundImageRule(name, newValue);\n result += '/*PREFERENCES STYLE*/';\n return result;\n }\n\n if (!isNewDefaultTheme) {\n return {\n injectCSS: generateInjectCSS(),\n styleJSON: JSON.stringify(styleJSON)\n };\n }\n\n switch (true) {\n case name === 'buttonStyle':\n delete styleJSON['@pbButtonCustomTemplate'];\n delete styleJSON['@buttonCustomTemplate'];\n\n if (newValue.length > 0) {\n styleJSON['@buttonCustomTemplate'] = `form-submit-button-${newValue}`;\n }\n\n return { styleJSON: JSON.stringify(styleJSON) };\n case name === 'colorScheme' && typeof newValue === 'object':\n advancedDesingerProps.forEach(key => delete styleJSON[`@${key}`]);\n styleJSON.newThemeProps = newValue;\n _injectCSS = generateNewColorSchemeCSS(styleJSON);\n break;\n case name === 'statelessColorScheme' && typeof newValue === 'object':\n advancedDesingerProps.forEach(key => delete styleJSON[`@${key}`]);\n styleJSON.newThemeProps = newValue;\n _injectCSS = '';\n break;\n case _injectCSS.indexOf('/* NEW THEME STYLE */') > -1:\n _injectCSS = _injectCSS.match(/((\\/\\*PREFERENCES STYLE\\*\\/)([\\s\\S]*?)(\\/\\* NEW THEME STYLE \\*\\/)([\\s\\S]*?)(\\/\\* NEW THEME STYLE \\*\\/)([\\s\\S]*?)([\\s\\S]*?)(\\/\\*PREFERENCES STYLE\\*\\/))/);\n _injectCSS = _injectCSS ? _injectCSS[0] : generateNewColorSchemeCSS(styleJSON);\n break;\n default:\n _injectCSS = '';\n }\n\n return {\n injectCSS: isCdnColorScheme ? _injectCSS + generateInjectCSS() : generateInjectCSS(),\n styleJSON: JSON.stringify(styleJSON)\n };\n};\n\nStyles.generateInjectCSS = (newStyles, formProperties) => {\n let { injectCSS } = formProperties;\n\n if (newStyles.injectCSS === undefined) {\n return injectCSS;\n }\n\n const hasPreferencesStyles = injectCSS?.indexOf('/*PREFERENCES STYLE*/') > -1;\n const hasInspectSeparator = injectCSS?.indexOf('/*__INSPECT_SEPERATOR__*/') > -1;\n\n if (injectCSS && hasPreferencesStyles) {\n injectCSS = injectCSS.replace(/(\\/\\*PREFERENCES STYLE\\*\\/)([\\s\\S]*)(\\/\\*PREFERENCES STYLE\\*\\/)/gm, '');\n }\n\n if (hasInspectSeparator) {\n const [jotformStyles, userStyles] = injectCSS.split('/*__INSPECT_SEPERATOR__*/');\n\n return `${jotformStyles + (newStyles.injectCSS || '')}/*__INSPECT_SEPERATOR__*/${userStyles}`;\n }\n\n // if there is no inspect separator, assume that all styles are user styles\n return `${newStyles.injectCSS || ''}/*__INSPECT_SEPERATOR__*/${injectCSS}`;\n};\n\nStyles.handleStylePropsChange = (name, value, temp, formProperties) => {\n const styles = Styles.generatePreferencesStyle(name, value, formProperties);\n let stylePropsTemp = temp;\n console.log(styles, formProperties);\n if (name !== 'colorScheme') {\n stylePropsTemp = {\n ...stylePropsTemp,\n injectCSS: Styles.generateInjectCSS(styles, formProperties),\n styleJSON: styles.styleJSON\n };\n } else {\n stylePropsTemp = {\n background: value.clrFrame,\n fontcolor: value.clrText,\n injectCSS: Styles.generateInjectCSS(styles, formProperties),\n styleJSON: styles.styleJSON\n };\n }\n // if font is changed and it is a google font replace import statement on older injectCSS if any\n let { injectCSS } = stylePropsTemp;\n if (injectCSS[0] === '@') { // means google font was added from big Designer\n if (value && value.type && value.type === 'jotform') {\n injectCSS = injectCSS.replace(/@import.*.\";/, `@import \"${value.link}\";`);\n }\n }\n stylePropsTemp.injectCSS = injectCSS;\n\n return stylePropsTemp;\n};\n\nStyles.prepareFormStyleFormat = (event, formProperties) => {\n const { name, value } = event.target;\n\n let temp = {\n [name]: value\n };\n\n if (name === 'font') {\n temp = {\n [name]: value.value\n };\n }\n\n if (styleProps.indexOf(name) >= 0) {\n temp = Styles.handleStylePropsChange(name, value, temp, formProperties);\n }\n\n return temp;\n};\n\nStyles.uploadOrganizationLogo = (data, formProperties) => {\n const expectedImgHeight = 140; // px\n\n let { url } = data;\n const localUrlPattern = /^\\//; // check starts with /\n const checkProtocolPattern = /^(http|https|ftp)/;\n // If url is local image, add jotform.com before\n if (url && localUrlPattern.test(url)) {\n url = `https://www.jotform.com${url}`;\n }\n if (url && !checkProtocolPattern.test(url)) { // we need to add protocol\n url = `http://${url}`; // or may be https?\n }\n const styles = formProperties.styleJSON;\n const styleJSON = typeof styles === 'string' ? JSON.parse(styles) : styles;\n let imgHeight = parseInt(data.dimensions.height, 10);\n let imgWidth = parseInt(data.dimensions.width, 10);\n const formWidth = styleJSON['@formWidth'] || formProperties.formWidth;\n let parsedFormWidth = formWidth ? formWidth.match(/\\d+/) : '';\n if (parsedFormWidth && parsedFormWidth[0]) {\n parsedFormWidth = parseInt(parsedFormWidth[0], 10);\n }\n if (imgHeight > expectedImgHeight) {\n const proportion = expectedImgHeight / imgHeight;\n imgWidth = Math.round(imgWidth * proportion);\n if (imgWidth.length === 0) {\n imgWidth = 0;\n }\n imgHeight = expectedImgHeight;\n }\n if (imgWidth > parsedFormWidth) { // if imgWidth is greater than form width, lets fix it to form width\n const proportion = parsedFormWidth / imgWidth;\n imgHeight = Math.round(imgHeight * proportion);\n if (imgHeight.length === 0) {\n imgHeight = 0;\n }\n imgWidth = parsedFormWidth;\n }\n styleJSON['@formCover'] = '1';\n styleJSON['@formCoverImg'] = url;\n styleJSON['@formCoverImgWidth'] = imgWidth;\n styleJSON['@formCoverImgHeight'] = imgHeight;\n styleJSON['@formCoverPosition'] = 'Top';\n styleJSON['@formCoverTopPosition'] = 'Center';\n styleJSON['@formCoverBottomMargin'] = 32;\n\n return { styleJSON: JSON.stringify(styleJSON) };\n};\n","var _path;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nconst SvgRoboto = props => /*#__PURE__*/React.createElement(\"svg\", _extends({\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 36 10\"\n}, props), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M14.5244 0.332031H13.4346V9.33203H14.4307L14.4865 8.59923C14.4971 8.61318 14.5078 8.62698 14.5186 8.64062C14.7256 8.90234 14.9795 9.10352 15.2803 9.24414C15.585 9.38086 15.9385 9.44922 16.3408 9.44922C16.7354 9.44922 17.085 9.36914 17.3896 9.20898C17.6943 9.04883 17.9521 8.82422 18.1631 8.53516C18.374 8.24609 18.5342 7.90625 18.6436 7.51562C18.7529 7.12109 18.8076 6.69336 18.8076 6.23242V6.10938C18.8076 5.625 18.7529 5.18555 18.6436 4.79102C18.5342 4.39258 18.374 4.05078 18.1631 3.76562C17.9561 3.48047 17.6982 3.26172 17.3896 3.10938C17.0811 2.95312 16.7275 2.875 16.3291 2.875C15.9307 2.875 15.5811 2.94531 15.2803 3.08594C14.9823 3.22137 14.7304 3.42005 14.5244 3.68197V0.332031ZM14.5244 7.52754V4.77397C14.6085 4.60159 14.712 4.44712 14.835 4.31055C14.9756 4.15039 15.1455 4.02344 15.3447 3.92969C15.5479 3.83594 15.7861 3.78906 16.0596 3.78906C16.3682 3.78906 16.6279 3.85156 16.8389 3.97656C17.0498 4.09766 17.2197 4.26562 17.3486 4.48047C17.4775 4.69141 17.5713 4.9375 17.6299 5.21875C17.6885 5.49609 17.7178 5.79297 17.7178 6.10938V6.23242C17.7178 6.54883 17.6865 6.8457 17.624 7.12305C17.5615 7.40039 17.4639 7.64453 17.3311 7.85547C17.2021 8.06641 17.0322 8.23242 16.8213 8.35352C16.6143 8.4707 16.3643 8.5293 16.0713 8.5293C15.7158 8.5293 15.417 8.44922 15.1748 8.28906C14.9365 8.12891 14.7451 7.92383 14.6006 7.67383C14.5738 7.62542 14.5484 7.57666 14.5244 7.52754ZM29.0527 3.82422V2.99219H27.8691V1.45117H26.7852V2.99219H25.625V3.82422H26.7852V7.75586C26.7852 8.17773 26.8496 8.51367 26.9785 8.76367C27.1113 9.00977 27.2891 9.18555 27.5117 9.29102C27.7344 9.39648 27.9785 9.44922 28.2441 9.44922C28.4395 9.44922 28.6055 9.43555 28.7422 9.4082C28.8828 9.38477 28.9961 9.35938 29.082 9.33203L29.0762 8.44727C29.0254 8.45898 28.9492 8.47461 28.8477 8.49414C28.75 8.50977 28.6562 8.51758 28.5664 8.51758C28.4453 8.51758 28.332 8.5 28.2266 8.46484C28.1211 8.42969 28.0352 8.35742 27.9688 8.24805C27.9023 8.13867 27.8691 7.97656 27.8691 7.76172V3.82422H29.0527ZM29.6084 6.09766V6.23242C29.6084 6.68945 29.6748 7.11328 29.8076 7.50391C29.9404 7.89453 30.1318 8.23633 30.3818 8.5293C30.6357 8.81836 30.9404 9.04492 31.2959 9.20898C31.6514 9.36914 32.0518 9.44922 32.4971 9.44922C32.9424 9.44922 33.3408 9.36914 33.6924 9.20898C34.0479 9.04492 34.3506 8.81836 34.6006 8.5293C34.8545 8.23633 35.0479 7.89453 35.1807 7.50391C35.3135 7.11328 35.3799 6.68945 35.3799 6.23242V6.09766C35.3799 5.64062 35.3135 5.2168 35.1807 4.82617C35.0479 4.43164 34.8545 4.08984 34.6006 3.80078C34.3506 3.50781 34.0459 3.28125 33.6865 3.12109C33.3311 2.95703 32.9307 2.875 32.4854 2.875C32.0439 2.875 31.6455 2.95703 31.29 3.12109C30.9346 3.28125 30.6318 3.50781 30.3818 3.80078C30.1318 4.08984 29.9404 4.43164 29.8076 4.82617C29.6748 5.2168 29.6084 5.64062 29.6084 6.09766ZM30.6924 6.23242V6.09766C30.6924 5.78516 30.7295 5.49023 30.8037 5.21289C30.8779 4.93164 30.9893 4.68359 31.1377 4.46875C31.29 4.25 31.4775 4.07812 31.7002 3.95312C31.9268 3.82812 32.1885 3.76562 32.4854 3.76562C32.7861 3.76562 33.0479 3.82812 33.2705 3.95312C33.4971 4.07812 33.6846 4.25 33.833 4.46875C33.9854 4.68359 34.0986 4.93164 34.1729 5.21289C34.251 5.49023 34.29 5.78516 34.29 6.09766V6.23242C34.29 6.54883 34.251 6.84766 34.1729 7.12891C34.0986 7.40625 33.9873 7.65234 33.8389 7.86719C33.6904 8.08203 33.5029 8.25195 33.2764 8.37695C33.0537 8.49805 32.7939 8.55859 32.4971 8.55859C32.1963 8.55859 31.9326 8.49805 31.7061 8.37695C31.4795 8.25195 31.29 8.08203 31.1377 7.86719C30.9893 7.65234 30.8779 7.40625 30.8037 7.12891C30.7295 6.84766 30.6924 6.54883 30.6924 6.23242ZM19.5801 6.23242V6.09766C19.5801 5.64062 19.6465 5.2168 19.7793 4.82617C19.9121 4.43164 20.1035 4.08984 20.3535 3.80078C20.6035 3.50781 20.9062 3.28125 21.2617 3.12109C21.6172 2.95703 22.0156 2.875 22.457 2.875C22.9023 2.875 23.3027 2.95703 23.6582 3.12109C24.0176 3.28125 24.3223 3.50781 24.5723 3.80078C24.8262 4.08984 25.0195 4.43164 25.1523 4.82617C25.2852 5.2168 25.3516 5.64062 25.3516 6.09766V6.23242C25.3516 6.68945 25.2852 7.11328 25.1523 7.50391C25.0195 7.89453 24.8262 8.23633 24.5723 8.5293C24.3223 8.81836 24.0195 9.04492 23.6641 9.20898C23.3125 9.36914 22.9141 9.44922 22.4688 9.44922C22.0234 9.44922 21.623 9.36914 21.2676 9.20898C20.9121 9.04492 20.6074 8.81836 20.3535 8.5293C20.1035 8.23633 19.9121 7.89453 19.7793 7.50391C19.6465 7.11328 19.5801 6.68945 19.5801 6.23242ZM20.6641 6.09766V6.23242C20.6641 6.54883 20.7012 6.84766 20.7754 7.12891C20.8496 7.40625 20.9609 7.65234 21.1094 7.86719C21.2617 8.08203 21.4512 8.25195 21.6777 8.37695C21.9043 8.49805 22.168 8.55859 22.4688 8.55859C22.7656 8.55859 23.0254 8.49805 23.248 8.37695C23.4746 8.25195 23.6621 8.08203 23.8105 7.86719C23.959 7.65234 24.0703 7.40625 24.1445 7.12891C24.2227 6.84766 24.2617 6.54883 24.2617 6.23242V6.09766C24.2617 5.78516 24.2227 5.49023 24.1445 5.21289C24.0703 4.93164 23.957 4.68359 23.8047 4.46875C23.6562 4.25 23.4688 4.07812 23.2422 3.95312C23.0195 3.82812 22.7578 3.76562 22.457 3.76562C22.1602 3.76562 21.8984 3.82812 21.6719 3.95312C21.4492 4.07812 21.2617 4.25 21.1094 4.46875C20.9609 4.68359 20.8496 4.93164 20.7754 5.21289C20.7012 5.49023 20.6641 5.78516 20.6641 6.09766ZM6.62207 6.23242V6.09766C6.62207 5.64062 6.68848 5.2168 6.82129 4.82617C6.9541 4.43164 7.14551 4.08984 7.39551 3.80078C7.64551 3.50781 7.94824 3.28125 8.30371 3.12109C8.65918 2.95703 9.05762 2.875 9.49902 2.875C9.94434 2.875 10.3447 2.95703 10.7002 3.12109C11.0596 3.28125 11.3643 3.50781 11.6143 3.80078C11.8682 4.08984 12.0615 4.43164 12.1943 4.82617C12.3271 5.2168 12.3936 5.64062 12.3936 6.09766V6.23242C12.3936 6.68945 12.3271 7.11328 12.1943 7.50391C12.0615 7.89453 11.8682 8.23633 11.6143 8.5293C11.3643 8.81836 11.0615 9.04492 10.7061 9.20898C10.3545 9.36914 9.95605 9.44922 9.51074 9.44922C9.06543 9.44922 8.66504 9.36914 8.30957 9.20898C7.9541 9.04492 7.64941 8.81836 7.39551 8.5293C7.14551 8.23633 6.9541 7.89453 6.82129 7.50391C6.68848 7.11328 6.62207 6.68945 6.62207 6.23242ZM7.70605 6.09766V6.23242C7.70605 6.54883 7.74316 6.84766 7.81738 7.12891C7.8916 7.40625 8.00293 7.65234 8.15137 7.86719C8.30371 8.08203 8.49316 8.25195 8.71973 8.37695C8.94629 8.49805 9.20996 8.55859 9.51074 8.55859C9.80762 8.55859 10.0674 8.49805 10.29 8.37695C10.5166 8.25195 10.7041 8.08203 10.8525 7.86719C11.001 7.65234 11.1123 7.40625 11.1865 7.12891C11.2646 6.84766 11.3037 6.54883 11.3037 6.23242V6.09766C11.3037 5.78516 11.2646 5.49023 11.1865 5.21289C11.1123 4.93164 10.999 4.68359 10.8467 4.46875C10.6982 4.25 10.5107 4.07812 10.2842 3.95312C10.0615 3.82812 9.7998 3.76562 9.49902 3.76562C9.20215 3.76562 8.94043 3.82812 8.71387 3.95312C8.49121 4.07812 8.30371 4.25 8.15137 4.46875C8.00293 4.68359 7.8916 4.93164 7.81738 5.21289C7.74316 5.49023 7.70605 5.78516 7.70605 6.09766ZM2.81445 0.800781H-0.00976562V9.33203H1.12109V5.875H3.12234L4.97656 9.33203H6.18359V9.26172L4.17961 5.63892C4.44286 5.53847 4.67726 5.41013 4.88281 5.25391C5.17969 5.02734 5.40625 4.75391 5.5625 4.43359C5.72266 4.10938 5.80273 3.75195 5.80273 3.36133C5.80273 2.80664 5.68555 2.33984 5.45117 1.96094C5.2207 1.57812 4.88281 1.28906 4.4375 1.09375C3.99609 0.898438 3.45508 0.800781 2.81445 0.800781ZM1.12109 4.95508V1.72656H2.81445C3.24805 1.72656 3.60156 1.79492 3.875 1.93164C4.15234 2.06445 4.35547 2.25391 4.48438 2.5C4.61328 2.74609 4.67773 3.0332 4.67773 3.36133C4.67773 3.6543 4.60938 3.92188 4.47266 4.16406C4.33594 4.40625 4.13281 4.59961 3.86328 4.74414C3.59375 4.88477 3.25586 4.95508 2.84961 4.95508H1.12109Z\",\n fill: \"#343C6A\"\n})));\nexport default SvgRoboto;","var _path;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nconst SvgOpensans = props => /*#__PURE__*/React.createElement(\"svg\", _extends({\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 58 13\"\n}, props), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M7.62695 8.54688C8.32227 7.76172 8.66992 6.68359 8.66992 5.3125C8.66992 3.9375 8.32422 2.85938 7.63281 2.07812C6.94141 1.29688 5.98047 0.90625 4.75 0.90625C3.48438 0.90625 2.50781 1.29102 1.82031 2.06055C1.13281 2.82617 0.789062 3.90625 0.789062 5.30078C0.789062 6.70703 1.13086 7.79688 1.81445 8.57031C2.50195 9.33984 3.47656 9.72461 4.73828 9.72461C5.97266 9.72461 6.93555 9.33203 7.62695 8.54688ZM2.58203 7.95508C2.08984 7.35352 1.84375 6.47266 1.84375 5.3125C1.84375 4.16797 2.08984 3.29688 2.58203 2.69922C3.07812 2.09766 3.80078 1.79688 4.75 1.79688C5.69531 1.79688 6.4082 2.0957 6.88867 2.69336C7.37305 3.28711 7.61523 4.16016 7.61523 5.3125C7.61523 6.47656 7.37305 7.35742 6.88867 7.95508C6.4043 8.55273 5.6875 8.85156 4.73828 8.85156C3.79688 8.85156 3.07812 8.55273 2.58203 7.95508ZM37.626 9.0918C38.1729 8.66992 38.4463 8.08203 38.4463 7.32812C38.4463 6.74219 38.2764 6.26562 37.9365 5.89844C37.6006 5.53125 36.9834 5.1875 36.085 4.86719C35.5498 4.67578 35.1514 4.50195 34.8896 4.3457C34.6318 4.18555 34.4482 4.01172 34.3389 3.82422C34.2295 3.63281 34.1748 3.38867 34.1748 3.0918C34.1748 2.68945 34.3232 2.375 34.6201 2.14844C34.917 1.92188 35.3291 1.80859 35.8564 1.80859C36.5244 1.80859 37.2119 1.95703 37.9189 2.25391L38.2295 1.38672C37.5146 1.07422 36.7314 0.917969 35.8799 0.917969C35.0635 0.917969 34.4072 1.11328 33.9111 1.50391C33.415 1.89453 33.167 2.41992 33.167 3.08008C33.167 3.70898 33.3369 4.21875 33.6768 4.60938C34.0205 5 34.5908 5.33789 35.3877 5.62305C35.958 5.82617 36.3818 6.00781 36.6592 6.16797C36.9404 6.32812 37.1396 6.50391 37.2568 6.69531C37.3779 6.88281 37.4385 7.125 37.4385 7.42188C37.4385 7.87109 37.2705 8.22266 36.9346 8.47656C36.5986 8.72656 36.0986 8.85156 35.4346 8.85156C35.0283 8.85156 34.6182 8.80859 34.2041 8.72266C33.79 8.63672 33.4072 8.51953 33.0557 8.37109V9.33203C33.6025 9.59375 34.3838 9.72461 35.3994 9.72461C36.3369 9.72461 37.0791 9.51367 37.626 9.0918ZM50.502 5.45312V9.60742H51.4746V5.41797C51.4746 4.59766 51.2793 4.00195 50.8887 3.63086C50.498 3.25586 49.916 3.06836 49.1426 3.06836C48.7012 3.06836 48.3008 3.15625 47.9414 3.33203C47.582 3.50391 47.3027 3.74805 47.1035 4.06445H47.0566L46.8984 3.18555H46.1074V9.60742H47.0801V6.23828C47.0801 5.40234 47.2363 4.80273 47.5488 4.43945C47.8613 4.07617 48.3535 3.89453 49.0254 3.89453C49.5332 3.89453 49.9062 4.02344 50.1445 4.28125C50.3828 4.53906 50.502 4.92969 50.502 5.45312ZM56.6406 9.23828C57.0859 8.91406 57.3086 8.45312 57.3086 7.85547C57.3086 7.42969 57.1738 7.07617 56.9043 6.79492C56.6387 6.51367 56.125 6.23438 55.3633 5.95703C54.8086 5.75 54.4336 5.5918 54.2383 5.48242C54.043 5.37305 53.9004 5.25781 53.8105 5.13672C53.7246 5.01562 53.6816 4.86914 53.6816 4.69727C53.6816 4.44336 53.7988 4.24414 54.0332 4.09961C54.2676 3.95508 54.6152 3.88281 55.0762 3.88281C55.5996 3.88281 56.1836 4.01562 56.8281 4.28125L57.1738 3.49023C56.5137 3.20898 55.8379 3.06836 55.1465 3.06836C54.4043 3.06836 53.8203 3.2207 53.3945 3.52539C52.9688 3.82617 52.7559 4.23828 52.7559 4.76172C52.7559 5.05469 52.8164 5.30664 52.9375 5.51758C53.0625 5.72852 53.25 5.91797 53.5 6.08594C53.7539 6.25 54.1797 6.44336 54.7773 6.66602C55.4062 6.9082 55.8281 7.11914 56.043 7.29883C56.2617 7.47461 56.3711 7.6875 56.3711 7.9375C56.3711 8.26953 56.2344 8.51758 55.9609 8.68164C55.6875 8.8418 55.2969 8.92188 54.7891 8.92188C54.4609 8.92188 54.1191 8.87695 53.7637 8.78711C53.4121 8.69727 53.082 8.57422 52.7734 8.41797V9.32031C53.25 9.58984 53.9141 9.72461 54.7656 9.72461C55.5703 9.72461 56.1953 9.5625 56.6406 9.23828ZM43.6885 9.60742L43.4951 8.69336H43.4482C43.1279 9.0957 42.8076 9.36914 42.4873 9.51367C42.1709 9.6543 41.7744 9.72461 41.2979 9.72461C40.6611 9.72461 40.1611 9.56055 39.7979 9.23242C39.4385 8.9043 39.2588 8.4375 39.2588 7.83203C39.2588 6.53516 40.2959 5.85547 42.3701 5.79297L43.46 5.75781V5.35938C43.46 4.85547 43.3506 4.48438 43.1318 4.24609C42.917 4.00391 42.5713 3.88281 42.0947 3.88281C41.5596 3.88281 40.9541 4.04688 40.2783 4.375L39.9795 3.63086C40.2959 3.45898 40.6416 3.32422 41.0166 3.22656C41.3955 3.12891 41.7744 3.08008 42.1533 3.08008C42.9189 3.08008 43.4854 3.25 43.8525 3.58984C44.2236 3.92969 44.4092 4.47461 44.4092 5.22461V9.60742H43.6885ZM41.4912 8.92188C42.0967 8.92188 42.5713 8.75586 42.915 8.42383C43.2627 8.0918 43.4365 7.62695 43.4365 7.0293V6.44922L42.4639 6.49023C41.6904 6.51758 41.1318 6.63867 40.7881 6.85352C40.4482 7.06445 40.2783 7.39453 40.2783 7.84375C40.2783 8.19531 40.3838 8.46289 40.5947 8.64648C40.8096 8.83008 41.1084 8.92188 41.4912 8.92188ZM27.9961 9.60742V5.45312C27.9961 4.92969 27.877 4.53906 27.6387 4.28125C27.4004 4.02344 27.0273 3.89453 26.5195 3.89453C25.8477 3.89453 25.3555 4.07617 25.043 4.43945C24.7305 4.80273 24.5742 5.40234 24.5742 6.23828V9.60742H23.6016V3.18555H24.3926L24.5508 4.06445H24.5977C24.7969 3.74805 25.0762 3.50391 25.4355 3.33203C25.7949 3.15625 26.1953 3.06836 26.6367 3.06836C27.4102 3.06836 27.9922 3.25586 28.3828 3.63086C28.7734 4.00195 28.9688 4.59766 28.9688 5.41797V9.60742H27.9961ZM17.6377 8.85742C18.1885 9.43555 18.9385 9.72461 19.8877 9.72461C20.3213 9.72461 20.6904 9.69141 20.9951 9.625C21.3037 9.5625 21.6299 9.45703 21.9736 9.30859V8.44141C21.2979 8.73047 20.6143 8.875 19.9229 8.875C19.2666 8.875 18.7568 8.67969 18.3936 8.28906C18.0342 7.89844 17.8447 7.32617 17.8252 6.57227H22.249V5.95703C22.249 5.08984 22.0146 4.39258 21.5459 3.86523C21.0771 3.33398 20.4404 3.06836 19.6357 3.06836C18.7764 3.06836 18.0908 3.37305 17.5791 3.98242C17.0713 4.5918 16.8174 5.41406 16.8174 6.44922C16.8174 7.47656 17.0908 8.2793 17.6377 8.85742ZM18.3877 4.38672C18.6963 4.05078 19.1084 3.88281 19.624 3.88281C20.1318 3.88281 20.5225 4.04688 20.7959 4.375C21.0693 4.69922 21.2061 5.16797 21.2061 5.78125H17.8486C17.9033 5.1875 18.083 4.72266 18.3877 4.38672ZM13.1162 9.72461C12.6982 9.72461 12.3154 9.64844 11.9678 9.49609C11.624 9.33984 11.335 9.10156 11.1006 8.78125H11.0303C11.0771 9.15625 11.1006 9.51172 11.1006 9.84766V12.4902H10.1279V3.18555H10.9189L11.0537 4.06445H11.1006C11.3506 3.71289 11.6416 3.45898 11.9736 3.30273C12.3057 3.14648 12.6865 3.06836 13.1162 3.06836C13.9678 3.06836 14.624 3.35938 15.085 3.94141C15.5498 4.52344 15.7822 5.33984 15.7822 6.39062C15.7822 7.44531 15.5459 8.26562 15.0732 8.85156C14.6045 9.43359 13.9521 9.72461 13.1162 9.72461ZM12.9756 3.89453C12.3193 3.89453 11.8447 4.07617 11.5518 4.43945C11.2588 4.80273 11.1084 5.38086 11.1006 6.17383V6.39062C11.1006 7.29297 11.251 7.93945 11.5518 8.33008C11.8525 8.7168 12.335 8.91016 12.999 8.91016C13.5537 8.91016 13.9873 8.68555 14.2998 8.23633C14.6162 7.78711 14.7744 7.16797 14.7744 6.37891C14.7744 5.57812 14.6162 4.96484 14.2998 4.53906C13.9873 4.10938 13.5459 3.89453 12.9756 3.89453Z\",\n fill: \"#343C6A\"\n})));\nexport default SvgOpensans;","var _path;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nconst SvgHelvetica = props => /*#__PURE__*/React.createElement(\"svg\", _extends({\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 46 9\"\n}, props), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M1.17773 0H0V8.60742H1.17773V4.58203H5.6543V8.60742H6.83203V0H5.6543V3.55664H1.17773V0ZM15.6416 0H14.5869V8.60742H15.6416V0ZM33.0732 2.36133H32.001V8.60742H33.0732V2.36133ZM33.0732 0H32.001V1.19531H33.0732V0ZM36.7812 2.15039C37.4883 2.15039 38.0625 2.32227 38.5039 2.66602C38.9492 3.00977 39.2168 3.60156 39.3066 4.44141H38.2812C38.2188 4.05469 38.0762 3.73438 37.8535 3.48047C37.6309 3.22266 37.2734 3.09375 36.7812 3.09375C36.1094 3.09375 35.6289 3.42188 35.3398 4.07812C35.1523 4.50391 35.0586 5.0293 35.0586 5.6543C35.0586 6.2832 35.1914 6.8125 35.457 7.24219C35.7227 7.67188 36.1406 7.88672 36.7109 7.88672C37.1484 7.88672 37.4941 7.75391 37.748 7.48828C38.0059 7.21875 38.1836 6.85156 38.2812 6.38672H39.3066C39.1895 7.21875 38.8965 7.82812 38.4277 8.21484C37.959 8.59766 37.3594 8.78906 36.6289 8.78906C35.8086 8.78906 35.1543 8.49023 34.666 7.89258C34.1777 7.29102 33.9336 6.54102 33.9336 5.64258C33.9336 4.54102 34.2012 3.68359 34.7363 3.07031C35.2715 2.45703 35.9531 2.15039 36.7812 2.15039ZM40.8574 6.9375C40.8574 7.24219 40.9688 7.48242 41.1914 7.6582C41.4141 7.83398 41.6777 7.92188 41.9824 7.92188C42.3535 7.92188 42.7129 7.83594 43.0605 7.66406C43.6465 7.37891 43.9395 6.91211 43.9395 6.26367V5.41406C43.8105 5.49609 43.6445 5.56445 43.4414 5.61914C43.2383 5.67383 43.0391 5.71289 42.8438 5.73633L42.2051 5.81836C41.8223 5.86914 41.5352 5.94922 41.3438 6.05859C41.0195 6.24219 40.8574 6.53516 40.8574 6.9375ZM43.4121 4.80469C43.6543 4.77344 43.8164 4.67188 43.8984 4.5C43.9453 4.40625 43.9688 4.27148 43.9688 4.0957C43.9688 3.73633 43.8398 3.47656 43.582 3.31641C43.3281 3.15234 42.9629 3.07031 42.4863 3.07031C41.9355 3.07031 41.5449 3.21875 41.3145 3.51562C41.1855 3.67969 41.1016 3.92383 41.0625 4.24805H40.0781C40.0977 3.47461 40.3477 2.9375 40.8281 2.63672C41.3125 2.33203 41.873 2.17969 42.5098 2.17969C43.248 2.17969 43.8477 2.32031 44.3086 2.60156C44.7656 2.88281 44.9941 3.32031 44.9941 3.91406V7.5293C44.9941 7.63867 45.0156 7.72656 45.0586 7.79297C45.1055 7.85938 45.2012 7.89258 45.3457 7.89258C45.3926 7.89258 45.4453 7.89062 45.5039 7.88672C45.5625 7.87891 45.625 7.86914 45.6914 7.85742V8.63672C45.5273 8.68359 45.4023 8.71289 45.3164 8.72461C45.2305 8.73633 45.1133 8.74219 44.9648 8.74219C44.6016 8.74219 44.3379 8.61328 44.1738 8.35547C44.0879 8.21875 44.0273 8.02539 43.9922 7.77539C43.7773 8.05664 43.4688 8.30078 43.0664 8.50781C42.6641 8.71484 42.2207 8.81836 41.7363 8.81836C41.1543 8.81836 40.6777 8.64258 40.3066 8.29102C39.9395 7.93555 39.7559 7.49219 39.7559 6.96094C39.7559 6.37891 39.9375 5.92773 40.3008 5.60742C40.6641 5.28711 41.1406 5.08984 41.7305 5.01562L43.4121 4.80469ZM29.1846 0.580078H30.251V2.33203H31.2529V3.19336H30.251V7.28906C30.251 7.50781 30.3252 7.6543 30.4736 7.72852C30.5557 7.77148 30.6924 7.79297 30.8838 7.79297H31.0479C31.1064 7.78906 31.1748 7.7832 31.2529 7.77539V8.60742C31.1318 8.64258 31.0049 8.66797 30.8721 8.68359C30.7432 8.69922 30.6025 8.70703 30.4502 8.70703C29.958 8.70703 29.624 8.58203 29.4482 8.33203C29.2725 8.07812 29.1846 7.75 29.1846 7.34766V3.19336H28.335V2.33203H29.1846V0.580078ZM26.5137 2.50781C26.0957 2.29688 25.6641 2.19141 25.2188 2.19141C24.3359 2.19141 23.6211 2.50586 23.0742 3.13477C22.5273 3.76367 22.2539 4.58203 22.2539 5.58984C22.2539 6.61328 22.5254 7.41016 23.0684 7.98047C23.6113 8.54688 24.2734 8.83008 25.0547 8.83008C25.375 8.83008 25.6621 8.79883 25.916 8.73633C26.3887 8.62695 26.7852 8.41602 27.1055 8.10352C27.2969 7.92383 27.4688 7.69336 27.6211 7.41211C27.7773 7.12695 27.8691 6.86914 27.8965 6.63867H26.8594C26.7812 6.91602 26.6484 7.16016 26.4609 7.37109C26.1328 7.73438 25.6934 7.91602 25.1426 7.91602C24.5527 7.91602 24.1172 7.72461 23.8359 7.3418C23.5547 6.95508 23.4043 6.44336 23.3848 5.80664H27.9844C27.9844 5.17383 27.9531 4.71289 27.8906 4.42383C27.8203 4.00195 27.6797 3.63281 27.4688 3.31641C27.25 2.98438 26.9316 2.71484 26.5137 2.50781ZM26.6016 3.87305C26.7578 4.14648 26.8574 4.51172 26.9004 4.96875H23.4141C23.4336 4.42969 23.6074 3.98633 23.9355 3.63867C24.2637 3.28711 24.6699 3.11133 25.1543 3.11133C25.8301 3.11133 26.3125 3.36523 26.6016 3.87305ZM17.4336 2.33203L19.1094 7.44141L20.8613 2.33203H22.0156L19.6484 8.60742H18.5234L16.209 2.33203H17.4336ZM10.8037 2.19141C11.249 2.19141 11.6807 2.29688 12.0986 2.50781C12.5166 2.71484 12.835 2.98438 13.0537 3.31641C13.2646 3.63281 13.4053 4.00195 13.4756 4.42383C13.5381 4.71289 13.5693 5.17383 13.5693 5.80664H8.96973C8.98926 6.44336 9.13965 6.95508 9.4209 7.3418C9.70215 7.72461 10.1377 7.91602 10.7275 7.91602C11.2783 7.91602 11.7178 7.73438 12.0459 7.37109C12.2334 7.16016 12.3662 6.91602 12.4443 6.63867H13.4814C13.4541 6.86914 13.3623 7.12695 13.2061 7.41211C13.0537 7.69336 12.8818 7.92383 12.6904 8.10352C12.3701 8.41602 11.9736 8.62695 11.501 8.73633C11.2471 8.79883 10.96 8.83008 10.6396 8.83008C9.8584 8.83008 9.19629 8.54688 8.65332 7.98047C8.11035 7.41016 7.83887 6.61328 7.83887 5.58984C7.83887 4.58203 8.1123 3.76367 8.65918 3.13477C9.20605 2.50586 9.9209 2.19141 10.8037 2.19141ZM12.4854 4.96875C12.4424 4.51172 12.3428 4.14648 12.1865 3.87305C11.8975 3.36523 11.415 3.11133 10.7393 3.11133C10.2549 3.11133 9.84863 3.28711 9.52051 3.63867C9.19238 3.98633 9.01855 4.42969 8.99902 4.96875H12.4854Z\",\n fill: \"#343C6A\"\n})));\nexport default SvgHelvetica;","var _path;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nconst SvgInter = props => /*#__PURE__*/React.createElement(\"svg\", _extends({\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 24 10\"\n}, props), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M1.05682 9.0593V0.332031H0V9.0593H1.05682ZM12.2817 3.36674V2.51447H10.884V0.946289H9.87828V2.51447H8.88965V3.36674H9.87828V7.45765C9.87828 7.83833 9.96635 8.15368 10.1425 8.40368C10.3215 8.65368 10.5459 8.83976 10.8158 8.96191C11.0885 9.08407 11.3669 9.14515 11.651 9.14515C11.8385 9.14515 11.9933 9.13095 12.1155 9.10254C12.2377 9.07697 12.3328 9.0514 12.401 9.02584L12.1965 8.12243L12.026 8.15652C11.955 8.16788 11.8641 8.17356 11.7533 8.17356C11.6056 8.17356 11.4649 8.15084 11.3314 8.10538C11.2007 8.05709 11.0928 7.96333 11.0075 7.82413C10.9252 7.68208 10.884 7.46902 10.884 7.18493V3.36674H12.2817ZM20.085 9.05984V2.51438H21.0566V3.50302H21.1247C21.2441 3.17916 21.46 2.91637 21.7725 2.71467C22.085 2.51296 22.4372 2.41211 22.8293 2.41211C22.9031 2.41211 22.9955 2.41353 23.1063 2.41637C23.2171 2.41921 23.3009 2.42347 23.3577 2.42916V3.45188C23.3236 3.44336 23.2455 3.43058 23.1233 3.41353C23.004 3.39364 22.8776 3.3837 22.7441 3.3837C22.4259 3.3837 22.1418 3.45046 21.8918 3.58399C21.6446 3.71467 21.4486 3.89648 21.3037 4.12944C21.1617 4.35955 21.0906 4.62234 21.0906 4.91779V9.05984H20.085ZM16.1566 9.19576C15.5259 9.19576 14.9819 9.05655 14.5245 8.77814C14.07 8.49689 13.7191 8.10485 13.4719 7.60201C13.2276 7.09632 13.1055 6.50826 13.1055 5.8378C13.1055 5.16735 13.2276 4.57644 13.4719 4.06507C13.7191 3.55087 14.0629 3.1503 14.5032 2.86337C14.9464 2.5736 15.4634 2.42871 16.0543 2.42871C16.3952 2.42871 16.7319 2.48553 17.0643 2.59916C17.3967 2.7128 17.6992 2.89746 17.9719 3.15314C18.2447 3.40598 18.462 3.74121 18.6239 4.15882C18.7859 4.57644 18.8668 5.09064 18.8668 5.70144V6.12757H14.1134C14.1278 6.56305 14.2123 6.93663 14.3668 7.24831C14.5401 7.58922 14.7802 7.84917 15.087 8.02814C15.3938 8.20428 15.7504 8.29235 16.1566 8.29235C16.4208 8.29235 16.6594 8.25542 16.8725 8.18155C17.0884 8.10485 17.2745 7.99121 17.4308 7.84064C17.587 7.68723 17.7077 7.49689 17.793 7.26962L18.7646 7.54235C18.6623 7.87189 18.4904 8.16167 18.2489 8.41167C18.0075 8.65882 17.7092 8.85201 17.354 8.99121C16.9989 9.12757 16.5998 9.19576 16.1566 9.19576ZM14.1159 5.25826H17.8441C17.8441 4.88894 17.7702 4.55939 17.6225 4.26962C17.4776 3.97985 17.2702 3.75115 17.0004 3.58354C16.7333 3.41593 16.418 3.33212 16.0543 3.33212C15.6538 3.33212 15.3072 3.43155 15.0146 3.63042C14.7248 3.82644 14.5018 4.08212 14.3455 4.39746C14.2116 4.6677 14.1351 4.95463 14.1159 5.25826ZM3.73322 5.12189V9.05939H2.72754V2.51394H3.69913V3.53667H3.78436C3.93777 3.20428 4.17072 2.93723 4.48322 2.73553C4.79572 2.53098 5.19913 2.42871 5.69345 2.42871C6.13663 2.42871 6.52441 2.51962 6.8568 2.70144C7.18919 2.88042 7.44771 3.15314 7.63237 3.51962C7.81703 3.88326 7.90936 4.34348 7.90936 4.9003V9.05939H6.90368V4.96848C6.90368 4.45428 6.77015 4.05371 6.50311 3.76678C6.23606 3.47701 5.86958 3.33212 5.40368 3.33212C5.08265 3.33212 4.79572 3.40172 4.54288 3.54093C4.29288 3.68013 4.09544 3.88326 3.95055 4.1503C3.80566 4.41735 3.73322 4.74121 3.73322 5.12189Z\",\n fill: \"#343C6A\"\n})));\nexport default SvgInter;","var _path;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nconst SvgTahoma = props => /*#__PURE__*/React.createElement(\"svg\", _extends({\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 40 10\"\n}, props), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M16.1924 9.33203H17.2939V5.08398C17.2939 4.2793 17.1123 3.66602 16.749 3.24414C16.3857 2.81836 15.8818 2.60547 15.2373 2.60547C14.8818 2.60547 14.5439 2.68359 14.2236 2.83984C13.9033 2.99609 13.5791 3.2207 13.251 3.51367V0.214844H12.1494V9.33203H13.251V4.44531C13.5283 4.21094 13.8115 4.02148 14.1006 3.87695C14.3936 3.72852 14.6768 3.6543 14.9502 3.6543C15.2275 3.6543 15.4463 3.69531 15.6064 3.77734C15.7666 3.85547 15.8916 3.97656 15.9814 4.14062C16.0635 4.29688 16.1182 4.50586 16.1455 4.76758C16.1768 5.02539 16.1924 5.30469 16.1924 5.60547V9.33203ZM23.9141 6.0625C23.9141 7.16406 23.6484 8.01562 23.1172 8.61719C22.5859 9.21484 21.8789 9.51367 20.9961 9.51367C20.0859 9.51367 19.3691 9.20508 18.8457 8.58789C18.3262 7.9668 18.0664 7.125 18.0664 6.0625C18.0664 4.96875 18.334 4.11914 18.8691 3.51367C19.4082 2.9082 20.1172 2.60547 20.9961 2.60547C21.8789 2.60547 22.5859 2.9082 23.1172 3.51367C23.6484 4.11523 23.9141 4.96484 23.9141 6.0625ZM22.7773 6.0625C22.7773 5.21484 22.623 4.58594 22.3145 4.17578C22.0059 3.76172 21.5664 3.55469 20.9961 3.55469C20.4219 3.55469 19.9785 3.76172 19.666 4.17578C19.3574 4.58594 19.2031 5.21484 19.2031 6.0625C19.2031 6.88281 19.3574 7.50586 19.666 7.93164C19.9785 8.35352 20.4219 8.56445 20.9961 8.56445C21.5625 8.56445 22 8.35742 22.3086 7.94336C22.6211 7.52539 22.7773 6.89844 22.7773 6.0625ZM32.1621 5.54688V9.33203H33.2637V5.02539C33.2637 4.57617 33.2148 4.20312 33.1172 3.90625C33.0234 3.60938 32.8887 3.36133 32.7129 3.16211C32.541 2.9668 32.3398 2.82617 32.1094 2.74023C31.8789 2.65039 31.623 2.60547 31.3418 2.60547C30.9707 2.60547 30.627 2.70117 30.3105 2.89258C29.9941 3.08398 29.6699 3.36523 29.3379 3.73633C29.1816 3.33398 28.9531 3.04492 28.6523 2.86914C28.3555 2.69336 28.0137 2.60547 27.627 2.60547C27.2871 2.60547 26.9746 2.68555 26.6895 2.8457C26.4082 3.00195 26.123 3.22461 25.834 3.51367V2.78711H24.7324V9.33203H25.834V4.44531C26.0801 4.21484 26.334 4.02539 26.5957 3.87695C26.8574 3.72852 27.1074 3.6543 27.3457 3.6543C27.5918 3.6543 27.7871 3.69141 27.9316 3.76562C28.0762 3.83984 28.1875 3.95508 28.2656 4.11133C28.3398 4.25586 28.3887 4.45703 28.4121 4.71484C28.4355 4.96875 28.4473 5.24609 28.4473 5.54688V9.33203H29.5488V5.02539C29.5488 4.90039 29.5449 4.79297 29.5371 4.70312C29.5332 4.60938 29.5293 4.5293 29.5254 4.46289C29.8027 4.20117 30.0703 4.00195 30.3281 3.86523C30.5898 3.72461 30.834 3.6543 31.0605 3.6543C31.3066 3.6543 31.502 3.69141 31.6465 3.76562C31.791 3.83984 31.9023 3.95508 31.9805 4.11133C32.0547 4.25586 32.1035 4.45703 32.127 4.71484C32.1504 4.96875 32.1621 5.24609 32.1621 5.54688ZM38.1553 5.9043V7.7207C37.9092 7.93945 37.6455 8.125 37.3643 8.27734C37.083 8.42578 36.7686 8.5 36.4209 8.5C36.0146 8.5 35.7061 8.4043 35.4951 8.21289C35.2842 8.02148 35.1787 7.73828 35.1787 7.36328C35.1787 7.03125 35.2744 6.77344 35.4658 6.58984C35.6572 6.40234 35.8994 6.26367 36.1924 6.17383C36.4385 6.09961 36.7607 6.04297 37.1592 6.00391C37.5615 5.96094 37.8936 5.92773 38.1553 5.9043ZM37.792 8.91602C37.9443 8.79492 38.0654 8.70117 38.1553 8.63477V9.33203H39.251V4.85547C39.251 4.44531 39.1924 4.09766 39.0752 3.8125C38.958 3.52734 38.7803 3.29492 38.542 3.11523C38.2959 2.93164 38.0186 2.80469 37.71 2.73438C37.4014 2.66406 37.0225 2.62891 36.5732 2.62891C36.2021 2.62891 35.8271 2.66406 35.4482 2.73438C35.0693 2.80469 34.7783 2.86914 34.5752 2.92773V4.04688H34.6396C34.9834 3.90234 35.3271 3.79297 35.6709 3.71875C36.0146 3.64062 36.3135 3.60156 36.5674 3.60156C36.7822 3.60156 36.9912 3.61719 37.1943 3.64844C37.3975 3.67578 37.5693 3.73438 37.71 3.82422C37.8506 3.91016 37.96 4.0332 38.0381 4.19336C38.1162 4.34961 38.1553 4.55664 38.1553 4.81445V5.02539C37.5771 5.05664 37.0381 5.10547 36.5381 5.17188C36.0381 5.23438 35.6045 5.34961 35.2373 5.51758C34.8232 5.70508 34.5205 5.95898 34.3291 6.2793C34.1377 6.5957 34.042 6.98047 34.042 7.43359C34.042 7.72656 34.0947 8.00586 34.2002 8.27148C34.3057 8.5332 34.4463 8.75391 34.6221 8.93359C34.8057 9.11719 35.0186 9.25977 35.2607 9.36133C35.5029 9.46289 35.7588 9.51367 36.0283 9.51367C36.3564 9.51367 36.6104 9.48633 36.79 9.43164C36.9736 9.37695 37.1631 9.29883 37.3584 9.19727C37.499 9.12695 37.6436 9.0332 37.792 8.91602ZM9.81348 7.7207V5.9043C9.55176 5.92773 9.21973 5.96094 8.81738 6.00391C8.41895 6.04297 8.09668 6.09961 7.85059 6.17383C7.55762 6.26367 7.31543 6.40234 7.12402 6.58984C6.93262 6.77344 6.83691 7.03125 6.83691 7.36328C6.83691 7.73828 6.94238 8.02148 7.15332 8.21289C7.36426 8.4043 7.67285 8.5 8.0791 8.5C8.42676 8.5 8.74121 8.42578 9.02246 8.27734C9.30371 8.125 9.56738 7.93945 9.81348 7.7207ZM9.81348 8.63477C9.72363 8.70117 9.60254 8.79492 9.4502 8.91602C9.30176 9.0332 9.15723 9.12695 9.0166 9.19727C8.82129 9.29883 8.63184 9.37695 8.44824 9.43164C8.26855 9.48633 8.01465 9.51367 7.68652 9.51367C7.41699 9.51367 7.16113 9.46289 6.91895 9.36133C6.67676 9.25977 6.46387 9.11719 6.28027 8.93359C6.10449 8.75391 5.96387 8.5332 5.8584 8.27148C5.75293 8.00586 5.7002 7.72656 5.7002 7.43359C5.7002 6.98047 5.7959 6.5957 5.9873 6.2793C6.17871 5.95898 6.48145 5.70508 6.89551 5.51758C7.2627 5.34961 7.69629 5.23438 8.19629 5.17188C8.69629 5.10547 9.23535 5.05664 9.81348 5.02539V4.81445C9.81348 4.55664 9.77441 4.34961 9.69629 4.19336C9.61816 4.0332 9.50879 3.91016 9.36816 3.82422C9.22754 3.73438 9.05566 3.67578 8.85254 3.64844C8.64941 3.61719 8.44043 3.60156 8.22559 3.60156C7.97168 3.60156 7.67285 3.64062 7.3291 3.71875C6.98535 3.79297 6.6416 3.90234 6.29785 4.04688H6.2334V2.92773C6.43652 2.86914 6.72754 2.80469 7.10645 2.73438C7.48535 2.66406 7.86035 2.62891 8.23145 2.62891C8.68066 2.62891 9.05957 2.66406 9.36816 2.73438C9.67676 2.80469 9.9541 2.93164 10.2002 3.11523C10.4385 3.29492 10.6162 3.52734 10.7334 3.8125C10.8506 4.09766 10.9092 4.44531 10.9092 4.85547V9.33203H9.81348V8.63477ZM2.92383 1.63867V9.33203H4.08398V1.63867H7.01367V0.607422H-0.00585938V1.63867H2.92383Z\",\n fill: \"#343C6A\"\n})));\nexport default SvgTahoma;","var _path;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nconst SvgCouriernew = props => /*#__PURE__*/React.createElement(\"svg\", _extends({\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 76 9\"\n}, props), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M31.2363 2.00391V0.732422H29.8066V2.00391H31.2363ZM31.4004 7.13086V3.01172H29.2324C28.9434 3.01172 28.7363 3.06836 28.6113 3.18164C28.4902 3.29102 28.4297 3.43359 28.4297 3.60938C28.4297 3.78906 28.4922 3.93555 28.6172 4.04883C28.7422 4.1582 28.9473 4.21289 29.2324 4.21289H30.1992V7.13086H28.7578C28.4688 7.13086 28.2617 7.1875 28.1367 7.30078C28.0156 7.41016 27.9551 7.55273 27.9551 7.72852C27.9551 7.9082 28.0156 8.05469 28.1367 8.16797C28.2617 8.27734 28.4688 8.33203 28.7578 8.33203H32.8418C33.1309 8.33203 33.3359 8.27734 33.457 8.16797C33.582 8.05469 33.6445 7.91016 33.6445 7.73438C33.6445 7.55469 33.582 7.41016 33.457 7.30078C33.3359 7.1875 33.1309 7.13086 32.8418 7.13086H31.4004ZM56.8828 3.49805V7.13086H57.3164C57.6055 7.13086 57.8105 7.1875 57.9316 7.30078C58.0566 7.41016 58.1191 7.55469 58.1191 7.73438C58.1191 7.91016 58.0566 8.05469 57.9316 8.16797C57.8105 8.27734 57.6055 8.33203 57.3164 8.33203H55.7402C55.4512 8.33203 55.2441 8.27734 55.1191 8.16797C54.998 8.05469 54.9375 7.9082 54.9375 7.72852C54.9375 7.55664 54.998 7.41406 55.1191 7.30078C55.2402 7.1875 55.4277 7.13086 55.6816 7.13086V2.43164H55.4941C55.2051 2.43164 54.998 2.37695 54.873 2.26758C54.752 2.1543 54.6914 2.00781 54.6914 1.82812C54.6914 1.64844 54.752 1.50391 54.873 1.39453C54.998 1.28125 55.2051 1.22461 55.4941 1.22461L56.8828 1.23047L59.9531 6.04688V2.43164H59.5195C59.2305 2.43164 59.0234 2.37695 58.8984 2.26758C58.7773 2.1543 58.7168 2.00781 58.7168 1.82812C58.7168 1.64844 58.7773 1.50391 58.8984 1.39453C59.0234 1.28125 59.2305 1.22461 59.5195 1.22461L61.0957 1.23047C61.3848 1.23047 61.5898 1.28516 61.7109 1.39453C61.8359 1.50391 61.8984 1.64844 61.8984 1.82812C61.8984 2.00391 61.8379 2.14844 61.7168 2.26172C61.5957 2.375 61.4102 2.43164 61.1602 2.43164V8.33203H59.9707L56.8828 3.49805ZM63.3682 6.28125H68.2959V5.77148C68.2959 5.38086 68.2334 5.03711 68.1084 4.74023C67.9248 4.31445 67.6924 3.95703 67.4111 3.66797C67.2119 3.46875 66.9072 3.2832 66.4971 3.11133C66.0908 2.93945 65.6436 2.85352 65.1553 2.85352C64.3428 2.85352 63.624 3.11914 62.999 3.65039C62.3779 4.17773 62.0674 4.86328 62.0674 5.70703C62.0674 6.5 62.3545 7.16797 62.9287 7.71094C63.5068 8.25391 64.2764 8.52539 65.2373 8.52539C65.7959 8.52539 66.3779 8.46094 66.9834 8.33203C67.5889 8.19922 67.9697 8.06055 68.126 7.91602C68.2432 7.80664 68.3018 7.67383 68.3018 7.51758C68.3018 7.3457 68.2471 7.20312 68.1377 7.08984C68.0283 6.97656 67.8936 6.91992 67.7334 6.91992C67.6162 6.91992 67.4053 6.95898 67.1006 7.03711C66.3623 7.22852 65.7705 7.32422 65.3252 7.32422C64.7822 7.32422 64.3506 7.22852 64.0303 7.03711C63.7139 6.8457 63.4932 6.59375 63.3682 6.28125ZM66.2451 4.3125C66.542 4.48047 66.7822 4.73633 66.9658 5.08008H63.4033C63.5908 4.73633 63.833 4.48047 64.1299 4.3125C64.4268 4.14062 64.7783 4.05469 65.1846 4.05469C65.5947 4.05469 65.9482 4.14062 66.2451 4.3125ZM71.3525 8.33203L72.1846 6.11719L73.0635 8.33203H74.1768L75.1611 4.21289C75.3721 4.19727 75.5303 4.13477 75.6357 4.02539C75.7451 3.91211 75.7998 3.77539 75.7998 3.61523C75.7998 3.43555 75.7373 3.29102 75.6123 3.18164C75.4912 3.06836 75.2861 3.01172 74.9971 3.01172H73.8662C73.5771 3.01172 73.3701 3.06836 73.2451 3.18164C73.124 3.29102 73.0635 3.43359 73.0635 3.60938C73.0635 3.83203 73.1572 4.00391 73.3447 4.125C73.4385 4.18359 73.6338 4.21289 73.9307 4.21289L73.4619 6.11719L72.7119 4.16602H71.6455L70.9014 6.11719L70.4443 4.21289C70.7529 4.21289 70.96 4.16602 71.0654 4.07227C71.2061 3.94727 71.2764 3.79492 71.2764 3.61523C71.2764 3.43555 71.2139 3.29102 71.0889 3.18164C70.9678 3.06836 70.7627 3.01172 70.4736 3.01172H69.3545C69.0654 3.01172 68.8584 3.06836 68.7334 3.18164C68.6123 3.29102 68.5518 3.43359 68.5518 3.60938C68.5518 3.77734 68.6064 3.91797 68.7158 4.03125C68.8291 4.14062 68.9951 4.20117 69.2139 4.21289L70.2217 8.33203H71.3525ZM44.3467 3.76172V3.01172H42.7119C42.4229 3.01172 42.2158 3.06836 42.0908 3.18164C41.9697 3.29102 41.9092 3.43359 41.9092 3.60938C41.9092 3.78906 41.9697 3.93555 42.0908 4.04883C42.2158 4.1582 42.4229 4.21289 42.7119 4.21289H43.1455V7.13086H42.4307C42.1416 7.13086 41.9346 7.1875 41.8096 7.30078C41.6885 7.41016 41.6279 7.55273 41.6279 7.72852C41.6279 7.9082 41.6885 8.05469 41.8096 8.16797C41.9346 8.27734 42.1416 8.33203 42.4307 8.33203H46.0576C46.3467 8.33203 46.5518 8.27734 46.6729 8.16797C46.7979 8.05469 46.8604 7.91016 46.8604 7.73438C46.8604 7.55469 46.7979 7.41016 46.6729 7.30078C46.5518 7.1875 46.3467 7.13086 46.0576 7.13086H44.3467V5.32031C44.8467 4.89844 45.2627 4.58203 45.5947 4.37109C45.9307 4.16016 46.1826 4.05469 46.3506 4.05469C46.4795 4.05469 46.626 4.12891 46.79 4.27734C46.9541 4.42578 47.1104 4.5 47.2588 4.5C47.4268 4.5 47.5693 4.44141 47.6865 4.32422C47.8076 4.20312 47.8682 4.05664 47.8682 3.88477C47.8682 3.68164 47.7432 3.48242 47.4932 3.28711C47.126 2.99805 46.7471 2.85352 46.3564 2.85352C46.1025 2.85352 45.8291 2.91406 45.5361 3.03516C45.2471 3.15625 44.8506 3.39844 44.3467 3.76172ZM40.7158 6.28125H35.7881C35.9131 6.59375 36.1338 6.8457 36.4502 7.03711C36.7705 7.22852 37.2021 7.32422 37.7451 7.32422C38.1904 7.32422 38.7822 7.22852 39.5205 7.03711C39.8252 6.95898 40.0361 6.91992 40.1533 6.91992C40.3135 6.91992 40.4482 6.97656 40.5576 7.08984C40.667 7.20312 40.7217 7.3457 40.7217 7.51758C40.7217 7.67383 40.6631 7.80664 40.5459 7.91602C40.3896 8.06055 40.0088 8.19922 39.4033 8.33203C38.7979 8.46094 38.2158 8.52539 37.6572 8.52539C36.6963 8.52539 35.9268 8.25391 35.3486 7.71094C34.7744 7.16797 34.4873 6.5 34.4873 5.70703C34.4873 4.86328 34.7979 4.17773 35.4189 3.65039C36.0439 3.11914 36.7627 2.85352 37.5752 2.85352C38.0635 2.85352 38.5107 2.93945 38.917 3.11133C39.3271 3.2832 39.6318 3.46875 39.8311 3.66797C40.1123 3.95703 40.3447 4.31445 40.5283 4.74023C40.6533 5.03711 40.7158 5.38086 40.7158 5.77148V6.28125ZM39.3857 5.08008C39.2021 4.73633 38.9619 4.48047 38.665 4.3125C38.3682 4.14062 38.0146 4.05469 37.6045 4.05469C37.1982 4.05469 36.8467 4.14062 36.5498 4.3125C36.2529 4.48047 36.0107 4.73633 35.8232 5.08008H39.3857ZM23.6621 3.01172V3.76172C24.166 3.39844 24.5625 3.15625 24.8516 3.03516C25.1445 2.91406 25.418 2.85352 25.6719 2.85352C26.0625 2.85352 26.4414 2.99805 26.8086 3.28711C27.0586 3.48242 27.1836 3.68164 27.1836 3.88477C27.1836 4.05664 27.123 4.20312 27.002 4.32422C26.8848 4.44141 26.7422 4.5 26.5742 4.5C26.4258 4.5 26.2695 4.42578 26.1055 4.27734C25.9414 4.12891 25.7949 4.05469 25.666 4.05469C25.498 4.05469 25.2461 4.16016 24.9102 4.37109C24.5781 4.58203 24.1621 4.89844 23.6621 5.32031V7.13086H25.373C25.6621 7.13086 25.8672 7.1875 25.9883 7.30078C26.1133 7.41016 26.1758 7.55469 26.1758 7.73438C26.1758 7.91016 26.1133 8.05469 25.9883 8.16797C25.8672 8.27734 25.6621 8.33203 25.373 8.33203H21.7461C21.457 8.33203 21.25 8.27734 21.125 8.16797C21.0039 8.05469 20.9434 7.9082 20.9434 7.72852C20.9434 7.55273 21.0039 7.41016 21.125 7.30078C21.25 7.1875 21.457 7.13086 21.7461 7.13086H22.4609V4.21289H22.0273C21.7383 4.21289 21.5312 4.1582 21.4062 4.04883C21.2852 3.93555 21.2246 3.78906 21.2246 3.60938C21.2246 3.43359 21.2852 3.29102 21.4062 3.18164C21.5312 3.06836 21.7383 3.01172 22.0273 3.01172H23.6621ZM19.5674 7.13086V3.01172H17.9326C17.6436 3.01172 17.4365 3.06836 17.3115 3.18164C17.1904 3.29102 17.1299 3.43359 17.1299 3.60938C17.1299 3.78906 17.1904 3.93555 17.3115 4.04883C17.4365 4.1582 17.6436 4.21289 17.9326 4.21289H18.3662V6.66211C17.9561 6.91211 17.6104 7.08594 17.3291 7.18359C17.0518 7.27734 16.792 7.32422 16.5498 7.32422C16.2959 7.32422 16.1064 7.26562 15.9814 7.14844C15.8604 7.02734 15.7998 6.83984 15.7998 6.58594V3.01172H14.3936C14.1045 3.01172 13.8975 3.06836 13.7725 3.18164C13.6514 3.29102 13.5908 3.43359 13.5908 3.60938C13.5908 3.78906 13.6514 3.93555 13.7725 4.04883C13.8975 4.1582 14.1045 4.21289 14.3936 4.21289H14.5986V6.79688C14.5986 7.11328 14.6592 7.37695 14.7803 7.58789C14.9482 7.88086 15.1768 8.11133 15.4658 8.2793C15.7549 8.44336 16.0967 8.52539 16.4912 8.52539C16.7725 8.52539 17.0693 8.48633 17.3818 8.4082C17.6943 8.33008 18.0225 8.21289 18.3662 8.05664V8.33203H19.5088C19.7979 8.33203 20.0029 8.27734 20.124 8.16797C20.249 8.05469 20.3115 7.91016 20.3115 7.73438C20.3115 7.55859 20.251 7.41406 20.1299 7.30078C20.0088 7.1875 19.8213 7.13086 19.5674 7.13086ZM13.2412 5.77148C13.2412 6.23242 13.1123 6.67969 12.8545 7.11328C12.6006 7.54297 12.2197 7.88672 11.7119 8.14453C11.208 8.39844 10.6807 8.52539 10.1299 8.52539C9.58301 8.52539 9.05957 8.40039 8.55957 8.15039C8.05957 7.89648 7.67871 7.55273 7.41699 7.11914C7.15527 6.68555 7.02441 6.23242 7.02441 5.75977C7.02441 5.2793 7.15723 4.80859 7.42285 4.34766C7.68848 3.88281 8.06934 3.51758 8.56543 3.25195C9.06543 2.98633 9.58691 2.85352 10.1299 2.85352C10.6768 2.85352 11.2021 2.99023 11.7061 3.26367C12.2139 3.5332 12.5967 3.89844 12.8545 4.35938C13.1123 4.81641 13.2412 5.28711 13.2412 5.77148ZM12.04 5.77734C12.04 5.39062 11.9014 5.03516 11.624 4.71094C11.2451 4.27344 10.7471 4.05469 10.1299 4.05469C9.58691 4.05469 9.13379 4.22852 8.77051 4.57617C8.40723 4.92383 8.22559 5.32617 8.22559 5.7832C8.22559 6.1582 8.40918 6.50977 8.77637 6.83789C9.14355 7.16211 9.59473 7.32422 10.1299 7.32422C10.6689 7.32422 11.1221 7.16211 11.4893 6.83789C11.8564 6.50977 12.04 6.15625 12.04 5.77734ZM5.34961 1.30664C5.26367 1.35742 5.18359 1.43359 5.10938 1.53516C4.84766 1.37109 4.56445 1.25 4.25977 1.17188C3.95898 1.08984 3.63477 1.04883 3.28711 1.04883C2.70898 1.04883 2.16211 1.19531 1.64648 1.48828C1.13086 1.78125 0.726562 2.19922 0.433594 2.74219C0.144531 3.28125 0 3.86328 0 4.48828V5.30273C0 5.90039 0.162109 6.45312 0.486328 6.96094C0.810547 7.46484 1.20312 7.83398 1.66406 8.06836C2.23438 8.36133 2.875 8.50781 3.58594 8.50781C4.19531 8.50781 4.75195 8.40234 5.25586 8.19141C5.63086 8.03516 5.9375 7.82031 6.17578 7.54688C6.33984 7.35938 6.42188 7.18359 6.42188 7.01953C6.42188 6.85547 6.36133 6.71289 6.24023 6.5918C6.11914 6.4707 5.97852 6.41016 5.81836 6.41016C5.72852 6.41016 5.64844 6.42969 5.57812 6.46875C5.50781 6.50391 5.41016 6.58398 5.28516 6.70898C5.08203 6.91602 4.89062 7.05469 4.71094 7.125C4.40234 7.24609 4.02539 7.30664 3.58008 7.30664C2.83398 7.30664 2.25 7.11328 1.82812 6.72656C1.41016 6.33984 1.20117 5.85742 1.20117 5.2793V4.5C1.20117 4.01562 1.31641 3.59766 1.54688 3.24609C1.77734 2.89453 2.04297 2.64062 2.34375 2.48438C2.64453 2.32812 2.97461 2.25 3.33398 2.25C3.62305 2.25 3.91016 2.30273 4.19531 2.4082C4.48438 2.51367 4.70898 2.6543 4.86914 2.83008C4.95117 2.91992 5.00586 3.04688 5.0332 3.21094C5.08008 3.45703 5.15234 3.625 5.25 3.71484C5.34766 3.80469 5.47656 3.84961 5.63672 3.84961C5.8125 3.84961 5.95508 3.78906 6.06445 3.66797C6.17773 3.54297 6.23438 3.33594 6.23438 3.04688V2.02734C6.23438 1.73828 6.17773 1.5332 6.06445 1.41211C5.95508 1.29102 5.8125 1.23047 5.63672 1.23047C5.53516 1.23047 5.43945 1.25586 5.34961 1.30664Z\",\n fill: \"#343C6A\"\n})));\nexport default SvgCouriernew;","var _path;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nconst SvgTrebuchetms = props => /*#__PURE__*/React.createElement(\"svg\", _extends({\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 70 10\"\n}, props), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M18.9922 8.88086L18.5996 9.44922H18.043V0.484375H19.1562V3.51953C19.2617 3.375 19.459 3.24219 19.748 3.12109C20.041 3 20.3281 2.93945 20.6094 2.93945C21.4688 2.93945 22.1641 3.23633 22.6953 3.83008C23.2305 4.42383 23.498 5.17383 23.498 6.08008C23.498 7.12695 23.2305 7.95117 22.6953 8.55273C22.1602 9.15039 21.4355 9.44922 20.5215 9.44922C20.2246 9.44922 19.9316 9.39453 19.6426 9.28516C19.3574 9.17188 19.1406 9.03711 18.9922 8.88086ZM19.1562 4.36914V7.99023C19.1562 8.05273 19.2949 8.15625 19.5723 8.30078C19.8496 8.44141 20.0605 8.51172 20.2051 8.51172C20.9629 8.51172 21.5059 8.33008 21.834 7.9668C22.1621 7.60352 22.3262 6.99414 22.3262 6.13867C22.3262 5.42773 22.1348 4.87305 21.752 4.47461C21.3691 4.07617 20.8535 3.87695 20.2051 3.87695C20.0684 3.87695 19.877 3.93555 19.6309 4.05273C19.3887 4.16992 19.2305 4.27539 19.1562 4.36914ZM40.1689 5.38867V9.33203H41.2822V5.38867C41.2822 4.63086 41.0928 4.0332 40.7139 3.5957C40.3389 3.1582 39.8193 2.93945 39.1553 2.93945C38.8037 2.93945 38.4619 3.01758 38.1299 3.17383C37.8018 3.32617 37.5635 3.51758 37.415 3.74805V0.484375H36.3018V9.33203H37.415V4.66797C37.5596 4.45703 37.7666 4.27344 38.0361 4.11719C38.3096 3.95703 38.5811 3.87695 38.8506 3.87695C39.2686 3.87695 39.5928 4.01172 39.8232 4.28125C40.0537 4.55078 40.1689 4.91992 40.1689 5.38867ZM64.4551 8.93945L64.8828 7.86133C65.1016 8.02148 65.373 8.15625 65.6973 8.26562C66.0254 8.37109 66.3184 8.42383 66.5762 8.42383C67.0332 8.42383 67.4004 8.29883 67.6777 8.04883C67.9551 7.79883 68.0938 7.48047 68.0938 7.09375C68.0938 6.80469 68.0156 6.53711 67.8594 6.29102C67.707 6.04102 67.3203 5.76953 66.6992 5.47656L66.0078 5.1543C65.4219 4.88086 65.0117 4.55664 64.7773 4.18164C64.5469 3.80664 64.4316 3.35547 64.4316 2.82812C64.4316 2.1875 64.6582 1.65625 65.1113 1.23438C65.5645 0.8125 66.1465 0.601562 66.8574 0.601562C67.8066 0.601562 68.4668 0.755859 68.8379 1.06445L68.4922 2.08398C68.3359 1.9707 68.0977 1.86133 67.7773 1.75586C67.457 1.65039 67.1602 1.59766 66.8867 1.59766C66.4883 1.59766 66.1738 1.71094 65.9434 1.9375C65.7168 2.16406 65.6035 2.45508 65.6035 2.81055C65.6035 3.0293 65.6445 3.22852 65.7266 3.4082C65.8086 3.58789 65.9219 3.73828 66.0664 3.85938C66.2148 3.98047 66.5156 4.15039 66.9688 4.36914L67.6719 4.70312C68.2578 4.98047 68.668 5.3125 68.9023 5.69922C69.1406 6.08203 69.2598 6.57031 69.2598 7.16406C69.2598 7.80859 69 8.35547 68.4805 8.80469C67.9648 9.25391 67.2734 9.47852 66.4062 9.47852C65.6445 9.47852 64.9941 9.29883 64.4551 8.93945ZM63.0967 9.33203L62.0771 3.81836L60.2021 9.44922H59.9092L57.9814 3.81836L56.9854 9.33203H55.8721L57.4775 0.748047H58.0107L60.0557 7.01172L61.9424 0.748047H62.4697L64.21 9.33203H63.0967ZM48.4629 3.93555H49.1895V7.49805C49.1895 8.06055 49.3594 8.52734 49.6992 8.89844C50.043 9.26562 50.4629 9.44922 50.959 9.44922C51.5098 9.44922 52.0156 9.39062 52.4766 9.27344L52.3125 8.29492C52.0078 8.43945 51.7129 8.51172 51.4277 8.51172C51.0332 8.51172 50.7461 8.40039 50.5664 8.17773C50.3906 7.95508 50.3027 7.58008 50.3027 7.05273V3.93555H52.0254V3.05664H50.3027V1.31641L49.1895 1.74414V3.05664H48.4629V3.93555ZM47.8379 6.30273H43.3145C43.3145 7.03711 43.5156 7.60156 43.918 7.99609C44.2734 8.33984 44.7305 8.51172 45.2891 8.51172C45.9258 8.51172 46.457 8.32617 46.8828 7.95508L47.3516 8.75781C47.1797 8.92969 46.916 9.07812 46.5605 9.20312C46.1152 9.36719 45.6191 9.44922 45.0723 9.44922C44.2832 9.44922 43.6133 9.18164 43.0625 8.64648C42.4492 8.05664 42.1426 7.26367 42.1426 6.26758C42.1426 5.23242 42.457 4.40234 43.0859 3.77734C43.6484 3.21875 44.3145 2.93945 45.084 2.93945C45.9785 2.93945 46.6797 3.19141 47.1875 3.69531C47.6797 4.17969 47.9258 4.82227 47.9258 5.62305C47.9258 5.86914 47.8965 6.0957 47.8379 6.30273ZM45.1367 3.87695C44.6406 3.87695 44.2246 4.03711 43.8887 4.35742C43.5684 4.66211 43.3867 5.04102 43.3438 5.49414H46.8184C46.8184 5.04492 46.6777 4.66992 46.3965 4.36914C46.0879 4.04102 45.668 3.87695 45.1367 3.87695ZM35.4072 3.56641L34.8564 4.35156C34.7432 4.23828 34.542 4.13086 34.2529 4.0293C33.9678 3.92773 33.6865 3.87695 33.4092 3.87695C32.8037 3.87695 32.3232 4.08984 31.9678 4.51562C31.6123 4.9375 31.4346 5.51758 31.4346 6.25586C31.4346 6.99023 31.6162 7.55078 31.9795 7.9375C32.3428 8.32031 32.8467 8.51172 33.4912 8.51172C33.9912 8.51172 34.4951 8.31836 35.0029 7.93164L35.4424 8.86914C34.8447 9.25586 34.1045 9.44922 33.2217 9.44922C32.3662 9.44922 31.6592 9.16211 31.1006 8.58789C30.542 8.01367 30.2627 7.23633 30.2627 6.25586C30.2627 5.25586 30.5518 4.45312 31.1299 3.84766C31.7119 3.24219 32.5068 2.93945 33.5146 2.93945C33.8389 2.93945 34.1904 3.00781 34.5693 3.14453C34.9482 3.28125 35.2275 3.42188 35.4072 3.56641ZM25.4766 7.05859V3.05664H24.3633V7.17578C24.3633 7.90234 24.5449 8.46289 24.9082 8.85742C25.2754 9.25195 25.8027 9.44922 26.4902 9.44922C26.8496 9.44922 27.2168 9.34766 27.5918 9.14453C27.9707 8.9375 28.2227 8.71094 28.3477 8.46484V9.33203H29.4609V3.05664H28.3477V7.46289C28.25 7.74023 28.0488 7.98438 27.7441 8.19531C27.4395 8.40625 27.1035 8.51172 26.7363 8.51172C25.8965 8.51172 25.4766 8.02734 25.4766 7.05859ZM12.5654 6.30273H17.0889C17.1475 6.0957 17.1768 5.86914 17.1768 5.62305C17.1768 4.82227 16.9307 4.17969 16.4385 3.69531C15.9307 3.19141 15.2295 2.93945 14.335 2.93945C13.5654 2.93945 12.8994 3.21875 12.3369 3.77734C11.708 4.40234 11.3936 5.23242 11.3936 6.26758C11.3936 7.26367 11.7002 8.05664 12.3135 8.64648C12.8643 9.18164 13.5342 9.44922 14.3232 9.44922C14.8701 9.44922 15.3662 9.36719 15.8115 9.20312C16.167 9.07812 16.4307 8.92969 16.6025 8.75781L16.1338 7.95508C15.708 8.32617 15.1768 8.51172 14.54 8.51172C13.9814 8.51172 13.5244 8.33984 13.1689 7.99609C12.7666 7.60156 12.5654 7.03711 12.5654 6.30273ZM13.1396 4.35742C13.4756 4.03711 13.8916 3.87695 14.3877 3.87695C14.9189 3.87695 15.3389 4.04102 15.6475 4.36914C15.9287 4.66992 16.0693 5.04492 16.0693 5.49414H12.5947C12.6377 5.04102 12.8193 4.66211 13.1396 4.35742ZM10.8623 4.12891C10.6201 3.96094 10.376 3.87695 10.1299 3.87695C9.73535 3.87695 9.38965 4.05859 9.09277 4.42188C8.7998 4.78516 8.65332 5.22266 8.65332 5.73438V9.33203H7.54004V3.05664H8.65332V4.05859C9.05957 3.3125 9.66309 2.93945 10.4639 2.93945C10.6631 2.93945 10.9502 2.97461 11.3252 3.04492L10.8623 4.12891ZM4.00781 9.33203V1.80273H6.86133V0.748047H0.105469V1.80273H2.83594V9.33203H4.00781Z\",\n fill: \"#343C6A\"\n})));\nexport default SvgTrebuchetms;","var _path;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nconst SvgLucidagrande = props => /*#__PURE__*/React.createElement(\"svg\", _extends({\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 78 10\"\n}, props), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M26.3438 8.13672V9.33203H27.5039V0.0800781H26.3438V3.69531C25.8477 3.11719 25.2227 2.82812 24.4688 2.82812C23.6562 2.82812 23 3.15039 22.5 3.79492C22.0039 4.43945 21.7559 5.29102 21.7559 6.34961C21.7559 7.31836 21.9746 8.08203 22.4121 8.64062C22.8535 9.19922 23.457 9.47852 24.2227 9.47852C25.168 9.47852 25.875 9.03125 26.3438 8.13672ZM24.6445 3.69531C25.1797 3.69531 25.7461 3.95898 26.3438 4.48633V7.41602C25.7305 8.11523 25.1035 8.46484 24.4629 8.46484C23.4785 8.46484 22.9863 7.7207 22.9863 6.23242C22.9863 4.54102 23.5391 3.69531 24.6445 3.69531ZM69.8164 8.13672V9.33203H70.9766V0.0800781H69.8164V3.69531C69.3203 3.11719 68.6953 2.82812 67.9414 2.82812C67.1289 2.82812 66.4727 3.15039 65.9727 3.79492C65.4766 4.43945 65.2285 5.29102 65.2285 6.34961C65.2285 7.31836 65.4473 8.08203 65.8848 8.64062C66.3262 9.19922 66.9297 9.47852 67.6953 9.47852C68.6406 9.47852 69.3477 9.03125 69.8164 8.13672ZM68.1172 3.69531C68.6523 3.69531 69.2188 3.95898 69.8164 4.48633V7.41602C69.2031 8.11523 68.5762 8.46484 67.9355 8.46484C66.9512 8.46484 66.459 7.7207 66.459 6.23242C66.459 4.54102 67.0117 3.69531 68.1172 3.69531ZM75.6562 9.47852C76.207 9.47852 76.8691 9.36133 77.6426 9.12695V8.21289C76.9434 8.4707 76.3535 8.59961 75.873 8.59961C74.5605 8.59961 73.8203 7.84375 73.6523 6.33203H77.666L77.6719 5.97461C77.6719 4.9668 77.4609 4.18945 77.0391 3.64258C76.6211 3.0957 76.0273 2.82227 75.2578 2.82227C74.4453 2.82227 73.7773 3.13086 73.2539 3.74805C72.7344 4.36523 72.4746 5.15625 72.4746 6.12109C72.4746 7.11328 72.7695 7.92188 73.3594 8.54688C73.9531 9.16797 74.7188 9.47852 75.6562 9.47852ZM76.5117 5.46484H73.7051C73.8066 4.28125 74.3008 3.68945 75.1875 3.68945C76.0703 3.68945 76.5117 4.28125 76.5117 5.46484ZM58.5908 9.33203V2.96875H59.7451V4.16406C60.3545 3.27344 61.1006 2.82812 61.9834 2.82812C62.5342 2.82812 62.9736 3.00391 63.3018 3.35547C63.6299 3.70312 63.7939 4.17188 63.7939 4.76172V9.33203H62.6396V5.13672C62.6396 4.66406 62.5693 4.32812 62.4287 4.12891C62.292 3.92578 62.0635 3.82422 61.7432 3.82422C61.0361 3.82422 60.3701 4.28711 59.7451 5.21289V9.33203H58.5908ZM53.5537 9.47852C54.1943 9.47852 54.8604 9.16016 55.5518 8.52344C55.7002 9.16016 56.0439 9.47852 56.583 9.47852C56.8994 9.47852 57.1885 9.41602 57.4502 9.29102L57.3682 8.65234C57.2705 8.66797 57.1963 8.67578 57.1455 8.67578C56.7393 8.67578 56.5361 8.3457 56.5361 7.68555V4.80273C56.5361 4.12695 56.3662 3.62891 56.0264 3.30859C55.6904 2.98828 55.167 2.82812 54.4561 2.82812C53.7764 2.82812 53.0479 2.98633 52.2705 3.30273V4.25781C52.9775 3.88281 53.6357 3.69531 54.2451 3.69531C55.0029 3.69531 55.3818 4.06445 55.3818 4.80273V5.57031H55.1064C54.0166 5.57031 53.1787 5.75781 52.5928 6.13281C52.0107 6.50391 51.7197 7.03711 51.7197 7.73242C51.7197 8.23633 51.8936 8.6543 52.2412 8.98633C52.5889 9.31445 53.0264 9.47852 53.5537 9.47852ZM55.3818 6.25V7.89648C54.8623 8.32227 54.3623 8.53516 53.8818 8.53516C53.6006 8.53516 53.3623 8.43945 53.167 8.24805C52.9717 8.05664 52.874 7.82227 52.874 7.54492C52.874 7.1543 53.0693 6.83984 53.46 6.60156C53.8506 6.35938 54.3623 6.23828 54.9951 6.23828L55.3818 6.25ZM47.6719 9.33203V2.96875H48.8262V4.16406C49.2832 3.27344 49.9473 2.82812 50.8184 2.82812C50.9355 2.82812 51.0586 2.83789 51.1875 2.85742V3.93555C50.9883 3.86914 50.8125 3.83594 50.6602 3.83594C49.9297 3.83594 49.3184 4.26953 48.8262 5.13672V9.33203H47.6719ZM43.0449 9.54883C43.8262 9.54883 44.7422 9.39844 45.793 9.09766V5.58789H44.5684V8.41211C44.0918 8.55664 43.6484 8.62891 43.2383 8.62891C42.2383 8.62891 41.4609 8.3125 40.9062 7.67969C40.3516 7.04297 40.0742 6.15234 40.0742 5.00781C40.0742 3.85156 40.332 2.95508 40.8477 2.31836C41.3672 1.68164 42.0957 1.36328 43.0332 1.36328C43.6699 1.36328 44.5859 1.56641 45.7812 1.97266V0.835938C44.8281 0.574219 43.9102 0.443359 43.0273 0.443359C41.6797 0.443359 40.6328 0.84375 39.8867 1.64453C39.1406 2.44141 38.7676 3.55859 38.7676 4.99609C38.7676 6.46094 39.1348 7.58594 39.8691 8.37109C40.6074 9.15625 41.666 9.54883 43.0449 9.54883ZM32.7881 8.52344C32.0967 9.16016 31.4307 9.47852 30.79 9.47852C30.2627 9.47852 29.8252 9.31445 29.4775 8.98633C29.1299 8.6543 28.9561 8.23633 28.9561 7.73242C28.9561 7.03711 29.2471 6.50391 29.8291 6.13281C30.415 5.75781 31.2529 5.57031 32.3428 5.57031H32.6182V4.80273C32.6182 4.06445 32.2393 3.69531 31.4814 3.69531C30.8721 3.69531 30.2139 3.88281 29.5068 4.25781V3.30273C30.2842 2.98633 31.0127 2.82812 31.6924 2.82812C32.4033 2.82812 32.9268 2.98828 33.2627 3.30859C33.6025 3.62891 33.7725 4.12695 33.7725 4.80273V7.68555C33.7725 8.3457 33.9756 8.67578 34.3818 8.67578C34.4326 8.67578 34.5068 8.66797 34.6045 8.65234L34.6865 9.29102C34.4248 9.41602 34.1357 9.47852 33.8193 9.47852C33.2803 9.47852 32.9365 9.16016 32.7881 8.52344ZM32.6182 7.89648V6.25L32.2314 6.23828C31.5986 6.23828 31.0869 6.35938 30.6963 6.60156C30.3057 6.83984 30.1104 7.1543 30.1104 7.54492C30.1104 7.82227 30.208 8.05664 30.4033 8.24805C30.5986 8.43945 30.8369 8.53516 31.1182 8.53516C31.5986 8.53516 32.0986 8.32227 32.6182 7.89648ZM19.1035 9.33203V2.96875H20.2578V9.33203H19.1035ZM19.1035 1.81445V0.660156H20.2578V1.81445H19.1035ZM13.6084 8.52344C14.1748 9.16016 14.8877 9.47852 15.7471 9.47852C16.29 9.47852 16.9346 9.36523 17.6807 9.13867V8.14258C17.1221 8.41211 16.5791 8.54688 16.0518 8.54688C15.458 8.54688 14.9775 8.32617 14.6104 7.88477C14.2432 7.44336 14.0596 6.86523 14.0596 6.15039C14.0596 5.41211 14.2373 4.82227 14.5928 4.38086C14.9521 3.93555 15.4268 3.71289 16.0166 3.71289C16.4268 3.71289 16.958 3.80859 17.6104 4V3.0332C16.9971 2.89648 16.4424 2.82812 15.9463 2.82812C14.9424 2.82812 14.1592 3.11719 13.5967 3.69531C13.0381 4.27344 12.7588 5.08008 12.7588 6.11523C12.7588 7.08398 13.042 7.88672 13.6084 8.52344ZM10.1006 9.33203V8.13672C9.4873 9.03125 8.74316 9.47852 7.86816 9.47852C7.31348 9.47852 6.87207 9.30469 6.54395 8.95703C6.21582 8.60547 6.05176 8.13281 6.05176 7.53906V2.96875H7.20605V7.16406C7.20605 7.64062 7.27441 7.98047 7.41113 8.18359C7.55176 8.38281 7.78418 8.48242 8.1084 8.48242C8.81152 8.48242 9.47559 8.01953 10.1006 7.09375V2.96875H11.2549V9.33203H10.1006ZM0 0.660156V9.33203H5.13281V8.41211H1.23047V0.660156H0Z\",\n fill: \"#343C6A\"\n})));\nexport default SvgLucidagrande;","var _path;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nconst SvgTimesnewroman = props => /*#__PURE__*/React.createElement(\"svg\", _extends({\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 89 9\"\n}, props), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M8.40137 0C8.56543 0 8.7041 0.0585938 8.81738 0.175781C8.93457 0.289062 8.99316 0.427734 8.99316 0.591797C8.99316 0.755859 8.93457 0.896484 8.81738 1.01367C8.7041 1.13086 8.56543 1.18945 8.40137 1.18945C8.2373 1.18945 8.09668 1.13086 7.97949 1.01367C7.8623 0.896484 7.80371 0.755859 7.80371 0.591797C7.80371 0.427734 7.86035 0.289062 7.97363 0.175781C8.09082 0.0585938 8.2334 0 8.40137 0ZM8.8877 2.80664V7.11914C8.8877 7.45508 8.91113 7.67969 8.95801 7.79297C9.00879 7.90234 9.08105 7.98438 9.1748 8.03906C9.27246 8.09375 9.44824 8.12109 9.70215 8.12109V8.33203H7.09473V8.12109C7.35645 8.12109 7.53223 8.0957 7.62207 8.04492C7.71191 7.99414 7.78223 7.91016 7.83301 7.79297C7.88769 7.67578 7.91504 7.45117 7.91504 7.11914V5.05078C7.91504 4.46875 7.89746 4.0918 7.8623 3.91992C7.83496 3.79492 7.79199 3.70898 7.7334 3.66211C7.6748 3.61133 7.59473 3.58594 7.49316 3.58594C7.38379 3.58594 7.25098 3.61523 7.09473 3.67383L7.0127 3.46289L8.62988 2.80664H8.8877ZM30.6299 0.386719H32.7861L37.6436 6.3457V1.76367C37.6436 1.27539 37.5889 0.970703 37.4795 0.849609C37.335 0.685547 37.1064 0.603516 36.7939 0.603516H36.5186V0.386719H39.2842V0.603516H39.0029C38.667 0.603516 38.4287 0.705078 38.2881 0.908203C38.2021 1.0332 38.1592 1.31836 38.1592 1.76367V8.46094H37.9482L32.71 2.0625V6.95508C32.71 7.44336 32.7627 7.74805 32.8682 7.86914C33.0166 8.0332 33.2451 8.11523 33.5537 8.11523H33.835V8.33203H31.0693V8.11523H31.3447C31.6846 8.11523 31.9248 8.01367 32.0654 7.81055C32.1514 7.68555 32.1943 7.40039 32.1943 6.95508V1.42969C31.9639 1.16016 31.7881 0.982422 31.667 0.896484C31.5498 0.810547 31.376 0.730469 31.1455 0.65625C31.0322 0.621094 30.8604 0.603516 30.6299 0.603516V0.386719ZM61.2041 8.33203H63.3252V8.11523C62.8916 8.06836 62.54 7.95898 62.2705 7.78711C62.001 7.61523 61.6787 7.26758 61.3037 6.74414L59.6631 4.46484C60.3311 4.31641 60.8232 4.0625 61.1396 3.70312C61.46 3.34375 61.6201 2.91992 61.6201 2.43164C61.6201 1.97461 61.4795 1.58203 61.1982 1.25391C60.9209 0.921875 60.5811 0.695312 60.1787 0.574219C59.7803 0.449219 59.1592 0.386719 58.3154 0.386719H55.4209V0.603516H55.7197C56.0205 0.603516 56.2471 0.689453 56.3994 0.861328C56.5088 0.982422 56.5635 1.29297 56.5635 1.79297V6.92578C56.5635 7.37891 56.5225 7.66602 56.4404 7.78711C56.2959 8.00586 56.0557 8.11523 55.7197 8.11523H55.4209V8.33203H58.8252V8.11523H58.5146C58.2178 8.11523 57.9951 8.0293 57.8467 7.85742C57.7373 7.73633 57.6826 7.42578 57.6826 6.92578V4.61719C57.7451 4.62109 57.8057 4.625 57.8643 4.62891H58.0283C58.1533 4.62891 58.3154 4.625 58.5146 4.61719L61.2041 8.33203ZM57.876 4.25391C57.8213 4.25 57.7568 4.24805 57.6826 4.24805V0.943359C58.0693 0.869141 58.376 0.832031 58.6025 0.832031C59.1143 0.832031 59.5244 0.988281 59.833 1.30078C60.1455 1.60938 60.3018 2.01172 60.3018 2.50781C60.3018 3.01562 60.1084 3.43359 59.7217 3.76172C59.3389 4.08984 58.7686 4.25391 58.0107 4.25391H57.876ZM65.9082 2.80664C66.7207 2.80664 67.373 3.11523 67.8652 3.73242C68.2832 4.25977 68.4922 4.86523 68.4922 5.54883C68.4922 6.0293 68.377 6.51562 68.1465 7.00781C67.916 7.5 67.5977 7.87109 67.1914 8.12109C66.7891 8.37109 66.3398 8.49609 65.8438 8.49609C65.0352 8.49609 64.3926 8.17383 63.916 7.5293C63.5137 6.98633 63.3125 6.37695 63.3125 5.70117C63.3125 5.20898 63.4336 4.7207 63.6758 4.23633C63.9219 3.74805 64.2441 3.38867 64.6426 3.1582C65.041 2.92383 65.4629 2.80664 65.9082 2.80664ZM65.7266 3.1875C65.5195 3.1875 65.3105 3.25 65.0996 3.375C64.8926 3.49609 64.7246 3.71094 64.5957 4.01953C64.4668 4.32812 64.4023 4.72461 64.4023 5.20898C64.4023 5.99023 64.5566 6.66406 64.8652 7.23047C65.1777 7.79688 65.5879 8.08008 66.0957 8.08008C66.4746 8.08008 66.7871 7.92383 67.0332 7.61133C67.2793 7.29883 67.4023 6.76172 67.4023 6C67.4023 5.04688 67.1973 4.29688 66.7871 3.75C66.5098 3.375 66.1562 3.1875 65.7266 3.1875ZM71.2559 3.27539C71.1855 3.33398 70.9551 3.55859 70.5645 3.94922V2.80664H70.3125L68.6953 3.46289L68.7832 3.67383C68.9355 3.61523 69.0664 3.58594 69.1758 3.58594C69.2773 3.58594 69.3574 3.61133 69.416 3.66211C69.4746 3.70898 69.5176 3.79688 69.5449 3.92578C69.5801 4.09766 69.5977 4.47852 69.5977 5.06836V7.11914C69.5977 7.45117 69.5723 7.67578 69.5215 7.79297C69.4707 7.90625 69.3965 7.99023 69.2988 8.04492C69.2012 8.0957 69.0293 8.12109 68.7832 8.12109V8.33203H71.4375V8.12109C71.1445 8.12109 70.9492 8.0957 70.8516 8.04492C70.7578 7.99023 70.6855 7.91016 70.6348 7.80469C70.5879 7.69922 70.5645 7.4707 70.5645 7.11914V4.24219C70.7402 4.02734 70.9902 3.83398 71.3145 3.66211C71.5215 3.54883 71.7305 3.49219 71.9414 3.49219C72.25 3.49219 72.4902 3.61719 72.6621 3.86719C72.791 4.05859 72.8555 4.37305 72.8555 4.81055V7.11914C72.8555 7.43945 72.8457 7.63281 72.8262 7.69922C72.7832 7.83984 72.7051 7.94531 72.5918 8.01562C72.4824 8.08594 72.2793 8.12109 71.9824 8.12109V8.33203H74.6953V8.12109C74.4219 8.12109 74.2285 8.0918 74.1152 8.0332C74.002 7.9707 73.9238 7.89453 73.8809 7.80469C73.8418 7.71484 73.8223 7.48633 73.8223 7.11914V4.55859L73.8105 4.30664L73.8223 4.24219C74.1191 3.96094 74.3711 3.76953 74.5781 3.66797C74.7891 3.5625 74.998 3.50977 75.2051 3.50977C75.541 3.50977 75.7852 3.63477 75.9375 3.88477C76.043 4.06445 76.0957 4.37305 76.0957 4.81055V7.11914C76.0957 7.43164 76.0879 7.62109 76.0723 7.6875C76.0332 7.82422 75.9688 7.92383 75.8789 7.98633C75.75 8.07617 75.5703 8.12109 75.3398 8.12109H75.2285V8.33203H77.877V8.12109C77.6387 8.12109 77.4668 8.0918 77.3613 8.0332C77.2559 7.9707 77.1836 7.89648 77.1445 7.81055C77.0938 7.68555 77.0684 7.45508 77.0684 7.11914V4.81055C77.0684 4.32617 77.0254 3.9707 76.9395 3.74414C76.8105 3.41211 76.6348 3.17383 76.4121 3.0293C76.1934 2.88086 75.9414 2.80664 75.6562 2.80664C75.3633 2.80664 75.0781 2.88086 74.8008 3.0293C74.5234 3.17383 74.1836 3.48047 73.7812 3.94922C73.6992 3.57812 73.5371 3.29492 73.2949 3.09961C73.0527 2.9043 72.7637 2.80664 72.4277 2.80664C72.2285 2.80664 72.0273 2.84766 71.8242 2.92969C71.6211 3.01172 71.4316 3.12695 71.2559 3.27539ZM81.04 7.55859C80.4893 7.98438 80.1436 8.23047 80.0029 8.29688C79.792 8.39453 79.5674 8.44336 79.3291 8.44336C78.958 8.44336 78.6514 8.31641 78.4092 8.0625C78.1709 7.80859 78.0518 7.47461 78.0518 7.06055C78.0518 6.79883 78.1104 6.57227 78.2275 6.38086C78.3877 6.11523 78.665 5.86523 79.0596 5.63086C79.458 5.39648 80.1182 5.11133 81.04 4.77539V4.56445C81.04 4.0293 80.9541 3.66211 80.7822 3.46289C80.6143 3.26367 80.3682 3.16406 80.0439 3.16406C79.7979 3.16406 79.6025 3.23047 79.458 3.36328C79.3096 3.49609 79.2354 3.64844 79.2354 3.82031L79.2471 4.16016C79.2471 4.33984 79.2002 4.47852 79.1064 4.57617C79.0166 4.67383 78.8975 4.72266 78.749 4.72266C78.6045 4.72266 78.4854 4.67188 78.3916 4.57031C78.3018 4.46875 78.2568 4.33008 78.2568 4.1543C78.2568 3.81836 78.4287 3.50977 78.7725 3.22852C79.1162 2.94727 79.5986 2.80664 80.2197 2.80664C80.6963 2.80664 81.0869 2.88672 81.3916 3.04688C81.6221 3.16797 81.792 3.35742 81.9014 3.61523C81.9717 3.7832 82.0068 4.12695 82.0068 4.64648V6.46875C82.0068 6.98047 82.0166 7.29492 82.0361 7.41211C82.0557 7.52539 82.0869 7.60156 82.1299 7.64062C82.1768 7.67969 82.2295 7.69922 82.2881 7.69922C82.3506 7.69922 82.4053 7.68555 82.4521 7.6582C82.5342 7.60742 82.6924 7.46484 82.9268 7.23047V7.55859C82.4893 8.14453 82.0713 8.4375 81.6729 8.4375C81.4814 8.4375 81.3291 8.37109 81.2158 8.23828C81.1025 8.10547 81.0439 7.87891 81.04 7.55859ZM81.04 7.17773V5.13281C80.4502 5.36719 80.0693 5.5332 79.8975 5.63086C79.5889 5.80273 79.3682 5.98242 79.2354 6.16992C79.1025 6.35742 79.0361 6.5625 79.0361 6.78516C79.0361 7.06641 79.1201 7.30078 79.2881 7.48828C79.4561 7.67188 79.6494 7.76367 79.8682 7.76367C80.165 7.76367 80.5557 7.56836 81.04 7.17773ZM84.583 3.94336C85.2119 3.18555 85.8115 2.80664 86.3818 2.80664C86.6748 2.80664 86.9268 2.88086 87.1377 3.0293C87.3486 3.17383 87.5166 3.41406 87.6416 3.75C87.7275 3.98438 87.7705 4.34375 87.7705 4.82812V7.11914C87.7705 7.45898 87.7979 7.68945 87.8525 7.81055C87.8955 7.9082 87.9639 7.98438 88.0576 8.03906C88.1553 8.09375 88.333 8.12109 88.5908 8.12109V8.33203H85.9365V8.12109H86.0479C86.2979 8.12109 86.4717 8.08398 86.5693 8.00977C86.6709 7.93164 86.7412 7.81836 86.7803 7.66992C86.7959 7.61133 86.8037 7.42773 86.8037 7.11914V4.92188C86.8037 4.43359 86.7393 4.08008 86.6104 3.86133C86.4854 3.63867 86.2725 3.52734 85.9717 3.52734C85.5068 3.52734 85.0439 3.78125 84.583 4.28906V7.11914C84.583 7.48242 84.6045 7.70703 84.6475 7.79297C84.7021 7.90625 84.7764 7.99023 84.8701 8.04492C84.9678 8.0957 85.1631 8.12109 85.4561 8.12109V8.33203H82.8018V8.12109H82.9189C83.1924 8.12109 83.376 8.05273 83.4697 7.91602C83.5674 7.77539 83.6162 7.50977 83.6162 7.11914V5.12695C83.6162 4.48242 83.6006 4.08984 83.5693 3.94922C83.542 3.80859 83.4971 3.71289 83.4346 3.66211C83.376 3.61133 83.2959 3.58594 83.1943 3.58594C83.085 3.58594 82.9541 3.61523 82.8018 3.67383L82.7139 3.46289L84.3311 2.80664H84.583V3.94336ZM44.2441 2.96484H46.4941V3.18164C46.2871 3.19727 46.1504 3.23438 46.084 3.29297C46.0215 3.35156 45.9902 3.43555 45.9902 3.54492C45.9902 3.66602 46.0234 3.8125 46.0898 3.98438L47.2383 7.07227L48.3926 4.55859L48.0879 3.76758C47.9941 3.5332 47.8711 3.37109 47.7188 3.28125C47.6328 3.22656 47.4727 3.19336 47.2383 3.18164V2.96484H49.793V3.18164C49.5117 3.19336 49.3125 3.24414 49.1953 3.33398C49.1172 3.39648 49.0781 3.49609 49.0781 3.63281C49.0781 3.71094 49.0938 3.79102 49.125 3.87305L50.3438 6.95508L51.4746 3.98438C51.5527 3.77344 51.5918 3.60547 51.5918 3.48047C51.5918 3.40625 51.5527 3.33984 51.4746 3.28125C51.4004 3.22266 51.252 3.18945 51.0293 3.18164V2.96484H52.7227V3.18164C52.3828 3.23242 52.1328 3.46289 51.9727 3.87305L50.1797 8.49609H49.9395L48.5977 5.06836L47.0332 8.49609H46.8164L45.0938 3.98438C44.9805 3.69922 44.8691 3.50781 44.7598 3.41016C44.6504 3.30859 44.4785 3.23242 44.2441 3.18164V2.96484ZM41.0059 6.86133C40.6152 6.4082 40.4219 5.7832 40.4258 4.98633H44.1348C44.1348 4.32227 43.9414 3.79297 43.5547 3.39844C43.168 3 42.6738 2.80078 42.0723 2.80078C41.3613 2.80078 40.7695 3.05859 40.2969 3.57422C39.8281 4.08594 39.5938 4.80078 39.5938 5.71875C39.5938 6.56641 39.8223 7.24219 40.2793 7.74609C40.7402 8.24609 41.293 8.49609 41.9375 8.49609C42.5312 8.49609 43.0254 8.27734 43.4199 7.83984C43.8145 7.39844 44.0527 6.91016 44.1348 6.375L43.9531 6.25781C43.7773 6.72656 43.5586 7.05859 43.2969 7.25391C43.0391 7.44531 42.7344 7.54102 42.3828 7.54102C41.8555 7.54102 41.3965 7.31445 41.0059 6.86133ZM42.9102 4.64648H40.4258C40.4688 4.19727 40.6172 3.84766 40.8711 3.59766C41.1289 3.34375 41.4199 3.2168 41.7441 3.2168C41.9551 3.2168 42.1562 3.2793 42.3477 3.4043C42.543 3.5293 42.6895 3.70117 42.7871 3.91992C42.8496 4.06055 42.8906 4.30273 42.9102 4.64648ZM27.5801 4.63477V2.80664H27.3867C27.3398 2.90039 27.2988 2.96094 27.2637 2.98828C27.2285 3.01562 27.1797 3.0293 27.1172 3.0293C27.0508 3.0293 26.918 3 26.7188 2.94141C26.418 2.85156 26.1621 2.80664 25.9512 2.80664C25.4707 2.80664 25.0781 2.95508 24.7734 3.25195C24.4727 3.54883 24.3223 3.91797 24.3223 4.35938C24.3223 4.69922 24.4102 4.98047 24.5859 5.20312C24.7617 5.42969 25.1328 5.68359 25.6992 5.96484C26.2656 6.24609 26.6426 6.47852 26.8301 6.66211C27.0215 6.8457 27.1172 7.07227 27.1172 7.3418C27.1172 7.56445 27.0312 7.75586 26.8594 7.91602C26.6914 8.07227 26.4727 8.15039 26.2031 8.15039C25.8203 8.15039 25.4746 8.01172 25.166 7.73438C24.8574 7.45703 24.6484 7.04492 24.5391 6.49805H24.3457V8.41406H24.5391C24.5898 8.3125 24.6602 8.26172 24.75 8.26172C24.832 8.26172 24.9375 8.28125 25.0664 8.32031C25.4883 8.4375 25.8633 8.49609 26.1914 8.49609C26.6484 8.49609 27.0605 8.34766 27.4277 8.05078C27.7988 7.75 27.9844 7.35547 27.9844 6.86719C27.9844 6.23438 27.5879 5.72461 26.7949 5.33789L25.9395 4.92188C25.5684 4.74219 25.3223 4.57227 25.2012 4.41211C25.0762 4.25586 25.0137 4.06836 25.0137 3.84961C25.0137 3.67383 25.0977 3.51367 25.2656 3.36914C25.4336 3.22461 25.6543 3.15234 25.9277 3.15234C26.2871 3.15234 26.582 3.25586 26.8125 3.46289C27.0469 3.66992 27.2383 4.06055 27.3867 4.63477H27.5801ZM19.9941 4.98633C19.9902 5.7832 20.1836 6.4082 20.5742 6.86133C20.9648 7.31445 21.4238 7.54102 21.9512 7.54102C22.3027 7.54102 22.6074 7.44531 22.8652 7.25391C23.127 7.05859 23.3457 6.72656 23.5215 6.25781L23.7031 6.375C23.6211 6.91016 23.3828 7.39844 22.9883 7.83984C22.5938 8.27734 22.0996 8.49609 21.5059 8.49609C20.8613 8.49609 20.3086 8.24609 19.8477 7.74609C19.3906 7.24219 19.1621 6.56641 19.1621 5.71875C19.1621 4.80078 19.3965 4.08594 19.8652 3.57422C20.3379 3.05859 20.9297 2.80078 21.6406 2.80078C22.2422 2.80078 22.7363 3 23.123 3.39844C23.5098 3.79297 23.7031 4.32227 23.7031 4.98633H19.9941ZM19.9941 4.64648H22.4785C22.459 4.30273 22.418 4.06055 22.3555 3.91992C22.2578 3.70117 22.1113 3.5293 21.916 3.4043C21.7246 3.2793 21.5234 3.2168 21.3125 3.2168C20.9883 3.2168 20.6973 3.34375 20.4395 3.59766C20.1855 3.84766 20.0371 4.19727 19.9941 4.64648ZM12.3486 3.27539C12.2783 3.33398 12.0479 3.55859 11.6572 3.94922V2.80664H11.4053L9.78809 3.46289L9.87598 3.67383C10.0283 3.61523 10.1592 3.58594 10.2686 3.58594C10.3701 3.58594 10.4502 3.61133 10.5088 3.66211C10.5674 3.70898 10.6104 3.79688 10.6377 3.92578C10.6729 4.09766 10.6904 4.47852 10.6904 5.06836V7.11914C10.6904 7.45117 10.665 7.67578 10.6143 7.79297C10.5635 7.90625 10.4893 7.99023 10.3916 8.04492C10.2939 8.0957 10.1221 8.12109 9.87598 8.12109V8.33203H12.5303V8.12109C12.2373 8.12109 12.042 8.0957 11.9443 8.04492C11.8506 7.99023 11.7783 7.91016 11.7275 7.80469C11.6807 7.69922 11.6572 7.4707 11.6572 7.11914V4.24219C11.833 4.02734 12.083 3.83398 12.4072 3.66211C12.6143 3.54883 12.8232 3.49219 13.0342 3.49219C13.3428 3.49219 13.583 3.61719 13.7549 3.86719C13.8838 4.05859 13.9482 4.37305 13.9482 4.81055V7.11914C13.9482 7.43945 13.9385 7.63281 13.9189 7.69922C13.876 7.83984 13.7979 7.94531 13.6846 8.01562C13.5752 8.08594 13.3721 8.12109 13.0752 8.12109V8.33203H15.7881V8.12109C15.5146 8.12109 15.3213 8.0918 15.208 8.0332C15.0947 7.9707 15.0166 7.89453 14.9736 7.80469C14.9346 7.71484 14.915 7.48633 14.915 7.11914V4.55859L14.9033 4.30664L14.915 4.24219C15.2119 3.96094 15.4639 3.76953 15.6709 3.66797C15.8818 3.5625 16.0908 3.50977 16.2979 3.50977C16.6338 3.50977 16.8779 3.63477 17.0303 3.88477C17.1357 4.06445 17.1885 4.37305 17.1885 4.81055V7.11914C17.1885 7.43164 17.1807 7.62109 17.165 7.6875C17.126 7.82422 17.0615 7.92383 16.9717 7.98633C16.8428 8.07617 16.6631 8.12109 16.4326 8.12109H16.3213V8.33203H18.9697V8.12109C18.7314 8.12109 18.5596 8.0918 18.4541 8.0332C18.3486 7.9707 18.2764 7.89648 18.2373 7.81055C18.1865 7.68555 18.1611 7.45508 18.1611 7.11914V4.81055C18.1611 4.32617 18.1182 3.9707 18.0322 3.74414C17.9033 3.41211 17.7275 3.17383 17.5049 3.0293C17.2861 2.88086 17.0342 2.80664 16.749 2.80664C16.4561 2.80664 16.1709 2.88086 15.8936 3.0293C15.6162 3.17383 15.2764 3.48047 14.874 3.94922C14.792 3.57812 14.6299 3.29492 14.3877 3.09961C14.1455 2.9043 13.8564 2.80664 13.5205 2.80664C13.3213 2.80664 13.1201 2.84766 12.917 2.92969C12.7139 3.01172 12.5244 3.12695 12.3486 3.27539ZM6.66797 2.25L6.58008 0.386719H0.09375L0 2.25H0.222656C0.25 1.89062 0.335938 1.60547 0.480469 1.39453C0.625 1.18359 0.798828 1.04102 1.00195 0.966797C1.1582 0.912109 1.42188 0.884766 1.79297 0.884766H2.74805V6.95508C2.74805 7.40039 2.70508 7.68555 2.61914 7.81055C2.47852 8.01367 2.24023 8.11523 1.9043 8.11523H1.62305V8.33203H4.99219V8.11523H4.7168C4.4082 8.11523 4.17969 8.0332 4.03125 7.86914C3.92578 7.74805 3.87305 7.44336 3.87305 6.95508V0.884766H4.99219C5.32031 0.884766 5.58398 0.939453 5.7832 1.04883C5.98633 1.1543 6.14844 1.32031 6.26953 1.54688C6.34375 1.6875 6.40234 1.92188 6.44531 2.25H6.66797Z\",\n fill: \"#343C6A\"\n})));\nexport default SvgTimesnewroman;","import { t } from '@jotforminc/translation';\n\nimport { FormFields, PaymentFields } from '../../constants/Fields';\n\nexport function getTranslatedFormFields() {\n const allFormFields = [];\n FormFields.map(q => {\n allFormFields.push(...q.categoryFields);\n return undefined;\n });\n\n // if (translatedFormFields.length > 0) { // Clear if it is defined before\n // translatedFormFields.splice(0, translateFormFields.length);\n // }\n const translatedFormFields = allFormFields.map(q => {\n const field = {\n name: q.name,\n type: q.type,\n translatedName: t(q.name),\n description: '', // May be we can fill here with tags\n };\n return field;\n });\n\n return translatedFormFields;\n}\n\nexport function getPaymentFields() {\n const allPayments = PaymentFields\n .filter(p => {\n if (p.isPassive) {\n return false;\n }\n return true;\n })\n .map(p => {\n const payment = {\n name: p.name,\n type: p.type,\n description: 'Payment, Payment Field, Money, Cash',\n icon: p.iconImg,\n };\n return payment;\n });\n return allPayments;\n}\n","// Loads given images, and caches to browser\nfunction cacheImageList(images) {\n if (typeof global.Image === 'undefined') {\n return; // TO DO :: Add fallback for old browsers\n }\n if (images && typeof images === typeof []) {\n for (let i = 0; i < images.length; i++) {\n const image = new global.Image(0, 0);\n const url = images[i];\n image.src = url;\n }\n }\n}\n\nexport default cacheImageList;\n","export const WidgetDefaultPropsForOldTheme = {\n '529467003477f3512000001f': { // Smooth Signature Widget\n frameWidth: {\n value: 400\n },\n frameHeight: {\n value: 200\n }\n },\n '52f8550f0019ace53000000b': { // Short Scrollable Terms\n frameWidth: {\n value: 500\n },\n frameHeight: {\n value: 300\n }\n },\n '529cd0ea8afa8f742d000004': { // Image Slider\n frameWidth: {\n value: 615\n },\n frameHeight: {\n value: 380\n }\n },\n '538dddaa976bf61129000004': { // Multiple Text Fields\n frameWidth: {\n value: 320\n },\n frameHeight: {\n value: 100\n }\n },\n '52934dbf3be147110a000030': { // Date Picker\n frameWidth: {\n value: 380\n },\n frameHeight: {\n value: 50\n }\n },\n '52961c97e3e5266570000004': { // Checklist\n frameWidth: {\n value: 350\n }\n }\n};\nexport const WidgetDefaultPropsForNewTheme = {\n '529467003477f3512000001f': { // Smooth Signature\n frameWidth: {\n value: 310\n },\n frameHeight: {\n value: 114\n }\n },\n '52f8550f0019ace53000000b': { // Short Scrollable Terms\n frameWidth: {\n value: 646\n },\n frameHeight: {\n value: 202\n }\n },\n '529cd0ea8afa8f742d000004': { // Image slider\n frameWidth: {\n value: 648\n },\n frameHeight: {\n value: 380\n },\n required: {\n value: 'No'\n }\n },\n '538dddaa976bf61129000004': { // Multiple Text Fields\n frameWidth: {\n value: 648\n },\n frameHeight: {\n value: 270\n }\n },\n '5273bb4faa80af0979000005': { // Youtube Widget.\n required: {\n value: 'No'\n }\n },\n '52a8531850e4cbc101000004': { // Progress Bar\n required: {\n value: 'No'\n }\n },\n '52934dbf3be147110a000030': { // Date Picker\n frameWidth: {\n value: 310\n },\n frameHeight: {\n value: 40\n }\n },\n '52961c97e3e5266570000004': { // Checklist\n frameWidth: {\n value: 310\n }\n }\n};\n","export default () => {\n const seed = 1;\n const ids = [\n seed,\n seed + 1,\n ];\n return {\n template: `This is a fill in the {shorttext-${ids[0]}} field. Please add appropriate {shorttext-${ids[1]}} fields and text.`, // eslint-disable-line\n fields: [{\n type: 'control_textbox',\n id: `${ids[0]}`,\n required: 'No',\n validation: 'None',\n label: 'blanks',\n options: [{\n id: `shorttext-${ids[0]}`, type: 'textbox', label: 'blanks', name: 'Short Text'\n }]\n },\n {\n type: 'control_textbox',\n id: `${ids[1]}`,\n required: 'No',\n validation: 'None',\n label: 'blank',\n options: [{\n id: `shorttext-${ids[1]}`, type: 'textbox', label: 'blank', name: 'Short Text'\n }]\n }]\n };\n};\n","import {\n pipe, map, fromMaybe, filter, concat, not, find\n} from 'sanctuary';\nimport includes from 'lodash/fp/includes';\nimport { t } from '@jotforminc/translation';\n\nconst LABEL_MAPPER = {\n control_fullname: 'Full Name',\n control_textbox: '',\n control_checkbox: 'Multiple Choice',\n control_datetime: 'Date',\n control_signature: 'Signature',\n control_dropdown: 'Please Select',\n control_email: 'Email',\n control_address: 'Address',\n control_phone: 'Phone Number',\n control_radio: 'Single Choice',\n control_number: 'Number',\n control_time: 'Time',\n};\n\nconst isEqual = x => y => x.id === y.id;\nconst isNotEqual = x => y => not(isEqual(x)(y));\n\n// update an existing field\nconst concatOptions = options => field => ({\n ...field,\n options: [\n ...(field.options || []),\n ...options\n ]\n});\n\nconst fieldDefaults = fieldType => {\n switch (fieldType) {\n case 'control_time':\n return {\n timeFormat: 'AM/PM',\n showDayPeriods: 'both',\n defaultTime: 'none',\n step: '10'\n };\n default:\n return {};\n }\n};\n\n// build new field\nconst buildField = options => field => {\n const translatedOptions = options.map(option => {\n const cloneOption = { ...option };\n cloneOption.label = t(cloneOption.label);\n cloneOption.name = t(cloneOption.name);\n return cloneOption;\n });\n\n return {\n ...fieldDefaults(field.type),\n id: field.id,\n type: field.type,\n label: t(LABEL_MAPPER[field.type]),\n options: [\n ...translatedOptions\n ],\n ...field.fieldProps\n };\n};\n\n// get updated/created field with options\nconst getField = fields => ({ field, options }) => pipe([\n map(concatOptions(options)),\n fromMaybe(buildField(options)(field))\n])(find(isEqual(field))(fields));\n\n// upsertInlineField :: [Option] -> Field -> [Field] -> [Field]\nconst upsertInlineField = options => field => prevFields => pipe([\n filter(isNotEqual(field)),\n concat([getField(prevFields)({ field, options })])\n])(prevFields);\n\nconst withOps = (options = []) => field => {\n const xs = (options.map(o => o.id));\n return {\n ...field,\n options: filter(o => includes(o.id)(xs))(field.options || [])\n };\n};\n\nexport const onlyCreatedOptions = field => fields => options => pipe([\n map(withOps(options)),\n fromMaybe({ ...field, options: [] })\n])(find(isEqual(field))(fields));\n\nexport default upsertInlineField;\n","import compose from 'lodash/fp/compose';\nimport sortBy from 'lodash/fp/sortBy';\n\nconst ascOrder = q => q.order;\nconst correctOrder = (q, i) => ({ ...q, order: i + 1 });\n// withOrder :: [Question] -> [Question]\nconst withOrder = compose(\n qs => qs.map(correctOrder), // we don't use map function because we need index in the correctOrder function\n sortBy(ascOrder)\n);\n\nexport default withOrder;\n","import {\n SHARE_GENERATE_NEW_LINK_FAILURE,\n SHARE_INIT_SUCCESS,\n SHARE_INIT_FAILURE,\n SHARE_REVOKE_USERS_SUCCESS,\n SHARE_REVOKE_USERS_FAILURE,\n SHARE_SEND_INVITATION_SUCCESS,\n SHARE_SEND_INVITATION_FAILURE,\n SHARE_RESEND_INVITATION_SUCCESS,\n SHARE_RESEND_INVITATION_FAILURE,\n SHARE_PROPERTY_CHANGE_SUCCESS,\n SHARE_PROPERTY_CHANGE_FAILURE,\n SHARE_SET_CURRENT_USER_REVOKED,\n SHARE_SET_MOVE_SIGNAL\n} from '../constants/actionTypes';\n\nimport { endpoints } from '../libs/api';\n\n/**\n * Get the share link of the resource or the empty string if it does not exist.\n *\n * @param {string} formID Form ID to get the share link for.\n * @returns {Promise} the share link or empty string\n */\nconst determineShareLink = async formID => {\n try {\n const { responseCode: linkStatus, content: shareLinkOrError } = await endpoints.getShareLink(formID);\n const shareLink = linkStatus === 200 ? shareLinkOrError : '';\n return shareLink;\n } catch {\n return '';\n }\n};\n\n/**\n * Get the share properties from backend and dispatch them to the redux store.\n *\n * @param {function} dispatch dispatch function to the redux staff.\n * @param {string} formID ID of the form to get the share properties for.\n * @param {object} additionalShareProperties Stu\n * @returns {Promise} Response props from the api even if it wasn't dispatched.\n */\nconst syncShareProperties = async (dispatch, formID, additionalShareProperties) => {\n const {\n content: {\n id: resourceShareID,\n sharedWith,\n permissions = {\n assigneeProtected: 'Yes',\n organizationAccess: '',\n ssoProtected: 'No'\n },\n ...otherProps\n }\n } = await endpoints.getShareProperties(formID);\n const payload = {\n resourceShareID,\n sharedWith,\n permissions,\n ...additionalShareProperties\n };\n dispatch({\n type: SHARE_INIT_SUCCESS,\n payload: payload\n });\n return { ...payload, ...otherProps };\n};\n\n/**\n * Initizalise the share slice of the redux store by fetching the link\n * and shared with resources.\n * @returns\n */\nexport const initilizeShareProps = () => async (dispatch, getState) => {\n const { formProperties: { id: formID } } = getState();\n try {\n const shareLink = await determineShareLink(formID);\n await syncShareProperties(dispatch, formID, { shareLink });\n } catch {\n // If getting the share properties completely fail we have a problem.\n return dispatch({\n type: SHARE_INIT_FAILURE\n });\n }\n};\n\n/**\n * Generate a new share link for the form builder.\n */\nexport const onGenerateNewLink = () => async (dispatch, getState) => {\n // Get the share config and form id from the state.\n const { share: config, formProperties: { id: formID } } = getState();\n try {\n // Use them to generate a new link and push it to redux store.\n const { responseCode, content: shareLink } = await endpoints.generateNewLink(formID, config);\n if (responseCode === 200) {\n await syncShareProperties(dispatch, formID, { shareLink });\n return shareLink;\n }\n dispatch({\n type: SHARE_GENERATE_NEW_LINK_FAILURE\n });\n } catch {\n dispatch({\n type: SHARE_GENERATE_NEW_LINK_FAILURE\n });\n }\n};\n\n/**\n * Update the share props for the resource.\n * @param {object[]} newPermissions New permissions to set, given by user.\n*/\nexport const onSharePropertyChange = newPermissions => async (dispatch, getState) => {\n try {\n // Get associated share resource id if it exits.\n const { share: { resourceShareID, permissions: storePermissions }, formProperties: { id: formID } } = getState();\n // New permissions are the delta + existing.\n const mergedPermissions = { ...storePermissions, ...newPermissions };\n let id = resourceShareID;\n if (!resourceShareID) {\n // If no share resource has been created yet\n // create it with store permission, which are by default,\n // private.\n const { content: shareLink } = await endpoints.generateNewLink(formID, { permissions: storePermissions });\n const { resourceShareID: newResourceShareID } = await syncShareProperties(dispatch, formID, { shareLink });\n id = newResourceShareID;\n }\n // Send the permission change request and write the results to redux.\n const { content: { permissions: responsePermissions } } = await endpoints.updateShareResourcePermissions(id, mergedPermissions);\n dispatch({\n type: SHARE_PROPERTY_CHANGE_SUCCESS,\n payload: { permissions: responsePermissions }\n });\n } catch ({ message }) {\n dispatch({\n type: SHARE_PROPERTY_CHANGE_FAILURE,\n payload: {\n message\n }\n });\n }\n};\n\n/**\n * Send the share invitations to emails.\n */\nexport const onShareInvitationSend = ({\n emails: users,\n message,\n role\n}) => async (dispatch, getState) => {\n try {\n const { formProperties: { id: formID } } = getState();\n // API expects a slightly different format.\n const payload = {\n users,\n message,\n role\n };\n const { responseCode } = await endpoints.sendInvitations(formID, payload);\n if (responseCode !== 200) {\n throw new Error('Invalid share argument');\n }\n\n const { content: newSharedUsers } = await endpoints.fetchSharedUsers(formID);\n\n // Shared with from the backend returns unfit to be rendered by the\n // Common Share Panel so preprocessing is necessary here.\n const parsedSharedWith = newSharedUsers.map(({\n accessRequestID,\n role: submissionPermission,\n id,\n user: {\n activatedAt,\n avatarUrl,\n email\n },\n }) => ({\n resourceShareID: id,\n accessRequestID,\n submissionPermission,\n activatedAt,\n avatarUrl,\n email,\n isAccessRequested: false\n }));\n\n // Then dispatch the parsed data.\n dispatch({\n type: SHARE_SEND_INVITATION_SUCCESS,\n payload: { sharedWith: parsedSharedWith }\n });\n return true;\n } catch (reason) {\n dispatch({\n type: SHARE_SEND_INVITATION_FAILURE,\n });\n return false;\n }\n};\n\n/**\n * Given a list of emails and reosurce share request objects, return the\n * IDs of the individual requests.\n *\n * @param {string[]} emails List of emails to compare against.\n * @param {{email: string, resourceShareID: string}[]} sharedWith resource share objects of the assignees.\n * @return {string[]} List of resource shared IDs associated with the ids.\n */\nconst getIDsFromEmails = (emails, sharedWith) => (\n sharedWith.flatMap(({ email, resourceShareID }) => (emails.includes(email) ? [resourceShareID] : []))\n);\n\n/**\n * Get the resource share ID belonging to an individual email.\n * @param {string} email Email to search for.\n * @param {*} sharedWith Resource share object array.\n * @returns {false|string} false if the id not found or the id of the user\n */\nconst getIDFromEmail = (email, sharedWith) => {\n const idsToSend = getIDsFromEmails([email], sharedWith);\n if (idsToSend.length === 0) {\n return false;\n }\n return idsToSend[0];\n};\n\n/**\n * Revoke the permissions of a single or multiple users.\n * @param {string[]} emails list of emails.\n */\nexport const onRevokeUsers = emails => async (dispatch, getState) => {\n const { share: { sharedWith } } = getState();\n // We have to extract the id from the email\n // since that is what the endpoint expects.\n const idsToSend = getIDsFromEmails(emails, sharedWith);\n if (!idsToSend) {\n return {\n success: false,\n message: ''\n };\n }\n try {\n const { message, responseCode, content } = await endpoints.revokeInvitees(idsToSend);\n // Sometimes even if the response code for the http request is\n // 200, there is an internal error code so we need to handle that case.\n if (responseCode !== 200 && Array.isArray(content) && content.length > 0) {\n dispatch({\n type: SHARE_REVOKE_USERS_FAILURE,\n message\n });\n return;\n }\n\n // Otherwise this is a successful request.\n // Send the id to the reducer.\n const removedResourceIDs = content;\n\n dispatch({\n type: SHARE_REVOKE_USERS_SUCCESS,\n payload: { removedResourceIDs }\n });\n return {\n success: responseCode === 200,\n message: message\n };\n } catch {\n dispatch({\n type: SHARE_REVOKE_USERS_FAILURE\n });\n return {\n success: false,\n message: ''\n };\n }\n};\n\n/**\n * Resend invitations for a specific user.\n */\nexport const onResendInvitation = email => async (dispatch, getState) => {\n const { share: { sharedWith } } = getState();\n // Extract the resource share id of the invitation.\n const idToSend = getIDFromEmail(email, sharedWith);\n if (!idToSend) {\n return {\n success: false,\n message: ''\n };\n }\n try {\n const { message, responseCode } = await endpoints.resendInvitation(idToSend);\n dispatch({\n type: responseCode === 200\n ? SHARE_RESEND_INVITATION_SUCCESS\n : SHARE_RESEND_INVITATION_FAILURE\n });\n return {\n success: responseCode === 200,\n message\n };\n } catch {\n dispatch({\n type: SHARE_RESEND_INVITATION_FAILURE,\n });\n return {\n success: false,\n message: ''\n };\n }\n};\n\nexport const processRevokedUser = revokedCollaboratorEmail => (dispatch, getState) => {\n const { user: { email: currentUserEmail }, users } = getState();\n if (revokedCollaboratorEmail === currentUserEmail) {\n dispatch({\n type: SHARE_SET_CURRENT_USER_REVOKED\n });\n } else {\n const user = users.find(u => u.email === revokedCollaboratorEmail);\n if (user) {\n dispatch({ type: 'DELETE_USER_FROM_USER', user });\n }\n }\n};\n\n/**\n * Signals to the user that their session has expired because the asset is being moved.\n */\nexport const processAssetMove = ({ direction, team }) => dispatch => {\n dispatch({ type: SHARE_SET_MOVE_SIGNAL, payload: { direction, team } });\n};\n","export const AIMessages = {\n INVALID_MESSAGE_ERROR: \"We couldn't understand your message. Please explain how you would like us to update the form.\",\n INITIAL_AI_MESSAGE_RESPONSE: 'Your form is ready. Use it as is or add another suggestion below to update the form.',\n UPDATE_FORM_AI_MESSAGE_RESPONSE: 'Your form has been updated.',\n UNEXPECTED_PROPMT_INJECTION: \"We couldn't understand your message. Please explain how you would like us to update the form.\",\n UNDO_PREVIOUS_ACTION_BEFORE: 'Undo previous action.',\n UNDO_PREVIOUS_ACTION: '\"%s\" was removed.',\n ANY_REVISION_NOT_FOUND: 'Undo is not available.',\n FORM_HAS_NOT_BEEN_UNDO: \"Due to a technical error, we couldn't undo this action.\",\n UNDO_HAS_BEEN_SUCCESS: 'Action undone.',\n INVALID_PROMPT_ERROR: 'Sorry, something went wrong. Please try again later.',\n JOTFORM_API_ERROR: 'Sorry, something went wrong. Please try again later.',\n LLM_PARSE_ERROR: 'An error occurred. Please try again or enter a new prompt.',\n LLM_SERVER_ERROR: 'An error occurred. Please try again or enter a new prompt.',\n PROMPT_INJECTION_ERROR: 'An error occurred. Please enter a new prompt to try again.',\n SOMETHING_WENT_WRONG: 'Sorry, something went wrong. Please try again later.',\n REGENERATION_FAILED: \"Due to a technical error, we couldn't regenare your form.\"\n};\n","import React from 'react';\nimport find from 'lodash/find';\n\nimport Tracking from '@jotforminc/tracking';\nimport { capitalizeEachLetter } from '@jotforminc/utils';\nimport { Button } from '@jotforminc/magnet';\nimport { Styles } from '@jotforminc/colorscheme';\n\nimport { t } from '@jotforminc/translation';\nimport { StorageHelper } from '@jotforminc/storage-helper';\nimport {\n IconFaceSmile as Friendly,\n IconBuildings as Professional,\n IconUserWomanFilled as Casual,\n IconPlusCircleFilled as AddALogoToYourForm,\n IconPencilLineFilled as ChangeToneOfVoice,\n IconTypeSquareFilled as ChangeFont,\n IconPaletteFilled as ChangeColorScheme\n} from '@jotforminc/svg-icons';\n\nimport * as types from '../constants/actionTypes';\nimport * as Utils from '../libs/Utils';\nimport * as notificationMessages from '../constants/notificationMessages';\nimport { NonInputFields } from '../constants/Fields';\nimport {\n confirm, deleteFormQuestion, deleteMultipleQuestion, fetchFormProperties, updateFormProperty, fetchFormQuestions, handleFormHeightChange\n} from './index';\nimport { AIMessages } from '../constants/AI';\nimport { endpoints } from '../libs/api';\n\nimport Roboto from '../assets/svg/roboto.svg';\nimport OpenSans from '../assets/svg/opensans.svg';\nimport Helvetica from '../assets/svg/helvetica.svg';\nimport Inter from '../assets/svg/inter.svg';\nimport Tahoma from '../assets/svg/tahoma.svg';\nimport CourierNew from '../assets/svg/couriernew.svg';\nimport TrebuchetMS from '../assets/svg/trebuchetms.svg';\nimport LucidaGrande from '../assets/svg/lucidagrande.svg';\nimport TimesNewRoman from '../assets/svg/timesnewroman.svg';\n\nconst SVGComponents = {\n Friendly,\n ChangeToneOfVoice,\n AddALogoToYourForm,\n Professional,\n Casual,\n ChangeFont,\n ChangeColorScheme,\n Roboto,\n OpenSans,\n Helvetica,\n Inter,\n Tahoma,\n CourierNew,\n TrebuchetMS,\n LucidaGrande,\n TimesNewRoman\n};\n\nconst SVG = ({ name, className, ...remainingProps }) => {\n if (typeof name !== 'string') return null;\n\n const SVGName = capitalizeEachLetter(name).split(' ').join('');\n\n const SVGComponent = SVGComponents[`${SVGName}`];\n\n if (!SVGComponent) return null;\n\n return (\n \n );\n};\n\nconst AIActionStack = {};\n\nexport function addErrorMessage({ formID, message, parentMessageID }) {\n return async (dispatch, getState) => {\n const { AI: { messages } } = getState();\n const messageType = 'ERROR';\n const isLastMsgErr = messages && messages.length > 0 && messages[messages.length - 1].message_type === messageType;\n\n // if last message is already a error message no need to save a another error msg\n if (!isLastMsgErr) {\n await endpoints.addAICustomPrompt({\n formID, parentMessageID, message, isReturnMessage: false, messageType\n });\n }\n\n dispatch({ type: types.SHOW_AI_ERROR_MESSAGE, data: message });\n };\n}\n\nexport function fetchAIChatMessages(formID) {\n return (dispatch, getState) => {\n dispatch({ type: types.AI_CHAT_MESSAGES_FETCHING });\n const { formProperties } = getState();\n endpoints.fetchAIChatMessages(formID).then(res => {\n const { messages } = res;\n\n const messagesWithActions = addMessageActionsRenderer({ messages, formProperties })(dispatch, getState);\n\n addStaticActions()(dispatch, getState);\n\n dispatch({ type: types.AI_CHAT_MESSAGES_FETCH, data: messagesWithActions });\n }).catch(() => {\n addErrorMessage({ formID: formProperties.id, message: AIMessages.SOMETHING_WENT_WRONG })(dispatch, getState);\n });\n };\n}\n\nexport function toggleAIPanel(isAIOpened) {\n const AIChat = StorageHelper.getLocalStorageItem({ key: 'AIChat', defaultValue: {} });\n if (Object.hasOwn(AIChat, 'isOpened') && AIChat.isOpened !== isAIOpened) {\n StorageHelper.setLocalStorageItem({\n key: 'AIChat',\n value: { ...AIChat, isOpened: isAIOpened }\n });\n }\n\n return (dispatch, getState) => {\n const { AI: { ui: { messagesFetched } }, formProperties: { id } } = getState();\n if (!messagesFetched && isAIOpened) {\n fetchAIChatMessages(id)(dispatch, getState);\n }\n dispatch({ type: types.AI_CHAT_TOGGLE, isOpened: isAIOpened });\n };\n}\n\nexport const saveMessages = (messages, changes, errorMessage = AIMessages.INVALID_MESSAGE_ERROR) => {\n return (dispatch, getState) => {\n const { formProperties } = getState();\n try {\n if (!messages) {\n addErrorMessage({ formID: formProperties.id, message: errorMessage })(dispatch, getState);\n return;\n }\n\n checkMessageActions(messages)(getState);\n\n const messagesWithActions = addMessageActionsRenderer({ messages, formProperties })(dispatch, getState);\n\n if (changes) {\n reflectAIChanges(changes, messagesWithActions)(dispatch, getState);\n } else {\n dispatch({ type: types.UPDATE_AI_FORM, data: { messages: messagesWithActions } });\n fetchFormProperties(formProperties.id)(dispatch, getState);\n fetchFormQuestions(formProperties.id)(dispatch, getState);\n }\n handleFormHeightChange()(dispatch, getState);\n dispatch({ type: types.FORM_PROPERTY_UPDATE_SUCCESS });\n } catch (err) {\n addErrorMessage({ formID: formProperties.id, message: errorMessage })(dispatch, getState);\n }\n };\n};\n\nexport function highlightUpdatedFields(changes = {}) {\n return (dispatch, getState) => {\n const customOrder = ['deleted', 'created', 'updated'];\n let lastQuestionID = '';\n const highlightedQuestions = customOrder.map(change => {\n const changedQuestions = changes[change] || [];\n const isNewDefaultTheme = getState && typeof getState === 'function' ? getState().formProperties.defaultTheme : 'v1';\n const { user } = getState();\n\n return changedQuestions.map(question => {\n if (change === 'created') {\n const extendedQuestion = Utils.extendQuestionWithDefaults(question, isNewDefaultTheme, user);\n const qOrder = question.order === 0 ? 1 : question.order;\n\n dispatch({\n type: types.FORM_QUESTION_CREATING,\n question: { ...extendedQuestion, isAICreated: true },\n order: String(qOrder),\n saveToUndoStack: false,\n saveOrder: true\n });\n\n const addedQuestion = global.document.querySelector(`li[data-qid=\"${extendedQuestion.qid}\"]`);\n Utils.restartAnimation(addedQuestion, 'AICreated');\n lastQuestionID = question.qid;\n } if (change === 'updated') {\n dispatch({ type: types.FORM_QUESTION_UPDATING, qid: question.qid, question: { ...question, isAIUpdated: true } });\n\n const updatedQuestion = global.document.querySelector(`li[data-qid=\"${question.qid}\"]`);\n Utils.restartAnimation(updatedQuestion, 'AIUpdated');\n lastQuestionID = question.qid;\n } if (change === 'deleted') {\n const deletedQuestion = global.document.querySelector(`li[data-qid=\"${question.qid}\"]`);\n Utils.restartAnimation(deletedQuestion, 'AIDeleted');\n\n dispatch({ type: types.FORM_QUESTION_DELETING, qid: question.qid });\n }\n return;\n });\n });\n\n if (lastQuestionID) {\n dispatch({ type: types.FORM_QUESTION_REORDER });\n }\n\n Utils.scrollIntoQuestion(lastQuestionID);\n return highlightedQuestions;\n };\n}\n\nexport const AIDeleteConfirmation = (isSingle, onDeleteCallback, onCancelCallback, onHideCallback) => dispatch => {\n const messageText = isSingle ? notificationMessages.QUESTION_DELETE_TEXTS : notificationMessages.MULTIPLE_QUESTION_DELETE_TEXTS;\n confirm({ ...messageText, onBeforeRemove: onCancelCallback, onHideCallback }, isDeleted => {\n if (isDeleted) {\n onDeleteCallback();\n } else {\n onCancelCallback();\n }\n })(dispatch);\n};\n\nexport const checkMessageActions = messages => getState => {\n const { formProperties: { id: formID, isAIForm } } = getState();\n if (messages?.slice(-1)?.[0]?.message_type !== 'ERROR') {\n endpoints.logAIActions({ action: 'responseSuccess', target: formID });\n if (isAIForm === 'Yes') {\n endpoints.logAIActions({ action: 'AICreatedFormEditedByAI', target: formID });\n } else {\n endpoints.logAIActions({ action: 'NormalCreatedFormEditedByAI', target: formID });\n }\n } else {\n endpoints.logAIActions({ action: 'responseFailure', target: formID });\n }\n\n const errorMessages = messages.filter(message => message.message_type === 'ERROR');\n const successResponseMessages = messages.filter(message => message.message_type === 'ASSISTANT');\n\n [3, 5, 10].map(count => {\n if (count === errorMessages.length && !AIActionStack[`aiError-${count}`]) {\n endpoints.logAIActions({ action: `failResponse-${count}`, target: formID });\n AIActionStack[`aiError-${count}`] = true;\n }\n\n if (count === successResponseMessages.length && !AIActionStack[`aiSuccess-${count}`]) {\n endpoints.logAIActions({ action: `successResponse-${count}`, target: formID });\n AIActionStack[`aiSuccess-${count}`] = true;\n }\n return count;\n });\n};\n\nexport function reflectAIChanges(changes = {}, messages = []) {\n return (dispatch, getState) => {\n const { formProperties: { id }, questions, form } = getState();\n\n const deletedChanges = changes?.deleted;\n if (deletedChanges.length > 0) {\n const deletedQuestion = deletedChanges[0];\n let isDeletingField = false;\n const submissionCount = form.count;\n const isSingle = deletedChanges.length === 1;\n\n if (isSingle) {\n const question = find(questions, k => k.qid === deletedQuestion.qid);\n isDeletingField = question && NonInputFields.indexOf(question.type) === -1;\n } else {\n deletedChanges.forEach(q => {\n const question = find(questions, k => k.qid === q.qid);\n if (NonInputFields.indexOf(question.type) === -1) {\n isDeletingField = true;\n }\n });\n }\n if (isDeletingField && submissionCount && submissionCount !== '0') {\n const { message_id: lastMessageID } = messages[messages.length - 1];\n endpoints.logAIActions({ action: 'deleteModalShown', target: `${id}-${lastMessageID}` });\n\n AIDeleteConfirmation(isSingle,\n () => {\n endpoints.logAIActions({ action: 'deleteFields', target: `${id}-${lastMessageID}` });\n if (isSingle) {\n deleteFormQuestion(deletedQuestion.qid, false, false, true)(dispatch, getState);\n } else {\n deleteMultipleQuestion(deletedChanges, false, false, false, true)(dispatch, getState);\n }\n\n endpoints.dataLoseConfirmationForAI(id, lastMessageID, null, 'APPROVE').then(approveRes => {\n const { messages: approveMessages } = approveRes;\n\n const messagesWithChanges = Utils.formatAIChanges(approveMessages, changes);\n\n dispatch({ type: types.UPDATE_AI_FORM, data: { messages: messagesWithChanges } });\n fetchFormProperties(id)(dispatch, getState);\n highlightUpdatedFields(changes)(dispatch, getState);\n dispatch({ type: types.FORM_PROPERTY_UPDATE_SUCCESS });\n });\n },\n () => {\n endpoints.logAIActions({ action: 'cancelDelete', target: `${id}-${lastMessageID}` });\n endpoints.dataLoseConfirmationForAI(id, lastMessageID, null, 'CANCEL').then(cancelRes => {\n const { messages: cancelMessages } = cancelRes;\n dispatch({ type: types.UPDATE_AI_FORM, data: { messages: cancelMessages } });\n });\n },\n () => {\n endpoints.logAIActions({ action: 'hideFields', target: `${id}-${lastMessageID}` });\n\n const deletedQIds = deletedChanges.map(question => question.qid);\n\n endpoints.dataLoseConfirmationForAI(id, lastMessageID, deletedQIds, 'HIDE').then(hideRes => {\n const { messages: hideMessages } = hideRes;\n\n const changesWithHidden = { ...changes, hidden: changes.deleted, deleted: [] };\n const messagesWithChanges = Utils.formatAIChanges(hideMessages, changesWithHidden);\n\n dispatch({ type: types.UPDATE_AI_FORM, data: { messages: messagesWithChanges } });\n const mutatedChanges = [...deletedChanges].map(question => {\n return {\n ...question,\n hidden: 'Yes'\n };\n });\n\n const updatedChanges = { ...changes, updated: mutatedChanges, deleted: [] };\n\n highlightUpdatedFields(updatedChanges)(dispatch, getState);\n dispatch({ type: types.FORM_PROPERTY_UPDATE_SUCCESS });\n });\n fetchFormProperties(id)(dispatch, getState);\n }\n )(dispatch, getState);\n return;\n }\n }\n const messagesWithChanges = Utils.formatAIChanges(messages, changes);\n dispatch({ type: types.UPDATE_AI_FORM, data: { messages: messagesWithChanges } });\n fetchFormProperties(id)(dispatch, getState);\n highlightUpdatedFields(changes)(dispatch, getState);\n };\n}\n\nexport function addAIChatMessage({\n text, source, checkUserIntention = true, sourceID = null\n}, formID) {\n return (dispatch, getState) => {\n const { user, AI: { fsEnabled } } = getState();\n dispatch({ type: types.ADD_AI_CHAT_MESSAGE, data: text });\n\n endpoints.logAIActions({ action: 'ChatPrompt-submit', target: formID });\n const promptWords = text.split(' ');\n if (promptWords.length > 1) {\n endpoints.logAIActions({ action: `typedWords-${promptWords.length}`, target: formID });\n }\n\n const isAIUser = user.aiFormBuilderIncrementalUpdateTest === '22601' || user.aiFormBuilderBetaUser === '16861';\n\n if (isAIUser && !fsEnabled && user.account_type?.name !== 'ADMIN' && !user.aiBuilderFromLandingV2) {\n Tracking.enableFS({ aiFormBuilderIncremental_bool: true });\n dispatch({ type: types.AI_FS_ENABLE });\n }\n\n endpoints.addAIChatMessage(formID, text, checkUserIntention, source, sourceID).then(res => {\n const { messages, changes } = res;\n\n const lastMessage = messages?.slice(-1)[0];\n\n if (lastMessage?.message_type === 'RETRYABLE_ERROR') {\n dispatch({ type: types.AI_CHAT_MESSAGES_FETCH, data: messages });\n retryError(lastMessage.parent_message_id, 1)(dispatch, getState);\n return;\n }\n\n saveMessages(messages, changes)(dispatch, getState);\n }).catch(err => {\n console.log(err);\n addErrorMessage({ formID, message: AIMessages.INVALID_MESSAGE_ERROR, parentMessageID: sourceID })(dispatch, getState);\n });\n };\n}\n\nexport function retryError(messageID, count) {\n return async (dispatch, getState) => {\n const { formProperties } = getState();\n try {\n endpoints.retryAIResponseError(formProperties.id, messageID).then(res => {\n const { messages, changes } = res;\n\n const lastMessage = messages?.slice(-1)[0];\n\n if (lastMessage?.message_type === 'RETRYABLE_ERROR' && (count - 1)) {\n retryError(lastMessage.parent_message_id, count - 1)(dispatch, getState);\n return;\n }\n saveMessages(messages, changes)(dispatch, getState);\n });\n } catch (err) {\n console.log(err);\n }\n };\n}\n\nexport function undoAIAction(formID, messageID) {\n return (dispatch, getState) => {\n dispatch({ type: types.ADD_AI_CHAT_MESSAGE, data: AIMessages.UNDO_PREVIOUS_ACTION_BEFORE });\n\n endpoints.logAIActions({ action: 'Undo-clicked', target: `${formID}-${messageID}` });\n\n endpoints.undoLastMessage(formID).then(res => {\n const { messages, changes } = res;\n\n saveMessages(messages, changes, AIMessages.FORM_HAS_NOT_BEEN_UNDO)(dispatch, getState);\n }).catch(() => {\n addErrorMessage({ formID, message: AIMessages.FORM_HAS_NOT_BEEN_UNDO, parentMessageID: messageID })(dispatch, getState);\n });\n };\n}\n\nexport function showAIAssistant(value) {\n return dispatch => {\n dispatch({ type: types.SHOW_AI_ASSISTANT, value });\n };\n}\n\nexport function setAIChatDefaultOpen(value) {\n return dispatch => {\n dispatch({ type: types.AI_CHAT_DEFAULT_OPEN, value });\n };\n}\n\nexport const addStaticActions = () => {\n return (dispatch, getState) => {\n const { formProperties } = getState();\n\n const actionsWithComponent = Object.keys(MessageActionTypes).map(action => {\n const actionObj = { ...MessageActionTypes[action] };\n return {\n ...actionObj, formProperties, dispatch, getState\n };\n });\n\n dispatch({ type: types.SET_STATIC_ACTIONS, payload: { staticActions: actionsWithComponent } });\n };\n};\n\nexport const addMessageActionsRenderer = ({ messages }) => {\n return (dispatch, getState) => {\n const { formProperties } = getState();\n return messages.map((message, i) => {\n if (message.actions) {\n const actionsWithComponent = message.actions.map(action => {\n const actionObj = { ...(MessageActionTypes[action.type]) };\n return {\n ...action, ...actionObj, disabled: [0, 1, messages.length - 1].includes(i) ? false : true, parentMessageID: message.parent_message_id, formProperties, dispatch, getState\n };\n });\n\n return {\n ...message,\n actions: actionsWithComponent\n };\n }\n\n return message;\n });\n };\n};\n\nexport const createTempFileInput = () => {\n const fileUpload = document.createElement('input');\n fileUpload.style.display = 'none';\n fileUpload.type = 'file';\n fileUpload.name = 'file';\n fileUpload.accept = 'image/*';\n\n return fileUpload;\n};\n\nexport const changeFormLogo = (event, { parentMessageID, formProperties }) => {\n return async (dispatch, getState) => {\n const files = event.target.files || event.dataTransfer.files;\n\n const [currFile] = files;\n\n try {\n const { message } = await endpoints.uploadImageS3(currFile, currFile.name);\n if (message) {\n // eslint-disable-next-line no-undef\n const tempImg = new Image();\n\n tempImg.onload = async e => {\n const data = {\n url: encodeURI(message),\n dimensions: {\n width: e.target.naturalWidth,\n height: e.target.naturalHeight\n }\n };\n const styleJSON = Styles.uploadOrganizationLogo(data, formProperties);\n\n updateFormProperty(styleJSON)(dispatch, getState);\n\n // ADD CUSTOM PROMPT\n const { messages, changes } = await endpoints.addAICustomPrompt({ formID: formProperties.id, parentMessageID, message: 'The logo has been uploaded.' });\n\n saveMessages(messages, changes, AIMessages.INVALID_MESSAGE_ERROR)(dispatch, getState);\n\n dispatch({ type: types.SET_MANUAL_CHANGES, value: { properties: styleJSON } });\n return true;\n };\n tempImg.src = message;\n }\n } catch (err) {\n console.log(err);\n }\n };\n};\n\nconst addFormLogo = ({\n formProperties, parentMessageID, dispatch, getState\n}) => {\n const fileUpload = createTempFileInput();\n fileUpload.addEventListener('change', e => {\n const changed = changeFormLogo(e, { formProperties, parentMessageID })(dispatch, getState);\n if (changed) {\n fileUpload.remove();\n }\n });\n fileUpload.click();\n};\n\nconst fireUserPrompt = ({\n promptText, intention, formProperties, dispatch, getState, source, sourceID\n}) => {\n addAIChatMessage({\n text: promptText, source, checkUserIntention: intention, sourceID\n }, formProperties.id)(dispatch, getState);\n};\n\nconst changeFontFamily = ({\n formProperties, actionText, dispatch, getState\n}) => {\n const font = actionText === 'Default' ? 'Inter' : actionText;\n const event = {\n target: {\n name: 'font',\n value: {\n family: font,\n link: `//cdn.jotfor.ms/fonts/?family=${font}`,\n type: 'jotform',\n value: font\n }\n }\n };\n const propObj = Styles.prepareFormStyleFormat(event, formProperties);\n\n updateFormProperty(propObj)(dispatch, getState);\n};\n\nexport const MessageActionTypes = {\n LOGO: {\n id: 'add-logo',\n ActionComponent: ({ actionProps, formProperties, ...rest }) => {\n const { onClick, ...restActionProps } = actionProps;\n return (\n }\n onClick={() => {\n Utils.logJotFormEvents('ai-builder', {\n action: 'ActionButtonClicked-addLogo',\n target: formProperties.id,\n actor: formProperties.owner,\n }, formProperties.formOwnerAccountType);\n\n addFormLogo({ formProperties, ...rest });\n\n if (onClick && typeof onClick === 'function') {\n onClick();\n }\n }}\n {...restActionProps}\n >\n {t('Add a logo to your form')}\n \n );\n },\n },\n FONT: {\n id: 'get-fonts',\n ActionComponent: ({\n subProps, actionProps, formProperties, ...rest\n }) => {\n const isSubAction = typeof subProps === 'string' && subProps;\n const fontTitle = (isSubAction === 'Default' && isSubAction) || (!isSubAction && t('Change font'));\n const { onClick, ...restActionProps } = actionProps;\n return (\n {\n if (!isSubAction) {\n return ;\n }\n const subSvgName = isSubAction !== 'Default' && isSubAction;\n return ;\n }}\n onClick={() => {\n Utils.logJotFormEvents('ai-builder', {\n action: `ActionButtonClicked-font-${isSubAction || 'Change font'}`,\n target: formProperties.id,\n actor: formProperties.owner,\n }, formProperties.formOwnerAccountType);\n\n if (!isSubAction) {\n fireUserPrompt({\n ...rest, formProperties, sourceID: 'FONT', promptText: t('Change Font'), intention: true, source: 'actionButton'\n });\n } else {\n changeFontFamily({ ...rest, formProperties, actionText: isSubAction });\n }\n\n if (onClick && typeof onClick === 'function') {\n onClick();\n }\n }}\n {...restActionProps}\n >\n {fontTitle}\n \n );\n },\n },\n TONE_OF_VOICE: {\n id: 'change-tone-of-voice',\n ActionComponent: ({\n subProps, actionProps, formProperties, ...rest\n }) => {\n const isSubAction = typeof subProps === 'string' && subProps;\n const toneTitle = isSubAction || 'Change tone of voice';\n const { onClick, ...restActionProps } = actionProps;\n return (\n }\n onClick={() => {\n Utils.logJotFormEvents('ai-builder', {\n action: `ActionButtonClicked-toneOfVoice-${toneTitle}`,\n target: formProperties.id,\n actor: formProperties.owner,\n }, formProperties.formOwnerAccountType);\n\n fireUserPrompt({\n ...rest, sourceID: !isSubAction && 'TONE_OF_VOICE', formProperties, promptText: !isSubAction ? t('Change tone of voice') : t(`Change tone of this form to ${toneTitle}`), intention: !isSubAction, source: 'actionButton'\n });\n\n if (onClick && typeof onClick === 'function') {\n onClick();\n }\n }}\n {...restActionProps}\n >\n {t(toneTitle)}\n \n );\n },\n }\n};\n","/* eslint-disable max-lines, prefer-promise-reject-errors */\nimport cloneDeep from 'lodash/cloneDeep';\nimport isObject from 'lodash/isObject';\nimport isUndefined from 'lodash/isUndefined';\nimport find from 'lodash/find';\nimport isArray from 'lodash/isArray';\nimport omit from 'lodash/omit';\n\nimport { isEnterprise } from '@jotforminc/enterprise-utils';\nimport { PaymentActions } from '@jotforminc/builder-components';\nimport {\n a11yAnnounce,\n handleCustomNavigation\n} from '@jotforminc/utils';\n\nimport { t } from '@jotforminc/translation';\nimport * as PaymentUtils from '../libs/PaymentUtils';\nimport * as Utils from '../libs/Utils';\n\nimport PaymentTypes from '../constants/payment_types';\nimport * as types from '../constants/actionTypes';\nimport * as notificationMessages from '../constants/notificationMessages';\n\nimport {\n addNotification,\n addToQueue,\n errorPromise,\n networkCallFailed,\n setFormPropertyCurrentValues,\n successPromise,\n updateFormProperty\n} from './index';\nimport { endpoints } from '../libs/api';\nimport { getApiKeyFromUrl } from '../libs/api_key_extractor';\n\nexport function openPaymentConnectionModal() {\n return async (dispatch, getState) => {\n const { user } = getState();\n\n const isCollaboratorInNewShareFlow = user.isCSICollaborator;\n const collaborationKey = getApiKeyFromUrl();\n const isMobileApp = global.navigator.userAgent.indexOf('JotForm Mobile') > -1 || global.navigator.userAgent.indexOf('JFCEMobile') > -1;\n const isCollaborator = (!!collaborationKey && !isMobileApp) || isCollaboratorInNewShareFlow;\n\n const userAccountType = user.accountType || user.account_type.name;\n const isJotformerAccessingUserResource = !isEnterprise() && !user.isFormOwner && ['ADMIN', 'SUPPORT', 'HELPDESK'].includes(userAccountType);\n\n // do not open modal\n if (isCollaborator || isJotformerAccessingUserResource) { return; }\n\n gatewayConnectionFlowToggle(true)(dispatch, getState);\n };\n}\n\nexport function gatewayConnectionFlowToggle(status = false) {\n return dispatch => {\n dispatch({ type: types.UI_GATEWAY_CONNECTION_FLOW_IS_OPEN, status });\n };\n}\n\nexport function toggleCategoryWrapper(categoryID) {\n return (dispatch, getState) => {\n const state = getState();\n const { formProperties } = state;\n let { paymentListSettings } = formProperties;\n\n if (paymentListSettings && paymentListSettings[0]) {\n paymentListSettings = cloneDeep(paymentListSettings[0]);\n if (typeof paymentListSettings.productCategories === 'string') { paymentListSettings.productCategories = Utils.parseJSON(paymentListSettings.productCategories); }\n if (paymentListSettings.productCategories && Array.isArray(paymentListSettings.productCategories)) {\n paymentListSettings.productCategories = paymentListSettings.productCategories.map(element => {\n if (element.id === categoryID) {\n if (element.isWrapped) {\n return { ...element, isWrapped: element.isWrapped === 'Yes' ? 'No' : 'Yes' };\n }\n return { ...element, isWrapped: 'Yes' };\n }\n return { ...element };\n });\n }\n\n const productCategories = isObject(paymentListSettings.productCategories)\n ? JSON.stringify(paymentListSettings.productCategories)\n : paymentListSettings.productCategories;\n\n updateFormProperty(\n {\n paymentListSettings: [{ ...paymentListSettings, productCategories }]\n }\n )(dispatch, getState);\n\n paymentListSettings = new Array(paymentListSettings);\n\n dispatch({\n type: types.PAYMENT_LIST_SETTINGS_UPDATE,\n paymentListSettings\n });\n PaymentActions.savePaymentListSettings(paymentListSettings[0]);\n }\n };\n}\n\nexport function handleCouponActions({ operation, couponID, updatedCouponList }) {\n return (dispatch, getState) => {\n const { formProperties: { id: formID } } = getState();\n const { apiCall, props } = PaymentUtils.prepareCouponData({\n operation,\n couponID,\n updatedCouponList,\n formID\n });\n\n if (typeof apiCall !== 'function') { return; }\n\n const prop = { coupons: updatedCouponList };\n dispatch({ type: types.FORM_PROPERTY_UPDATING, prop, saveToUndoStack: false });\n\n addToQueue(apiCall, props, resp => {\n const responseObj = resp;\n if (!isUndefined(responseObj) && responseObj.responseCode === 401) {\n handleCustomNavigation(`/login?rp=${global.location.href}`, '_self', true);\n return;\n } if (isUndefined(responseObj) || !responseObj || !responseObj.content) {\n return errorPromise(() => {\n addNotification({\n message: notificationMessages.ERROR_ON_UPDATE_FORM_TEXT,\n dismissible: false,\n actions: notificationMessages.ERROR_RELOAD_BUTTON,\n level: 'error',\n backdrop: true\n })(dispatch, getState);\n });\n }\n\n dispatch({ type: types.FORM_PROPERTY_UPDATE_SUCCESS, prop });\n return successPromise();\n }, err => {\n dispatch({ type: types.FORM_PROPERTY_UPDATE_ERROR, error: err });\n networkCallFailed(notificationMessages.ERROR_ON_UPDATE_FORM_TEXT)(dispatch, getState);\n })(dispatch, getState);\n };\n}\n\nexport function deleteCategory(cID, productsFromRightPanel, settings) {\n return (dispatch, getState) => {\n return new Promise((resolve, reject) => {\n const { formProperties: { id: formID } } = getState();\n const products = productsFromRightPanel;\n const paymentListSettings = [settings];\n dispatch({ type: types.FORM_PROPERTY_UPDATING, prop: { products, paymentListSettings } });\n addToQueue(endpoints.deleteCategory, { formID, cID }, resp => {\n const responseObj = resp;\n\n if (!isUndefined(responseObj) && responseObj.responseCode === 401) {\n handleCustomNavigation(`/login?rp=${global.location.href}`, '_self', true);\n return reject({ type: 'UNAUTHORIZED' });\n } if (isUndefined(responseObj) || !responseObj || !responseObj.content) {\n reject({ type: 'ERROR_ON_RESPONSE' });\n return errorPromise(() => {\n addNotification({\n message: notificationMessages.ERROR_ON_UPDATE_FORM_TEXT,\n dismissible: false,\n actions: notificationMessages.ERROR_RELOAD_BUTTON,\n level: 'error',\n backdrop: true\n })(dispatch, getState);\n });\n }\n\n dispatch({ type: types.FORM_PROPERTY_UPDATE_SUCCESS, prop: { products, paymentListSettings } });\n resolve({ type: 'UPDATE_SUCCEED' });\n return successPromise();\n }, err => {\n dispatch({ type: types.FORM_PROPERTY_UPDATE_ERROR, error: err });\n reject({ type: 'ERROR_ON_REQUEST', error: err });\n networkCallFailed(notificationMessages.ERROR_ON_UPDATE_FORM_TEXT)(dispatch, getState);\n })(dispatch, getState);\n });\n };\n}\n\nexport function handleCategoryActions(action, params, updatedData) {\n return (dispatch, getState) => {\n const { formProperties: { id: formID } } = getState();\n\n dispatch({ type: types.FORM_PROPERTY_UPDATING, prop: updatedData });\n\n const apiCalls = {\n create: endpoints.createCategory,\n update: endpoints.updateCategory,\n sort: endpoints.sortCategory\n };\n\n addToQueue(apiCalls[action], { formID, params }, responseObj => {\n if (!isUndefined(responseObj) && responseObj.responseCode === 401) {\n handleCustomNavigation(`/login?rp=${global.location.href}`, '_self', true);\n return;\n }\n if (isUndefined(responseObj) || !responseObj || !responseObj.content) {\n return errorPromise(() => {\n addNotification({\n message: notificationMessages.ERROR_ON_UPDATE_FORM_TEXT,\n dismissible: false,\n actions: notificationMessages.ERROR_RELOAD_BUTTON,\n level: 'error',\n backdrop: true\n })(dispatch, getState);\n });\n }\n\n dispatch({ type: types.FORM_PROPERTY_UPDATE_SUCCESS, prop: updatedData });\n a11yAnnounce(t('Product category settings updated!'));\n return successPromise();\n }, err => {\n dispatch({ type: types.FORM_PROPERTY_UPDATE_ERROR, error: err });\n networkCallFailed(notificationMessages.ERROR_ON_UPDATE_FORM_TEXT)(dispatch, getState);\n })(dispatch, getState);\n };\n}\n\nexport function updateProductListSettings(updatedKeyVal, dataToUpdateStore) {\n return (dispatch, getState) => {\n const { formProperties: { id: formID } } = getState();\n\n dispatch({ type: types.FORM_PROPERTY_UPDATING, prop: dataToUpdateStore });\n\n addToQueue(endpoints.updateProductListSettings, {\n formID, params: updatedKeyVal\n }, responseObj => {\n if (!isUndefined(responseObj) && responseObj.responseCode === 401) {\n handleCustomNavigation(`/login?rp=${global.location.href}`, '_self', true);\n return;\n }\n if (isUndefined(responseObj) || !responseObj || !responseObj.content) {\n return errorPromise(() => {\n addNotification({\n message: notificationMessages.ERROR_ON_UPDATE_FORM_TEXT,\n dismissible: false,\n actions: notificationMessages.ERROR_RELOAD_BUTTON,\n level: 'error',\n backdrop: true\n })(dispatch, getState);\n });\n }\n dispatch({ type: types.FORM_PROPERTY_UPDATE_SUCCESS, prop: dataToUpdateStore });\n a11yAnnounce(t('Product list settings updated!'));\n return successPromise();\n }, err => {\n dispatch({ type: types.FORM_PROPERTY_UPDATE_ERROR, error: err });\n networkCallFailed(notificationMessages.ERROR_ON_UPDATE_FORM_TEXT)(dispatch, getState);\n })(dispatch, getState);\n };\n}\n\nexport function removeFromSingleCategory({\n pid,\n updatedProductsList,\n productsFromPaymentStore,\n isInlineChange,\n forceDelete\n}) {\n return (dispatch, getState) => {\n return new Promise((resolve, reject) => {\n const {\n formProperties: {\n products: stateProducts,\n taxes,\n coupons,\n id: formID\n }\n } = getState();\n\n let updateList = {};\n const prop = {};\n\n if (isInlineChange) {\n const productToRemove = stateProducts.find(p => `${p.pid}` === `${pid}`);\n const connectedProducts = productToRemove.connectedProducts ? Utils.parseJSON(productToRemove.connectedProducts) : productToRemove.connectedProducts;\n\n // remove the related product...\n const filteredStateProducts = stateProducts.filter(p => `${p.pid}` !== `${pid}`);\n\n // // ...then update its cP's cP-cC list\n prop.products = filteredStateProducts.map(p => {\n const tempProduct = cloneDeep(p);\n if (connectedProducts.includes(`${tempProduct.pid}`)) {\n const cp = tempProduct.connectedProducts ? Utils.parseJSON(tempProduct.connectedProducts) : tempProduct.connectedProducts;\n const cd = tempProduct.connectedCategories ? Utils.parseJSON(tempProduct.connectedCategories) : tempProduct.connectedCategories;\n tempProduct.connectedProducts = cp.filter(connectedPid => `${connectedPid}` !== `${pid}`);\n tempProduct.connectedCategories = cd.filter(cid => `${cid}` !== `${productToRemove.cid}`);\n }\n\n return tempProduct;\n });\n\n const connectedProductsData = stateProducts.reduce((prev, cur) => {\n if (connectedProducts.includes(`${cur.pid}`)) {\n const product = cloneDeep(cur);\n return [...prev, product];\n }\n return prev;\n }, []);\n\n updateList = PaymentUtils.prepareCategoryPayload(connectedProductsData);\n\n // remove product from tax exemptions, if any\n if (taxes && taxes[0]?.exemptions.length > 0) {\n prop.taxes = PaymentUtils.removeGivenPidsFromTaxes(taxes[0], [`${pid}`]);\n }\n\n // // remove product from coupons, if any\n if (coupons?.length > 0) {\n prop.coupons = PaymentUtils.removeGivenPidsFromCoupons(coupons, [`${pid}`]);\n }\n } else {\n prop.products = cloneDeep(productsFromPaymentStore);\n updateList = PaymentUtils.prepareCategoryPayload(updatedProductsList);\n }\n\n updateList = JSON.stringify(updateList);\n\n if (isInlineChange) {\n PaymentActions.updateStore(cloneDeep(prop.products));\n }\n dispatch({ type: types.FORM_PROPERTY_UPDATING, prop, saveToUndoStack: true });\n\n addToQueue(endpoints.updateProduct, {\n pid: pid, prop: { updateList, ...(forceDelete && { forceDelete: '1' }) }, formID\n }, resp => {\n const responseObj = resp;\n if (!isUndefined(responseObj) && responseObj.responseCode === 401) {\n handleCustomNavigation(`/login?rp=${global.location.href}`, '_self', true);\n return reject({ type: 'UNAUTHORIZED' });\n } if (isUndefined(responseObj) || !responseObj || !responseObj.content) {\n reject({ type: 'ERROR_ON_RESPONSE' });\n return errorPromise(() => {\n addNotification({\n message: notificationMessages.ERROR_ON_UPDATE_FORM_TEXT,\n dismissible: false,\n actions: notificationMessages.ERROR_RELOAD_BUTTON,\n level: 'error',\n backdrop: true\n })(dispatch, getState);\n });\n }\n\n dispatch({ type: types.FORM_PROPERTY_UPDATE_SUCCESS, prop });\n resolve({ type: 'UPDATE_SUCCEED' });\n return successPromise();\n }, err => {\n dispatch({ type: types.FORM_PROPERTY_UPDATE_ERROR, error: err });\n reject({ type: 'ERROR_ON_REQUEST', error: err });\n networkCallFailed(notificationMessages.ERROR_ON_UPDATE_FORM_TEXT)(dispatch, getState);\n })(dispatch, getState);\n });\n };\n}\n\nexport function updateProduct(data, propsToReplaceFromRightPanel = {}) {\n return (dispatch, getState) => {\n return new Promise((resolve, reject) => {\n const { formProperties } = getState();\n const formID = formProperties.id;\n let prop = {};\n\n // if change is inline, make update here\n // if change is from right panel, replace changed props obj with the old one\n let updateList = [];\n if (data.isInlineChange) {\n let pidsToUpdate = [`${data.pid}`];\n\n const updatedProduct = formProperties.products.find(p => `${p.pid}` === `${data.pid}`);\n const connectedProducts = updatedProduct.connectedProducts ? Utils.parseJSON(updatedProduct.connectedProducts) : updatedProduct.connectedProducts;\n\n if (connectedProducts && connectedProducts.length > 0) {\n pidsToUpdate = [...pidsToUpdate, ...connectedProducts.map(pid => `${pid}`)];\n }\n\n const key = Object.keys(data.prop)[0];\n const products = formProperties.products.map(p => {\n const product = cloneDeep(p);\n if (pidsToUpdate.includes(`${product.pid}`)) {\n product[key] = data.prop[key];\n }\n\n return product;\n });\n\n prop = { products };\n\n if (data.removeFromSingleCategory) {\n // remove the related product...\n prop.products = prop.products.filter(p => `${p.pid}` !== `${data.pid}`);\n\n // ...then update its connected products' 'connectedProducts' list\n if (connectedProducts.length > 0) {\n prop.products = prop.products.map(p => {\n const tempProduct = cloneDeep(p);\n const cp = tempProduct.connectedProducts ? Utils.parseJSON(tempProduct.connectedProducts) : tempProduct.connectedProducts;\n\n if (cp && cp.includes(`${data.pid}`)) {\n tempProduct.connectedProducts = cp.filter(pid => `${pid}` !== `${data.pid}`);\n }\n\n return tempProduct;\n });\n }\n\n // remove products from tax exemptions, if any\n if (formProperties.taxes && formProperties.taxes[0]?.exemptions.length > 0) {\n prop.taxes = PaymentUtils.removeGivenPidsFromTaxes(formProperties.taxes[0], [`${data.pid}`]);\n }\n\n // remove products from coupons, if any\n if (formProperties?.coupons?.length > 0) {\n prop.coupons = PaymentUtils.removeGivenPidsFromCoupons(formProperties.coupons, [`${data.pid}`]);\n }\n }\n\n // single product\n if (!connectedProducts || connectedProducts.length === 0) {\n updateList = [{ pid: Number(data.pid) }];\n } else { // connected products\n const connectedProductsData = formProperties.products.reduce((prev, cur) => {\n if (pidsToUpdate.includes(`${cur.pid}`)) {\n const product = cloneDeep(cur);\n return [...prev, product];\n }\n return prev;\n }, []);\n updateList = PaymentUtils.prepareCategoryPayload(connectedProductsData);\n }\n } else {\n prop = cloneDeep(propsToReplaceFromRightPanel);\n if (\n (data?.prop?.cid === '' && data.updatedProductsList.length === 0) // remove from all categories\n || (data.updatedProductsList.length === 1 && !data.updatedProductsList[0].cid && !data.removeFromSingleCategory) // product with no category\n ) {\n updateList = [{ pid: Number(data.pid) }];\n } else {\n updateList = PaymentUtils.prepareCategoryPayload(data.updatedProductsList);\n }\n }\n updateList = JSON.stringify(updateList);\n\n if (data.isInlineChange) {\n PaymentActions.updateStore(cloneDeep(prop.products));\n }\n dispatch({ type: types.FORM_PROPERTY_UPDATING, prop, saveToUndoStack: true });\n\n let payload = {};\n if (data.prop) {\n const { connectedCategories, ...filteredProps } = data.prop;\n payload = {\n product: PaymentUtils.stringifyProductObjectProps(filteredProps)\n };\n }\n payload = { ...payload, updateList };\n\n addToQueue(endpoints.updateProduct, {\n pid: data.pid, prop: payload, formID\n }, resp => {\n const responseObj = resp;\n if (!isUndefined(responseObj) && responseObj.responseCode === 401) {\n handleCustomNavigation(`/login?rp=${global.location.href}`, '_self', true);\n return reject({ type: 'UNAUTHORIZED' });\n } if (isUndefined(responseObj) || !responseObj || !responseObj.content) {\n reject({ type: 'ERROR_ON_RESPONSE' });\n return errorPromise(() => {\n addNotification({\n message: responseObj.message?.detailedErrorMessage ? responseObj.message?.detailedErrorMessage : notificationMessages.ERROR_ON_UPDATE_FORM_TEXT,\n dismissible: false,\n actions: notificationMessages.ERROR_RELOAD_BUTTON,\n level: 'error',\n backdrop: true\n })(dispatch, getState);\n });\n }\n\n dispatch({ type: types.FORM_PROPERTY_UPDATE_SUCCESS, prop });\n resolve({ type: 'UPDATE_SUCCEED' });\n return successPromise();\n }, err => {\n dispatch({ type: types.FORM_PROPERTY_UPDATE_ERROR, error: err });\n reject({ type: 'ERROR_ON_REQUEST', error: err });\n networkCallFailed(notificationMessages.ERROR_ON_UPDATE_FORM_TEXT)(dispatch, getState);\n })(dispatch, getState);\n });\n };\n}\n\nexport function sortProducts(data, productsFromRightPanel = []) {\n return (dispatch, getState) => {\n return new Promise((resolve, reject) => {\n const { formProperties: { id: formID } } = getState();\n\n const products = cloneDeep(productsFromRightPanel);\n dispatch({ type: types.FORM_PROPERTY_UPDATING, prop: { products }, saveToUndoStack: true });\n\n addToQueue(endpoints.sortProducts, { payload: data, formID }, resp => {\n const responseObj = resp;\n if (!isUndefined(responseObj) && responseObj.responseCode === 401) {\n handleCustomNavigation(`/login?rp=${global.location.href}`, '_self', true);\n return reject({ type: 'UNAUTHORIZED' });\n } if (isUndefined(responseObj) || !responseObj || !responseObj.content) {\n reject({ type: 'ERROR_ON_RESPONSE' });\n return errorPromise(() => {\n addNotification({\n message: notificationMessages.ERROR_ON_UPDATE_FORM_TEXT,\n dismissible: false,\n actions: notificationMessages.ERROR_RELOAD_BUTTON,\n level: 'error',\n backdrop: true\n })(dispatch, getState);\n });\n }\n\n dispatch({ type: types.FORM_PROPERTY_UPDATE_SUCCESS, prop: { products } });\n resolve({ type: 'UPDATE_SUCCEED' });\n return successPromise();\n }, err => {\n dispatch({ type: types.FORM_PROPERTY_UPDATE_ERROR, error: err });\n reject({ type: 'ERROR_ON_REQUEST', error: err });\n networkCallFailed(notificationMessages.ERROR_ON_UPDATE_FORM_TEXT)(dispatch, getState);\n })(dispatch, getState);\n });\n };\n}\n\nexport function updateShipping(shippingData, updatedPropName, productsFromRightPanel, updatedProductsForPayload) {\n return (dispatch, getState) => {\n const { formProperties } = getState();\n\n if (updatedPropName === 'products' && updatedProductsForPayload.length === 0) return;\n\n const payload = PaymentUtils.prepareShippingPayload(shippingData, updatedPropName, updatedProductsForPayload);\n let prop = {};\n\n if (updatedPropName === 'shippingEnabled' && shippingData.shippingEnabled.enabled !== undefined && shippingData.shippingEnabled.enabled !== null) {\n prop = setFormPropertyCurrentValues({ disabledShippingInfo: { ...formProperties.disabledShippingInfo, enabled: shippingData.shippingEnabled.enabled } }, formProperties);\n }\n\n if (updatedPropName === 'shippingText') {\n prop = setFormPropertyCurrentValues({ paymentStrings: [{ shippingShipping: shippingData.shippingText }] }, formProperties);\n }\n\n if (prop.paymentStrings) {\n if (!formProperties.paymentStringsChanged || (formProperties.paymentStringsChanged && formProperties.paymentStringsChanged !== 'Yes')) {\n updateFormProperty({ paymentStringsChanged: 'Yes' })(dispatch, getState);\n }\n }\n\n prop.products = cloneDeep(productsFromRightPanel);\n dispatch({ type: types.FORM_PROPERTY_UPDATING, prop, saveToUndoStack: false });\n\n addToQueue(endpoints.updateShipping, {\n formID: formProperties.id, payload\n }, resp => {\n const responseObj = resp;\n if (!isUndefined(responseObj) && responseObj.responseCode === 401) {\n handleCustomNavigation(`/login?rp=${global.location.href}`, '_self', true);\n return;\n } if (isUndefined(responseObj) || !responseObj || !responseObj.content) {\n return errorPromise(() => {\n addNotification({\n message: notificationMessages.ERROR_ON_UPDATE_FORM_TEXT,\n dismissible: false,\n actions: notificationMessages.ERROR_RELOAD_BUTTON,\n level: 'error',\n backdrop: true\n })(dispatch, getState);\n });\n }\n\n dispatch({ type: types.FORM_PROPERTY_UPDATE_SUCCESS, prop });\n return successPromise();\n }, err => {\n dispatch({ type: types.FORM_PROPERTY_UPDATE_ERROR, error: err });\n networkCallFailed(notificationMessages.ERROR_ON_UPDATE_FORM_TEXT)(dispatch, getState);\n })(dispatch, getState);\n };\n}\n\n// productsFromRightPanel = data of created product + created connectedProducts\nexport function addProduct(data = {}, productsFromRightPanel = []) {\n return (dispatch, getState) => {\n return new Promise((resolve, reject) => {\n const { questions, formProperties } = getState();\n const { pid: dataPid, isInlineChange, ..._data } = cloneDeep(data);\n let products = formProperties.products ? [...formProperties.products] : [];\n\n let newProduct = {\n pid: `${dataPid}`,\n price: '0',\n description: '',\n images: '[]',\n disabled: 'show',\n fitImageToCanvas: 'Yes',\n icon: '',\n selected: '0'\n };\n\n if (newProduct.pid === 'NaN' || Number.isNaN(dataPid)) {\n const isValidProducts = products.filter(product => !Number.isNaN(Number(product.pid)) && Number(product.pid) >= 1000);\n if (isValidProducts && isValidProducts.length > 0) {\n const calcMaxPid = Math.max(...isValidProducts.map(product => Number(product.pid)));\n newProduct.pid = `${calcMaxPid + 1}`;\n } else {\n newProduct.pid = '1000';\n }\n }\n\n const { paymentType } = find(questions, q => PaymentTypes.indexOf(q.type) >= 0);\n switch (paymentType) {\n case 'subscription':\n const subscriptionSpecificProps = {\n name: 'Subscription Name',\n period: 'Monthly',\n hasFirstPayment: '0',\n hasTrialPeriod: '0',\n customPrice: '0',\n customPriceSource: '0',\n recurringtimes: 'No Limit',\n chargeOnDay: '0',\n required: '',\n setupfee: '',\n setupfeePeriod: '',\n trial: 'None',\n customFirstPaymentPrice: '0',\n customFirstPaymentPriceSource: '0',\n hasFirstPaymentPeriod: '0'\n };\n newProduct = { ...newProduct, ...subscriptionSpecificProps };\n delete newProduct.disabled;\n break;\n case 'product':\n default:\n const productSpecificProps = {\n name: 'Product Name',\n required: '0'\n };\n newProduct = { ...newProduct, ...productSpecificProps };\n break;\n }\n\n // if shipping flat rate is enabled\n const flatRate = PaymentUtils.getFlatRateShipping(formProperties.products);\n if (flatRate) {\n newProduct.shipping = { flatRate };\n }\n\n if (Object.keys(_data).length > 0) {\n newProduct = { ...newProduct, ..._data };\n }\n\n // add connectedProducts, and the actual product, from PaymentStore (right panel)\n if (productsFromRightPanel.length > 0 && !isInlineChange) {\n products = [...products, ...productsFromRightPanel];\n } else {\n // if product added inline, just add newProduct\n products = [...products, newProduct];\n }\n\n if (isInlineChange) {\n PaymentActions.updateStore(cloneDeep(products));\n }\n dispatch({ type: types.FORM_PROPERTY_UPDATING, prop: { products }, saveToUndoStack: true });\n\n // deduct pid, connectedCategories and send to request\n const { pid, connectedCategories, ...newProductProps } = newProduct;\n let updateList = {};\n if (isInlineChange || typeof connectedCategories === 'undefined' || connectedCategories?.length === 0) {\n updateList = [{ pid: Number(pid) }];\n } else {\n updateList = PaymentUtils.prepareCategoryPayload(productsFromRightPanel);\n }\n\n updateList = JSON.stringify(updateList);\n\n const payload = {\n product: PaymentUtils.stringifyProductObjectProps(newProductProps),\n updateList\n };\n\n addToQueue(endpoints.addProduct, {\n pid, prop: payload, formID: formProperties.id\n }, resp => {\n const responseObj = resp;\n\n if (!isUndefined(responseObj) && responseObj.responseCode === 401) {\n handleCustomNavigation(`/login?rp=${global.location.href}`, '_self', true);\n return reject({ type: 'UNAUTHORIZED' });\n } if (isUndefined(responseObj) || !responseObj || !responseObj.content) {\n reject({ type: 'ERROR_ON_RESPONSE' });\n return successPromise(\n addNotification({\n message: responseObj.message?.detailedErrorMessage ? responseObj.message?.detailedErrorMessage : notificationMessages.ERROR_ON_UPDATE_FORM_TEXT,\n dismissible: false,\n actions: notificationMessages.ERROR_RELOAD_BUTTON,\n level: 'error',\n backdrop: true\n })(dispatch, getState)\n );\n }\n\n dispatch({ type: types.FORM_PROPERTY_UPDATE_SUCCESS, prop: { products } });\n resolve({ type: 'UPDATE_SUCCEED' });\n return successPromise();\n }, err => {\n dispatch({ type: types.FORM_PROPERTY_UPDATE_ERROR, error: err });\n reject({ type: 'ERROR_ON_REQUEST', error: err });\n networkCallFailed(notificationMessages.ERROR_ON_UPDATE_FORM_TEXT)(dispatch, getState);\n })(dispatch, getState);\n });\n };\n}\n\nexport function duplicateProduct({\n pidToClone,\n createdPid,\n productsFromRightPanel = [],\n nameOfNewProduct\n}) {\n return (dispatch, getState) => {\n return new Promise((resolve, reject) => {\n const { formProperties, questions } = getState();\n const products = cloneDeep(productsFromRightPanel);\n dispatch({ type: types.FORM_PROPERTY_UPDATING, prop: { products }, saveToUndoStack: true });\n\n const updateList = JSON.stringify([{ pid: Number(createdPid) }]);\n\n const payload = {\n updateList,\n product: {\n name: nameOfNewProduct\n }\n };\n // if user can selected product toggle is no, prevent required product duplicate\n const formHasRequiredProduct = formProperties.products.filter(product => {\n return product.required === '1' || product.selected === '1';\n });\n const isOpenUserCanSelectedProduct = questions.find(item => typeof item.paymentType !== 'undefined');\n if (formHasRequiredProduct.length > 0 && isOpenUserCanSelectedProduct.multiple === 'No') {\n const targetIndex = products.findIndex(item => {\n return Number(item.pid) === createdPid;\n });\n if (targetIndex !== -1) {\n products[targetIndex].required = '0';\n products[targetIndex].selected = '0';\n }\n payload.product.required = 0;\n payload.product.selected = 0;\n }\n\n addToQueue(endpoints.duplicateProduct, {\n pidToClone, payload, formID: formProperties.id\n }, resp => {\n const responseObj = resp;\n\n if (!isUndefined(responseObj) && responseObj.responseCode === 401) {\n handleCustomNavigation(`/login?rp=${global.location.href}`, '_self', true);\n return reject({ type: 'UNAUTHORIZED' });\n } if (isUndefined(responseObj) || !responseObj || !responseObj.content) {\n reject({ type: 'ERROR_ON_RESPONSE' });\n return errorPromise(() => {\n addNotification({\n message: responseObj.message?.detailedErrorMessage ? responseObj.message?.detailedErrorMessage : notificationMessages.ERROR_ON_UPDATE_FORM_TEXT,\n dismissible: false,\n actions: notificationMessages.ERROR_RELOAD_BUTTON,\n level: 'error',\n backdrop: true\n })(dispatch, getState);\n });\n }\n PaymentActions.updateStore(window.structuredClone(products));\n dispatch({ type: types.FORM_PROPERTY_UPDATE_SUCCESS, prop: { products } });\n resolve({ type: 'UPDATE_SUCCEED' });\n return successPromise();\n }, err => {\n dispatch({ type: types.FORM_PROPERTY_UPDATE_ERROR, error: err });\n reject({ type: 'ERROR_ON_REQUEST', error: err });\n networkCallFailed(notificationMessages.ERROR_ON_UPDATE_FORM_TEXT)(dispatch, getState);\n })(dispatch, getState);\n });\n };\n}\n\nexport function deleteProductInline(data) {\n return (dispatch, getState) => {\n const { formProperties } = getState();\n\n let current = [...formProperties.products];\n const removingProduct = current[data.index];\n current.splice(data.index, 1);\n\n const connectedProducts = typeof removingProduct.connectedProducts === 'string' ? JSON.parse(removingProduct.connectedProducts) : removingProduct.connectedProducts;\n\n if (connectedProducts !== undefined && isArray(connectedProducts) && connectedProducts.length > 0) {\n current = current.filter(p => !connectedProducts.includes(`${p.pid}`));\n }\n\n const paymentProps = {\n attachInvoice: formProperties.attachInvoice,\n coupons: formProperties.coupons,\n emailsToAttachInvoice: formProperties.emailsToAttachInvoice,\n invoiceEnabled: formProperties.invoiceEnabled,\n paymentQuestion: formProperties.paymentQuestion,\n paymentStrings: formProperties.paymentStrings,\n paymentStringsChanged: formProperties.paymentStringsChanged,\n products: [...current]\n };\n\n PaymentActions.updateStore(cloneDeep(paymentProps.products));\n updateFormProperty(paymentProps)(dispatch, getState);\n };\n}\n\nexport function deleteProductInlineTest(data) {\n return (dispatch, getState) => {\n return new Promise((resolve, reject) => {\n const { formProperties, productStock } = getState();\n\n let products = cloneDeep(formProperties.products);\n let pidsToDelete = [`${data.pid}`];\n\n // if product has connectedProducts\n const productToRemove = formProperties.products.find(product => `${product.pid}` === `${data.pid}`);\n let { connectedProducts } = productToRemove;\n if (typeof connectedProducts !== 'undefined') {\n if (typeof connectedProducts === 'string') {\n connectedProducts = Utils.parseJSON(connectedProducts);\n }\n\n pidsToDelete = [...pidsToDelete, ...connectedProducts];\n }\n\n // remove product and its connected products\n products = products.filter(product => !pidsToDelete.includes(`${product.pid}`));\n\n const prop = { products };\n\n // remove products from tax exemptions, if any\n const tax = isArray(formProperties.taxes) && formProperties.taxes[0];\n const exemptions = tax && tax.exemptions;\n if (exemptions && exemptions.length > 0) {\n prop.taxes = PaymentUtils.removeGivenPidsFromTaxes(tax, pidsToDelete);\n }\n\n // remove products from coupons, if any\n if (formProperties?.coupons?.length > 0) {\n prop.coupons = PaymentUtils.removeGivenPidsFromCoupons(formProperties.coupons, pidsToDelete);\n }\n\n if (data.isInlineChange) {\n PaymentActions.updateStore(cloneDeep(prop.products));\n }\n dispatch({ type: types.FORM_PROPERTY_UPDATING, prop, saveToUndoStack: true });\n\n addToQueue(endpoints.deleteProduct, {\n pid: data.pid, formID: formProperties.id\n }, resp => {\n const responseObj = resp;\n if (!isUndefined(responseObj) && responseObj.responseCode === 401) {\n handleCustomNavigation(`/login?rp=${global.location.href}`, '_self', true);\n return reject({ type: 'UNAUTHORIZED' });\n } if (isUndefined(responseObj) || !responseObj || !responseObj.content) {\n reject({ type: 'ERROR_ON_RESPONSE' });\n return errorPromise(() => {\n addNotification({\n message: notificationMessages.ERROR_ON_UPDATE_FORM_TEXT,\n dismissible: false,\n actions: notificationMessages.ERROR_RELOAD_BUTTON,\n level: 'error',\n backdrop: true\n })(dispatch, getState);\n });\n }\n\n dispatch({ type: types.FORM_PROPERTY_UPDATE_SUCCESS, prop });\n const updatedStockData = productStock.filter(pS => `${pS.pid}` !== `${data.pid}`);\n updatePaymentStockWithoutRequest(updatedStockData)(dispatch);\n resolve({ type: 'UPDATE_SUCCEED' });\n return successPromise();\n }, err => {\n dispatch({ type: types.FORM_PROPERTY_UPDATE_ERROR, error: err });\n reject({ type: 'ERROR_ON_REQUEST', error: err });\n networkCallFailed(notificationMessages.ERROR_ON_UPDATE_FORM_TEXT)(dispatch, getState);\n })(dispatch, getState);\n });\n };\n}\n\nexport function uploadProductImageInline(file, pid) {\n return (dispatch, getState) => {\n try {\n const { isValid, message } = PaymentUtils.validateInlineUpload(file);\n if (!isValid) {\n addNotification({\n message,\n level: 'error',\n autoDismiss: 5\n })(dispatch);\n return;\n }\n const { formProperties } = getState();\n endpoints.uploadPaymentProductImage(formProperties.id, file).then(res => {\n if (res && res.responseCode === 200 && res.message) {\n const p = formProperties.products.find(product => `${product.pid}` === `${pid}`);\n let { images } = p;\n const uploadedImage = res.message[0];\n\n // if there is no images prop, start with empty array\n if (typeof images === 'undefined') {\n images = [];\n }\n\n if (typeof images === 'string') {\n images = Utils.parseJSON(images);\n }\n\n if (isArray(images)) {\n images = [...images, uploadedImage];\n images = JSON.stringify(images);\n\n const data = {\n pid,\n prop: { images },\n isInlineChange: true\n };\n\n updateProduct(data)(dispatch, getState);\n }\n }\n });\n } catch (error) {\n console.log('Error on inline product uploading: ', error);\n }\n };\n}\n\nexport function deleteAllPaymentStock() {\n return (dispatch, getState) => {\n const { formProperties: { id: formID } } = getState();\n\n endpoints.deleteAllPaymentStock(formID).then(() => {\n fetchAllPaymentStock()(dispatch, getState);\n });\n };\n}\n\nexport function updateStockOnOptionSort(pid, prev, next) {\n return (dispatch, getState) => {\n const { formProperties: { id: formID } } = getState();\n\n const data = {\n pid,\n formID,\n prev: JSON.stringify(prev),\n next\n };\n\n addToQueue(endpoints.updateStockOnOptionSort, data, response => {\n if (!isUndefined(response) && response.responseCode === 401) {\n handleCustomNavigation(`/login?rp=${global.location.href}`, '_self', true);\n return;\n } if (isUndefined(response) || !response || !response.content) {\n return errorPromise(() => {\n addNotification({\n message: notificationMessages.ERROR_ON_UPDATE_FORM_TEXT,\n dismissible: false,\n actions: notificationMessages.ERROR_RELOAD_BUTTON,\n level: 'error',\n backdrop: true\n })(dispatch, getState);\n });\n }\n return successPromise();\n }, () => {\n networkCallFailed(notificationMessages.ERROR_ON_UPDATE_FORM_TEXT)(dispatch, getState);\n })(dispatch, getState);\n };\n}\n\nexport function resetAllPaymentStock(pid) {\n return (dispatch, getState) => {\n const { formProperties: { id: formID } } = getState();\n\n setTimeout(() => {\n endpoints.resetAllPaymentStock(pid, formID).then(() => {\n fetchAllPaymentStock()(dispatch, getState);\n });\n }, 1000);\n };\n}\n\nexport function uncheckCategory(pid) {\n return (dispatch, getState) => {\n const { formProperties: { id: formID } } = getState();\n\n endpoints.uncheckCategory(formID, pid).then(() => {\n fetchAllPaymentStock()(dispatch, getState);\n });\n };\n}\n\n// Product Stock Control Management\nexport function fetchAllPaymentStock() {\n return (dispatch, getState) => {\n try {\n const { formProperties: { id: formID } } = getState();\n endpoints.fetchAllPaymentStock(formID).then(resp => {\n const responseObj = resp;\n const isNoStock = responseObj.responseCode === 400 && responseObj.message === 'No Stock!';\n if (responseObj.responseCode === 404 || isNoStock) {\n dispatch({\n type: types.PAYMENT_FETCH_ALL_STOCK,\n data: []\n });\n dispatch({\n type: types.PAYMENT_CLONE_STOCK_DATA,\n data: []\n });\n return;\n }\n if (responseObj.responseCode !== 200) { return; }\n let response = resp.content;\n\n if (typeof response === 'string') {\n response = JSON.parse(resp.content);\n }\n\n response = response.map(element => {\n return {\n ...element,\n options: element.options[0]\n };\n });\n\n dispatch({\n type: types.PAYMENT_FETCH_ALL_STOCK,\n data: response\n });\n dispatch({\n type: types.PAYMENT_CLONE_STOCK_DATA,\n data: response\n });\n });\n } catch (err) {\n console.log(err);\n }\n };\n}\n\nexport function updatePaymentStock(pid, data, isCloneProduct = false) {\n return (dispatch, getState) => {\n const { formProperties: { id: formID }, paymentStockRevision } = getState();\n\n const stockData = cloneDeep(data);\n if (!isCloneProduct && paymentStockRevision && paymentStockRevision.length > 0) {\n stockData.map(stock => {\n const matchData = paymentStockRevision.find(revisionData => {\n const isMatchVariant = revisionData.options === stock.options || revisionData.options === `/n${stock.options}/n`;\n return revisionData.pid === stock.pid && isMatchVariant;\n });\n\n if (matchData) {\n Object.assign(stock, {\n prev_available_stock: matchData.available_stock\n });\n }\n return stock;\n });\n }\n\n endpoints.updatePaymentStock(pid, stockData, formID).then(response => {\n if (!isUndefined(response) && response.responseCode === 400 && response.message) {\n addNotification({\n message: response.message,\n dismissible: true,\n level: 'warning',\n backdrop: false,\n autoDismiss: 5,\n })(dispatch, getState);\n }\n fetchAllPaymentStock()(dispatch, getState);\n });\n };\n}\n\nexport function renamePaymentStock(pid, oldName, newName) {\n return (dispatch, getState) => {\n const { formProperties: { id: formID } } = getState();\n\n endpoints.renamePaymentStock(pid, oldName, newName, formID).then(resp => {\n if (resp.responseCode === 404) {\n dispatch({\n type: types.PAYMENT_FETCH_ALL_STOCK,\n data: []\n });\n return;\n }\n if (resp.responseCode !== 200) { return; }\n let response = resp.content;\n response = response.map(element => {\n return {\n ...element,\n options: element.options[0]\n };\n });\n\n dispatch({\n type: types.PAYMENT_FETCH_ALL_STOCK,\n data: response\n });\n });\n };\n}\n\nexport function updatePaymentStockWithoutRequest(data) {\n return dispatch => {\n dispatch({\n type: types.PAYMENT_UPDATE_STOCK,\n data\n });\n };\n}\n\nexport function deletePaymentStock(pid) {\n return (dispatch, getState) => {\n const { formProperties: { id: formID } } = getState();\n\n endpoints.deletePaymentStock(pid, formID).then(() => {\n fetchAllPaymentStock()(dispatch, getState);\n });\n };\n}\n\nexport function setPaymentProductList(status = false) {\n return dispatch => {\n dispatch({ type: types.UI_SET_PAYMENT_PRODUCT_LIST, status });\n };\n}\n\nexport function setSwitchAnotherGateway(status = false) {\n return dispatch => {\n dispatch({ type: types.UI_SET_SWITCH_ANOTHER_GATEWAY, status });\n };\n}\n\nexport function setPaymentModalProperties(properties = {}) {\n return (dispatch, getState) => {\n const { paymentModals = {} } = getState().ui;\n let modals = {};\n\n if (typeof properties === 'object') {\n modals = { ...paymentModals, [properties.uid]: { ...properties } };\n } else {\n modals = omit(paymentModals, properties);\n }\n\n dispatch({ type: types.UI_SET_PAYMENT_MODAL_PROPERTIES, modals: { ...modals } });\n };\n}\n\nexport function setPaymentBuilderButtonStatus(status) {\n return dispatch => {\n dispatch({ type: types.UI_PAYMENT_CONNECTION_BUILDER_BTN_STATUS, status });\n };\n}\n\nexport function setPaymentConfigurationStatus(data) {\n return dispatch => {\n dispatch({ type: types.UI_PAYMENT_GATEWAY_CONFIGURATION_STATUS, data });\n };\n}\n","/* eslint-disable complexity */\n/* eslint-disable max-statements, max-lines */\nimport React from 'react';\nimport find from 'lodash/find';\nimport findIndex from 'lodash/findIndex';\nimport isEmpty from 'lodash/isEmpty';\nimport isArray from 'lodash/isArray';\nimport isString from 'lodash/fp/isString';\nimport isObject from 'lodash/isObject';\nimport isPlainObject from 'lodash/isPlainObject';\nimport isUndefined from 'lodash/isUndefined';\nimport remove from 'lodash/remove';\nimport maxBy from 'lodash/maxBy';\nimport uniq from 'lodash/uniq';\nimport set from 'lodash/set';\nimport filter from 'lodash/filter';\nimport includes from 'lodash/fp/includes';\nimport sortBy from 'lodash/sortBy';\nimport cloneDeep from 'lodash/cloneDeep';\nimport getOr from 'lodash/fp/getOr';\nimport compose from 'lodash/fp/compose';\nimport map from 'lodash/fp/map';\nimport filterF from 'lodash/fp/filter';\nimport intersection from 'lodash/intersection';\nimport isEqual from 'lodash/isEqual';\nimport { ABTestManager } from '@jotforminc/abtest-manager';\nimport { t, translation as Translations } from '@jotforminc/translation';\nimport { parseBlotId } from '@jotforminc/jotform-common';\nimport { htmlDecode } from '@jotforminc/form-common'; // eslint-disable-line\nimport {\n a11yAnnounce,\n handleCustomNavigation,\n moment\n} from '@jotforminc/utils';\nimport { isEnterprise } from '@jotforminc/enterprise-utils';\nimport { QUESTION_PROPS, QUESTION_PROPS_FOR_NEW_THEME } from '@jotforminc/question-props';\nimport { featureFlag } from '@jotforminc/feature-flag';\nimport Tracking from '@jotforminc/tracking';\nimport * as types from '../constants/actionTypes';\nimport PaymentTypes from '../constants/payment_types';\nimport { NonInputFields, NonDuplicatableFields, NonHideableFields } from '../constants/Fields';\nimport * as Utils from '../libs/Utils';\nimport * as PaymentUtils from '../libs/PaymentUtils';\nimport PaymentDataCollector from '../libs/paymentDataCollector';\nimport { isTestingUser, getApiKeyFromUrl } from '../libs/api_key_extractor';\nimport { getTranslatedFormFields, getPaymentFields } from '../components/quicksearchpanel/Utils';\nimport * as Socket from '../libs/socket';\nimport cacheImageUrls from '../libs/image_to_cache';\nimport * as notificationMessages from '../constants/notificationMessages';\nimport styleAndInject from '../libs/styleAndInject';\nimport { getPinnedAnnotations } from '../reducers/pdfImport';\nimport { getDefaultProps, getDefaultQuestions, isWidgetSupported } from '../components/pdfImporter/helpers';\nimport {\n setAnnotations, setAnnotationSelection, createInlinePDFField, setSelectedField\n} from './pdfImport';\nimport { getTimezoneOffset } from '../libs/DateTimeHelper';\nimport { WidgetDefaultPropsForOldTheme, WidgetDefaultPropsForNewTheme } from '../constants/widget_properties_NDT';\nimport extendInlineDefaults from '../constants/extend_inline_defaults';\nimport upsertInlineField, { onlyCreatedOptions } from './upsertInlineField';\nimport {\n expandInlineOptions, getIds, getOptionId, getOptionsForSelectbox, mergeInlineOptions\n} from './normalizeInlineOptions';\nimport withOrder from './withOrder';\nimport { LIMIT_LEVELS } from '../constants/limitDefaults';\nimport specialOptions from '../constants/specialOptions';\nimport { endpoints } from '../libs/api';\nimport Logger from '../libs/logger';\nimport { FIELD_NAME_MAP } from '../components/revisionhistory/constants';\nimport { LIMIT_BY_CODE } from '../libs/pdfImport/constants';\n\nconst MOBILE_SCALE_BREAK_POINT = 360;\nconst MOBILE_BREAK_POINT = 480;\nconst TABLET_BREAK_POINT = 768;\nconst SMALLSCREEN_BREAK_POINT = 960;\nconst BIGSCREEN_BREAK_POINT = 1200;\nconst CARDFORMS_BREAK_POINTS = {\n 580: { name: 'isCardFormMobile', value: '100%' },\n 768: { name: 'isCardFormTablet', value: '540px' },\n 992: { name: 'isCardFormSmallDevice', value: '720px' },\n 1200: { name: 'isCardFormMediumDevice', value: '780px' },\n 1366: { name: 'isCardFormLargeDevice', value: '840px' }\n};\n\nconst CARDFORM_OPTIONS_2_COLUMN_THRESHOLD_WIDTH = 250;\nconst CARDFORM_OPTIONS_3_COLUMN_THRESHOLD_WIDTH = 90;\nconst SMART_PDF_FORM_ARRAY_FIELD_TYPES = ['control_textarea', 'control_checkbox', 'control_matrix'];\n/* QueryQuee Constants Types\nconst QUEE_QUESTION_ADD = 'QUEE_QUESTION_ADD';\nconst QUEE_QUESTION_UPDATE = 'QUEE_QUESTION_UPDATE';\nconst QUEE_QUESTION_DELETE = 'QUEE_QUESTION_DELETE';\nconst QUEE_QUESTION_MULTI_UPDATE = 'QUEE_QUESTION_MULTI_UPDATE';\n*/\n\nexport function setFormPropertyCurrentValues(_prop, formProperties) {\n const newProps = cloneDeep(_prop);\n Object.keys(_prop).forEach(key => {\n if (key === 'title' || key === 'pagetitle') {\n if (isEmpty(_prop[key])) {\n newProps[key] = formProperties[key];\n }\n }\n\n const isInlineProductChange = key === 'products' && Object.keys(_prop).length === 1; // only one key should have inline change\n if ((isObject(_prop[key]) && ['paymentStrings', 'welcomePage', 'thankYouPage', 'formStrings'].indexOf(key) > -1) || isInlineProductChange) { // check value if object\n newProps[key] = cloneDeep(formProperties[key]);\n if (key === 'formStrings' && formProperties[key][0] && isArray(formProperties[key][0])) {\n newProps[key] = [{}];\n }\n if (key === 'products' && newProps[key]) {\n const objectProps = ['options', 'images'];\n newProps[key] = newProps[key].map(productObj => {\n const newProductObj = cloneDeep(productObj);\n objectProps.forEach(p => {\n if (typeof newProductObj[p] === 'object') { newProductObj[p] = JSON.stringify(newProductObj[p]); }\n });\n return newProductObj;\n });\n }\n Object.keys(_prop[key]).forEach(subkey => {\n Object.keys(_prop[key][subkey]).forEach(secondSubKey => {\n set(newProps, `[${key}][${subkey}][${secondSubKey}]`, _prop[key][subkey][secondSubKey]);\n });\n });\n }\n });\n\n return newProps;\n}\n\nexport function setActiveFormPage(page) {\n return dispatch => {\n dispatch({ type: types.UI_SET_ACTIVE_FORM_PAGE, page });\n };\n}\n\nexport function displayActiveFormPage(page) {\n return dispatch => {\n dispatch({ type: types.UI_DISPLAY_ACTIVE_FORM_PAGE, page });\n };\n}\n\nexport function confirm(notification, callback) {\n return dispatch => {\n dispatch({ type: types.NOTIFICATION_CONFIRM, notification, callback });\n };\n}\n\nexport function addNotification(notification, level, callback) {\n return dispatch => {\n dispatch({\n type: types.NOTIFICATION_ADD, notification, level, callback\n });\n };\n}\n\nexport function addMainLevelNotification(notification, level, callback) {\n return dispatch => {\n const cloneNotification = cloneDeep(notification);\n cloneNotification.mainLevel = true;\n dispatch({\n type: types.NOTIFICATION_ADD_MAIN_LEVEL, notification: cloneNotification, level, callback\n });\n };\n}\n\nexport function removeNotification(notification, uuid, callback) {\n return dispatch => {\n dispatch({\n type: types.NOTIFICATION_REMOVE, notification, uuid, callback\n });\n };\n}\n\nexport function findAccessibilityErrors() {\n return (dispatch, getState) => {\n const { questions, formProperties } = getState();\n const qidsWithProblems = questions.map(question => {\n return {\n qid: question.qid,\n accessibilityErrors: Utils.getAccessibilityErrors(question, formProperties.formType === 'cardForm')\n };\n });\n const formErrors = Utils.getFormAccessibilityErrors(formProperties, questions);\n dispatch({ type: types.FORM_ACCESSIBILITY_CHECK_SUCCESS, questionErrors: qidsWithProblems, formErrors });\n };\n}\n\nexport function isAccessibilityEnabled() {\n return (dispatch, getState) => {\n const { formProperties } = getState();\n return formProperties.accessibility && formProperties.accessibility === '1';\n };\n}\n\nexport function errorPromise(errorFallback) {\n return new Promise((resolve, reject) => {\n reject(errorFallback);\n });\n}\n\nexport function successPromise(successObject) {\n return new Promise(resolve => {\n return resolve(successObject);\n });\n}\n/* NetworkTask Queue Method START */\n\nfunction clearQueue() {\n global.queryQueue = [];\n global.isQueueExecuting = false;\n}\n\nconst maximumRequestAttemptCount = 2;\nexport function executeNextQueueTask(tryCount = 0) {\n return (dispatch, getState) => {\n if (global.isQueueExecuting === true || global.queryQueue.length === 0) {\n return false;\n }\n try {\n global.isQueueExecuting = true;\n const task = global.queryQueue[0];\n const {\n func, params, success, error\n } = task;\n func(params).then(response => {\n success(response).then((successResponse) => { // eslint-disable-line\n global.isQueueExecuting = false;\n global.queryQueue.splice(0, 1);\n executeNextQueueTask()(dispatch, getState);\n }).catch(successError => {\n global.isQueueExecuting = false;\n if (tryCount < maximumRequestAttemptCount) {\n executeNextQueueTask(tryCount + 1)(dispatch, getState);\n } else {\n successError();\n }\n });\n }).catch(err => {\n global.isQueueExecuting = false;\n if (tryCount < maximumRequestAttemptCount) {\n executeNextQueueTask(tryCount + 1)(dispatch, getState);\n } else {\n error(err);\n }\n });\n } catch (E) {\n /* eslint-disable no-console */\n console.error('An error occured in queue', E);\n /* eslint-enable no-console */\n global.queryQueue.splice(0, 1);\n global.isQueueExecuting = false;\n executeNextQueueTask()(dispatch, getState);\n }\n };\n}\n\nglobal.queryQueue = [];\nexport function addToQueue(func, params, success, error) {\n return (dispatch, getState) => {\n const _params = cloneDeep(params);\n global.queryQueue.push({\n func, params: _params, success, error\n });\n if (global.isQueueExecuting !== true && global.queryQueue.length > 0) {\n executeNextQueueTask()(dispatch, getState);\n }\n\n // Temporarily return sample promise for fixing integrations\n return new Promise(\n resolve => {\n resolve();\n }\n );\n //\n };\n}\n\n/* NetworkTask Queue Method END */\n\nexport function socketDisconnected() {\n return dispatch => {\n addNotification({\n uid: 'socket_connection_lost',\n uuid: 'socket_connection_lost',\n message: notificationMessages.ERROR_ON_SOCKET_CONNECTION_TEXT,\n actions: notificationMessages.ERROR_RELOAD_BUTTON\n })(dispatch);\n };\n}\n\nexport function socketReconnected() {\n return dispatch => {\n const notification = {\n message: notificationMessages.SOCKET_RECONNECTED_TEXT,\n autoDismiss: 3,\n level: 'success'\n };\n addNotification(notification)(dispatch);\n removeNotification('socket_connection_lost')(dispatch);\n };\n}\n\nexport function disableOfflineMode() {\n return (dispatch, getState) => {\n dispatch({ type: types.OFFLINE_MODE_CHANGED, data: false });\n addNotification({\n message: notificationMessages.OFFLINE_MODE_DISABLED_TEXT,\n uid: 'offline_mode_disabled',\n level: 'success',\n autoDismiss: 3\n })(dispatch, getState);\n };\n}\n\n// WARN :: This method is for just for offline mode\n// It is not atomic, it saves all form to api\nexport function syncFormToAPI() {\n return (dispatch, getState) => {\n const state = getState();\n let replace = true;\n const { questions, formProperties, paymentConnectionBackup } = state;\n const { id } = formProperties;\n // TO DO :: NEED ERROR HANDLING HERE\n clearQueue();\n const paymentQuestion = questions.find(p => PaymentTypes.indexOf(p.type) > -1);\n const sensitivePayments = ['control_square', 'control_stripe'];\n\n const paymentConnectionPayments = ['control_paypalpro', 'control_braintree'];\n if (paymentQuestion && paymentConnectionPayments.includes(paymentQuestion.type) && !isEmpty(paymentConnectionBackup)) {\n dispatch({ type: types.PAYMENT_CONNECTION_CLEAR_BACKUP });\n }\n\n if (paymentQuestion && sensitivePayments.includes(paymentQuestion.type)) {\n replace = false;\n }\n addToQueue(endpoints.updateMultipleFormQuestion, { formID: id, questions, replace },\n () => {\n disableOfflineMode()(dispatch, getState);\n return successPromise();\n }, () => { })(dispatch, getState);\n addToQueue(endpoints.updateMultipleFormProperty, { formID: id, formProperties, replace: true },\n () => { return successPromise(); }, () => { })(dispatch, getState);\n };\n}\n\nexport function checkServerStatus() {\n return (dispatch, getState) => {\n endpoints.getServerStatus().then(resp => {\n if (resp.responseCode === 200) {\n // OWW! We are online now!\n syncFormToAPI()(dispatch, getState);\n }\n }).catch(() => {\n // Continue offline..\n setTimeout(() => { checkServerStatus()(dispatch, getState); }, 5000);\n });\n };\n}\n\nexport function enableOfflineMode() {\n return (dispatch, getState) => {\n const { isOfflineModeEnabled } = getState().ui;\n if (isOfflineModeEnabled === true) {\n return;\n }\n dispatch({ type: types.OFFLINE_MODE_CHANGED, data: true });\n const notification = {\n message: notificationMessages.OFFLINE_MODE_ACTIVATED_TEXT,\n level: 'warning',\n uid: 'offline_mode_enabled',\n autoDismiss: 3\n };\n addNotification(notification)(dispatch);\n checkServerStatus()(dispatch, getState);\n };\n}\n\nexport function networkCallFailed(defaultErrorMessage) {\n return (dispatch, getState) => {\n const { isOfflineModeEnabled } = getState().ui;\n if (isOfflineModeEnabled === true) {\n return;\n }\n setTimeout(() => {\n endpoints.getServerStatus().then(() => {\n addNotification({\n message: defaultErrorMessage,\n dismissible: false,\n backdrop: true,\n actions: notificationMessages.ERROR_RELOAD_BUTTON,\n level: 'error'\n })(dispatch, getState);\n }).catch(() => {\n // Activated automatically\n enableOfflineMode()(dispatch, getState);\n });\n }, 1000);\n };\n}\n\nexport function changeUserInvitationStatus(value, key) {\n return dispatch => {\n dispatch({ type: types.UI_CHANGE_INVITATION_STATUS, value, key });\n };\n}\n\nexport function createNewForm(title, createdWithUrl) {\n return dispatch => {\n const isCardForm = global.location.href.match(/\\/#card/) !== null || global.buildermode === 'card';\n return endpoints.createNewForm(title, isCardForm, createdWithUrl).then(resp => {\n dispatch({ type: types.NEW_FORM_CREATED, form: resp.content });\n }).catch(err => {\n dispatch({ type: types.NEW_FORM_CREATE_ERROR, error: err });\n Logger.logBreadCrumb('NEW_FORM_CREATE_ERROR', 'form-builder', err);\n });\n };\n}\n\nexport function updateRightPanelMode(mode, force = false) {\n return (dispatch, getState) => {\n const { rightPanelMode, isRightPanelOpen } = getState().ui;\n if (isRightPanelOpen && rightPanelMode === 'design' && !force) {\n return;\n } if (rightPanelMode === mode) {\n return;\n }\n dispatch({\n type: types.UI_CHANGE_RIGHT_PANEL_MODE,\n mode\n });\n };\n}\n\nexport function fetchThemeInfo(themeID) {\n return dispatch => {\n endpoints.fetchThemeInfo(themeID).then(resp => {\n dispatch({ type: types.THEME_FETCH_INFO, data: resp.content });\n });\n };\n}\n\nexport function initializeInjectCss(value) {\n return dispatch => {\n dispatch({\n type: types.UI_INITIALIZE_INJECT_CSS,\n value\n });\n };\n}\n\nexport function rightPanelToggle(visible, forceHideRightPanel = false) {\n return (dispatch, getState) => {\n const { ui } = getState();\n const { isRightPanelOpen } = ui;\n if (isRightPanelOpen !== visible) {\n if (!visible && ui.showRevisionPreview) {\n dispatch({ type: types.UI_REVISION_PREVIEW, revision: false });\n }\n dispatch({ type: types.UI_RIGHT_PANEL_TOGGLE, visible, forceHideRightPanel });\n }\n };\n}\n\nexport function leftPanelToggle(visible) {\n return dispatch => {\n dispatch({ type: types.UI_LEFT_PANEL_TOGGLE, visible });\n };\n}\n\nexport function changeBuilderType(builderType) {\n return dispatch => {\n dispatch({ type: types.UI_CHANGE_BUILDER_TYPE, builderType });\n };\n}\n\nfunction generateNewQid(questions, lastQuestionID) {\n const formLastQid = lastQuestionID ? parseInt(lastQuestionID, 10) : 0;\n\n const max = maxBy(questions, q => { return parseInt(q.qid, 10); }) || { qid: 0 };\n const maxQid = parseInt(max.qid, 10);\n\n if (formLastQid > maxQid) {\n return formLastQid + 1;\n }\n\n return maxQid + 1;\n}\n\nexport function fixFormProperties(formID, content) {\n return dispatch => {\n const formProps = { ...content, id: formID };\n const properties = Utils.extendFormWithDefaults(formProps);\n PaymentUtils.checkPropsDataHygiene(formProps, formProps.id);\n const { products, coupons, paymentListSettings } = properties;\n if (!content.isAutoCompleteAvailable && properties.isHIPAA && properties.isHIPAA === '1') {\n properties.isAutoCompleteAvailable = 'No';\n }\n if (properties.formType === 'cardForm') { // Lets change builder to \"cardform builder\"\n changeBuilderType('card')(dispatch);\n }\n if (properties.emailForm === '1') { // Lets change builder to \"email form builder\"\n changeBuilderType('emailForm')(dispatch);\n }\n /* Damn styleJSON encoding issues start\n We are fetching form properties through parseJSON parameter, so we thought styleJSON will be object,\n but somehow styleJSON is fetching string, and we need to fix it.\n */\n try {\n if (global.buildermode === 'card' && isArray(properties.styleJSON)) {\n properties.styleJSON = {};\n }\n if (properties.styleJSON && typeof properties.styleJSON === typeof 'string') {\n /* eslint-disable no-console */\n console.error('Actions :: Unexpected styleJSON fetched!');\n /* eslint-enable no-console */\n // Check for double encoded\n properties.styleJSON = JSON.parse(properties.styleJSON);\n if (properties.styleJSON === null) {\n properties.styleJSON = {};\n }\n }\n } catch (e) {\n try {\n // Or check for false decoded\n properties.styleJSON = properties.styleJSON.replace(/\\\\/g, '');\n properties.styleJSON = JSON.parse(properties.styleJSON);\n } catch (ex) {\n // Nothing\n }\n }\n // End styleJSON encoding\n if (typeof properties.injectCSS === typeof 'string') {\n properties.injectCSS = htmlDecode(properties.injectCSS);\n }\n\n /*\n This condition prevents the future errors which is based on specific data cases (about shape)\n like data as object of objects instead of array of objects.\n */\n properties.products = PaymentUtils.convertObjectToList(products);\n properties.coupons = PaymentUtils.convertObjectToList(coupons);\n\n const productCategories = paymentListSettings && paymentListSettings[0]?.productCategories && Utils.parseJSON(paymentListSettings[0].productCategories);\n const isProductsExist = properties.products && isArray(properties.products);\n if (isProductsExist && isArray(productCategories) && productCategories.length > 0) {\n properties.products = PaymentUtils.removeMissingCategories(properties.products, productCategories.map(c => c.id), formID);\n }\n\n if (properties.themeID === '5e6b428acc8c4e222d1beb91' && properties.defaultTheme !== 'v2') {\n properties.defaultTheme = 'v2';\n }\n\n return properties;\n };\n}\n\nexport function dispatchFormProperties(properties) {\n return dispatch => {\n dispatch({ type: types.FORM_PROPERTIES_FETCH_SUCCESS, properties });\n };\n}\n\nexport function formPropertiesLoading() {\n return dispatch => {\n dispatch({ type: types.FORM_PROPERTIES_FETCHING });\n };\n}\n\nexport function fetchFormProperties(formID) {\n return (dispatch, getState) => {\n if (global.__formProps && typeof global.__formProps === typeof {}) {\n const properties = fixFormProperties(formID, global.__formProps)(dispatch);\n dispatchFormProperties(properties)(dispatch);\n if (global.__currentThemeInfo && typeof global.__currentThemeInfo === typeof {}) {\n dispatch({ type: types.THEME_FETCH_INFO, data: global.__currentThemeInfo });\n }\n global.__formProps = undefined; // we need to clear its content\n global.__currentThemeInfo = undefined;\n return;\n }\n formPropertiesLoading();\n return endpoints.fetchFormProperties(formID).then(resp => {\n if (!isUndefined(resp) && resp.responseCode === 401) {\n endpoints.fetchUser().then(res => {\n const userAccountType = res && res.content && res.content.account_type;\n const isLoggedInUser = userAccountType && userAccountType.name && userAccountType.name !== 'GUEST';\n const loc = isLoggedInUser ? '/myforms' : `/login?rp=${global.location.href}`;\n handleCustomNavigation(loc, '_self', !isLoggedInUser);\n });\n return;\n } if (isUndefined(resp) || isUndefined(resp.content)) {\n addMainLevelNotification({\n message: notificationMessages.ERROR_ON_INITIALIZING_TEXT,\n dismissible: false,\n backdrop: true,\n actions: notificationMessages.ERROR_RELOAD_BUTTON,\n uid: 'error_on_init',\n })(dispatch);\n }\n\n const properties = fixFormProperties(formID, resp.content)(dispatch);\n const { formProperties: { formType } } = getState();\n if (formType !== properties.formType) {\n global.location.reload();\n }\n dispatchFormProperties(properties)(dispatch);\n if (global.buildermode === 'card') { // TO DO :: read this varialbe from ui reducer ! not here!!\n fetchThemeInfo(properties.themeID)(dispatch);\n }\n }).catch(err => {\n dispatch({ type: types.FORM_PROPERTIES_FETCH_ERROR, error: err });\n addMainLevelNotification({\n message: notificationMessages.ERROR_ON_INITIALIZING_TEXT,\n dismissible: false,\n backdrop: true,\n actions: notificationMessages.ERROR_RELOAD_BUTTON\n })(dispatch);\n });\n };\n}\n\nexport function normalizeAllQuestions(questions, formID, stringQID = false) {\n let result = Object.keys(questions).map(questionNumber => {\n let question = questions[questionNumber];\n if (question.type) {\n question = Utils.parseJSONPropsForQuestion(question);\n question = Utils.extendQuestionWithDefaults(question);\n if (stringQID) {\n question.qid = question.qid.toString();\n }\n if (!question.name) {\n const { qid } = question;\n const name = Utils.makeQuestionName(question.text, qid, Object.values(questions));\n endpoints.updateFormQuestion({ formID, qid, prop: { name: name } });\n /* eslint-disable no-param-reassign */\n questions[questionNumber].name = name;\n /* eslint-enable no-param-reassign */\n }\n // BUGFIX #11327391 :: We need to transform pdfFields into the array in case it's an object.\n if (SMART_PDF_FORM_ARRAY_FIELD_TYPES.includes(question.type) && question.pdfDetails && question.pdfDetails.pdfFields) {\n question.pdfDetails.pdfFields = Array.isArray(question.pdfDetails.pdfFields)\n ? question.pdfDetails.pdfFields\n : Object.values(question.pdfDetails.pdfFields);\n }\n return question;\n }\n return undefined;\n });\n result = result.filter(q => q !== undefined);\n if (global.buildermode === 'card') { // or we can read this from ui reducer\n result = normalizeQuestionsForCardForm(result); // eslint-disable-line\n }\n result = result.reduce((o, v, i) => ({ ...o, [i]: v }), {});\n return result;\n}\n\nexport function fetchFormQuestions(formID) {\n return (dispatch, getState) => {\n dispatch({ type: types.FORM_QUESTIONS_FETCHING });\n // Look if questions available in window // refactor here\n if (global.__questionProps && typeof global.__questionProps === typeof {}) {\n if (global.__currentThemeInfo && typeof global.__currentThemeInfo === typeof {}) {\n dispatch({ type: types.THEME_FETCH_INFO, data: global.__currentThemeInfo });\n }\n const result = normalizeAllQuestions(global.__questionProps, formID);\n const { formProperties: { formOwnerName, formOwnerAccountType, products } } = getState();\n\n /* PAYMENT DATA HYGIENE */\n const paymentQuestion = Object.values(result).find(item => typeof item.paymentType !== 'undefined');\n PaymentUtils.checkPropsDataHygiene(paymentQuestion, formID);\n PaymentUtils.singleSelectRequiredValueFixDataHygiene(paymentQuestion, products, formID);\n if (paymentQuestion && paymentQuestion.paymentType === 'donation' && typeof products !== 'undefined') {\n endpoints.paymentDataHygieneTrigger(formID);\n }\n const isSquare = paymentQuestion && paymentQuestion.type === 'control_square' && !paymentQuestion.nameAPM;\n const _isReusableConnectionEnabled = isReusableConnectionEnabled()(dispatch, getState);\n if (_isReusableConnectionEnabled && isSquare) {\n const rawPaymentQuestion = Object.fromEntries(\n Object.entries(global.__questionProps).filter(([_, value]) => value.paymentType)\n )[paymentQuestion.qid];\n\n const noShowCardProp = typeof rawPaymentQuestion.showCard === 'undefined' || ['', 'No'].includes(rawPaymentQuestion.showCard);\n if (noShowCardProp) {\n endpoints.fixSquareAPMProps(formID);\n }\n }\n /* PAYMENT DATA HYGIENE */\n\n try {\n const specialProps = Object.entries(result).reduce((acc, curr) => {\n const specialProp = curr[1].special;\n return (specialProp && specialProp !== 'None' && !specialOptions[specialProp]?.value) ? [...acc, specialProp] : [...acc];\n }, []);\n if (specialProps.length) {\n Utils.logJotFormEvents('specialPropCheck', {\n actor: formOwnerName ? formOwnerName : 'admin',\n action: 'unexpectedSpecialProp',\n target: `${formID} -> ${JSON.stringify(specialProps)}`\n }, formOwnerAccountType);\n }\n } catch (e) {\n Utils.logJotFormEvents('specialPropCheck', {\n actor: formOwnerName ? formOwnerName : 'admin',\n action: 'unexpectedSpecialProp',\n target: `${formID} -> couldn't check special prop, ${e.message}`\n }, formOwnerAccountType);\n }\n global.__questionProps = undefined; // we need to clear its content\n dispatch({ type: types.FORM_QUESTIONS_FETCH_SUCCESS, questions: result });\n return;\n }\n\n endpoints.fetchFormQuestions(formID).then(resp => {\n if (!isUndefined(resp) && resp.responseCode === 401) {\n endpoints.fetchUser().then(res => {\n const userAccountType = res && res.content && res.content.account_type;\n const isLoggedInUser = userAccountType && userAccountType.name && userAccountType.name !== 'GUEST';\n const loc = isLoggedInUser ? '/myforms' : `/login?rp=${global.location.href}`;\n handleCustomNavigation(loc, '_self', !isLoggedInUser);\n });\n return;\n } if (isUndefined(resp) || isUndefined(resp.content)) {\n addMainLevelNotification({\n message: notificationMessages.ERROR_ON_INITIALIZING_TEXT,\n dismissible: false,\n backdrop: true,\n actions: notificationMessages.ERROR_RELOAD_BUTTON,\n uid: 'error_on_init',\n })(dispatch);\n }\n const { content } = resp;\n const result = normalizeAllQuestions(content, formID);\n dispatch({ type: types.FORM_QUESTIONS_FETCH_SUCCESS, questions: result });\n }).catch(err => {\n dispatch({ type: types.FORM_QUESTIONS_FETCH_ERROR, error: err });\n addMainLevelNotification({\n message: notificationMessages.ERROR_ON_FETCHING_QUESTIONS_TEXT,\n dismissible: false,\n backdrop: true,\n actions: notificationMessages.ERROR_RELOAD_BUTTON\n })(dispatch);\n });\n };\n}\n\n// Multiple update for form questions\nexport function updateMultipleFormQuestions(_props, saveToUndoStack = true, callApi = true, replace = false, dontSendRevision = false, instantUpdate = false) {\n return (dispatch, getState) => {\n const state = getState();\n const formID = state.formProperties.id;\n const { isOfflineModeEnabled } = state.ui;\n const props = Object.assign([], _props);\n remove(props, k => isUndefined(k)); // Remove undefined objects we couldn't not pass it to api\n dispatch({\n type: types.FORM_MULTIPLE_QUESTION_UPDATING, updatedQuestions: props, saveToUndoStack, instantUpdate\n });\n if (isOfflineModeEnabled === true) {\n return;\n }\n\n if (callApi) {\n const apiData = { formID, questions: props };\n if (replace) {\n apiData.replace = true;\n }\n if (dontSendRevision) {\n apiData.dontSendRevision = true;\n }\n return addToQueue(endpoints.updateMultipleFormQuestion, apiData, resp => {\n try {\n const responseObj = resp;\n if (isUndefined(responseObj) || !responseObj || !responseObj.content) {\n return errorPromise(() => {\n addNotification({\n message: notificationMessages.ERROR_ON_UPDATE_QUESTION_TEXT,\n dismissible: false,\n actions: notificationMessages.ERROR_RELOAD_BUTTON,\n level: 'error',\n backdrop: true\n })(dispatch, getState);\n });\n }\n const updatedQuestions = responseObj.content.questions;\n dispatch({ type: types.FORM_PROPERTY_UPDATING, prop: responseObj.content.formProperties, saveToUndoStack: false });\n if (replace) {\n const questions = normalizeAllQuestions(updatedQuestions, formID, true);\n dispatch({ type: types.FORM_MULTIPLE_QUESTION_REPLACE, questions });\n }\n dispatch({ type: types.FORM_MULTIPLE_QUESTION_UPDATE_SUCCESS, updatedQuestions });\n // eslint-disable-next-line no-use-before-define\n handleFormHeightChange()(dispatch, getState);\n return successPromise(updatedQuestions);\n } catch (E) {\n /* eslint-disable no-console */\n console.error('an error occured in updateMultipleFormQuestions', E);\n /* eslint-enable no-console */\n return errorPromise(() => {\n addNotification({\n message: notificationMessages.ERROR_ON_UPDATE_QUESTION_TEXT,\n dismissible: false,\n actions: notificationMessages.ERROR_RELOAD_BUTTON,\n level: 'error',\n backdrop: true\n })(dispatch, getState);\n });\n }\n }, err => {\n dispatch({ type: types.FORM_MULTIPLE_QUESTION_UPDATE_ERROR, error: err });\n networkCallFailed(notificationMessages.ERROR_ON_UPDATE_QUESTION_TEXT)(dispatch, getState);\n })(dispatch, getState);\n }\n dispatch({ type: types.FORM_MULTIPLE_QUESTION_UPDATE_SUCCESS, props });\n };\n}\n\nexport function fetchServerPaymentList() {\n return dispatch => {\n endpoints.fetchServerPaymentList('/API/form/payment/server-gateway-list').then(resp => {\n const { content, responseCode, message } = resp;\n if (responseCode === 200) {\n dispatch({ type: types.SERVER_PAYMENTS_FETCH_SUCCESS, data: content });\n } else {\n throw new Error(message);\n }\n }).catch(err => {\n console.error(err);\n });\n };\n}\n\nexport function fetchBuilderCustomizationStatus() {\n return dispatch => {\n endpoints.fetchServerBuilderCustomizationStatus('/API/enterprise-dashboard/server/customization/product/builder').then(resp => {\n const { content, responseCode, message } = resp;\n if (responseCode === 200) {\n dispatch({ type: types.SERVER_BUILDER_CUSTOMIZATION_STATUS_FETCH_SUCCESS, data: content });\n } else {\n throw new Error(message);\n }\n }).catch(err => {\n console.error(err);\n });\n };\n}\n\nexport function fetchWidgets(username) {\n return (dispatch, getState) => {\n const { isComingFromJotFormMobile, isPDFImporter } = getState().ui;\n // const url = `https://apps.jotform.com/apps/widgetlist/?username=${username}`;\n let developerName = username;\n if (developerName.endsWith('.store')) {\n developerName += '.json';\n }\n\n // I have no idea if we have another case...\n const baseUrl = '/API';\n const url = `${baseUrl}/apw/get-all/${developerName}${isPDFImporter ? '?builderType=PDFImporter' : ''}`;\n endpoints.fetchWidgets(url).then(resp => {\n if (resp) {\n // let widgetArr = resp || [];\n let widgetArr = resp.content || [];\n const widgetMap = {};\n const result = [];\n const imageCacheList = [];\n if (isComingFromJotFormMobile || global.isComingFromJotFormNext === 1) { // Change order of widgets on mobile\n const jotformNextFirstWidgetIds = [\n '529c8286a75dae5e7f000006', // take photo\n '5379f8c6d6aa82306500000a',\n '5343b614d5f416b42a000005',\n '5297188631357d390700000e',\n '5c07848f6cca57972900001a',\n '529d600cab9d379a4c000007', // qr code\n '528c8b8186659c5616000005',\n '529467003477f35120000020',\n '529cb089728b3bc46f000005',\n '535a49d40a05fdff5200002c',\n ];\n const jotformNextFirstWidget = jotformNextFirstWidgetIds.map(id => {\n return widgetArr.find(p => p._id === id);\n }).filter(a => a);\n widgetArr = widgetArr.filter(w => jotformNextFirstWidgetIds.indexOf(w._id) === -1);\n widgetArr = [...jotformNextFirstWidget, ...widgetArr];\n }\n\n widgetArr.forEach(p => {\n if (!(p._id in widgetMap)) {\n widgetMap[p._id] = 1;\n if (imageCacheList.length < 21 && p.details && p.details.smallImage) {\n imageCacheList.push(p.details.smallImage);\n }\n result.push(p);\n }\n });\n cacheImageUrls(imageCacheList); // Cache first 20 widget's image\n dispatch({ type: types.WIDGET_FETCH_SUCCESS, data: result });\n }\n }).catch(err => {\n console.log('an error happened in fetch cdn config method ', err); // eslint-disable-line\n addMainLevelNotification({\n message: notificationMessages.ERROR_ON_INITIALIZING_WIDGETS_TEXT,\n actions: notificationMessages.ERROR_RELOAD_BUTTON,\n uid: 'error_on_init_widget'\n })(dispatch, getState);\n });\n };\n}\n\n// This is not an action creator actually\n// TODO:: find a better place for this.\nexport function fetchDictionary(code, dispatch) {\n if (Object.keys(Translations.dictionaries).includes(code)) {\n dispatch({ type: types.USER_LANGUAGE_FETCH_SUCCESS });\n return;\n }\n\n endpoints.fetchDictionary(code).then(resp => {\n const jsonString = resp.responseText.replace('Locale.language=', '');\n const dictionary = Utils.parseJSON(jsonString);\n // remove untranslated keys\n const clearedDic = Object.keys(dictionary).reduce((dic, key) => {\n const entry = dictionary[key];\n if (!entry) {\n return dic;\n }\n return Object.assign(dic, { [key]: entry });\n }, {});\n if (dictionary) {\n Translations.add(code, clearedDic);\n dispatch({ type: types.USER_LANGUAGE_FETCH_SUCCESS });\n }\n }).catch(err => {\n console.log('an error happened in `fetchDictionary` method ', err); // eslint-disable-line\n });\n}\n\n// This is not an action creator actually\n// TODO:: find a better place for this.\nexport function fetchProcessingList(code) {\n endpoints.fetchProcessingList(code).then(resp => {\n // If untranslated strings found and is an array\n if (Array.isArray(resp.untranslatedStrings)) {\n // Update processed list with strings that are already in the translation process\n Translations.updateProcessedStrings(code, resp.untranslatedStrings.map(obj => obj.original));\n }\n }).catch(err => {\n console.log('an error happened in `fetchProcessingList` method ', err); // eslint-disable-line\n });\n}\n\nexport function displaySignupPrompt(show, subtitle, showSlides, onUserLogin, appName, buttonNames) {\n return (dispatch, getState) => {\n const isWorkflow = getState().ui.isInsideWorkflowBuilder;\n if (isWorkflow && global.parent !== global) {\n // Workflow builder will handle signup with its own way\n global.parent.postMessage(JSON.stringify({\n event: 'show-signup-modal',\n }), '*');\n return;\n }\n dispatch({\n type: types.UI_DISPLAY_SIGNUP_PROMPT, show, subtitle, showSlides, onUserLogin, appName, buttonNames\n });\n };\n}\n\nexport function makeSignupPromptClosable(closable) {\n return { type: types.UI_CANCLOSE_SIGNUP_PROMPT, closable };\n}\n\nexport function setVariableForCasperJSCrawler() {\n if (global.document.URL.indexOf('#casperJS:') > 0) {\n const hash = global.location.hash.split(':');\n if (hash.length > 0) {\n global.window.casperjsTestDomParam = hash[1];\n }\n }\n}\n\nexport function fetchEmailSettings(formID) {\n return dispatch => {\n const iak = getApiKeyFromUrl();\n const fetchSenderEmailListPromise = endpoints.fetchSenderEmailList(formID, iak);\n fetchSenderEmailListPromise.then(resp => {\n const senderEmailsList = {\n addNewButton: resp.content.addNewButton,\n smtpConfigs: resp.content.smtpConfigs\n };\n dispatch({ type: types.EMAIL_SETTINGS_FETCH_SUCCESS, senderEmailsList });\n }).catch(err => {\n dispatch({ type: types.EMAIL_SETTINGS_FETCH_ERROR, error: err });\n });\n };\n}\n\nexport function fetchUser(formID, callback) {\n return (dispatch, getState) => {\n return new Promise((resolve, reject) => {\n dispatch({ type: types.USER_PROPERTIES_FETCHING });\n // If test api key detected, send demo user to avoid data manupulation in db\n const iak = getApiKeyFromUrl();\n if (iak && isTestingUser(iak)) {\n const testingUser = {\n username: 'jotform_testing_this_is_in_v4_actions',\n name: null,\n email: null,\n website: null,\n time_zone: null,\n usage: {\n api: 10,\n form_count: 20,\n payments: 10,\n ssl_submissions: 10,\n submissions: 0,\n total_submissions: 0,\n uploads: 100,\n views: 1000,\n },\n account_type: {\n name: 'GUEST',\n limits: {\n submissions: 10,\n overSubmissions: 20,\n sslSubmissions: 10,\n payments: 10,\n uploads: 104857600,\n tickets: 0,\n subusers: 0,\n 'api-daily-limit': 100,\n views: 1000,\n formCount: 5\n },\n prices: {\n monthly: 0,\n yearly: 0,\n biyearly: 0\n },\n plimusIDs: {\n monthly: 0,\n yearly: 0,\n biyearly: 0\n }\n },\n status: 'ACTIVE',\n created_at: '2017-03-24 05:49:31',\n updated_at: '2017-03-24 05:49:31',\n is_verified: 0,\n v4: 1\n };\n dispatch({ type: types.USER_LANGUAGE_FETCH_SUCCESS });\n dispatch({ type: types.USER_PROPERTIES_FETCH_SUCCESS, user: testingUser });\n Socket.enableMockSocket();\n resolve(testingUser);\n if (callback) {\n callback();\n }\n return;\n }\n // END Mock user\n dispatch(fetchEmailSettings(formID));\n const fetchUserPromise = endpoints.fetchUser(formID);\n fetchUserPromise.then(resp => {\n if (isUndefined(resp) || isUndefined(resp.content)) {\n addMainLevelNotification({\n message: notificationMessages.ERROR_ON_INITIALIZING_TEXT,\n dismissible: false,\n backdrop: true,\n actions: notificationMessages.ERROR_RELOAD_BUTTON,\n uid: 'error_on_init',\n })(dispatch);\n Socket.enableMockSocket();\n return;\n }\n if (resp.content.username === 'translation_zombie') {\n setVariableForCasperJSCrawler();\n }\n\n const { user, form, formProperties: { owner } } = getState();\n const { language: nextLanguage = null, isFormBuilderNewShare = false } = resp.content;\n\n // Toggle the new share flows if the user is allowed to access them.\n if (isFormBuilderNewShare) {\n featureFlag.toggleFeature(featureFlag.getList().FORM_BUILDER_NEW_SHARE);\n }\n\n if (nextLanguage && nextLanguage !== 'en-US' && user.language !== nextLanguage) {\n if (resp.content.username === 'translation_zombie') {\n fetchProcessingList('crawler');\n } else {\n fetchProcessingList(nextLanguage);\n }\n if (resp.content.username === 'translation_approve') {\n fetchDictionary('coverage', dispatch);\n } else {\n fetchDictionary(nextLanguage, dispatch);\n }\n } else {\n dispatch({ type: types.USER_LANGUAGE_FETCH_SUCCESS });\n }\n\n // If API sends apiDemo user, we need to reload page to get real user.\n if (resp.content.username === 'guest_apiDemo') {\n global.location.reload();\n return;\n }\n // Check if user is the owner of the form or not, it will be used for checking form limits\n const isFormOwner = resp.content?.username === form.username;\n dispatch({ type: types.USER_PROPERTIES_FETCH_SUCCESS, user: { ...resp.content, isFormOwner } });\n resolve(resp.content);\n if (callback) {\n callback();\n }\n\n const { account_type: { name: accountTypeName = '' } = {} } = resp.content;\n\n // Get the widgets of the form's owner, which may differ\n // from the current user in case of collaboration.\n fetchWidgets(owner)(dispatch, getState);\n\n if (isEnterprise()) {\n fetchServerPaymentList()(dispatch);\n // It is already not working, the endpoint returning 403. I commented this by asking Culban.\n if (accountTypeName === 'ADMIN') {\n fetchBuilderCustomizationStatus()(dispatch);\n }\n }\n // Open signup modal if has parameter '#openSignupModal'\n if (global.location.href.match(/#openSignupModal/) !== null && accountTypeName === 'GUEST') {\n dispatch(displaySignupPrompt(true));\n }\n }).catch(err => {\n dispatch({ type: types.USER_PROPERTIES_FETCH_ERROR, error: err });\n reject(err);\n addMainLevelNotification({\n message: notificationMessages.ERROR_ON_FETCHING_USER_TEXT,\n dismissible: false,\n backdrop: true,\n actions: notificationMessages.ERROR_RELOAD_BUTTON\n })(dispatch);\n });\n });\n };\n}\n\nexport function initUsersReducer(data) {\n return (dispatch, getState) => {\n const { user } = getState();\n const currentUser = find(data, u => u.username === user.username);\n if (isUndefined(currentUser)) {\n if (Socket.Config.formID && Socket.Config.user) {\n Socket.joinRoom();\n }\n } else {\n dispatch({ type: types.USERS_REDUCER_INIT, state: data });\n }\n };\n}\n\nexport function initQuestionsReducer(data) {\n return dispatch => {\n dispatch({ type: types.QUESTIONS_REDUCER_INIT, state: data.questions });\n };\n}\n\nexport function showUndoLastActionNotification(message, uniquekey = 0) {\n return (dispatch, getState) => {\n addNotification({\n uid: `UI_UNDO_LAST_ACTION_NOTIFICATION_${uniquekey}`,\n message: message,\n actions: [(\n {\n removeNotification(`UI_UNDO_LAST_ACTION_NOTIFICATION_${uniquekey}`)(dispatch, getState);\n handleUndo()(dispatch, getState); // eslint-disable-line\n }}\n >\n {t('Undo')}\n \n )],\n level: 'info',\n autoDismiss: 6,\n dismissible: true,\n })(dispatch, getState);\n };\n}\n\nexport function fetchIsAllowedToZoomWidget() {\n return dispatch => {\n return new Promise((resolve, reject) => {\n dispatch({ type: types.FETCH_ALLOWED_ZOOM_WIDGET });\n endpoints.fetchIsAllowedToZoomWidget().then(resp => {\n resolve(resp);\n return;\n }).catch(error => {\n reject(error);\n });\n });\n };\n}\n\nexport function fetchCDNConfig() {\n return (dispatch, getState) => {\n endpoints.fetchCDNConfig('/server.php?action=getConfigs').then(resp => {\n const j = resp;\n if (isUndefined(j) || !j) {\n addMainLevelNotification({\n message: notificationMessages.ERROR_ON_INITIALIZING_TEXT,\n uid: 'error_on_init',\n actions: notificationMessages.ERROR_RELOAD_BUTTON\n })(dispatch, getState);\n return; // TO DO : IF api call fails, send a notification to user and add question to staged\n }\n dispatch({ type: types.CDN_CONFIG_FETCH_SUCCESS, value: Object.assign(j.configs, { CDN: j.configs.cloudURL.length === 0 ? '/' : j.configs.cloudURL }) });\n }).catch(err => {\n console.log('an error happened in fetch cdn config method ', err); // eslint-disable-line\n addMainLevelNotification({\n message: notificationMessages.ERROR_ON_INITIALIZING_TEXT,\n uid: 'error_on_init',\n actions: notificationMessages.ERROR_RELOAD_BUTTON\n })(dispatch, getState);\n });\n };\n}\n\n/**\n * Form Reducer\n */\nexport function fetchFormInfo(formID) {\n return (dispatch, getState) => {\n // if data is available on window, dont' fetch from network\n if (global.__formInfo && typeof global.__formInfo === typeof {}) {\n dispatch({\n type: types.FORM_FETCH_INFO,\n form_id: formID,\n data: global.__formInfo\n });\n return;\n }\n endpoints.fetchSubmissionCount(formID).then(resp => {\n let data = resp;\n if (isUndefined(data) || !data || !data.content) {\n addMainLevelNotification({\n message: notificationMessages.ERROR_ON_INITIALIZING_TEXT,\n dismissible: false,\n backdrop: true,\n uid: 'error_on_init',\n actions: notificationMessages.ERROR_RELOAD_BUTTON\n })(dispatch, getState);\n return; // TO DO : IF api call fails, send a notification to user and add question to staged\n }\n data = data.content;\n dispatch({\n type: types.FORM_FETCH_INFO,\n form_id: formID,\n data\n });\n }).catch(() => {\n addMainLevelNotification({\n message: notificationMessages.ERROR_ON_INITIALIZING_TEXT,\n dismissible: false,\n backdrop: true,\n uid: 'error_on_init',\n actions: notificationMessages.ERROR_RELOAD_BUTTON\n })(dispatch);\n });\n };\n}\n\n// check prop and set curent values before update if it is object\n// Ex: when updating sublabel.first we must set sublabel.last too.\n// Or Check the values is seperated by pipe ex. update checkbox option 2\nfunction setCurrentValues(qid, _prop, _questions, isDeleteOperation) {\n const seperator = '|';\n const newProps = { ..._prop };\n const questions = JSON.parse(JSON.stringify(_questions));\n const propKeys = Object.keys(_prop);\n const question = find(questions, q => q.qid === qid);\n propKeys.forEach(key => {\n if ((isObject(_prop[key]) && !isArray(_prop[key]))) { // check value if object\n if (!isDeleteOperation) {\n newProps[key] = question ? question[key] : undefined;\n // initialize the destination if not an object\n // this is for widget paramChunks prop\n if (!isObject(newProps[key])) {\n newProps[key] = {};\n }\n Object.keys(_prop[key]).forEach(subkey => {\n newProps[key][subkey] = _prop[key][subkey]; // get current values\n });\n }\n } else if (question) {\n if (key.split(seperator).length === 2) { // check if value has seperator\n const arr = key.split(seperator); // split by pipe\n const exactKey = arr[0]; // get key\n const value = _prop[key];\n const order = arr[1]; // get which option (ex checkbox 2. option)\n if (question.type === 'control_imagechoice' || (question.type === 'control_matrix' && (exactKey === 'dcolumns' || exactKey === 'drows'))) {\n if (value || question.type === 'control_imagechoice') {\n question[exactKey][order].text = value;\n newProps[exactKey] = question[exactKey];\n }\n } else {\n const questionCurrentValues = question[exactKey].split(seperator); // get current values\n if (questionCurrentValues.length > order) {\n questionCurrentValues[order] = value; // update 2. option by new value\n }\n newProps[exactKey] = questionCurrentValues.filter(p => p || (question?.inputType === 'Emoji Slider' && p === '')).join(seperator); // assign to props, filled values are filtered no empty entry accepted\n }\n } else if (key.split(seperator).length === 3 && question.type !== 'control_imagechoice') {\n // || pattern means : we insert a value to array\n const [fieldName, , index] = key.split(seperator);\n const valueArr = question[fieldName].split(seperator);\n valueArr[index] = _prop[key];\n valueArr.splice(parseInt(index, 10) + 1, 0, '');\n newProps[fieldName] = valueArr.join(seperator);\n delete newProps[key];\n } else if (key.split(seperator).length === 4 && question.type !== 'control_imagechoice') {\n // ||| pattern means : we remove value\n const [fieldName, , , index] = key.split(seperator);\n const valueArr = question[fieldName].split(seperator);\n valueArr.splice(index, 1);\n newProps[fieldName] = valueArr.join(seperator);\n } else if (key === 'options' && propKeys.indexOf('selected') === -1 && question.type !== 'control_imagechoice') { // If options parameter will be updated and any selected property update is not scheduled\n // Get question\n // If question is dropdown and has a selected value\n if (question && question.type === 'control_dropdown' && question.selected) {\n // If selected value does not exist in options anymore\n if (_prop[key].split('|').indexOf(question.selected) === -1) {\n newProps.selected = '';\n }\n }\n }\n }\n });\n return newProps;\n}\n\n// START Collaboration - Socket actions\nexport function createQuestionWS(question) {\n return dispatch => {\n dispatch({ type: types.FORM_QUESTION_CREATED_WS, question });\n };\n}\n\nexport function updateQuestionWS(qid, question) {\n return dispatch => {\n dispatch({ type: types.FORM_QUESTION_UPDATED_WS, qid, question });\n };\n}\nexport function updateMultipleQuestionWS(questions) {\n return dispatch => {\n dispatch({ type: types.FORM_MULTIPLE_QUESTION_UPDATED_WS, questions });\n };\n}\nexport function deleteQuestionWS(qid) {\n return dispatch => {\n dispatch({ type: types.FORM_QUESTION_DELETED_WS, qid });\n };\n}\nexport function deleteMultipleQuestionWS(questionIDList) {\n return dispatch => {\n dispatch({ type: types.FORM_MULTIPLE_QUESTION_DELETED_WS, questionIDList });\n };\n}\nexport function createMultipleQuestionWS(questions) {\n return dispatch => {\n dispatch({ type: types.FORM_MULTIPLE_QUESTION_CREATED_WS, questions });\n };\n}\n\nexport function syncRevisionRevertedWS(formID) {\n return (dispatch, getState) => {\n postRevertActions(formID, dispatch, getState, true);\n };\n}\n\nexport function updateFormPropertyWS(prop) {\n return dispatch => {\n dispatch({ type: types.FORM_PROPERTY_UPDATED_WS, prop });\n };\n}\n\nexport function fetchFormTokens() {\n return (dispatch, getState) => {\n const formID = getState().formProperties.id;\n return endpoints.fetchFormTokens(formID);\n };\n}\n\nexport function getNewToken() {\n return (dispatch, getState) => {\n const formID = getState().formProperties.id;\n return endpoints.getNewToken(formID).then(resp => {\n dispatch({ type: types.UI_SET_COLLABORATION_TOKEN, token: resp.content.token });\n });\n };\n}\n\nexport function regenerateCollaborationToken() {\n return (dispatch, getState) => {\n const formID = getState().formProperties.id;\n return endpoints.regenerateCollaborationToken(formID)\n .then(resp => {\n dispatch({ type: types.UI_SET_COLLABORATION_TOKEN, token: resp.content.token });\n });\n };\n}\n\nexport function deleteToken(token) {\n return (dispatch, getState) => {\n const formID = getState().formProperties.id;\n return endpoints.deleteToken(formID, token);\n };\n}\n\n// END Collaboration actions\n// @replace => replaces question with given question if sets to true\nexport function saveFormQuestion(qid, _prop, replace = false, questionsProvided = null, isDeleteOperation = false) {\n return (dispatch, getState) => {\n if (isUndefined(_prop)) {\n return;\n }\n const state = getState();\n const formID = state.formProperties.id;\n const questions = questionsProvided || state.questions || {};\n const questionToSave = find(questions, p => p.qid === qid);\n let filledProp = setCurrentValues(qid, { ..._prop }, questions, isDeleteOperation);\n\n // eslint-disable-next-line no-use-before-define\n filledProp = updateCalculationValuesIfNecessary(filledProp, questionToSave);\n\n return addToQueue(endpoints.updateFormQuestion, {\n formID, qid, prop: filledProp, replace, questionToSave\n }, resp => {\n try {\n const responseObj = resp;\n if (!isUndefined(responseObj) && responseObj.responseCode === 401) {\n handleCustomNavigation(`/login?rp=${global.location.href}`, '_self', true);\n return;\n } if (isUndefined(responseObj) || !responseObj || !responseObj.content) {\n return errorPromise(() => {\n addNotification({\n message: notificationMessages.ERROR_ON_UPDATE_QUESTION_TEXT,\n dismissible: false,\n actions: notificationMessages.ERROR_RELOAD_BUTTON,\n level: 'error',\n backdrop: true\n })(dispatch, getState);\n });\n }\n const { question, updatedReminderEmails } = responseObj.content;\n if (responseObj.content.formProperties && !isEmpty(responseObj.content.formProperties)) {\n dispatch({ type: types.FORM_PROPERTY_UPDATING, prop: responseObj.content.formProperties || {}, saveToUndoStack: false });\n }\n dispatch({\n type: types.FORM_QUESTION_UPDATE_SUCCESS,\n qid,\n question\n });\n if (Array.isArray(updatedReminderEmails) && updatedReminderEmails.length > 0 && updatedReminderEmails.every(val => !val)) {\n fetchFormQuestions(formID)(dispatch, getState);\n }\n // eslint-disable-next-line no-use-before-define\n handleFormHeightChange()(dispatch, getState);\n return successPromise(question);\n } catch (E) {\n return errorPromise(() => {\n addNotification({\n message: notificationMessages.ERROR_ON_UPDATE_QUESTION_TEXT,\n dismissible: false,\n actions: notificationMessages.ERROR_RELOAD_BUTTON,\n level: 'error',\n backdrop: true\n })(dispatch, getState);\n });\n }\n }, err => {\n networkCallFailed(notificationMessages.ERROR_ON_UPDATE_QUESTION_TEXT)(dispatch, getState);\n dispatch({ type: types.FORM_QUESTION_UPDATE_ERROR, error: err });\n })(dispatch, getState);\n };\n}\n\nfunction updateCalculationValuesIfNecessary(filledProp, question) { // sync the order of calculation values with drop-down options\n // handling empty option on dropdowns\n const offsetValue = question.type === 'control_dropdown' ? 1 : 0;\n\n if (!(question.calcValues && typeof question.options === 'string' && typeof filledProp.options === 'string')) return filledProp;\n\n const prevOpts = question.options.split('|');\n const newOpts = filledProp.options.split('|');\n\n let updatedCalcValues = { calcValues: question.calcValues };\n\n if (newOpts.length > prevOpts.length) { // if new options are added, create new spaces in calculation values\n let newOptIndex = null;\n for (let i = 0; i < prevOpts.length; i++) {\n if (prevOpts[i] !== newOpts[i]) {\n newOptIndex = i;\n break;\n }\n }\n if (typeof newOptIndex === 'number') {\n const newCalcValues = question.calcValues.split('|');\n const emptyElements = new Array(newOpts.length - prevOpts.length);\n emptyElements.fill('');\n newCalcValues.splice(newOptIndex + offsetValue, 0, ...emptyElements);\n updatedCalcValues = { calcValues: newCalcValues.join('|') };\n }\n } else if (newOpts.length < prevOpts.length) { // if some options are removed, remove the corresponding calculation values\n let removedOptIndex = null;\n for (let i = 0; i < newOpts.length; i++) {\n if (prevOpts[i] !== newOpts[i]) {\n removedOptIndex = i;\n break;\n }\n }\n if (typeof removedOptIndex === 'number') {\n const newCalcValues = question.calcValues.split('|');\n newCalcValues.splice(removedOptIndex + offsetValue, prevOpts.length - newOpts.length);\n updatedCalcValues = { calcValues: newCalcValues.join('|') };\n }\n }\n return { ...filledProp, ...updatedCalcValues };\n}\n\n// TO-DO : Add revert question option on error.\n// if @replace parameters is true, api will delete question and re-add with request data.\nexport function updateFormQuestion(qid, _prop, saveToUndoStack = true, callApi = true, replace = false, isDeleteOperation = false, stringified = false) {\n return (dispatch, getState) => {\n if (isUndefined(_prop)) {\n return;\n }\n const prop = { ..._prop };\n // We can not update qid! please dont remove it it is for widgets.\n delete prop.qid;\n const state = getState();\n const questions = JSON.parse(JSON.stringify(state.questions)) || [];\n const { isOfflineModeEnabled } = state.ui;\n const question = find(questions, q => q.qid === qid);\n\n if (question) {\n let filledProp = setCurrentValues(qid, prop, questions, isDeleteOperation);\n filledProp = updateCalculationValuesIfNecessary(filledProp, question);\n\n dispatch({\n type: types.FORM_QUESTION_UPDATING,\n qid,\n question: stringified ? Utils.parseJSONPropsForQuestion(filledProp) : filledProp,\n saveToUndoStack\n });\n\n const isTempQuestion = _prop.isTempQuestion === true || question.isTempQuestion === true;\n\n if (isTempQuestion) {\n return dispatch({\n type: types.FORM_STAGED_QUESTION_SAVE,\n qid,\n prop: stringified ? Utils.parseJSONPropsForQuestion(filledProp) : filledProp,\n });\n }\n if (isOfflineModeEnabled === true) {\n return;\n }\n\n if (callApi) {\n return saveFormQuestion(qid, filledProp, replace, questions, isDeleteOperation)(dispatch, getState);\n }\n dispatch({\n type: types.FORM_PROPERTY_UPDATE_SUCCESS,\n });\n }\n };\n}\n\nexport function updateQuestionPropertiesActiveTab(tab) {\n return (dispatch, getState) => {\n const { questionPropertiesActiveTab } = getState().ui;\n if (questionPropertiesActiveTab !== tab) {\n dispatch({ type: types.UI_UPDATE_QUESTION_PROPERTIES_TAB, tab });\n }\n };\n}\n\nexport function updateQuestionPropertiesActivePanel(panel) {\n return (dispatch, getState) => {\n const { questionPropertiesActivePanel } = getState().ui;\n if (questionPropertiesActivePanel !== panel) {\n dispatch({ type: types.UI_UPDATE_QUESTION_PROPERTIES_PANEL, panel });\n }\n };\n}\n\nexport function updateSelectedQuestionOriginal(_qid, force = true, extraParams = {}) {\n return (dispatch, getState) => {\n const state = getState();\n const { selectedQuestions } = state.ui;\n if (selectedQuestions.length > 0 && !force) {\n return;\n }\n const { username } = state.user;\n const { users } = state;\n const qid = _qid ? _qid.toString() : _qid;\n\n dispatch({\n type: types.UI_UPDATE_SELECTED_QUESTION, questionID: qid, username, ...extraParams\n });\n if (!isUndefined(users) && isArray(users) && users.length > 1) {\n Socket.updateSelectedQuestion(state.user, qid);\n }\n const isPaymentQuestion = state.questions.find(q => q.qid === _qid) && state.questions.find(q => q.qid === _qid).paymentType;\n if (isPaymentQuestion && isReusableConnectionEnabled()(dispatch, getState)) {\n updateQuestionPropertiesActiveTab('paymentGeneral')(dispatch, getState);\n return;\n }\n updateQuestionPropertiesActiveTab('general')(dispatch, getState);\n };\n}\n\nfunction updateSelectedQuestionPDFImporter(_qid, force = true, extraParams = {}) {\n return (dispatch, getState) => {\n const lExtraParams = {\n ...extraParams,\n pinnedAnnotations: getPinnedAnnotations(getState())\n };\n updateSelectedQuestionOriginal(_qid, force, lExtraParams)(dispatch, getState);\n\n const aQID = getOr(null, 'pdfImport.selectedFormField.qid', getState());\n\n // Limit unselection of selectedAnnotation/selectedFormField on certain conditions when selected question changed\n if (aQID !== _qid) {\n setAnnotationSelection([])(dispatch, getState);\n setSelectedField({\n rect: [],\n fieldName: null,\n fieldId: null,\n labelId: null,\n fieldValue: null,\n qid: null,\n questionType: null,\n fieldType: null,\n mappedAnnotations: [],\n pinnedAnnotations: [],\n connectField: false,\n order: null,\n timeFormat: null\n })(dispatch, getState);\n }\n };\n}\n\nexport function updateSelectedQuestion(_qid, force = true, extraParams = {}) {\n return (dispatch, getState) => {\n const { ui } = getState();\n const {\n selectedQuestionId, selectedQuestions, isPDFImporter\n } = ui;\n const qid = _qid ? _qid.toString() : _qid;\n if (selectedQuestions.length !== 0 || selectedQuestionId !== qid) {\n if (isPDFImporter) {\n updateSelectedQuestionPDFImporter(_qid, force, extraParams)(dispatch, getState);\n } else {\n updateSelectedQuestionOriginal(_qid, force, extraParams)(dispatch, getState);\n }\n }\n };\n}\n\n// If qid is selected, deselects neither selects question.\nexport function updateMultipleSelectedQuestions(qid, _qidList, append = false) {\n return (dispatch, getState) => {\n let qidList = _qidList;\n const { showMultiSelectCheckboxes } = getState().ui;\n if (_qidList && typeof _qidList === typeof [] && _qidList.length > 0) {\n qidList = uniq(qidList);\n }\n if (qidList && typeof qidList === typeof [] && qidList.length === 1 && !showMultiSelectCheckboxes) { // If list has just one question, no need to select multiple\n return updateSelectedQuestion(qidList[0])(dispatch, getState);\n }\n dispatch({\n type: types.UI_UPDATE_MULTISELECT_QUESTIONS, qid, qidList, append\n });\n };\n}\n\nexport function setMultipleSelectDirection(direction) {\n return (dispatch, getState) => {\n const { multiSelectDirection } = getState().ui;\n if (multiSelectDirection !== direction) {\n dispatch({ type: types.UI_SET_MULTISELECT_DIRECTION, direction });\n }\n };\n}\n\nexport function selectQuestionRange(qidLast, qidFirst) {\n return (dispatch, getState) => {\n let start = qidFirst;\n const end = qidLast;\n const { questions } = getState();\n if (isUndefined(start)) { // If startin qid is not defined lets find it\n const { selectedQuestionId, selectedQuestions, multiSelectDirection } = getState().ui;\n if (selectedQuestionId) {\n start = selectedQuestionId;\n } else if (selectedQuestions && selectedQuestions.length > 0) {\n start = multiSelectDirection === 'down' ? selectedQuestions[0] : selectedQuestions[selectedQuestions.length - 1];\n } else {\n start = questions && questions[0] ? questions[0].qid : 0;\n }\n }\n // Let select range\n const startIndex = findIndex(questions, q => q.qid === start.toString());\n const endIndex = findIndex(questions, q => q.qid === end.toString());\n let qidList;\n if (startIndex <= endIndex) {\n qidList = questions.slice(startIndex, endIndex + 1).map(q => { return q.qid; });\n setMultipleSelectDirection('down')(dispatch, getState);\n } else {\n qidList = questions.slice(endIndex, startIndex + 1).map(q => { return q.qid; });\n setMultipleSelectDirection('up')(dispatch, getState);\n }\n updateMultipleSelectedQuestions(undefined, qidList)(dispatch, getState);\n };\n}\n\nconst isEligibleForAB = () => {\n const searchParamsURL = new URLSearchParams(global.window.location.search);\n return searchParamsURL.get('siriusab') === '1';\n};\n\n/* eslint-disable no-use-before-define */\n/**\n * creates a new question object which will be directly rendering on stage\n * will assign a temporary id temp${counter}\n * and extend with defaults\n *\n * @param {[type]} {\n * type: required,\n * qid: optional\n * }\n * @param {[type]} dispatch [description]\n * @param {[type]} order [description]\n */\nfunction createQuestion(question = {}, dispatch, getState, order, saveToUndoStack, questions, isForceRightPanel = true) {\n const isCardForm = global.buildermode === 'card';\n const isNewDefaultTheme = getState && typeof getState === 'function' ? getState().formProperties.defaultTheme : 'v1';\n const { isPaymentStoreInBasicFields } = question;\n const { user, formProperties } = getState();\n // question being created with click\n // TODO: change this so that question will never come without qid\n const extendedQuestion = Utils.extendQuestionWithDefaults(question, isNewDefaultTheme, user);\n // const tempID = `temp${counter}`; // BERKAY\n const lastQuestionID = getState && typeof getState === 'function' ? getState().formProperties.lastQuestionID : false;\n const tempID = question.prevQid === undefined ? generateNewQid(questions, lastQuestionID) : question.prevQid;\n const newQuestion = { qid: tempID.toString(), ...extendedQuestion };\n newQuestion.order = newQuestion.order || order;\n newQuestion.isTempQuestion = true;\n newQuestion.name = Utils.makeQuestionName(newQuestion.text, tempID, questions); // Set question name for api\n\n if (isPaymentStoreInBasicFields === true || isPaymentStoreInBasicFields === '1') {\n newQuestion.isPaymentStoreInBasicFields = true;\n }\n\n if (newQuestion.type === 'control_datetime') {\n // Translation for months/days names\n const months = (newQuestion.months && typeof newQuestion.months === 'string') ? newQuestion.months.split('|').map(p => p.locale()) : [];\n const days = (newQuestion.days && typeof newQuestion.days === 'string') ? newQuestion.days.split('|').map(p => p.locale()) : [];\n newQuestion.months = months.join('|');\n newQuestion.days = days.join('|');\n newQuestion.today = newQuestion.today.locale();\n\n // To avoid confusion on submission page which is caused by dynamic presentation format of date field\n if (isCardForm) {\n newQuestion.format = 'yyyymmdd';\n }\n }\n\n if (newQuestion.type === 'control_birthdate') {\n // Translation for months names\n const months = newQuestion.months ? newQuestion.months.map(p => p.locale()) : [];\n newQuestion.months = months;\n\n // To avoid confusion on submission page which is caused by dynamic presentation format of date field\n if (isCardForm) {\n newQuestion.format = 'yyyymmdd';\n }\n }\n\n if (newQuestion.type === 'control_address') {\n if (isCardForm) {\n newQuestion.hasAutocomplete = 'No';\n }\n\n if (\n global.JOTFORM_ENV === 'ENTERPRISE'\n && typeof global.CUSTOMIZED_CONFIGS === 'object'\n && typeof global.CUSTOMIZED_CONFIGS.CUSTOM_FIELD_SETTINGS === 'object'\n ) {\n const { address: { states: defaultState = '' } = {} } = global.CUSTOMIZED_CONFIGS.CUSTOM_FIELD_SETTINGS;\n if (defaultState) {\n newQuestion.states = defaultState;\n }\n }\n }\n\n if (isCardForm && newQuestion.type === 'control_textarea') {\n newQuestion.mde = 'Yes';\n }\n\n if (isCardForm && newQuestion.type === 'control_captcha') {\n newQuestion.text = 'Please verify that you are human';\n }\n\n if (newQuestion.type === 'control_captcha' && global.window.JOTFORM_ENV !== 'ENTERPRISE' && isCardForm !== 'true') {\n newQuestion.captchaType = 'hCaptcha';\n }\n\n // Later, we may need to check if the `order` is `string`\n if (isNewDefaultTheme && !isCardForm && newQuestion.type === 'control_head' && newQuestion.order === 1) {\n newQuestion.headerType = 'Large';\n }\n\n if (formProperties.isHIPAA === '1') {\n newQuestion.protected = 'Yes';\n }\n\n if (newQuestion.type === 'control_appointment') {\n // Translation for months/days names\n const months = (newQuestion.months && typeof newQuestion.months === 'string') ? newQuestion.months.split('|').map(p => p.locale()) : [];\n const days = (newQuestion.days && typeof newQuestion.days === 'string') ? newQuestion.days.split('|').map(p => p.locale()) : [];\n newQuestion.months = months.join('|');\n newQuestion.days = days.join('|');\n\n const timezone = user.time_zone || 'America/New_York';\n newQuestion.timezone = `${timezone} ${getTimezoneOffset(timezone)}`;\n newQuestion.startWeekOn = 'Sunday';\n newQuestion.timeFormat = 'AM/PM';\n }\n\n if (newQuestion.type === 'control_inline' && !question.template) {\n const { fields, template } = extendInlineDefaults();\n newQuestion.fields = fields.map(field => ({\n ...field,\n label: field.label.locale(),\n options: field.options.map(opt => ({ ...opt, label: opt.label.locale() }))\n }));\n newQuestion.template = `

${template.locale()}

`;\n }\n\n if (newQuestion.type === 'control_divider') {\n newQuestion.color = question.color || formProperties.styleJSON['@clrBg'] || '#e6e6e6';\n }\n\n dispatch({\n type: types.FORM_QUESTION_CREATING,\n question: newQuestion,\n order,\n saveToUndoStack,\n isFocusToQuestion: isForceRightPanel\n });\n\n if (isCardForm) {\n normalizeScreenZoom()(dispatch, getState); // eslint-disable-line\n }\n // dispatch({ type: types.UI_SET_FOCUSED_INLINEEDIT_INFO, data: { qid: tempID } });\n if (newQuestion.type === 'control_email' && !global.window.isAutoresponderActionsABActive && isEligibleForAB()) {\n const abTestManager = new ABTestManager({\n isTestEnabled: true,\n testName: 'autoresponderEmailContentTest',\n urlParam: 'ssvEmailVariation',\n controlVariantCode: '28361',\n testVariantCode: [{\n code: '28371',\n urlParam: 'ssvEmailVariationB'\n }, {\n code: '28372',\n urlParam: 'ssvEmailVariationC'\n }, {\n code: '28491',\n urlParam: 'ssvEmailVariationD'\n }],\n // debugMode: { forceUserEligible: true, forceControlVariant: false, forceTestVariant: true },\n customUserChecks: {\n isUSUser: user?.location?.country_code === 'US'\n },\n user\n });\n abTestManager.isTestVariant().then(variant => {\n const isTestVariant = variant ? variant[0] : variant;\n\n if (!global.window.ssvEmailABTestManager && isTestVariant) {\n global.window.ssvEmailABTestManager = abTestManager.registerABTestAction;\n }\n global.window.isAutoresponderActionsABActive = isTestVariant;\n });\n }\n\n if (isForceRightPanel) {\n dispatch({ type: types.UI_SET_NEW_QUESTION_IDS, data: [newQuestion.qid] });\n setTimeout(() => {\n dispatch({ type: types.UI_SET_NEW_QUESTION_IDS, data: [] });\n }, 500);\n updateSelectedQuestion(tempID)(dispatch, getState);\n }\n\n // counter += 1;\n return newQuestion;\n}\n\nexport function deleteQuestionByType(questionType, widgetId) {\n return (dispatch, getState) => {\n const { questions } = getState();\n let question;\n if (questionType === 'control_widget') {\n question = filter(questions, q => q.type === questionType && q.selectedField === widgetId);\n } else {\n question = filter(questions, q => q.type === questionType);\n }\n // Last found question\n if (question && question[question.length - 1]) {\n deleteFormQuestion(question[question.length - 1].qid, false, false)(dispatch, getState);\n }\n };\n}\n\nexport function handleFormTypeChange(newType) {\n return (dispatch, getState) => {\n const { formProperties } = getState();\n const tmpStyleJSON = formProperties.styleJSON;\n dispatch({ type: types.UI_CHANGE_FORM_TYPE, newType });\n if (newType === 'legacyForm') {\n // Add Submit button\n addNewQuestion({ type: 'control_button' })(dispatch, getState);\n // Get new layout background image and set it in old format\n if (formProperties.styleJSON && formProperties.styleJSON['pageBg-image']) {\n tmpStyleJSON['@bgURL'] = formProperties.styleJSON['pageBg-image'];\n }\n } else {\n // Delete Submit button if available\n deleteQuestionByType('control_button')(dispatch, getState);\n // Get old layout background image and set it in new format\n if (formProperties.styleJSON && formProperties.styleJSON['@bgURL']) {\n tmpStyleJSON['pageBg-image'] = formProperties.styleJSON['@bgURL'];\n tmpStyleJSON['pageBg-video'] = '';\n }\n }\n\n if (tmpStyleJSON) {\n updateFormProperty({ styleJSON: JSON.stringify(tmpStyleJSON) })(dispatch, getState);\n }\n };\n}\n\nexport function deleteMappedQidFromPayment(paymentQuestion, qid) {\n return (dispatch, getState) => {\n const addAndFormQuestionDropdowns = PaymentUtils.getAddAndFormQuestionDropdown(paymentQuestion);\n if (isPlainObject(addAndFormQuestionDropdowns)) {\n Object.keys(addAndFormQuestionDropdowns).forEach(key => {\n if (key in paymentQuestion && paymentQuestion[key] === qid) {\n updateFormQuestion(paymentQuestion.qid, { [key]: 'none' }, true, true, false)(dispatch, getState);\n }\n });\n }\n };\n}\n\nexport function createDummyProduct(products, questionType, isPaymentStoreInBasicFields) {\n if (!products && questionType === 'control_payment' && isPaymentStoreInBasicFields) {\n const dummyProduct = {};\n dummyProduct.customPrice = '';\n dummyProduct.customPriceSource = '0';\n dummyProduct.description = Translations.translate('Enter description');\n dummyProduct.hasExpandedOption = '';\n dummyProduct.hasQuantity = '1';\n dummyProduct.hasSpecialPricing = '';\n dummyProduct.icon = '';\n dummyProduct.images = '[\"https://cdn.jotfor.ms/assets/img/payments/sample_image-3.png\",\"https://cdn.jotfor.ms/assets/img/payments/sample_image-2.png\"]';\n dummyProduct.name = Translations.translate('Product Name');\n dummyProduct.options = `[{\"type\":\"quantity\",\"properties\":\"1\\\\n2\\\\n3\\\\n4\\\\n5\\\\n6\\\\n7\\\\n8\\\\n9\\\\n10\",\"name\":\"${Translations.translate('Quantity')}\",\"defaultQuantity\":\"\",\"specialPricing\":false,\"specialPrices\":\"\",\"expanded\":false}]`;\n dummyProduct.period = 'Monthly';\n dummyProduct.pid = '1000';\n dummyProduct.price = '10';\n dummyProduct.recurringtimes = 'No Limit';\n dummyProduct.required = '';\n dummyProduct.selected = '';\n dummyProduct.setupfee = '';\n dummyProduct.order = '0';\n dummyProduct.showSubtotal = false;\n dummyProduct.trial = '';\n const formProduct = [dummyProduct];\n const coupons = 0;\n\n const paymentString = {};\n paymentString.couponApply = 'Apply';\n paymentString.couponBlank = 'Please enter a coupon.';\n paymentString.couponChange = '';\n paymentString.couponEnter = 'Enter coupon';\n paymentString.couponExpired = 'Coupon is expired. Please try another one.';\n paymentString.couponInvalid = 'Coupon is invalid.';\n paymentString.couponValid = 'Coupon is valid.';\n paymentString.shippingShipping = 'Shipping';\n paymentString.taxTax = 'Tax';\n paymentString.totalSubtotal = 'Subtotal';\n paymentString.totalTotal = 'Total';\n\n const paymentStrings = [paymentString];\n const paymentStringsChanged = 'Yes';\n\n const dummyProducts = [];\n dummyProducts.coupons = coupons;\n dummyProducts.products = formProduct;\n dummyProducts.paymentStrings = paymentStrings;\n dummyProducts.paymentStringsChanged = paymentStringsChanged;\n\n return dummyProducts;\n }\n}\n\n/* eslint-enable no-use-before-define */\nexport function updateFormProperty(_prop, saveToUndoStack = true, callAPI = true, dontSendRevision = false) {\n return (dispatch, getState) => {\n return new Promise((resolve, reject) => {\n const state = getState();\n const { formProperties, questions } = state;\n\n const isFormTypeChanging = !isUndefined(_prop.formType) && formProperties.formType;\n const alteredProps = { ..._prop };\n\n if (isFormTypeChanging) {\n const isLegacy = alteredProps.formType === 'legacyForm';\n if (isLegacy && Array.isArray(formProperties.conditions)) {\n alteredProps.conditions = Utils.handleConditionsOfFormTypeChange(formProperties.conditions);\n }\n handleFormTypeChange(_prop.formType)(dispatch, getState);\n }\n\n const {\n isOfflineModeEnabled, leftSelection, isRightPanelOpen, rightPanelMode\n } = state.ui;\n const formID = formProperties.id;\n const prop = setFormPropertyCurrentValues(alteredProps, formProperties);\n\n if (!formProperties.products && _prop.question_type === 'control_payment' && _prop.isPaymentStoreInBasicFields) {\n const dummyProductInBasic = createDummyProduct(formProperties.products, 'control_payment', true);\n prop.products = dummyProductInBasic.products;\n prop.coupons = 0;\n prop.paymentStringsChanged = 'Yes';\n }\n\n if (_prop.paymentModalFlow && (_prop.modalFlowPaymentType && _prop.modalFlowPaymentType === 'product') && !formProperties.products) {\n const modalFlowDummyData = createDummyProduct(formProperties.products, 'control_payment', true);\n prop.products = modalFlowDummyData.products;\n prop.coupons = 0;\n prop.paymentStringsChanged = 'Yes';\n }\n\n dispatch({ type: types.FORM_PROPERTY_UPDATING, prop, saveToUndoStack });\n if (isOfflineModeEnabled === true || callAPI === false) {\n if ((leftSelection === 'integrations' || leftSelection === 'prefill')\n || (isRightPanelOpen === true && rightPanelMode === 'salesforce' && _prop && _prop.integrations && _prop.integrations.salesforceV2)) {\n dispatch({ type: types.FORM_PROPERTY_UPDATE_SUCCESS, prop });\n }\n return resolve({ type: 'OFFLINE_SAVED' });\n }\n\n addToQueue(endpoints.updateFormProperty, {\n formID, prop, isFormTypeChanging, state, dontSendRevision\n }, resp => {\n const responseObj = resp;\n if (!isUndefined(responseObj) && responseObj.responseCode === 401) {\n handleCustomNavigation(`/login?rp=${global.location.href}`, '_self', true);\n return reject({ type: 'UNAUTHORIZED' });\n } if (isUndefined(responseObj) || !responseObj || !responseObj.content) {\n reject({ type: 'ERROR_ON_RESPONSE' });\n return errorPromise(() => {\n addNotification({\n message: notificationMessages.ERROR_ON_UPDATE_FORM_TEXT,\n dismissible: false,\n actions: notificationMessages.ERROR_RELOAD_BUTTON,\n level: 'error',\n backdrop: true\n })(dispatch, getState);\n });\n }\n if (_prop && _prop.welcomePage && _prop.welcomePage[0] && _prop.welcomePage[0].logo) {\n // Fetch Properties because background color may be changed according to logo change\n fetchFormProperties(formID)(dispatch, getState);\n }\n const newInvoiceAttachedEmails = responseObj?.content?.emailsToAttachInvoice;\n if (newInvoiceAttachedEmails) {\n dispatch(updateFormPropertyWS({ emailsToAttachInvoice: Utils.parseJSON(newInvoiceAttachedEmails) }));\n }\n if (_prop && (_prop.emailsToAttachInvoice || _prop.invoiceEnabled || _prop.attachInvoice || _prop.invoicePDFId)) {\n // we need to fetch props because we change email attachment and invoice pdf id props\n fetchFormProperties(formID)(dispatch, getState);\n }\n\n if (_prop && (_prop.thankYouFillAnotherFormSettings || _prop.thankYouFillAgainSettings || _prop.thankYouFillAgainText || _prop.thankYouFillAgain || _prop.thankYouVisitURL)) {\n fetchFormProperties(formID)(dispatch, getState);\n }\n\n if (_prop && _prop.useJotformSign) {\n const isEnabling = _prop.useJotformSign === 'Yes';\n const newButtonText = isEnabling ? 'Continue' : 'Submit';\n const buttonElements = questions.filter(({ type }) => type === 'control_button');\n const isSmartPDFForm = formProperties && formProperties.importedPDF !== undefined;\n buttonElements.forEach(({ qid, text }) => {\n updateFormQuestion(\n qid,\n {\n ...text === (isEnabling ? 'Submit' : 'Continue') && { text: newButtonText },\n ...isSmartPDFForm && { preview: isEnabling ? 'No' : 'Yes' }\n },\n true,\n true,\n false\n )(dispatch, getState);\n });\n if (isSmartPDFForm) {\n updateFormProperty({ importedPdfEnablePreviewButton: isEnabling ? 'No' : 'Yes' }, false)(dispatch, getState);\n }\n Utils.logJotFormEvents('sign', {\n actor: formProperties.owner,\n action: `${isEnabling ? 'enable' : 'disable'}-form-integration-by-settings-toggle`,\n target: formProperties.id,\n }, formProperties.formOwnerAccountType);\n }\n\n dispatch({ type: types.FORM_PROPERTY_UPDATE_SUCCESS, prop });\n if (isFormTypeChanging && state.ui.currentLocation === 'builder') {\n // Socket signal should occur immediatly before the current window's reload\n // request to avoid race conditions as much as possible.\n Socket.signalReloadRequired();\n global.location.reload();\n }\n resolve({ type: 'UPDATE_SUCCEED' });\n a11yAnnounce(t('Form updated!'));\n return successPromise();\n }, err => {\n dispatch({ type: types.FORM_PROPERTY_UPDATE_ERROR, error: err });\n reject({ type: 'ERROR_ON_REQUEST', error: err });\n networkCallFailed(notificationMessages.ERROR_ON_UPDATE_FORM_TEXT)(dispatch, getState);\n })(dispatch, getState);\n });\n };\n}\n\nexport function handleConditionsActions({\n operation, _prop, conditions, saveToUndoStack = true\n}) {\n return (dispatch, getState) => {\n const state = getState();\n const { formProperties } = state;\n const formID = formProperties.id;\n dispatch({ type: types.FORM_PROPERTY_UPDATING, prop: conditions, saveToUndoStack });\n\n const apiCalls = {\n create: endpoints.createConditions,\n update: endpoints.updateConditions,\n change: endpoints.changeConditionsStatus,\n delete: endpoints.deleteConditions,\n sort: endpoints.sortConditions,\n duplicate: endpoints.duplicateConditions,\n };\n const apiCall = apiCalls[operation];\n\n addToQueue(apiCall, { prop: _prop, formID }, response => {\n if (!isUndefined(response) && response.responseCode === 401) {\n handleCustomNavigation(`/login?rp=${global.location.href}`, '_self', true);\n return;\n } if (isUndefined(response) || !response || !response.content) {\n return errorPromise(() => {\n addNotification({\n message: notificationMessages.ERROR_ON_UPDATE_FORM_TEXT,\n dismissible: false,\n actions: notificationMessages.ERROR_RELOAD_BUTTON,\n level: 'error',\n backdrop: true\n })(dispatch, getState);\n });\n }\n dispatch({ type: types.FORM_PROPERTY_UPDATE_SUCCESS, prop: conditions });\n a11yAnnounce(t('Form updated!'));\n return successPromise();\n }, err => {\n dispatch({ type: types.FORM_PROPERTY_UPDATE_ERROR, error: err });\n // eslint-disable-next-line prefer-promise-reject-errors\n networkCallFailed(notificationMessages.ERROR_ON_UPDATE_FORM_TEXT)(dispatch, getState);\n })(dispatch, getState);\n };\n}\n\nexport function updateFormURL(url) {\n return dispatch => {\n dispatch({ type: types.FORM_URL_UPDATE, url });\n };\n}\n\nexport function handleFormHeightChange() {\n return (dispatch, getState) => {\n const { formProperties, ui, questions } = getState();\n const isCardBuilder = ui.builderType === 'card' || global.buildermode === 'card';\n const configs = global.window.JOTFORM_ENV === 'ENTERPRISE' && typeof global.CUSTOMIZED_CONFIGS === 'object' && global.CUSTOMIZED_CONFIGS;\n const formHeightCalcConfig = configs && configs.CALCULATE_MAX_FORM_HEIGHT;\n\n if (!formHeightCalcConfig || isCardBuilder || ui.device !== 'isDesktop') {\n return;\n }\n\n const {\n themeID, defaultTheme, height, language, conditions\n } = formProperties;\n const currentFormHeight = height ? parseInt(height, 10) : 0;\n const formLanguages = language && language[0];\n const langOptions = formLanguages && formLanguages.options ? formLanguages.options.split('|') : [];\n let maxHeight = 0;\n\n let hiddenIDs = filter(questions, (q => q.hidden === 'Yes')).map(quest => quest.qid);\n if (conditions) {\n const actionIDs = conditions\n .filter(cond => cond.type === 'field')\n .reduce((acc, next) => acc.concat(next.action), [])\n .map(next => next.field);\n hiddenIDs = filter(hiddenIDs, (id => actionIDs.indexOf(id) === -1));\n }\n\n const defaultThemeVersion = defaultTheme || 'v1';\n\n // wait for fields/widgets to be loaded completely\n setTimeout(() => {\n maxHeight = Utils.calculateFormMaxHeight(hiddenIDs, questions, defaultThemeVersion);\n let formPadding = defaultThemeVersion === 'v2' ? 60 : 20;\n\n if (themeID) {\n const themeIDArr = ['5ece2abc0eb67557444695f1', '5ecdffc8950b7646d6193e11', '5ece305004fada31120078a1', '5ecdffb7a3e5381e4233a581', '5efa45cd32c14e523d2c3a81', '5efa45ce11a955145e29cbb1'];\n if (themeIDArr.indexOf(themeID) !== -1) {\n maxHeight = maxHeight - 30; // theme specific padding.\n formPadding = 0;\n }\n }\n\n let finalMargin = formPadding;\n if (langOptions.length > 1) {\n finalMargin = finalMargin + 42; // language dropdown height\n }\n\n if (maxHeight > 0 && currentFormHeight && (currentFormHeight - finalMargin) !== maxHeight) {\n const finalHeight = maxHeight + finalMargin; // consider form padding/margin\n const formHeight = { height: finalHeight };\n updateFormProperty(formHeight, false)(dispatch, getState);\n dispatch({ type: types.FORM_PROPERTY_UPDATING, prop: formHeight, saveToUndoStack: false });\n }\n }, 1500);\n };\n}\n\nfunction commitQuestion(_question, saveToUndoStack, instantAdd = false, isDuplicated = false) {\n return (dispatch, getState) => {\n const state = getState();\n const { isOfflineModeEnabled } = state.ui;\n const formID = state.formProperties.id;\n const question = cloneDeep(_question);\n delete question.isTempQuestion;\n // change default step to \"1\" for timev2\n if ((question.type === 'control_datetime' || question.type === 'control_time') && state.formProperties.defaultTheme === 'v2') {\n question.step = '1';\n }\n const { qid } = question;\n if (isOfflineModeEnabled === true) {\n return;\n }\n const commitQuestionFailCallBack = (err => {\n dispatch({ type: types.FORM_QUESTION_CREATE_ERROR, error: err, tempID: question.qid });\n Logger.logBreadCrumb('FORM_QUESTION_CREATE_ERROR', 'form-builder', err);\n networkCallFailed(notificationMessages.ERROR_ON_CREATE_QUESTION_TEXT)(dispatch, getState);\n });\n const commitQuestionSuccesCallBack = (resp => {\n try {\n const responseObj = resp;\n if (!isUndefined(responseObj) && responseObj.responseCode === 401) {\n handleCustomNavigation(`/login?rp=${global.location.href}`, '_self', true);\n return;\n } if (isUndefined(responseObj) || !responseObj || isUndefined(responseObj.content) || isUndefined(responseObj.content.questions)) {\n return errorPromise(() => {\n addNotification({\n message: notificationMessages.ERROR_ON_CREATE_QUESTION_TEXT,\n dismissible: false,\n actions: notificationMessages.ERROR_RELOAD_BUTTON,\n level: 'error',\n backdrop: true\n })(dispatch, getState);\n });\n }\n\n const questionObj = responseObj.content.questions;\n const { formProperties } = responseObj.content;\n questionObj.qid = questionObj.qid.toString();\n if (!isUndefined(formProperties)) {\n dispatch({ type: types.FORM_PROPERTY_UPDATING, prop: formProperties, saveToUndoStack: false });\n }\n dispatch({\n type: types.FORM_QUESTION_CREATE_SUCCESS, question: questionObj, tempID: qid, saveToUndoStack, isDuplicated\n });\n dispatch({ type: types.FORM_STAGED_QUESTION_UPDATING, qid: questionObj.qid.toString(), tempID: qid.toString() });\n dispatch({ type: types.FORM_STAGED_FULL_QUESTION_SAVE_SUCCESS, qid });\n const { stagedQuestions } = getState();\n\n const unsynchronizedProps = !isEmpty(stagedQuestions) ? stagedQuestions.filter(k => k.qid === questionObj.qid) : [];\n unsynchronizedProps.forEach(q => {\n if (!isUndefined(q.props)) {\n updateFormQuestion(questionObj.qid, q.props)(dispatch, getState);\n }\n });\n dispatch({ type: types.FORM_STAGED_QUESTION_UPDATE_SUCCESS, qid: questionObj.qid, tempID: qid });\n if (qid && qid.toString() !== questionObj.qid.toString()) { // We have different qid\n Socket.updateQuestion({ qid, question: { qid: questionObj.qid } });\n }\n\n // set max card height to form height\n if (state.formProperties.hackweekFeats === 'enable' && (state.ui.device === 'isDesktop' && state.ui.builderType === 'card')) {\n const cardWrapper = global.document.querySelector(`#id_${qid}`);\n const maxCardHeight = parseInt(state.formProperties.height, 10);\n\n if (cardWrapper && (maxCardHeight === 539 || maxCardHeight < cardWrapper.getBoundingClientRect().height)) {\n const formHeight = { height: cardWrapper.getBoundingClientRect().height };\n updateFormProperty(formHeight, false)(dispatch, getState);\n dispatch({ type: types.FORM_PROPERTY_UPDATING, prop: formHeight, saveToUndoStack: false });\n }\n }\n\n // temporarily checking for useJotformSign related changes\n if (question.type === 'control_signature') {\n fetchFormProperties(formID)(dispatch, getState);\n }\n\n handleFormHeightChange()(dispatch, getState);\n return successPromise({ question: questionObj });\n } catch (E) {\n return errorPromise(() => {\n addNotification({\n message: notificationMessages.ERROR_ON_CREATE_QUESTION_TEXT,\n dismissible: false,\n actions: notificationMessages.ERROR_RELOAD_BUTTON,\n level: 'error',\n backdrop: true\n })(dispatch, getState);\n });\n }\n });\n\n if (instantAdd) {\n return endpoints.createFormQuestion(formID, question, !saveToUndoStack)\n .then(resp => commitQuestionSuccesCallBack(resp))\n .catch(err => commitQuestionFailCallBack(err));\n }\n\n return addToQueue(endpoints.createFormQuestion,\n { formID, question, isUndo: !saveToUndoStack },\n commitQuestionSuccesCallBack,\n commitQuestionFailCallBack)(dispatch, getState);\n };\n}\n\nexport function addNewQuestion(question, questionOrder, duplicate, saveToUndoStack = true, instantAdd = false, isForceToRightPanel = true, stayOnPaymentSettings = false) {\n return (dispatch, getState) => {\n // find order of first control_button\n const {\n questions, ui, formProperties, user: { accountType, username }\n } = getState();\n let order = null;\n let willPaypalSubmitButtonAdd = false;\n\n const { selectedQuestionId, limitLevel } = ui;\n\n if (limitLevel === LIMIT_LEVELS.DANGER) {\n addNotification({\n message: notificationMessages.FORM_FIELD_LIMIT_EXCEEDED_ERROR_TEXT,\n autoDismiss: 5,\n level: 'warning'\n })(dispatch);\n return new Promise(\n resolve => {\n resolve();\n }\n );\n }\n if (PaymentTypes.indexOf(question.type) >= 0 && find(questions, q => PaymentTypes.indexOf(q.type) >= 0)) {\n addNotification({\n message: notificationMessages.MULTIPLE_PAYMENT_ERROR_TEXT,\n autoDismiss: 5,\n level: 'error'\n })(dispatch);\n return new Promise(\n resolve => {\n resolve();\n }\n );\n }\n if (question.type === 'control_widget' && find(questions, q => q.selectedField === question.selectedField)) {\n const { widgets } = getState();\n const widget = find(widgets, w => w.client_id === question.selectedField);\n if (widget.multipleInstance && widget.multipleInstance === 'No') {\n addNotification({\n message: notificationMessages.MULTIPLE_WIDGET_ERROR_TEXT,\n autoDismiss: 5,\n level: 'error'\n })(dispatch);\n return new Promise(\n resolve => {\n resolve();\n }\n );\n }\n }\n\n if (question.type === 'control_paypalSPB' && formProperties && formProperties.formType !== 'cardForm') {\n const submitButton = questions.find(q => q.type === 'control_button');\n\n /* eslint-disable no-param-reassign */\n if (submitButton) {\n question.paypalButton = 'Yes';\n question.paypalButtonQid = submitButton.qid;\n\n updateFormQuestion(submitButton.qid, { paypalBt: 'Yes', buttonAlign: 'Center' }, true, true, false)(dispatch, getState);\n } else {\n willPaypalSubmitButtonAdd = true;\n }\n /* eslint-enable no-param-reassign */\n }\n\n // Send payment event\n if (question.type === 'control_square') {\n PaymentDataCollector.sendEvent('add_question');\n }\n if (isUndefined(questionOrder)) {\n if (!questions || questions.length === 0) {\n order = 1;\n } else {\n let isSubmitButtonFound = false;\n questions.forEach((q, idx) => {\n if (q.type === 'control_button') {\n order = idx + 1;\n isSubmitButtonFound = true;\n }\n if (!isSubmitButtonFound) {\n order = idx + 2;\n }\n });\n if (selectedQuestionId) {\n const selectedQuestion = find(questions, q => q.qid === selectedQuestionId);\n if (!isUndefined(selectedQuestion)) {\n order = selectedQuestion.type !== 'control_button' ? questions.indexOf(selectedQuestion) + 2 : order; // If selected question is a submit button don't add question to below of it.\n }\n } else {\n const pageBreaks = questions.filter(q => q.type === 'control_pagebreak');\n if (pageBreaks.length > 0) {\n const { activePage } = ui;\n if (pageBreaks.length > activePage - 1) {\n const { order: activePageBreakOrder = order } = pageBreaks[activePage - 1];\n order = activePageBreakOrder;\n }\n }\n }\n }\n } else if (questionOrder === 'last') {\n order = questions.reduce((acc, q) => { return q.order > acc ? q.order : acc; }, -1) + 1;\n } else if (questionOrder === 'paymentmethods') {\n const lastQuestion = questions.slice(-1)[0];\n const prevQuestionOfLatest = questions.slice(-2, -1)[0];\n if (lastQuestion) {\n if ((prevQuestionOfLatest && prevQuestionOfLatest.type === 'control_pagebreak') && lastQuestion.type === 'control_button') {\n order = lastQuestion.order;\n } else if (lastQuestion.type === 'control_pagebreak') {\n order = lastQuestion.order + 1;\n } else if (lastQuestion.type === 'control_button') {\n order = lastQuestion.order;\n } else {\n order = lastQuestion.order + 1;\n }\n }\n } else {\n order = questionOrder;\n }\n\n const paymentMethods = find(questions, q => q.type === 'control_paymentmethods');\n if (paymentMethods && parseInt(order, 10) > parseInt(paymentMethods.order, 10)) {\n order = paymentMethods.order;\n // eslint-disable-next-line no-param-reassign\n question.order = paymentMethods.order;\n\n addNotification({\n uid: 'question_cant_add_below_paymentmethods',\n uuid: 'question_cant_add_below_paymentmethods',\n autoDismiss: 5,\n level: 'warning',\n message: t('You can\\'t add a question below the Payment Methods field. '),\n })(dispatch);\n }\n\n /* eslint-disable no-param-reassign */\n if (question.type === 'control_button') {\n if (!question.text) {\n question.text = Translations.translate('Submit');\n }\n if (ui.isPDFImporter) {\n question.preview = formProperties.importedPdfEnablePreviewButton;\n }\n }\n\n // Refactoring needed. Order of these two condition is important. Please don't touch.\n if ((typeof formProperties.isPaymentStoreInBasicFields !== 'undefined' && (formProperties.isPaymentStoreInBasicFields === true || formProperties.isPaymentStoreInBasicFields === '1'))\n || (((ui.fieldPanelActiveTab === 'formFields' || question.isPaymentStoreInBasicFieldsRemoveAction) && question.type === 'control_payment') && !question.isConnectionDetached)) {\n question.isPaymentStoreInBasicFields = true;\n formProperties.isPaymentStoreInBasicFields = true;\n updateFormProperty({ question_type: question.type, isPaymentStoreInBasicFields: true })(dispatch, getState);\n }\n if (question.isConnectionDetached) { delete question.isConnectionDetached; }\n\n if (question.paymentModalFlow) {\n if (question.paymentType && question.paymentType === 'product') {\n updateFormProperty({ paymentModalFlow: true, modalFlowPaymentType: 'product' })(dispatch, getState);\n }\n }\n\n const isPaymentQuestion = PaymentTypes.indexOf(question.type) > -1;\n if (\n (formProperties.isPaymentStoreInBasicFields === 'undefined'\n || formProperties.isPaymentStoreInBasicFields === false\n || formProperties.isPaymentStoreInBasicFields === '0')\n && isPaymentQuestion\n ) {\n if (!question.paymentModalFlow) {\n if (!isReusableConnectionEnabled()(dispatch, getState)) {\n question.isPaymentStoreInBasicFields = false;\n }\n updateFormProperty({ question_type: question.type, isPaymentStoreInBasicFields: false })(dispatch, getState);\n }\n }\n\n /* If addNewQuestion request is coming from Jotform Integrations (by URL), we need to set nameAPM first and then update\n control_appleAndGooglePay with control_payment\n control_venmo with control_paypalcomplete (in other words, paypal commerce or paypal bussiness)\n */\n /* if request is coming from Jotform integrations, \"control_\" keyword will be added to APM names, only for here! */\n switch (question.type) {\n case 'control_appleAndGooglePay':\n question.nameAPM = 'appleAndGooglePay';\n question.builderLabel = 'Apple And Google Pay';\n question.type = 'control_payment';\n question.isPaymentStoreInBasicFields = false;\n break;\n case 'control_venmo':\n question.nameAPM = 'Venmo';\n question.builderLabel = 'Venmo';\n question.type = 'control_paypalcomplete';\n question.isPaymentStoreInBasicFields = false;\n break;\n case 'control_CashAppPay':\n question.nameAPM = 'CashApp';\n question.builderLabel = 'Cash App Pay';\n question.type = 'control_square';\n question.isPaymentStoreInBasicFields = false;\n break;\n case 'control_afterpay':\n question.nameAPM = 'Afterpay';\n question.builderLabel = 'Afterpay';\n question.type = 'control_square';\n question.isPaymentStoreInBasicFields = false;\n break;\n case 'control_clearpay':\n question.nameAPM = 'Clearpay';\n question.builderLabel = 'Clearpay';\n question.type = 'control_square';\n question.isPaymentStoreInBasicFields = false;\n break;\n default:\n break;\n }\n\n /* If Cash App is selected from the list, add showCashApp = Yes to control_square */\n if (question.type === 'control_square' && question.nameAPM === 'CashApp') {\n question.showCashApp = 'Yes';\n }\n /* If Afterpay is selected from the list, add showAfterpay = Yes to control_square */\n if (question.type === 'control_square' && question.nameAPM === 'Afterpay') {\n question.showAfterpay = 'Yes';\n }\n\n /* If Clearpay is selected from the list, add showClearpay = Yes to control_square */\n if (question.type === 'control_square' && question.nameAPM === 'Clearpay') {\n question.showClearpay = 'Yes';\n question.currency = 'GBP';\n }\n\n question = createQuestion(question, dispatch, getState, order, undefined, questions, isForceToRightPanel);\n\n // Close question pane if isMobile or Tablet\n if (ui.device === 'isMobile' || ui.device === 'isTablet') {\n leftPanelToggle(false)(dispatch, getState);\n rightPanelToggle(false)(dispatch, getState);\n }\n\n // submitCaptcha setting is retired. If captcha field is added, disable it\n if (question.type === 'control_captcha' && ui.builderType === 'card' && formProperties.submitCaptcha === 'Yes') {\n updateFormProperty({ submitCaptcha: 'No' })(dispatch, getState);\n }\n\n if (question.type === 'control_pagebreak') {\n setTimeout(() => {\n try {\n const pageQid = questionOrder !== 'last' ? question.qid : questions.find(p => p.type === 'control_pagebreak').qid;\n const pageDom = global.document.querySelectorAll(`.form-all[data-page-qid='${pageQid}']`);\n const newPageDom = pageDom[pageDom.length - 1];\n newPageDom.classList.add('activeFormFlash');\n updateSelectedQuestion(pageQid)(dispatch, getState);\n } catch (e) {\n // Nothing.\n }\n });\n }\n if (question.type === 'control_widget' && (question.selectedField === '23f0a4749ef0943cbe89921d' || question.selectedField === 'ae37c8f942e45ba202513fd6')) {\n // Then it is salesforce dynamic prefill widget. Make it hidden\n question.hidden = 'Yes';\n }\n if (question.type === 'control_widget' && isUndefined(duplicate)) {\n // Open Right Panel If Question is a widget but not if annotation will be created.\n updateRightPanelMode('widgetsettings', true)(dispatch, getState);\n if (!ui.isPDFImporter || !isWidgetSupported(question.selectedField)) {\n // for wigetTypes embed and widget default url input is added so wizard should be opened\n if ((question.fieldParameters && question.fieldParameters.length) > 0 || question.widgetType === 'embed' || question.widgetType === 'widget') {\n rightPanelToggle(true, false)(dispatch, getState);\n } else {\n rightPanelToggle(true, true)(dispatch, getState);\n }\n } else {\n rightPanelToggle(true, true)(dispatch, getState);\n }\n return dispatch({ type: types.FORM_STAGED_FULL_QUESTION_SAVE, qid: question.qid, question });\n } if (PaymentTypes.indexOf(question.type) >= 0) {\n if (willPaypalSubmitButtonAdd) {\n // If submit button not exists when added paypalSPB question then add the submit button.\n addNewQuestion({ type: 'control_button', paypalBt: 'Yes', buttonAlign: 'Center' }, undefined, false, false, true)(dispatch, getState).then(resp => {\n if (!resp) return;\n\n resp.then(response => {\n if (response) {\n updateFormQuestion(question.qid, { paypalButton: 'Yes', paypalButtonQid: response.question.qid }, true, true, false)(dispatch, getState);\n updateSelectedQuestion(question.qid)(dispatch, getState);\n }\n });\n });\n }\n\n // In future, we will add new payment types. Only for paypalcomplete currently.\n if (\n ['control_paypalcomplete'].includes(question.type)\n && question.paymentType !== 'subscription'\n ) {\n setTimeout(() => {\n addNewQuestion({\n type: 'control_paymentmethods',\n paymentFieldType: question.type\n }, 'paymentmethods', undefined, false, false, false, true)(dispatch, getState);\n }, 0);\n }\n\n const rpModeForPayment = isReusableConnectionEnabled()(dispatch, getState) ? 'paymentproperties' : 'paymentsettings';\n const isProductListItem = rpModeForPayment === 'paymentproperties' && question.isPaymentStoreInBasicFields && question.isProductListItem;\n if (isProductListItem) {\n dispatch(openPaymentWizard('', ''));\n } else {\n updateRightPanelMode(rpModeForPayment)(dispatch, getState);\n rightPanelToggle(true)(dispatch, getState);\n dispatch({\n type: types.UI_SET_PAYMENT_MODE,\n paymentWizardMode: (question.type === 'control_payment' && question.nameAPM) ? 'gatewayselectioneditor' : question.type.replace('control_', 'gateway_'),\n paymentPID: ''\n });\n }\n } else if (question.type === 'control_calculation' && !ui.isPDFImporter) {\n updateRightPanelMode('widgetsettings')(dispatch, getState);\n rightPanelToggle(true, false)(dispatch, getState);\n } else {\n // eslint-disable-next-line no-lonely-if\n if (!stayOnPaymentSettings) {\n updateRightPanelMode('questionsettings')(dispatch, getState);\n if (question.type === 'control_image') {\n rightPanelToggle(true)(dispatch, getState);\n }\n }\n }\n\n if (question.type === 'control_signature') {\n const signatureWidget = (getState && typeof getState === 'function' && getState().widgets && getState().widgets.find && getState().widgets.find(widget => widget.webSlug === 'signature')) || [];\n\n const signatureWidgetId = signatureWidget.client_id || '';\n\n question.selectedField = signatureWidgetId;\n\n updateFormQuestion(question.qid, { selectedField: signatureWidgetId }, true, true, false)(dispatch, getState);\n }\n\n if (\n global.window.JotFormActions\n && global.window.builderPaymentListEvents\n && !['ADMIN', 'SUPPORT', 'INTERN'].includes(accountType)\n // eslint-disable-next-line no-undef\n && window.JOTFORM_ENV !== 'DEVELOPMENT'\n && PaymentTypes.includes(question.type)\n ) {\n global.window.builderPaymentListEvents.tick({ actor: username, action: question.type, target: question.builderLabel });\n }\n\n // enable full story for sensepass\n if (question.type === 'control_sensepass') {\n if (!Tracking.FSisInitialized()) {\n Tracking.enableFS({ sensepassQuestionTracking_bool: true });\n } else {\n Tracking.setUserVars({ sensepassQuestionTracking_bool: true });\n }\n }\n\n const isReusableConnectionEnable = isReusableConnectionEnabled()(dispatch, getState);\n if (isPaymentQuestion && isReusableConnectionEnable && !['ADMIN', 'SUPPORT', 'INTERN', 'HELPDESK'].includes(accountType)) {\n const fullstoryVars = { reusableConnectionFieldCreation_bool: true };\n\n try {\n if (username && !Tracking.FSisInitialized()) {\n Tracking.enableFS(fullstoryVars);\n Tracking.identify(username || '', {\n displayName: username || '',\n source: 'FORM',\n accountType: accountType || '',\n paymentgateway_bool: true,\n ...fullstoryVars\n });\n } else {\n Tracking.setUserVars(fullstoryVars);\n }\n } catch (error) {\n console.log('Error on FS', error);\n }\n }\n\n a11yAnnounce(t('New field added.'));\n return commitQuestion(question, saveToUndoStack, instantAdd, duplicate)(dispatch, getState);\n };\n}\n\nexport function createMultipleQuestion(_questions, saveToUndoStack = true, selectCreatedItems = false) {\n return (dispatch, getState) => {\n let questions = _questions;\n const { ui: { limitLevel } } = getState();\n const fieldPerForm = global.fieldPerFormLimitOfFormOwner;\n if (getState().ui.isPDFImporter && saveToUndoStack) {\n // saveToUndoStack is used to check if create operation is a real one, i.e. not is a result of undo/ redo opts.\n questions = questions.map(q => { const { pdfDetails, ...rest } = q; return rest; });\n }\n // Ctrl+C-V filter case for non-dublicable fields like captcha\n const questionTypes = getState().questions.map(q => q.type);\n questions = filter(questions, (q => NonDuplicatableFields.indexOf(q.type) === -1 || questionTypes.indexOf(q.type) === -1));\n const stateQuestions = getState().questions;\n const formID = getState().formProperties.id;\n const { lastQuestionID } = getState().formProperties;\n const newQuestions = questions.reduce((acc, q) => {\n const qid = generateNewQid(stateQuestions, lastQuestionID) + acc.length;\n const questionName = Utils.makeQuestionName(q.text, qid, [...stateQuestions, ...acc]); // Set question name for api\n return [...acc, { ...q, qid: qid.toString(), name: questionName }];\n }, []);\n if (newQuestions && newQuestions.length === 0) {\n return successPromise(); // Fake promise\n }\n if (limitLevel === LIMIT_LEVELS.DANGER || (global.JOTFORM_ENV !== 'ENTERPRISE' && fieldPerForm > 0 && stateQuestions.length + newQuestions.length > fieldPerForm)) {\n addNotification({\n message: notificationMessages.FORM_FIELD_LIMIT_EXCEEDED_ERROR_TEXT,\n autoDismiss: 5,\n level: 'warning'\n })(dispatch);\n return successPromise();\n }\n const lastQuestion = newQuestions[newQuestions.length - 1];\n dispatch({\n type: types.FORM_MULTIPLE_QUESTION_CREATING, questions: newQuestions, question: lastQuestion, saveToUndoStack\n });\n if (selectCreatedItems) { // Select fields after duplicating questions in manage multiple\n const qidList = newQuestions.map(q => { return q.qid.toString(); });\n updateMultipleSelectedQuestions(undefined, qidList)(dispatch, getState);\n dispatch({ type: types.UI_SET_DUPLICATED_QUESTION_IDS, data: newQuestions.map(p => p.qid) });\n setTimeout(() => {\n dispatch({ type: types.UI_SET_DUPLICATED_QUESTION_IDS, data: [] });\n }, 500);\n }\n addToQueue(endpoints.createMultipleQuestion, { formID, questions: newQuestions, isUndo: !saveToUndoStack }, resp => {\n try {\n const responseObj = resp;\n if (isUndefined(responseObj) || !responseObj || isUndefined(responseObj.content)) {\n return errorPromise(() => {\n addNotification({\n message: notificationMessages.ERROR_ON_CREATE_QUESTION_TEXT,\n dismissible: false,\n actions: notificationMessages.ERROR_RELOAD_BUTTON,\n level: 'error',\n backdrop: true\n })(dispatch, getState);\n });\n }\n const isSingleQuestionDuplicated = selectCreatedItems === true && newQuestions && newQuestions.length === 1;\n dispatch({ type: types.FORM_PROPERTY_UPDATING, prop: responseObj.content.formProperties, saveToUndoStack: false });\n dispatch({ type: types.FORM_MULTIPLE_QUESTION_CREATE_SUCCESS, isSingleQuestionDuplicated });\n return successPromise();\n } catch (E) {\n /* eslint-disable no-console */\n console.error('error on createMultipleQuestion', E);\n /* eslint-enable no-console */\n return errorPromise(() => {\n addNotification({\n message: notificationMessages.ERROR_ON_CREATE_QUESTION_TEXT,\n dismissible: false,\n actions: notificationMessages.ERROR_RELOAD_BUTTON,\n level: 'error',\n backdrop: true\n })(dispatch, getState);\n });\n }\n }, () => {\n networkCallFailed(notificationMessages.ERROR_ON_CREATE_QUESTION_TEXT)(dispatch, getState);\n })(dispatch, getState);\n\n if (selectCreatedItems === true) { // this means also operation is in multiselect\n showUndoLastActionNotification(notificationMessages.UNDO_DUPLICATE_QUESTION_TEXT, 'multiple_create')(dispatch, getState);\n }\n };\n}\n\nexport function commitStagedQuestions() {\n return (dispatch, getState) => {\n const state = getState();\n const { stagedQuestions } = state;\n if (!isUndefined(stagedQuestions) && isArray(stagedQuestions)) {\n stagedQuestions.forEach(stagedQuestion => {\n if (stagedQuestion && stagedQuestion.question) {\n commitQuestion(stagedQuestion.question)(dispatch, getState);\n }\n });\n }\n };\n}\n\nexport function addNewWidget(widget, commit = true) {\n return (dispatch, getState) => {\n let widgetProps = {};\n if (widget.type === 'native') {\n widgetProps = {\n type: `control_${widget.slug}`,\n label: widget.label,\n widgetType: widget.type,\n selectedField: widget.client_id\n };\n } else {\n widgetProps = {\n type: 'control_widget',\n label: widget.label,\n widgetType: widget.type,\n selectedField: widget.client_id,\n fieldParameters: widget.fieldParameters,\n cfname: widget.name,\n /* extending with defaults */\n ...widget.fieldParameters.reduce((params, param) => {\n return { ...params, [param.name]: param.default };\n }, {})\n };\n }\n\n // track widget usage\n endpoints.increaseWidgetUsage(widget.client_id);\n\n if (commit) {\n addNewQuestion(widgetProps)(dispatch, getState);\n } else {\n return widgetProps;\n }\n };\n}\n\nconst confirmDeleteQuestion = (qid, onConfirmed) => (dispatch, getState) => {\n const state = getState();\n const question = find(state.questions, k => k.qid === qid);\n const formSubmittionCount = state.form.count;\n\n if (NonInputFields.indexOf(question.type) === -1 && formSubmittionCount && formSubmittionCount !== '0') {\n updateSelectedQuestion(undefined)(dispatch, getState);\n confirm({\n title: `${Translations.translate('Are you sure you want to delete this field')}?`,\n message: `${Translations.translate('If you delete this field, you will lose the associated submission data. Are you sure you want to proceed?')}`,\n level: 'warning',\n hint: `${Translations.translate('Instead of deleting a field, you can hide it. That way, your data will not be deleted, and the field will not be shown on the form.')}`,\n type: 'delete',\n backdrop: false,\n additionalClasses: 'new-delete-field',\n onHideCallback: () => toggleVisibility([qid], true, 'Yes')(dispatch, getState)\n }, result => {\n if (result && onConfirmed) {\n onConfirmed();\n }\n })(dispatch);\n\n return true;\n }\n\n return false;\n};\n\nconst confirmDeleteMultipleQuestions = (questions, onConfirmed) => (dispatch, getState) => {\n const state = getState();\n const formSubmittionCount = state.form.count;\n let deletingInput = false;\n questions.forEach(q => {\n const question = find(state.questions, k => k.qid === q.qid);\n if (NonInputFields.indexOf(question.type) === -1) {\n deletingInput = true;\n }\n });\n\n const qIDs = questions.map(question => question.qid);\n\n if (deletingInput && formSubmittionCount && formSubmittionCount !== '0') {\n updateSelectedQuestion(undefined)(dispatch, getState);\n confirm({\n title: `${Translations.translate('Are you sure you want to delete these fields')}?`,\n message: `${Translations.translate('If you delete these fields, you will lose the associated data. Are you sure you want to proceed?')}`,\n level: 'warning',\n hint: `${Translations.translate('Instead of deleting a field, you can hide it. That way, your data will not be deleted, and the field will not be shown on the form.')}`,\n type: 'delete',\n backdrop: false,\n deleteButtonText: 'Delete Fields',\n additionalClasses: 'new-delete-field',\n onHideCallback: () => toggleVisibility(qIDs, true, 'Yes')(dispatch, getState)\n }, result => {\n if (result && onConfirmed) {\n onConfirmed();\n }\n })(dispatch);\n\n return true;\n }\n\n return false;\n};\n\nexport function deleteFormQuestion(qid, saveToUndoStack = true, showConfirmation = true, useOptimistic = false) {\n return (dispatch, getState) => {\n const state = getState();\n if (showConfirmation && confirmDeleteQuestion(qid, () => {\n deleteFormQuestion(qid, true, false)(dispatch, getState);\n })(dispatch, getState)) {\n return;\n }\n\n const {\n formProperties: {\n id: formID,\n conditions\n }, ui: {\n currentLocation\n }\n } = state;\n\n const question = find(state.questions, k => k.qid === qid);\n\n if (conditions && conditions.length > 0) {\n const sanitizedConditions = conditions.map(condition => {\n if (Array.isArray(condition.action)) {\n const isMatch = condition.action.some(action => action.field === question.qid) || condition.terms.some(term => term.field === question.qid);\n if (isMatch) {\n return { ...condition, isError: true };\n }\n }\n return condition;\n });\n\n if (!isEqual(conditions, sanitizedConditions)) {\n updateFormProperty({ conditions: sanitizedConditions })(dispatch, getState);\n }\n }\n\n if (question.isPaymentStoreInBasicFields === false && !isUndefined(state.formProperties.isPaymentStoreInBasicFields)\n && (state.formProperties.isPaymentStoreInBasicFields === true || state.formProperties.isPaymentStoreInBasicFields === '1')) {\n updateFormProperty({ isPaymentStoreInBasicFields: false })(dispatch, getState);\n }\n\n // It's a feature for payment gateways.\n const billingQuestion = find(state.questions, q => q.billingData != null || q.billingData !== undefined);\n const isLegacyForm = state.formProperties && state.formProperties.formType !== 'cardForm';\n\n if (!question) {\n /* eslint-disable no-console */\n console.error('No question found to delete', qid);\n /* eslint-enable no-console */\n return;\n }\n\n if (billingQuestion && billingQuestion.billingData) {\n const { billingData } = billingQuestion;\n\n if (billingData[question.type] === question.qid) {\n delete billingData[question.type];\n updateFormQuestion(billingQuestion.qid, { billingData }, true, true, false)(dispatch, getState);\n }\n }\n\n if (question.type === 'control_calculation') {\n const { formProperties: { calculations } } = state;\n if (calculations) {\n const newCalculations = calculations.filter(c => {\n return c.resultField !== question.qid;\n });\n updateFormProperty({ calculations: newCalculations.length > 0 ? newCalculations : 0 })(dispatch, getState);\n }\n }\n\n const paymentQuestion = find(state.questions, q => PaymentTypes.indexOf(q.type) >= 0);\n if (paymentQuestion) {\n deleteMappedQidFromPayment(paymentQuestion, qid)(dispatch, getState);\n }\n\n if (isLegacyForm && question.type === 'control_paypalSPB' && question.paypalButton === 'Yes' && question.paypalButtonQid) {\n const submitButton = find(state.questions, q => q.qid === question.paypalButtonQid);\n if (submitButton) {\n updateFormQuestion(question.paypalButtonQid, { paypalBt: 'No' }, true, true, false)(dispatch, getState);\n }\n }\n\n if (isLegacyForm && question.type === 'control_button' && question.paypalBt === 'Yes') {\n const paypalSPB = find(state.questions, q => q.type === 'control_paypalSPB');\n\n if (paypalSPB) {\n deleteFormQuestion(paypalSPB.qid, true, false)(dispatch, getState);\n return;\n }\n }\n\n if (question.type === 'control_paypalcomplete') {\n const paymentMethodEl = find(state.questions, q => q.type === 'control_paymentmethods');\n\n if (paymentMethodEl) {\n deleteFormQuestion(paymentMethodEl.qid, true, false)(dispatch, getState);\n }\n }\n\n const { isOfflineModeEnabled } = state.ui;\n dispatch({ type: types.FORM_QUESTION_DELETING, qid, saveToUndoStack });\n updateSelectedQuestion(undefined)(dispatch, getState);\n const isTempQuestion = question.isTempQuestion === true;\n if (isOfflineModeEnabled === true) {\n return;\n }\n\n if (!useOptimistic) {\n addToQueue(endpoints.deleteFormQuestion, { formID, qid }, resp => {\n const responseObj = resp;\n if (isUndefined(responseObj) || !responseObj || isUndefined(responseObj.content)) {\n if (responseObj && responseObj.message && responseObj.message.indexOf('not deleted') > -1) {\n dispatch({ type: types.FORM_QUESTION_DELETE_SUCCESS, qid });\n return successPromise();\n }\n return errorPromise(() => {\n addNotification({\n message: notificationMessages.ERROR_ON_UPDATE_QUESTION_TEXT,\n dismissible: false,\n actions: notificationMessages.ERROR_RELOAD_BUTTON,\n level: 'error',\n backdrop: true\n })(dispatch, getState);\n });\n }\n dispatch({ type: types.FORM_PROPERTY_UPDATING, prop: responseObj.content.formProperties || {}, saveToUndoStack: false });\n dispatch({ type: types.FORM_QUESTION_DELETE_SUCCESS, qid });\n\n // check for signature element, smooth signature widget and initials\n const signSignatureWidgetIDs = [\n '529467003477f3512000001f', // smooth signature widget\n '533a8c19a3f5fec35d00009a' // initials widget\n ];\n const isJotformSignEnabled = state.formProperties.useJotformSign === 'Yes';\n const isSignSignatureElementBeingDeleted = question.type === 'control_signature' || signSignatureWidgetIDs.includes(question.selectedField);\n if (isJotformSignEnabled && isSignSignatureElementBeingDeleted) {\n fetchFormQuestions(formID)(dispatch, getState);\n fetchFormProperties(formID)(dispatch, getState);\n }\n\n // set form height with highest card height from remining cards\n if (state.formProperties.hackweekFeats === 'enable' && (state.ui.device === 'isDesktop' && state.ui.builderType === 'card')) {\n let newHeight = 0;\n const { questions } = state;\n\n if (questions.length > 0) {\n questions.forEach(quest => {\n if (quest.qid !== undefined) {\n const cardWrapper = global.document.querySelector(`#id_${quest.qid}`);\n if (cardWrapper !== null && cardWrapper.getBoundingClientRect().height > newHeight) {\n newHeight = cardWrapper.getBoundingClientRect().height;\n }\n }\n });\n\n const formHeight = { height: newHeight };\n updateFormProperty(formHeight, false)(dispatch, getState);\n dispatch({ type: types.FORM_PROPERTY_UPDATING, prop: formHeight, saveToUndoStack: false });\n }\n }\n handleFormHeightChange()(dispatch, getState);\n\n return successPromise();\n }, err => {\n dispatch({ type: types.FORM_QUESTION_DELETE_ERROR, error: err, question });\n networkCallFailed(notificationMessages.ERROR_ON_UPDATE_QUESTION_TEXT)(dispatch, getState);\n })(dispatch, getState);\n }\n dispatch({ type: types.FORM_STAGED_QUESTION_DELETE, qid });\n a11yAnnounce(`${question.text} ${t('field deleted.')}`);\n if (showConfirmation && saveToUndoStack && !isTempQuestion) {\n showUndoLastActionNotification(notificationMessages.UNDO_DELETE_QUESTION_TEXT({ questionsCount: 1, currentLocation }), 'question')(dispatch, getState);\n }\n };\n}\n\n/*\n @param questions : you can pass questions or questionIdList to this param\n*/\nexport function deleteMultipleQuestion(questions, saveToUndoStack = true, showNotification = false, showConfirmation = false, useOptimistic = false) {\n return (dispatch, getState) => {\n const state = getState();\n\n if (showConfirmation && confirmDeleteMultipleQuestions(questions, () => {\n deleteMultipleQuestion(questions, saveToUndoStack, showNotification, false)(dispatch, getState);\n })(dispatch, getState)) {\n return;\n }\n\n const formID = state.formProperties.id;\n const isLegacyForm = state.formProperties && state.formProperties.formType !== 'cardForm';\n const { isOfflineModeEnabled } = state.ui;\n let questionIDList;\n if (questions && questions[0] && questions[0].qid) {\n questionIDList = questions.map(q => { return q.qid; });\n } else {\n questionIDList = questions;\n }\n\n const questionTypes = questions.map(q => q.type);\n const paymentQuestion = find(state.questions, q => PaymentTypes.indexOf(q.type) >= 0);\n const billingData = paymentQuestion && paymentQuestion.billingData;\n if (paymentQuestion) {\n if (billingData) {\n questions.forEach(question => {\n if (billingData[question.type] === question.qid) {\n delete billingData[question.type];\n }\n });\n\n updateFormQuestion(paymentQuestion.qid, { billingData }, true, true, false)(dispatch, getState);\n }\n /* If paypalSPB gets deleted in form, then button type should change. */\n if (isLegacyForm && questionTypes.includes('control_paypalSPB') && paymentQuestion.type === 'control_paypalSPB' && paymentQuestion.paypalButton === 'Yes' && paymentQuestion.paypalButtonQid) {\n updateFormQuestion(paymentQuestion.paypalButtonQid, { paypalBt: 'No' }, true, true, false)(dispatch, getState);\n }\n questions.forEach(question => {\n if (isLegacyForm && question.type === 'control_button' && question.paypalBt === 'Yes') {\n const paypalSPB = find(state.questions, q => q.type === 'control_paypalSPB');\n\n if (paypalSPB) {\n deleteFormQuestion(paypalSPB.qid, true, false)(dispatch, getState);\n }\n }\n });\n /* In future, there will be new gateways which are associated with PaymentMethods. For now, we only use paypal complete\n In order to delete control_paymentmethods field, questions parameter must include at least one control_paypalcomplete\n If you delete these types, it causes to deletion of control_paymentmethods (expandable) */\n const paymentBindings = ['control_paypalcomplete'];\n if (intersection(paymentBindings, questionTypes).length > 0) {\n const paymentMethodsField = find(state.questions, q => q.type === 'control_paymentmethods');\n if (paymentMethodsField) {\n deleteFormQuestion(paymentMethodsField.qid)(dispatch, getState);\n }\n }\n }\n const calculationQIDs = state.questions.reduce((pre, curr) => {\n if (curr.type === 'control_calculation') return pre.concat(curr.qid);\n return pre;\n }, []);\n\n if (calculationQIDs.length > 0) {\n const deletedCalculationQIs = questionIDList.filter(id => {\n return calculationQIDs.indexOf(id) >= 0;\n });\n\n const { formProperties: { calculations } } = state;\n if (calculations && deletedCalculationQIs.length > 0) {\n const newCalculations = calculations.filter(calc => {\n return deletedCalculationQIs.indexOf(calc.resultField) < 0;\n });\n updateFormProperty({ calculations: newCalculations })(dispatch, getState);\n }\n }\n\n dispatch({ type: types.FORM_MULTIPLE_QUESTION_DELETING, questionIDList, saveToUndoStack });\n updateSelectedQuestion(undefined)(dispatch, getState);\n if (isOfflineModeEnabled === true) {\n return;\n }\n\n if (paymentQuestion) {\n questionIDList.forEach(qid => { deleteMappedQidFromPayment(paymentQuestion, qid)(dispatch, getState); });\n }\n\n if (!useOptimistic) {\n addToQueue(endpoints.deleteMultipleQuestion, { formID, questionIDList }, resp => {\n const responseObj = resp;\n if (isUndefined(responseObj) || !responseObj || isUndefined(responseObj.content)) {\n return errorPromise(() => {\n addNotification({\n message: notificationMessages.ERROR_ON_UPDATE_QUESTION_TEXT,\n dismissible: false,\n actions: notificationMessages.ERROR_RELOAD_BUTTON,\n level: 'error',\n backdrop: true\n })(dispatch, getState);\n });\n }\n dispatch({ type: types.FORM_MULTIPLE_QUESTION_DELETE_SUCCESS });\n\n if (state.formProperties.useJotformSign === 'Yes') {\n const signSignatureWidgetIDs = [\n '529467003477f3512000001f', // smooth signature widget\n '533a8c19a3f5fec35d00009a' // initials widget\n ];\n const hasSignWidget = !!find(state.questions, q => signSignatureWidgetIDs.includes(q.selectedField));\n // check for signature element, smooth signature widget and initials\n const isSignSignatureElementBeingDeleted = questionTypes.includes('control_signature') || hasSignWidget;\n if (isSignSignatureElementBeingDeleted) {\n fetchFormQuestions(formID)(dispatch, getState);\n fetchFormProperties(formID)(dispatch, getState);\n }\n }\n\n return successPromise();\n }, () => {\n networkCallFailed(notificationMessages.ERROR_ON_UPDATE_QUESTION_TEXT)(dispatch, getState);\n })(dispatch, getState);\n }\n a11yAnnounce(`${questions.length} ${t('fields deleted.')}`);\n const message = notificationMessages.UNDO_DELETE_QUESTION_TEXT({ questionsCount: questions.length });\n if (showNotification === true) {\n showUndoLastActionNotification(message, 'multiple_delete')(dispatch, getState);\n }\n };\n}\n// Deletes ignored questions by card forms\nfunction normalizeQuestionsForCardForm(questions) {\n /* ignored fields moved to constants\n const ignoredFields = ['control_head', 'control_button', 'control_divider', 'control_pagebreak', 'control_collapse', 'control_helper', 'control_googleco', 'control_filepickerIO', 'control_separator', 'control_clear'];\n const ignoredQuestions = questions.filter(q => ignoredFields.indexOf(q.type) !== -1);\n const qidListForDeletion = [];\n ignoredQuestions.each((q) => {\n qidListForDeletion.push(q.qid);\n });\n // Don't delete data, we are allowing user to switch\n // if (qidListForDeletion.length > 0) {\n // deleteMultipleQuestion(qidListForDeletion)(dispatch, getState);\n // }\n */\n // Mutate file upload questions for better use\n for (let i = 0; i < questions.length; i++) {\n const question = questions[i];\n if (question.type === 'control_fileupload' && (question.allowMultiple === 'No' || question.allowMultiple === false)) {\n question.allowMultiple = 'Yes';\n }\n }\n return questions;\n}\n\nexport function translationUpdate() {\n return dispatch => {\n dispatch({ type: types.TRANSLATION_TEXT_UPDATING });\n };\n}\n\nexport function translationSuccess() {\n return dispatch => {\n dispatch({ type: types.TRANSLATION_TEXT_UPDATE_SUCCESS });\n };\n}\n\nexport function primaryPanelToggle(visible) {\n return (dispatch, getState) => {\n if (getState().ui.isPrimaryHeaderOpened !== visible && !getState().ui.isComingFromJotFormMobile) {\n dispatch({ type: types.UI_PRIMARY_PANEL_TOGGLE, visible });\n }\n };\n}\n\nexport function scrollToTopButtonToggle(visible) {\n return dispatch => {\n dispatch({ type: types.UI_TOGGLE_SCROLL_TO_TOP_BUTTON, visible });\n };\n}\n\nexport function togglePreview(mode) {\n return { type: types.UI_PREVIEW_MOD_TOGGLE, mode };\n}\n\nexport function togglePreviewReady(mode) {\n return { type: types.UI_PREVIEW_MOD_READY, mode };\n}\n\nexport function setPreviewDeviceType(deviceType) {\n return { type: types.UI_SET_PREVIEW_MOD_DEVICE_TYPE, deviceType };\n}\n\nexport function setIsComingFromJotFormMobile() {\n return { type: types.UI_SET_JOTFORM_MOBILE_APP };\n}\n\nexport function updateLocation() {\n return (dispatch, getState) => {\n const { currentLocation, leftSelection, isInsideWorkflowBuilder } = getState().ui;\n const { user, formProperties } = getState();\n const location = global.currentLocation;\n if (isInsideWorkflowBuilder && global.parent !== global) {\n // Send url change to parent window for workflow's router\n global.parent.postMessage(JSON.stringify({\n event: 'urlChange',\n module: global.currentLocation,\n subModule: global.subLocation\n }), '*');\n }\n if (currentLocation !== location || global.subLocation !== leftSelection) {\n dispatch({\n type: types.LOCATION_UPDATE, location, leftSelection: global.subLocation, user, themeVersion: formProperties.defaultTheme\n });\n }\n };\n}\n\nexport function draggingExistingQuestion(oldIndex, newIndex, fromPage, toPage, qid) {\n return dispatch => {\n dispatch({\n type: types.FORM_DRAGGING_EXISTING_QUESTION, oldIndex, newIndex, fromPage, toPage, qid\n });\n };\n}\n\nexport function draggingExistingMultipleQuestions(oldIndex, newIndex, fromPage, toPage, startingQid, length) {\n return dispatch => {\n dispatch({\n type: types.FORM_DRAGGING_MULTIPLE_EXISTING_QUESTION, oldIndex, newIndex, fromPage, toPage, startingQid, length\n });\n };\n}\n\nexport function newElementDropped(question, widgetID, toPage, newIndex) {\n return (dispatch, getState) => {\n if (isUndefined(question)) return;\n let newQuestion = { ...question };\n\n if (newQuestion.type === 'control_widget') {\n const widget = find(getState().widgets, w => w.client_id === widgetID);\n\n // Extending question with necessary widget params and widget defaults.\n newQuestion = {\n\n ...newQuestion,\n type: widget.type === 'native' ? `control_${widget.slug}` : newQuestion.type,\n widgetType: widget.type,\n selectedField: widget.client_id,\n label: widget.label,\n fieldParameters: widget.fieldParameters,\n /* extending with defaults */\n ...widget.fieldParameters.reduce((params, param) => {\n return { ...params, [param.name]: param.default };\n }, {})\n };\n\n // track widget usage\n endpoints.increaseWidgetUsage(widget.client_id);\n }\n\n if (!isUndefined(newQuestion)) {\n // find index of it.\n let index = newIndex;\n const { questions } = getState();\n const pages = questions.filter(q => q.type === 'control_pagebreak');\n if (toPage != 1) { // eslint-disable-line\n const pageBreak = pages[(toPage - 2)];\n const maximumIndex = questions.length;\n const indexOfPageBreak = questions.indexOf(pageBreak);\n const indexValue = 1;\n index = indexOfPageBreak + newIndex + indexValue;\n if (index > maximumIndex) {\n index = maximumIndex;\n }\n }\n newQuestion.order = index + 1;\n addNewQuestion(newQuestion, newQuestion.order)(dispatch, getState);\n }\n };\n}\n\nexport function existingQuestionDropped(saveToUndoStack = false) {\n return (dispatch, getState) => {\n dispatch({ type: types.UI_DROPPED_EXISTING_QUESTION });\n // update orders\n setTimeout(() => {\n const { questions, formProperties } = getState();\n const paypalSPBindex = questions.findIndex(q => q.type === 'control_paypalSPB');\n const isLegacyForm = formProperties && formProperties.formType !== 'cardForm';\n\n const data = questions.map((q, idx) => {\n return {\n qid: q.qid,\n order: idx + 1,\n type: q.type\n };\n }, {});\n\n if (isLegacyForm && paypalSPBindex !== -1) {\n const foundIndex = data.findIndex(d => d.type === 'control_paypalSPB');\n\n if (data[foundIndex]) {\n data[foundIndex] = {\n qid: data[foundIndex].qid,\n order: data[foundIndex].order,\n type: data[foundIndex].type,\n render: Math.random()\n };\n }\n }\n updateMultipleFormQuestions(data, saveToUndoStack)(dispatch, getState); // TO DO :: Update just order modifies questions not all of them!\n }, 500);\n };\n}\n\nexport function handleWidthChange(windowWidth, isInital = false, formWidth) {\n const isMobileApp = global.navigator.userAgent.indexOf('JotForm Mobile') > -1 || global.navigator.userAgent.indexOf('JFCEMobile') > -1;\n return (dispatch, getState) => {\n const { ui } = getState();\n const themeVersion = getState().formProperties.defaultTheme;\n const { user } = getState();\n const isCardBuilder = ui.builderType === 'card';\n let device = null;\n let screenType = '';\n if (windowWidth > BIGSCREEN_BREAK_POINT) {\n device = 'isDesktop';\n screenType = 'isBigScreen';\n } else if (SMALLSCREEN_BREAK_POINT > windowWidth && windowWidth > TABLET_BREAK_POINT) {\n device = 'isDesktop';\n screenType = 'isSmallScreen';\n } else if (windowWidth > TABLET_BREAK_POINT) {\n device = 'isDesktop';\n } else if (windowWidth > MOBILE_BREAK_POINT) {\n device = 'isTablet';\n } else if (windowWidth > MOBILE_SCALE_BREAK_POINT) {\n device = 'isMobile';\n } else if (isMobileApp) { // To fix mobile app innerWidth issue\n device = 'isMobile';\n } else {\n device = 'isMobile';\n screenType = 'isExtraSmallScreen';\n }\n\n let cardWidth = null;\n if (isCardBuilder) {\n for (let i in CARDFORMS_BREAK_POINTS) { // eslint-disable-line\n const breakPoint = CARDFORMS_BREAK_POINTS[i];\n cardWidth = breakPoint.value;\n const deviceWidth = parseInt(i, 10);\n\n if (deviceWidth > windowWidth) {\n screenType = `${screenType} ${breakPoint.name}`;\n break;\n }\n }\n }\n let props;\n const addShouldSqueeze = (windowWidth < parseInt(formWidth, 10) + 750) || (windowWidth === 1440 && isCardBuilder);\n const lPanel = (addShouldSqueeze && ui.isLeftPanelOpen && ui.isRightPanelOpen) ? false : ui.isLeftPanelOpen;\n const rPanel = (addShouldSqueeze && ui.isLeftPanelOpen && ui.isRightPanelOpen) ? true : ui.isRightPanelOpen;\n\n if (isInital && device === 'isMobile') {\n props = {\n device: device, isLeftPanelOpen: false, isRightPanelOpen: false, shouldSqueeze: addShouldSqueeze, isFooterOpened: false, showAllBasicFields: true, screenType, cardWidth\n };\n } else {\n props = {\n device: device, isLeftPanelOpen: lPanel, isRightPanelOpen: rPanel, shouldSqueeze: addShouldSqueeze, screenType, cardWidth\n };\n if (ui.currentLocation === 'settings' || ui.currentLocation === 'publish') {\n props.isWizardsPanelOpen = ((device === 'isMobile' && ui.leftSelection === 'default') || device !== 'isMobile');\n }\n }\n\n if (ui.device !== props.device\n // ui.cardWidth !== props.cardWidth ||\n || ui.screenType !== props.screenType\n || ui.isLeftPanelOpen !== props.isLeftPanelOpen\n || ui.isRightPanelOpen !== props.isRightPanelOpen\n || ui.shouldSqueeze !== props.shouldSqueeze\n || (props.isFooterOpened && ui.isFooterOpened !== props.isFooterOpened)\n || (props.showAllBasicFields && ui.showAllBasicFields !== props.showAllBasicFields)) {\n return dispatch({\n type: types.UI_WINDOW_WIDTH_CHANGED, props, user, themeVersion\n });\n }\n };\n}\n\nexport function handleFieldsPanelTabChange(target) {\n return { type: types.UI_FIELD_PANEL_TAB_CHANGED, target };\n}\n\nexport function setDirtyFlag(flag) {\n return {\n type: types.UI_SET_DIRTY_WIZARD_FLAG,\n flag\n };\n}\n\nexport function filterWidgets(filterText) {\n return {\n type: types.WIDGET_FILTER,\n filterText\n };\n}\n\nexport function showFeedback(show) {\n return {\n type: types.UI_FEEDBACK_SHOW,\n show\n };\n}\n\nexport function toggleRichTextEditorForQuestion(qid, mode) {\n return {\n type: types.UI_TOGGLE_RICH_TEXT_FOR_QUESTION,\n qid,\n mode\n };\n}\n\nexport function initState(data) {\n return dispatch => {\n if (data.questions) {\n dispatch({ type: types.FORM_QUESTIONS_INIT, state: data.questions });\n }\n };\n}\n\nexport function handleUndo(showWarningModalOnFormQuestionCreateSuccess = true) {\n return (dispatch, getState) => {\n const state = getState();\n if (isUndefined(global.currentStackIndex) || isUndefined(global.undoStack) || global.currentStackIndex > global.undoStack.length || global.currentStackIndex < 0) {\n return;\n }\n\n const stackIndex = global.currentStackIndex;\n const item = global.undoStack[stackIndex];\n\n switch (item.type) {\n case types.FORM_QUESTION_UPDATING: {\n updateFormQuestion(item.undo.qid, item.undo.data, false)(dispatch, getState);\n break;\n }\n case types.FORM_QUESTION_CREATE_SUCCESS: {\n deleteFormQuestion(item.undo.qid, false, showWarningModalOnFormQuestionCreateSuccess)(dispatch, getState);\n break;\n }\n case types.FORM_MULTIPLE_QUESTION_DELETING: {\n createMultipleQuestion(item.undo.questions, false)(dispatch, getState);\n break;\n }\n case types.FORM_QUESTION_DELETING: {\n addNewQuestion(item.undo.data, parseInt(item.undo.data.order, 10), undefined, false)(dispatch, getState);\n break;\n }\n case types.FORM_MULTIPLE_QUESTION_CREATING: {\n deleteMultipleQuestion(item.undo.questions, false)(dispatch, getState);\n break;\n }\n case types.FORM_PROPERTY_UPDATING: {\n updateFormProperty(item.undo.data, false)(dispatch, getState);\n break;\n }\n case types.FORM_MULTIPLE_QUESTION_UPDATING: {\n updateMultipleFormQuestions(item.undo.data, false)(dispatch, getState);\n break;\n }\n default:\n break;\n }\n global.currentStackIndex = stackIndex >= 0 ? stackIndex - 1 : -1;\n dispatch({ type: types.UI_UNDO, state: state });\n };\n}\n\nexport function handleUndoGateway() {\n return (dispatch, getState) => {\n handleUndo(false)(dispatch, getState);\n handleUndo(false)(dispatch, getState);\n };\n}\n\nexport function handleRedo() {\n return (dispatch, getState) => {\n const state = getState();\n if (isUndefined(global.currentStackIndex) || isUndefined(global.undoStack) || global.currentStackIndex >= global.undoStack.length - 1) {\n return;\n }\n global.currentStackIndex++;\n const stackIndex = global.currentStackIndex;\n const item = global.undoStack[stackIndex];\n switch (item.type) {\n case types.FORM_QUESTION_UPDATING: {\n updateFormQuestion(item.redo.qid, item.redo.data, false)(dispatch, getState);\n break;\n }\n case types.FORM_QUESTION_DELETING: {\n deleteFormQuestion(item.redo.qid, false)(dispatch, getState);\n break;\n }\n case types.FORM_MULTIPLE_QUESTION_DELETING: {\n deleteMultipleQuestion(item.redo.questions, false)(dispatch, getState);\n break;\n }\n case types.FORM_QUESTION_CREATE_SUCCESS: {\n addNewQuestion(item.redo.data, parseInt(item.redo.data.order, 10), undefined, false)(dispatch, getState);\n break;\n }\n case types.FORM_MULTIPLE_QUESTION_CREATING: {\n createMultipleQuestion(item.redo.questions, false)(dispatch, getState);\n break;\n }\n case types.FORM_PROPERTY_UPDATING: {\n updateFormProperty(item.redo.data, false)(dispatch, getState);\n break;\n }\n case types.FORM_MULTIPLE_QUESTION_UPDATING: {\n updateMultipleFormQuestions(item.redo.data, false)(dispatch, getState);\n break;\n }\n default:\n break;\n }\n dispatch({ type: types.UI_REDO, state: state });\n };\n}\n\nexport function setThemeSelection(selection) {\n return { type: types.THEME_SET_SELECTION, data: selection };\n}\n\nfunction handleFetchUserThemesResponse(dispatch, getState, responseObj) {\n if (!responseObj.content) return;\n const used = responseObj.content.used && !Array.isArray(responseObj.content.used) ? Object.keys(responseObj.content.used).map(p => responseObj.content.used[p]) : null;\n const liked = responseObj.content.liked && !Array.isArray(responseObj.content.liked) ? Object.keys(responseObj.content.liked).map(p => responseObj.content.liked[p]) : null;\n const purchases = responseObj.content.purchases && !Array.isArray(responseObj.content.purchases) ? Object.keys(responseObj.content.purchases).map(p => responseObj.content.purchases[p]) : null;\n const { themeID } = getState().formProperties;\n if (themeID) { // move selected theme to first place\n const themeIndex = findIndex(used, q => q.id === themeID);\n if (themeIndex && themeIndex > -1 && themeIndex !== 0) {\n const item = used.splice(themeIndex, 1)[0];\n used.splice(0, 0, item);\n }\n }\n dispatch({\n type: types.THEME_FETCHED_USERTHEMES,\n data: {\n used, liked, purchases\n }\n });\n if (global.buildermode === 'card') {\n return 'freeThemes';\n }\n return 'featuredThemes';\n}\n\nfunction handleFetchCardThemesResponse(dispatch, getState, responseObj) {\n if (!responseObj.content) return;\n const { colorThemes } = responseObj.content;\n const { imageThemes } = responseObj.content;\n const { videoThemes } = responseObj.content;\n\n dispatch({\n type: types.THEME_FETCHED_CARDTHEMES,\n data: {\n colorThemes, imageThemes, videoThemes\n }\n });\n}\n\nfunction handleFetchThemeCollection(dispatch, getState, responseObj, type) {\n if (!responseObj.content) return;\n // Lets cache theme images\n if (responseObj.content && responseObj.content && responseObj.content.length) {\n const imageUrls = [];\n for (let index = 0; index < responseObj.content.length; index++) {\n const theme = responseObj.content[index];\n let themeImgLink = theme.screenshots && theme.screenshots[0] ? theme.screenshots[0] : false;\n if (themeImgLink) {\n themeImgLink = themeImgLink.replace('1280.png', '320.png');\n imageUrls.push(themeImgLink);\n }\n }\n if (imageUrls.length > 0) {\n if (imageUrls.length > 10) {\n imageUrls.splice(10, Math.abs(10 - imageUrls.length));\n }\n cacheImageUrls(imageUrls);\n }\n }\n const { themeID } = getState().formProperties;\n const { content } = responseObj;\n if (themeID && isArray(content.themes)) {\n const themeIndex = findIndex(content.themes, q => q.id === themeID);\n if (themeIndex && themeIndex > -1 && themeIndex !== 0) { // move selected theme to first place\n const item = content.themes.splice(themeIndex, 1)[0];\n content.themes.splice(0, 0, item);\n }\n }\n // End caching\n dispatch({\n type: types.THEME_FETCHED_COLLECTION,\n data: { type, collection: content }\n });\n}\n\nexport function fetchUserThemes() {\n return (dispatch, getState) => {\n dispatch({ type: types.THEME_LOADING, isLoading: true });\n endpoints.fetchUserThemes().then(resp => {\n dispatch({ type: types.THEME_LOADING_SUCCESS });\n handleFetchUserThemesResponse(dispatch, getState, resp);\n }).catch(() => {\n dispatch({ type: types.THEME_LOADING_FAIL });\n });\n };\n}\n\nexport function fetchCardThemes() {\n return (dispatch, getState) => {\n dispatch({ type: types.THEME_LOADING, isLoading: true });\n endpoints.fetchCardThemes().then(resp => {\n handleFetchCardThemesResponse(dispatch, getState, resp);\n }).catch(() => {\n dispatch({ type: types.THEME_LOADING_FAIL });\n });\n };\n}\n\n/*\n* @param {string} themeID - User's new default theme ID\n* @param {string} themeName - new theme's human readable name\n*/\nexport function updateDefaultTheme(themeID, themeName) {\n return dispatch => {\n endpoints.updateDefaultTheme(themeID).then(resp => {\n if (resp.responseCode === 200) {\n dispatch({ type: types.USER_DEFAULT_THEME_UPDATE, themeID });\n let notificationMessage = t('From now on, new forms will be themed “{themeName}”.');\n notificationMessage = notificationMessage.replace('{themeName}', themeName);\n addNotification({\n uid: 'defualt_theme_change',\n uuid: 'defualt_theme_change',\n autoDismiss: 4,\n message: notificationMessage,\n })(dispatch);\n }\n });\n };\n}\n\nexport function updateShowNdtPromotionModal(value) {\n return (dispatch, getState) => {\n const state = getState();\n const formID = state.formProperties.id;\n endpoints.updateShowNdtPromotionModal(value).then(() => {\n endpoints.fetchUser(formID).then(resp => {\n dispatch({ type: types.USER_PROPERTIES_FETCH_SUCCESS, user: resp.content });\n });\n }).catch(() => {\n });\n };\n}\n\nexport function fetchThemeCollection(type) {\n return (dispatch, getState) => {\n dispatch({ type: types.THEME_LOADING, isLoading: true });\n endpoints.fetchThemeCollection(type).then(resp => {\n const responseObj = Utils.parseJSON(resp);\n dispatch({ type: types.THEME_LOADING_SUCCESS });\n handleFetchThemeCollection(dispatch, getState, responseObj, type);\n }).catch(() => {\n dispatch({ type: types.THEME_LOADING_FAIL });\n });\n };\n}\n\nexport function fetchAllThemes() {\n return (dispatch, getState) => {\n dispatch({ type: types.THEME_LOADING, isLoading: true });\n endpoints.fetchAllThemes().then(([userResp, freeResp, /* paidResp, */ featuredResp]) => {\n dispatch({ type: types.THEME_LOADING_SUCCESS });\n const initialSelection = handleFetchUserThemesResponse(dispatch, getState, Utils.parseJSON(userResp));\n handleFetchThemeCollection(dispatch, getState, Utils.parseJSON(freeResp), 'freeThemes');\n // handleFetchThemeCollection(dispatch, Utils.parseJSON(paidResp.response), 'paidThemes');\n handleFetchThemeCollection(dispatch, getState, Utils.parseJSON(featuredResp), 'featuredThemes');\n dispatch(setThemeSelection(initialSelection));\n }).catch(() => {\n dispatch({ type: types.THEME_LOADING_FAIL });\n });\n };\n}\n\nexport function previewTheme(themeId) {\n return { type: types.THEME_PREVIEW, data: themeId };\n}\n\nexport function updateTheme(themeId, overridenStyleJSON) {\n return (dispatch, getState) => {\n const state = getState();\n const { formProperties } = state;\n const { isOfflineModeEnabled } = state.ui;\n const formID = formProperties.id;\n const prop = setFormPropertyCurrentValues({\n themeID: themeId,\n formBackgroundImage: '',\n pageBackgroundImage: '',\n statelessColorScheme: ''\n }, formProperties);\n if (global.buildermode !== 'card') {\n prop.styles = ''; // this is to prevent old styles prop and themeid prop conflict.\n }\n // remove revision id from formProps\n prop.themeRevisionID = '';\n if (overridenStyleJSON) {\n prop.styleJSON = overridenStyleJSON;\n }\n dispatch({ type: types.FORM_PROPERTY_UPDATING, prop, saveToUndoStack: false });\n if (isOfflineModeEnabled === true) {\n return;\n }\n\n // Save styleJSON in scope for later use\n const pastFormProperties = formProperties;\n endpoints.updateFormProperty(formID, prop).then(() => {\n // We need to fetch all form props to apply theme correctly.\n fetchFormProperties(formID)(dispatch, getState).then(() => {\n const presentFormProperties = getState().formProperties;\n // form has a @formCover(aka logo), so update styleJSON and injectCSS properties with actual @formCover\n if (pastFormProperties.styleJSON && pastFormProperties.styleJSON['@formCover'] === '1') {\n updateFormProperty(\n styleAndInject(pastFormProperties, presentFormProperties)\n )(dispatch, getState);\n }\n });\n dispatch({ type: types.FORM_PROPERTY_UPDATE_SUCCESS, prop }); // update saving indicator\n handleFormHeightChange()(dispatch, getState);\n\n const currentState = getState();\n if (!(currentState.themes.userThemes.used || []).find(p => p.id === themeId)) {\n // add theme to used themes\n\n const theme = (currentState.themes.freeThemes || []).find(p => p.id === themeId) || (currentState.themes.featuredThemes.themes || []).find(p => p.id === themeId)\n || (currentState.themes.userThemes.liked || []).find(p => p.id === themeId)\n || (currentState.themes.userThemes.purchases || []).find(p => p.id === themeId);\n\n if (theme) {\n dispatch({\n type: types.THEME_FETCHED_USERTHEMES,\n data: {\n used: [...(currentState.themes.userThemes.used || []), theme],\n liked: currentState.themes.userThemes.liked,\n purchases: currentState.themes.userThemes.purchases\n }\n });\n }\n }\n }).catch(err => {\n dispatch({ type: types.FORM_PROPERTY_UPDATE_ERROR, error: err });\n networkCallFailed(notificationMessages.ERROR_ON_UPDATE_FORM_TEXT)(dispatch, getState);\n });\n };\n}\n\nexport function likeTheme(theme, like = true) {\n return (dispatch, getState) => {\n const themeId = theme.id;\n dispatch({ type: types.THEME_THUMBNAIL_LOADING, data: themeId });\n endpoints.likeTheme(themeId, like).then(() => {\n dispatch({ type: types.THEME_THUMBNAIL_LOADING, data: null });\n let likedThemes;\n\n if (like) {\n likedThemes = [...(getState().themes.userThemes.liked || []), JSON.parse(JSON.stringify(theme))];\n } else {\n likedThemes = (getState().themes.userThemes.liked || []).filter(p => p.id !== themeId);\n }\n\n const userThemes = { ...getState().themes.userThemes, liked: likedThemes };\n dispatch({ type: types.THEME_FETCHED_USERTHEMES, data: userThemes });\n }).catch(() => {\n dispatch({ type: types.THEME_THUMBNAIL_LOADING, data: null });\n });\n };\n}\n\nexport function openCollaborationPopup(open = true) {\n return { type: types.UI_OPEN_COLLABORATIONPOPUP, open };\n}\n\nexport function openHelpMenu(open = true) {\n return { type: types.UI_OPEN_HELPMENU, open };\n}\n\nexport function openUserSettingsPopup(open = true) {\n return { type: types.UI_OPEN_USERSETTINGSPOPUP, open };\n}\n\nexport function toggleAppNavigation() {\n return { type: types.UI_SET_APP_NAVIGATION };\n}\n\nexport function setIndicatorRevision(flag = false) {\n return { type: types.UI_REVISION_INDICATOR, flag };\n}\n\n/* Revision History */\n\nexport function fetchRevisionHistory(formID) {\n return (dispatch, getState) => {\n const { isAIForm } = getState().formProperties;\n dispatch({ type: types.UI_REVISION_INDICATOR, flag: true });\n dispatch({ type: types.REVISION_FETCHING });\n return endpoints.fetchRevisionDates(formID).then(response => {\n dispatch({ type: types.UI_REVISION_INDICATOR, flag: false });\n dispatch({ type: types.UI_REVISION_ITEM_INDICATOR, flag: true });\n dispatch({ type: types.REVISION_DATES_FETCH_SUCCESS, revisionDates: response.content });\n\n if (Object.keys(response.content).length > 0) {\n const [lastRevisionDate, limit] = Object.entries(response.content)[0];\n endpoints.fetchRevisions(formID, lastRevisionDate, Math.max(limit, 100), isAIForm).then(resp => {\n dispatch({ type: types.UI_REVISION_ITEM_INDICATOR, flag: false });\n dispatch({ type: types.REVISION_FETCH_SUCCESS, revisions: resp.content });\n dispatch({ type: types.UI_REVISION_PREVIEW, revision: 'current' });\n }).catch(err => {\n dispatch({ type: types.REVISION_FETCH_ERROR, error: err });\n });\n }\n }).catch(err => {\n dispatch({ type: types.REVISION_DATES_FETCH_ERROR, error: err });\n addMainLevelNotification({\n message: notificationMessages.ERROR_ON_REVISION_HISTORY_TEXT,\n actions: notificationMessages.ERROR_RELOAD_BUTTON\n })(dispatch);\n });\n };\n}\n\n/**\n * Fetch revisions for a specific date.\n * @param {string|number} formID ID of the form.\n * @param {string} date Date of the revisions adjusted by user\n * timezone.\n */\nexport function fetchRevisionHistoryByDate(formID, date, limit, updateDate = false) {\n return (dispatch, getState) => {\n const { isAIForm } = getState().formProperties;\n dispatch({ type: types.UI_REVISION_ITEM_INDICATOR, flag: true });\n return endpoints.fetchRevisions(formID, date, limit, isAIForm).then(resp => {\n dispatch({ type: types.UI_REVISION_ITEM_INDICATOR, flag: false });\n if (updateDate) {\n // Certain revert operations are no-ops and don't create any new revisions\n // so we need to dynamically update the revision count for the current date.\n if (Array.isArray(resp.content) && resp.content.length === 0) {\n // if there is a no changes, do not do anything\n return;\n }\n const newRevisionCountAtDate = Object.values(resp.content).length;\n dispatch({ type: types.REVISION_DATE_CHANGE_COUNT, date, newCount: newRevisionCountAtDate });\n }\n dispatch({ type: types.REVISION_FETCH_SUCCESS, revisions: resp.content });\n }).catch(err => {\n dispatch({ type: types.REVISION_FETCH_ERROR, error: err });\n addMainLevelNotification({\n message: notificationMessages.ERROR_ON_REVISION_HISTORY_TEXT,\n actions: notificationMessages.ERROR_RELOAD_BUTTON\n })(dispatch);\n });\n };\n}\n\n/**\n * Fetch the revisions after a revert operation, optionally set the UI\n * so that it is previewing the right revision.\n *\n * @param {string} formID ID of the form.\n * @param {boolean} skipUIUpdates Unless set to true, toggles the current\n * revision to be the previewed one.\n */\nexport function fetchRevisionsAfterLoadRevision(formID, skipUIUpdates = false) {\n return (dispatch, getState) => {\n const { revisions: { list: revisionList }, user: { time_zone } } = getState();\n // eslint-disable-next-line no-unused-vars\n const currentDate = moment.getDateWithTimezone(undefined, time_zone || 'America/New_York', 'YYYY-MM-DD');\n fetchRevisionHistoryByDate(formID, currentDate, revisionList[currentDate] + 1, true)(dispatch, getState);\n if (!skipUIUpdates) {\n dispatch({ type: types.UI_REVISION_PREVIEW, revision: 'current' });\n dispatch({ type: types.UI_REVISION_INDICATOR, flag: false });\n }\n };\n}\n\nexport function isReusableConnectionEnabled() {\n return (_, __) => {\n const { isPaymentReusableConnection = false } = window;\n return isPaymentReusableConnection === true;\n };\n}\n\n/**\n * Actions to be performed after a sucessful revert operation.\n * @param {string} formID ID of the form.\n * @param {function} dispatch Dispatcher for redux.\n * @param {function} getState State getter function for redux.\n * @param {boolean} skipUIUpdates Does not update the revision panel\n * UI.\n */\nconst postRevertActions = (formID, dispatch, getState, skipUIUpdates = false) => {\n fetchFormQuestions(formID)(dispatch, getState);\n fetchFormProperties(formID)(dispatch, getState);\n fetchRevisionsAfterLoadRevision(formID, skipUIUpdates)(dispatch, getState);\n};\n\nexport function loadRevision(formID, revisionID) {\n return (dispatch, getState) => {\n dispatch({ type: types.REVISION_LOADING });\n return endpoints.loadRevision(formID, revisionID).then(() => {\n postRevertActions(formID, dispatch, getState);\n Socket.signalRevisionReverted();\n }).catch(err => {\n dispatch({ type: types.REVISION_LOADING_ERROR, error: err });\n addMainLevelNotification({\n message: notificationMessages.ERROR_ON_REVISION_HISTORY_TEXT,\n actions: notificationMessages.ERROR_RELOAD_BUTTON\n })(dispatch);\n });\n };\n}\n\nexport function fetchLeanRevisionHistory(formID) {\n return dispatch => {\n return endpoints.fetchRevisions(formID).then(resp => {\n dispatch({ type: types.REVISION_FETCH_SUCCESS, revisions: resp.content });\n }).catch(() => {\n console.log('Revision cannot fetched'); // eslint-disable-line\n });\n };\n}\n\nexport function favoriteWidgets(widgetId, isFaved) {\n return (dispatch, getState) => {\n let widgets = getState().user.favoriteWidgets;\n widgets = widgets ? widgets.split(',').filter(p => p) : [];\n\n if (isFaved) {\n widgets.push(widgetId);\n } else {\n const widgetIndex = widgets.indexOf(widgetId);\n\n if (widgetIndex > -1) {\n widgets.splice(widgetIndex, 1);\n }\n }\n\n dispatch({ type: types.WIDGET_FAVSTATE_UPDATE, widgetId, isFaved });\n\n endpoints.favoriteWidgets(widgets).then(() => {\n // action dispatched before api call and reversed in case of error\n }).catch(() => {\n dispatch({ type: types.WIDGET_FAVSTATE_UPDATE, widgetId, isFaved: !isFaved });\n });\n };\n}\n\nexport function setRevisionPreview(revision = false) {\n return { type: types.UI_REVISION_PREVIEW, revision };\n}\n\nexport function displayWidgetInfo(widgetId) {\n return { type: types.UI_DISPLAY_WIDGETINFO, widgetId };\n}\nexport function setShowDetails(showDetails) {\n return { type: types.UI_SET_SHOW_DETAILS, showDetails };\n}\n\nexport function setFocusedInlineEditInfo(focuedInlineEditInfo) {\n return { type: types.UI_SET_FOCUSED_INLINEEDIT_INFO, data: focuedInlineEditInfo };\n}\n\nexport function toggleRevisionInfoPanel(open = true) {\n return { type: types.UI_REVISION_INFO_PANEL, open };\n}\n\nexport function openPaymentWizard(paymentWizardMode, paymentPID, force = false) {\n return dispatch => {\n dispatch(updateRightPanelMode('paymentsettings', force));\n dispatch(rightPanelToggle(true));\n dispatch({\n type: types.UI_SET_PAYMENT_MODE,\n paymentWizardMode,\n paymentPID\n });\n };\n}\n\nexport function showUpgradePopover(show) {\n return { type: types.UI_UPGRADEPOPOVER_SHOW, show };\n}\n\nexport function updateShowJotFormPowered() {\n return (dispatch, getState) => {\n const state = getState();\n const formID = state.formProperties.id;\n endpoints.updateShowJotFormPowered().then(() => {\n endpoints.fetchUser(formID).then(resp => {\n dispatch({ type: types.USER_PROPERTIES_FETCH_SUCCESS, user: resp.content });\n });\n }).catch(() => {\n });\n };\n}\n\nexport function updateAutoresponderSetting(value) {\n return (dispatch, getState) => {\n const state = getState();\n const formID = state.formProperties.id;\n endpoints.updateAutoresponderSetting(value).then(() => {\n endpoints.fetchUser(formID).then(resp => {\n dispatch({ type: types.USER_PROPERTIES_FETCH_SUCCESS, user: resp.content });\n });\n }).catch(() => {\n });\n };\n}\n\nexport function setContextMenu(contextProps) {\n return { type: types.UI_SET_CONTEXT_MENU, data: contextProps };\n}\n\nexport function duplicateQuestions(selectedQuestionsIDList, insertOrder) {\n return (dispatch, getState) => {\n const { questions } = getState();\n const selectedQuestions = filter(questions, (q => selectedQuestionsIDList.indexOf(q.qid) > -1));\n const filteredSelectedQuestions = filter(selectedQuestions, (q => NonDuplicatableFields.indexOf(q.type) === -1));\n const order = insertOrder || filteredSelectedQuestions.reduce((acc, q) => { return Math.max(q.order, acc); }, 0) + 1;\n const orderedSelectedQuestions = sortBy(filteredSelectedQuestions, q => parseInt(q.order, 10));\n const data = orderedSelectedQuestions.map((q, idx) => {\n return Object.assign(q, { order: order + idx });\n });\n if (data && data.length > 0) {\n createMultipleQuestion(data, true, true)(dispatch, getState);\n }\n };\n}\n\nexport function makeRequired(selectedQuestionsIDList, instantUpdate = false) {\n return (dispatch, getState) => {\n const { questions } = getState();\n const selectedQuestions = filter(questions, (q => selectedQuestionsIDList.indexOf(q.qid) > -1));\n const isRequired = selectedQuestions.find(q => !Utils.isQuestionRequired(q));\n const data = selectedQuestions.map(q => {\n if (q.type === 'control_inline') {\n const newFields = q.fields.map(f => ({ ...f, required: isRequired ? 'Yes' : 'No' }));\n return {\n type: q.type, qid: q.qid, fields: newFields, required: isRequired ? 'Yes' : 'No'\n };\n }\n const _requiredText = q.type === 'control_matrix' ? 'Require an answer in every row' : 'Yes';\n return { type: q.type, qid: q.qid, required: isRequired ? _requiredText : 'No' };\n });\n updateMultipleFormQuestions(data, true, true, false, false, instantUpdate)(dispatch, getState);\n };\n}\n\nexport function toggleVisibility(selectedQuestionsIDList, instantUpdate = false, manualToggle) {\n return (dispatch, getState) => {\n const { questions } = getState();\n const selectedQuestions = filter(questions, (q => selectedQuestionsIDList.indexOf(q.qid) > -1));\n const filteredSelectedQuestions = filter(selectedQuestions, (q => NonHideableFields.indexOf(q.type) === -1));\n const isHidden = filter(filteredSelectedQuestions, (q => q.hidden !== 'Yes')).length > 0 ? true : false;\n const visibility = isHidden ? 'Yes' : 'No';\n const data = filteredSelectedQuestions.map(q => {\n return { type: q.type, qid: q.qid, hidden: manualToggle || visibility };\n });\n updateMultipleFormQuestions(data, true, true, false, false, instantUpdate)(dispatch, getState);\n };\n}\n\nexport function deleteQuestions(selectedQuestionsIDList) {\n return (dispatch, getState) => {\n const { questions } = getState();\n const filteredQuestions = filter(questions, q => q.type !== 'control_clear');\n let selectedQuestions = [];\n if (getState().formProperties.isPaymentStoreInBasicFields === '1' || getState().formProperties.isPaymentStoreInBasicFields === true) {\n updateFormProperty({ isPaymentStoreInBasicFields: false })(dispatch, getState);\n getState().formProperties.isPaymentStoreInBasicFields = false;\n }\n if (selectedQuestionsIDList.length === filteredQuestions.length) { // if user selected all questions, now we can delete all control_clear s!\n selectedQuestions = questions;\n } else {\n selectedQuestions = filter(questions, (q => selectedQuestionsIDList.indexOf(q.qid) > -1));\n }\n deleteMultipleQuestion(selectedQuestions, true, true, true)(dispatch, getState);\n };\n}\n\nexport function hideRevisionFooterInfo() {\n return { type: types.UI_REVISION_FOOTER_INFO };\n}\n\nexport function showNewFormDialog(show) {\n return { type: types.UI_DISPLAY_NEWFORMDIALOG, show };\n}\n\nexport function showFormCountDialog(show) {\n return { type: types.UI_DISPLAY_FORM_COUNT_DIALOG, show };\n}\n\nexport function toggleQuickSearchPanel() {\n return (dispatch, getState) => {\n const nextVisibility = !getState().ui.isQuickSearchOpen;\n dispatch({ type: types.UI_SET_QUICK_SEARCH_PANEL, data: nextVisibility });\n };\n}\n\nexport function moveSelectedQuestion(direction, selectMultiple = false) { // Moves selected question with direction\n return (dispatch, getState) => {\n const state = getState();\n const {\n selectedQuestionId, selectedQuestions, lastSelectedQuestionId, multiSelectDirection\n } = state.ui;\n const { questions } = state;\n if (!selectedQuestionId && selectedQuestions.length === 0) return;\n const filteredQuestions = filter(questions, q => q.type !== 'control_clear');\n // lets find necessary qid\n const selectedQid = selectedQuestionId ? selectedQuestionId : (lastSelectedQuestionId || selectedQuestions[selectedQuestions.length - 1]);\n\n const qid = (() => {\n if (selectMultiple && multiSelectDirection && multiSelectDirection !== direction && lastSelectedQuestionId) {\n return lastSelectedQuestionId;\n }\n for (let i = 0; i < filteredQuestions.length; i++) {\n if (filteredQuestions[i].qid === selectedQid) {\n return (filteredQuestions[(i + (direction === 'up' ? -1 : 1) + filteredQuestions.length) % filteredQuestions.length].qid);\n }\n }\n })();\n if (selectMultiple) {\n updateMultipleSelectedQuestions(qid)(dispatch, getState);\n setMultipleSelectDirection(direction)(dispatch, getState);\n } else {\n updateSelectedQuestion(qid)(dispatch, getState);\n // focus element\n global.document.querySelector(`#id_${qid}`)?.focus();\n }\n };\n}\n\nexport function deleteSelectedQuestions() {\n return (dispatch, getState) => {\n const { selectedQuestionId, selectedQuestions } = getState().ui;\n if (selectedQuestions && isArray(selectedQuestions) && selectedQuestions.length > 0) {\n const deleteSelectedFields = filter(getState().questions, (q => selectedQuestions.indexOf(q.qid) > -1));\n deleteMultipleQuestion(deleteSelectedFields, true, true, true)(dispatch, getState); // questions, saveToUndoStack, showNotificataion, showConfirmation\n } else if (selectedQuestionId) {\n deleteFormQuestion(selectedQuestionId)(dispatch, getState);\n }\n };\n}\n\nexport function selectAllQuestions() {\n return (dispatch, getState) => {\n const { questions } = getState();\n const qidList = questions.map(q => {\n return q.qid;\n });\n updateMultipleSelectedQuestions(undefined, qidList)(dispatch, getState);\n };\n}\n\nexport function duplicateSelectedQuestions() {\n return (dispatch, getState) => {\n const { selectedQuestions, selectedQuestionId } = getState().ui;\n if (selectedQuestions && isArray(selectedQuestions) && selectedQuestions.length > 0) {\n duplicateQuestions(selectedQuestions)(dispatch, getState);\n } else if (selectedQuestionId) {\n duplicateQuestions([selectedQuestionId])(dispatch, getState);\n }\n };\n}\n\n// Clipboard Actions for questions\nexport function addSelectedQuestionsToClipboard(showNotification = true) {\n return (dispatch, getState) => {\n const state = getState();\n const { questions, ui: { selectedQuestions, selectedQuestionId } } = state;\n let questionIDList = [];\n if (selectedQuestions && isArray(selectedQuestions) && selectedQuestions.length > 0) {\n questionIDList = selectedQuestions;\n } else if (selectedQuestionId) {\n questionIDList.push(selectedQuestionId);\n }\n if (questionIDList.length > 0 && showNotification) {\n const relatedQuestions = filter(questions, q => { return questionIDList.indexOf(q.qid) > -1; });\n const COPIED_TO_CLIPBOARD_TEXT = questionIDList.length > 1\n ? t('{0} Questions added to clipboard.').replace('{0}', questionIDList.length)\n : t('{FieldName} Question is copied.').replace('{FieldName}', FIELD_NAME_MAP[relatedQuestions[0].type] || 'Selected question');\n dispatch({ type: types.COPY_QUESTIONS_TO_CLIPBOARD, questions: relatedQuestions });\n addNotification({\n uid: 'copied_to_clipboard',\n uuid: 'copied_to_clipboard',\n autoDismiss: 2,\n message: COPIED_TO_CLIPBOARD_TEXT,\n })(dispatch);\n }\n };\n}\n\nexport function pasteQuestionsFromClipboard() {\n return (dispatch, getState) => {\n const state = getState();\n const { questions } = state.clipboard;\n const { selectedQuestionId } = state.ui;\n const selectedQuestion = find(state.questions, { qid: selectedQuestionId });\n if (selectedQuestion && questions && questions.length > 0) {\n const orderedSelectedQuestions = sortBy(questions, q => parseInt(q.order, 10));\n const data = orderedSelectedQuestions.map((q, idx) => {\n return Object.assign(q, { order: parseInt(selectedQuestion.order, 10) + idx + 1 });\n });\n createMultipleQuestion(data, true, true)(dispatch, getState);\n }\n };\n}\n\nexport function toggleMultiSelectCheckBoxVisibility(show) {\n return dispatch => {\n dispatch({ type: types.UI_CHANGE_MULTISELECT_CHECKBOX_VISIBILITY, show });\n };\n}\n\nexport function incrementSelectedQuestionsOrder(val, multiple) {\n return (dispatch, getState) => {\n const { selectedQuestions, selectedQuestionId, builderType } = getState().ui;\n const { questions: _questions } = getState();\n const questions = [..._questions];\n const questionsToMove = selectedQuestions && selectedQuestions.length ? questions.filter(p => selectedQuestions.indexOf(p.qid) > -1) : [find(questions, p => p.qid === selectedQuestionId)];\n const removeIndex = questions.findIndex(p => p.qid === questionsToMove[0].qid);\n\n if (multiple) {\n const moveToStart = val < 0;\n\n // Move inside the bounds of the current page if layout is not cardform\n if (builderType !== 'card') {\n if (moveToStart) {\n for (let moveCount = 0; moveCount > val; moveCount--) {\n if (questions[moveCount + removeIndex] && questions[moveCount + removeIndex].type === 'control_pagebreak') {\n val = moveCount + 1;\n break;\n }\n }\n } else {\n for (let moveCount = 0; moveCount < val; moveCount++) {\n if (questions[moveCount + removeIndex] && questions[moveCount + removeIndex].type === 'control_pagebreak') {\n val = moveCount - questionsToMove.length;\n break;\n }\n }\n }\n }\n\n // Don't move above the header\n if (moveToStart && questions[removeIndex + val] && questions[removeIndex + val].type === 'control_head') {\n val++;\n }\n\n // Don't move below the submit button\n if (!moveToStart && questions[removeIndex + val] && questions[removeIndex + val].type === 'control_button') {\n val -= questionsToMove.length;\n }\n }\n\n if (questions[removeIndex + val] && questions[removeIndex + val].type === 'control_paymentmethods') {\n addNotification({\n message: 'You can’t move a question below the Payment Methods field. ',\n level: 'warning',\n uid: 'cannot_add_question_below_pm',\n autoDismiss: 10\n })(dispatch);\n\n if (!multiple) {\n return;\n }\n val -= questionsToMove.length;\n }\n\n const removedQuestions = questions.splice(removeIndex, questionsToMove.length);\n questions.splice(removeIndex + val, 0, ...removedQuestions);\n const orders = questions.map((p, i) => ({\n qid: p.qid,\n order: i + 1,\n type: p.type\n }));\n\n updateMultipleFormQuestions(orders, true, true)(dispatch, getState);\n };\n}\n\n/* Search Store Functions START */\n\nexport function fillStaticSearchData() {\n return dispatch => {\n const formFields = getTranslatedFormFields();\n const payments = getPaymentFields();\n dispatch({ type: types.SEARCH_SET_STATIC_DATA, data: { formFields, payments } }); // set fields and payments\n endpoints.getFormsList().then(data => {\n if (data && data.responseCode === 200) { // if we are success full\n const forms = data.content.filter(q => { return q.status === 'ENABLED'; }).map(form => {\n return {\n name: form.title,\n url: form.url,\n id: form.id\n };\n });\n dispatch({ type: types.SEARCH_SET_STATIC_DATA, data: { forms } }); // set user forms\n }\n });\n };\n}\n/* Search Store Functions END */\n\n// Card Form Actions\n\nexport function changeWelcomePageVisibility(show) {\n return (dispatch, getState) => {\n const currentVisibility = getState().ui.showWelcomePage;\n if (show !== currentVisibility) {\n dispatch({ type: types.UI_SET_WELCOME_PAGE_VISIBILITY, show });\n }\n };\n}\n\nexport function changeThankYouPageVisibility(show) {\n return (dispatch, getState) => {\n const currentVisibility = getState().ui.showThankYouPage;\n if (show !== currentVisibility) {\n dispatch({ type: types.UI_TOGGLE_PROP, prop: 'showThankYouPage', value: show });\n }\n };\n}\n\nexport function openWelcomePageWizard() {\n return (dispatch, getState) => {\n updateRightPanelMode('welcomepagewizard', true)(dispatch, getState);\n rightPanelToggle(true)(dispatch, getState);\n };\n}\n\nexport function openThankYouPageWizard(activeTab = '', mode = 'thankyoupagewizard') {\n return (dispatch, getState) => {\n updateFormProperty({ thankYouActiveTab: activeTab }, false)(dispatch, getState);\n updateRightPanelMode(mode, true)(dispatch, getState);\n rightPanelToggle(true)(dispatch, getState);\n };\n}\n\nexport function toggleUiProp(prop, value) {\n return (dispatch, getState) => {\n const currentState = getState().ui[prop];\n if (currentState !== value) {\n dispatch({ type: types.UI_TOGGLE_PROP, prop, value });\n }\n };\n}\n\n/*\nTODO:\n - Following the creation of a new theme, we should use the server's response\n instead of fetching all of the Card Themes\n - Same thing applies to updating a theme\n - The real solution lies in the Builder's Card Designer\n*/\n\nexport function createNewTheme(_data) {\n return (dispatch, getState) => {\n const { form } = getState();\n const formID = form.id;\n const formURL = form.url;\n if (typeof _data === typeof {}) {\n const data = { ..._data, formID, formURL };\n endpoints.createNewTheme(data).then(resp => {\n updateTheme(resp.content.id)(dispatch, getState);\n fetchCardThemes()(dispatch, getState);\n });\n }\n };\n}\n\nexport function updateThemeProperties(themeID, _data) {\n return () => {\n if (typeof _data === typeof {}) {\n const data = { ..._data };\n endpoints.updateThemeInfo(themeID, data);\n }\n };\n}\n\nexport function zoomOutScreen() {\n return dispatch => {\n if (global.screenNormalizeTimeout) {\n clearTimeout(global.screenNormalizeTimeout);\n }\n dispatch({ type: types.UI_TOGGLE_PROP, prop: 'scale', value: 0.7 });\n };\n}\n\nexport function normalizeScreenZoom(ms = 500) {\n return dispatch => {\n if (global.screenNormalizeTimeout) {\n clearTimeout(global.screenNormalizeTimeout);\n }\n global.screenNormalizeTimeout = setTimeout(() => {\n dispatch({ type: types.UI_TOGGLE_PROP, prop: 'scale', value: 1 });\n }, ms);\n };\n}\n\nconst getColumnCountForOptionsText = options => {\n const requiredSizes = options.map(Utils.getRequiredSizeForText);\n let spreadCols = '1';\n if (requiredSizes.every(p => p.width <= CARDFORM_OPTIONS_3_COLUMN_THRESHOLD_WIDTH)) {\n spreadCols = '3';\n } else if (requiredSizes.some(p => p.width > CARDFORM_OPTIONS_2_COLUMN_THRESHOLD_WIDTH)) {\n spreadCols = '1';\n } else {\n spreadCols = '2';\n }\n\n return spreadCols;\n};\n\nconst restoreSelection = selection => {\n const { focusNode, focusOffset } = selection;\n const parentElement = focusNode.parentNode;\n const isCursorAtEnd = focusNode.nodeType === global.Node.TEXT_NODE && focusNode.nodeValue.length === focusOffset;\n setTimeout(() => {\n const node = parentElement.childNodes[0];\n if (parentElement.parentNode && node.nodeType === global.Node.TEXT_NODE) {\n let offset = focusOffset;\n const nodeLength = node.nodeValue.length;\n if (offset >= nodeLength) offset = nodeLength;\n if (offset < 0) offset = 0;\n if (isCursorAtEnd) offset = node.nodeValue.length;\n const range = global.document.createRange();\n range.setStart(node, offset);\n range.setEnd(node, offset);\n const sel = global.getSelection();\n sel.removeAllRanges();\n sel.addRange(range);\n }\n }, 1);\n};\n\nexport function onInlineEditInput(id, propPath, value) {\n return (dispatch, getState) => {\n if (getState().ui.builderType === 'card') {\n const question = getState().questions.find(p => p.qid === id);\n if (question && (question.type === 'control_radio' || question.type === 'control_checkbox')) {\n const [optionPath, index] = propPath.split('|');\n\n if (optionPath === 'options' && index !== undefined) {\n const currentOptionTexts = (question.options || '').split('|');\n currentOptionTexts[index] = value;\n\n const spreadCols = getColumnCountForOptionsText(currentOptionTexts);\n\n if (question.spreadCols !== spreadCols) {\n currentOptionTexts[index] = Utils.sanitizeAndDecode(currentOptionTexts[index]);\n updateFormQuestion(id, {\n spreadCols,\n options: currentOptionTexts.join('|')\n })(dispatch, getState);\n\n restoreSelection(global.getSelection());\n }\n }\n }\n }\n };\n}\n\nexport function recalculateOptionColumnCount(id) {\n return (dispatch, getState) => {\n if (getState().ui.builderType === 'card') {\n const question = getState().questions.find(p => p.qid === id);\n if (question && (question.type === 'control_radio' || question.type === 'control_checkbox')) {\n const spreadCols = getColumnCountForOptionsText((question.options || '').split('|'));\n if (question.spreadCols !== spreadCols) {\n updateFormQuestion(id, {\n spreadCols,\n })(dispatch, getState);\n }\n }\n }\n };\n}\n\nexport function updateMixedQuestionSelectedField(fieldID) {\n return (dispatch, getState) => {\n dispatch({ type: types.UI_MIXED_QUESTION_SELECTED_FIELD, fieldID });\n updateQuestionPropertiesActiveTab('general')(dispatch, getState);\n };\n}\n\nexport function toggleMixedFields(opts) {\n return (dispatch, getState) => {\n dispatch({ type: types.UI_TOGGLE_MIXED_FIELDS, opts });\n updateQuestionPropertiesActiveTab('general')(dispatch, getState);\n };\n}\n\nexport function draggingMixedFields(data) {\n return dispatch => {\n dispatch({ type: types.UI_DRAGGING_MIXED_FIELDS, data });\n };\n}\n\nexport function updateBackgroundImageLoadStatus(status) {\n return dispatch => {\n dispatch({ type: types.UI_SET_BACKGROUND_IMAGE_LOAD_STATUS, status });\n };\n}\n\nexport function updateBackgroundImage(image) {\n return dispatch => {\n dispatch({ type: types.UI_SET_BACKGROUND_IMAGE, image });\n };\n}\n\nexport function handleImportResult(\n response,\n file,\n widgets,\n device,\n formWidth,\n preferAdobeSign,\n isHIPAAForm,\n dispatch,\n getState\n) {\n const {\n questions: questionsJson,\n annotations: annotationsJson,\n uploadURL,\n isMaxFieldPerFormLimitExceeded\n } = response.content;\n\n let questions = [];\n let annotations = [];\n\n try {\n questions = JSON.parse(questionsJson);\n annotations = JSON.parse(annotationsJson);\n } catch (e) {\n // safely parse json\n }\n\n // Small delay to receive questions correctly on first doc upload\n setTimeout(() => { setAnnotations(annotations, questions)(dispatch, getState); }, 100);\n\n dispatch({\n type: types.FORM_PROPERTY_UPDATING,\n prop: {\n importedPDF: uploadURL.replace('?nc=1', '')\n }\n });\n global.isPDFImporter = 1;\n if (questions.length === 0) {\n questions = getDefaultQuestions(file.name.split('.')[0]);\n }\n let logo = null;\n let questionsWithType = questions\n .filter(q => {\n if (!q.type) return false;\n if (q.type === 'control_image' && q.isLogo) {\n logo = {\n src: q.src,\n width: q.width > formWidth ? formWidth : q.width,\n // Get all props from ignored control_image question to use it on a new question, if there is no control_head question\n fromProps: { ...q }\n };\n return false;\n }\n return true;\n })\n .map((possibleQuestion, idx) => {\n return Object.assign(possibleQuestion, { qid: idx + 1 });\n }).filter(q => q.type.indexOf('control') > -1); // Temporarily.\n if (preferAdobeSign) {\n let adobeSignWidget = widgets.find(w => w.client_id === '53bfd5c2ec70ec9f25000005');\n questionsWithType = questionsWithType.map(q => {\n if (q.type === 'control_signature') {\n adobeSignWidget = addNewWidget(adobeSignWidget, false)(dispatch, getState);\n return Object.assign(q, adobeSignWidget);\n }\n return q;\n });\n }\n const questionsWithName = questionsWithType.reduce((acc, current) => {\n const name = Utils.makeQuestionName(current.text, current.qid, acc);\n const newQ = { ...current, name };\n return [...acc, newQ];\n }, []).map(question => Utils.extendQuestionWithDefaults(question))\n .map(question => (isHIPAAForm === '1' ? { ...question, protected: 'Yes' } : question));\n // Assign qids\n\n // Submit button preview setting disabled for mobile\n const submitQuestion = questionsWithName.find(q => q.type === 'control_button');\n let hidePreview = false;\n if (\n global.JOTFORM_ENV === 'ENTERPRISE'\n && global.CUSTOMIZED_CONFIGS\n && typeof global.CUSTOMIZED_CONFIGS === 'object'\n && global.CUSTOMIZED_CONFIGS.HIDE_PREVIEW_PDF_BUTTON === true\n ) {\n hidePreview = true;\n }\n submitQuestion.preview = (device === 'isDesktop' && !hidePreview) ? 'Yes' : 'No';\n // extract form title\n const headQuestion = questionsWithName.find(q => q.type === 'control_head' && q.useAsFormTitle === true);\n const formTitle = headQuestion ? headQuestion.text : file.name.split('.')[0];\n // Handle adding pdf doc logo to form, if logo exists\n if (logo) {\n const QIndexWithFirstOrder = questionsWithName.findIndex(x => x.order === 1);\n let prevIndex = null;\n\n if (headQuestion) {\n const headQ = questionsWithName.findIndex(x => x.type === 'control_head');\n prevIndex = questionsWithName[headQ].order; // Set current control_head question's order\n // Update current control_head's prop with logo\n questionsWithName[headQ] = {\n ...questionsWithName[headQ],\n order: 1,\n headerImage: logo.src,\n width: logo.width,\n imageAlign: 'Top',\n textAlign: 'Center'\n };\n } else {\n // If logo was found but there is no heading, add logo as a new control_image question to top\n questionsWithName.push({\n ...logo.fromProps,\n order: 1,\n qid: questionsWithName.length + 1\n });\n }\n // Set previous first ordered question's order with prev control_head's order\n if (QIndexWithFirstOrder > -1 && prevIndex) {\n questionsWithName[QIndexWithFirstOrder].order = prevIndex;\n }\n }\n // Set formTitle if available\n if (formTitle) {\n updateFormProperty({ title: formTitle, pagetitle: formTitle }, false)(dispatch, getState);\n }\n\n if (isMaxFieldPerFormLimitExceeded) {\n addNotification({\n message: notificationMessages.FORM_FIELD_LIMIT_EXCEEDED_ERROR_TEXT,\n autoDismiss: 5,\n level: 'warning',\n actions: notificationMessages.PRICING_BUTTON([\n ['utm_source', 'fielPerForm'],\n ['utm_medium', 'toast'],\n ['utm_term', 'create'],\n ['utm_content', 'v4editor'],\n ['utm_campaign', 'smartPDFForm-fileUpload'],\n ])\n })(dispatch);\n }\n return updateMultipleFormQuestions(withOrder(questionsWithName), false, true, true)(dispatch, getState);\n}\n\nexport function importPDF(file, pdfPassword = '') {\n return (dispatch, getState) => {\n const { href } = global.location;\n const state = getState();\n const {\n formProperties, widgets, ui: { device }, pdfImport\n } = state;\n const { id, formWidth, isHIPAA: isHIPAAForm } = formProperties;\n const preferAdobeSign = href.indexOf('preferAdobeSign') > -1;\n\n // TO DO :: NEED ERROR HANDLING HERE\n // if exists, send cacheKey instead of pdf file\n const { variantCode = '' } = pdfImport.ui;\n return endpoints.importFillablePDF(id, file, pdfPassword, variantCode).then(response => {\n // TODO: allowed keys.\n if (response.responseCode !== 200) {\n throw new Error(response.message);\n }\n\n handleImportResult(\n response,\n file,\n widgets,\n device,\n formWidth,\n preferAdobeSign,\n isHIPAAForm,\n dispatch,\n getState\n );\n // to show field detection limit warning\n const pageRange = getOr(0, 'content.pageRange.end', response);\n const pageCount = getOr(0, 'content.pageCount', response);\n const pageLimit = LIMIT_BY_CODE[variantCode];\n if (pageRange === pageLimit && pageCount > pageLimit) {\n showPageDetectionLimitToast(pageLimit)(dispatch);\n }\n })\n .catch(errMsg => {\n throw new Error(t(errMsg));\n });\n };\n}\n\nexport function showPageDetectionLimitToast(limit) {\n return dispatch => {\n addNotification({\n message: notificationMessages.GUEST_SMART_PDF_FORMS_OCR_WARNING_TEXT(limit),\n level: 'warning',\n autoDismiss: 8,\n dismissible: true\n })(dispatch);\n };\n}\n\nexport function importImage(file) {\n return (dispatch, getState) => {\n const { hash = null, href } = global.location;\n const state = getState();\n const { formProperties, widgets, ui: { device } } = state;\n const { id, formWidth, isHIPAA: isHIPAAForm } = formProperties;\n const preferAdobeSign = href.indexOf('preferAdobeSign') > -1;\n const source = hash && hash.indexOf('tdf=1') > -1 ? 'LANDING' : 'DEFAULT';\n return endpoints.importImage(id, file, source).then(response => {\n if (response.responseCode !== 200) {\n throw new Error(response.message);\n }\n handleImportResult(\n response,\n file,\n widgets,\n device,\n formWidth,\n preferAdobeSign,\n isHIPAAForm,\n dispatch,\n getState\n );\n });\n };\n}\n\nexport function removePDF() {\n return (dispatch, getState) => {\n const state = getState();\n return endpoints.removeFillablePDF(state.formProperties.id).then(response => {\n const json = Utils.parseJSON(response);\n if (json && json.content === 'OK') {\n // re-init questions state with empty array\n dispatch({ type: types.FORM_QUESTIONS_INIT, state: [] });\n dispatch({ type: types.PDF_IMPORT_REMOVE_PDF_SUCCESS });\n } else {\n throw new Error('Unable to remove questions');\n }\n });\n };\n}\n\nexport function uploadImageS3(file, fileName) {\n return () => {\n // TODO: use reducer\n return endpoints.uploadImageS3(file, fileName);\n };\n}\n\nexport function setPDFImporter() {\n return dispatch => {\n dispatch({ type: types.UI_SET_PDF_IMPORTER, value: true });\n };\n}\n\nexport function setImportedPdfDefaultProps() {\n return (dispatch, getState) => {\n const {\n formProperties: {\n importedPdfIsConnected,\n importedPdfEnableThumbnail,\n importedPdfEnablePreviewButton,\n importedPdfEnableThankYouButtons,\n importedPdfNotificationAttachment,\n importedPdfAutoresponderAttachment,\n importedPDFStartButtonText,\n importedPdfFileName,\n isHIPAA,\n },\n ui: { device },\n user: { email },\n questions\n } = getState();\n const defaultProps = getDefaultProps({\n importedPdfIsConnected,\n importedPdfEnableThumbnail,\n importedPdfEnablePreviewButton,\n importedPdfEnableThankYouButtons,\n importedPdfNotificationAttachment,\n importedPdfAutoresponderAttachment,\n importedPDFStartButtonText,\n importedPdfFileName,\n isHIPAA: isHIPAA === '1',\n isMobile: device !== 'isDesktop',\n email,\n questions\n });\n\n if (!isEmpty(defaultProps)) {\n const { user: { accountType, username } } = getState();\n\n updateFormProperty(defaultProps, false)(dispatch, getState);\n // Send init options' values as 'Default' to actions on form creation\n Object.entries(defaultProps).forEach(([key]) => {\n Utils.logJotFormEvents('pdf-import', {\n actor: username,\n action: 'Complete - value: Default',\n target: `PDF Settings - ${key}`\n }, accountType);\n });\n }\n };\n}\n\nexport const createInlineQuestionField = (options, qid) => (dispatch, getState) => {\n const question = getState().questions.find(p => p.qid === qid);\n let { fields } = question;\n let createdOptions = [];\n options.forEach(option => {\n fields = upsertInlineField(expandInlineOptions(option.group)(option.blots))(option.group)(fields || []);\n createdOptions = [...createdOptions, onlyCreatedOptions(option.group)(mergeInlineOptions(fields))(option.blots)];\n });\n updateFormQuestion(qid, { fields })(dispatch, getState);\n if (getState().ui.isPDFImporter) {\n createInlinePDFField(createdOptions, question)(dispatch, getState);\n }\n};\n\nconst getFields = question => (\n (question.fields === null || question.fields === '') ? [] : question.fields\n);\n\nconst hasOption = ids => option => !includes(getOptionId(option))(getIds(option)(ids));\n\nconst getField = field => options => (\n (options.findIndex(o => o.name === 'Country Code') === -1)\n ? { ...field, countryCode: 'No' }\n : field\n);\n\nconst setOptions = ids => field => {\n const options = filterF(hasOption(ids))(field.options);\n return {\n ...getField(field)(options),\n options\n };\n};\n\nconst emptyOptions = field => field.options.length !== 0;\n\nconst getSafeField = result => (result.length > 0 ? result : null);\n\n// deleteFieldOptions :: [ID] -> Question -> [Field]\nconst deleteFieldOptions = ids => compose(\n getSafeField,\n filterF(emptyOptions),\n map(setOptions(ids)),\n getFields\n);\n\nexport const deleteInlineQuestionFields = (ids = [], qid) => (dispatch, getState) => {\n const question = getState().questions.find(p => p.qid === qid);\n const newFields = deleteFieldOptions(ids)(question);\n\n dispatch({ type: types.UI_SELECTED_FITB_FIELD_ID, fieldId: '' });\n\n return updateFormQuestion(question.qid, {\n fields: newFields,\n ...((newFields === null || newFields.length === 0) ? { required: 'No' } : {})\n })(dispatch, getState);\n};\n\nconst updateProp = ({ blotId, prop, fieldType }) => o => (\n (fieldType === 'control_dropdown' && parseBlotId(blotId).id === parseBlotId(o.id).id) || blotId === o.id ? { ...o, ...(fieldType === 'control_dropdown' && prop.label ? {} : prop) } : o\n);\n\nconst singleFields = [\n 'control_textbox',\n 'control_datetime',\n 'control_dropdown',\n 'control_email',\n 'control_number',\n 'control_time',\n 'control_signature',\n];\nconst isSingleField = type => singleFields.indexOf(type) !== -1;\n\nconst fieldLabelUpdate = prop => (\n prop && isString(prop.label) ? { label: prop.label } : {}\n);\n\nconst updateField = ({ blotId, prop, field }) => {\n const options = field.type === 'control_dropdown' && prop.options\n ? getOptionsForSelectbox(prop.options)(field)\n : map(updateProp({ blotId, prop, fieldType: field.type }))(field.options);\n\n return {\n ...field,\n ...(isSingleField(field.type) ? fieldLabelUpdate(prop) : {}),\n options\n };\n};\n\nconst updateFieldProp = ({ blotId, prop }) => field => {\n return (parseBlotId(blotId).id === field.id) ? updateField({ blotId, prop, field }) : field;\n};\n\nexport const updateInlineQuestionField = (qid, blotId, prop) => (dispatch, getState) => {\n const question = getState().questions.find(p => p.qid === qid);\n\n if (!question.fields || !prop || !blotId) {\n return Promise.reject('Cannot update inline question field');\n }\n const fields = question.fields.map(updateFieldProp({ blotId, prop }));\n\n return updateFormQuestion(qid, { fields })(dispatch, getState);\n};\n\nconst setFieldIndex = blots => field => {\n const blot = (blots || []).find(bl => parseBlotId(bl.id).id === field.id);\n return blot ? ({ ...field, index: blot.index }) : field;\n};\n\nexport const updateFITBFieldsIndex = (qid, blots) => (dispatch, getState) => {\n const question = getState().questions.find(p => p.qid === qid);\n const fields = isArray(question.fields) ? question.fields.map(setFieldIndex(blots)) : [];\n\n return updateFormQuestion(qid, { fields })(dispatch, getState);\n};\n\nexport function overrideQuestionPropertiesForThemeSwitch(defaultTheme, buttonStyles) {\n return (dispatch, getState) => {\n const { questions } = getState();\n // only update these fields and these props\n const questionPropertyKeysToBeUpdated = {\n control_phone: [{ property: 'inputMask' }],\n control_widget: [{ property: 'labelAlign' }],\n control_number: [{ property: 'size' }],\n control_textbox: [{ property: 'size' }],\n control_spinner: [{ property: 'width' }],\n control_dropdown: [{ property: 'width' }],\n control_signature: [{ property: 'width' }, { property: 'height' }],\n control_textarea: [{ property: 'cols' }, { property: 'rows' }],\n control_email: [{ property: 'size' }],\n control_time: [{ property: 'shrink', useCustom: true }],\n control_datetime: [{ property: 'shrink', useCustom: true }],\n control_fullname: [{ property: 'shrink', useCustom: true }],\n control_head: [{ property: 'headerType', useCustom: true }],\n control_fileupload: [{ property: 'allowMultiple' }],\n control_button: [{ property: 'buttonStyle' }],\n control_pagebreak: [{ property: 'buttonStyle' }]\n };\n\n const defaultQuestionProps = QUESTION_PROPS();\n for (const question of questions) {\n // if no need to update, pass it\n if (!(question.type in questionPropertyKeysToBeUpdated)) {\n continue;\n }\n\n let propBase = null;\n const propsToBeUpdated = questionPropertyKeysToBeUpdated[question.type];\n for (const prop of propsToBeUpdated) {\n if (defaultTheme === 'v2' && !prop.useCustom) {\n propBase = QUESTION_PROPS_FOR_NEW_THEME;\n } else {\n propBase = defaultQuestionProps;\n }\n if (defaultTheme === 'v2' && prop.useCustom) {\n if ((question.type === 'control_fullname' && (question.middle === 'Yes' || question.prefix === 'Yes' || question.suffix === 'Yes'))\n || (question.type === 'control_datetime' && question.allowTime === 'Yes')\n || (question.type === 'control_time' && question.range === 'Yes')) {\n question[prop.property] = 'No';\n }\n if (question.type === 'control_head' && (question.order && (question.order === '1' || question.order === 1))) {\n question[prop.property] = 'Large';\n }\n } else if (propBase[question.type] && propBase[question.type][prop.property] && propBase[question.type][prop.property].value) {\n // eslint-disable-next-line\n question[prop.property] = propBase[question.type][prop.property].value;\n } else {\n // eslint-disable-next-line\n question[prop.property] = question[prop.property];\n }\n\n if (question.type === 'control_button') {\n question[prop.property] = buttonStyles?.submitButtonStyle;\n }\n\n if (question.type === 'control_pagebreak') {\n question[prop.property] = buttonStyles?.pagebreakButtonStyle;\n }\n }\n }\n if (questions.length > 0) updateMultipleFormQuestions(questions, false, true, false, true)(dispatch, getState);\n };\n}\n\nexport function overrideFormPropertiesForThemeSwitch(defaultTheme) {\n return (dispatch, getState) => {\n const newFormProps = {};\n const formPropertiesKeysToBeUpdated = [\n 'errorNavigation'\n ];\n const defaultQuestionProps = QUESTION_PROPS();\n formPropertiesKeysToBeUpdated.forEach(formPropertyToBeUpdated => {\n if (defaultTheme === 'v2') {\n newFormProps[formPropertyToBeUpdated] = QUESTION_PROPS_FOR_NEW_THEME.form[formPropertyToBeUpdated].value;\n } else {\n newFormProps[formPropertyToBeUpdated] = defaultQuestionProps.form[formPropertyToBeUpdated].value;\n }\n });\n updateFormProperty(newFormProps, false, true, true)(dispatch, getState);\n };\n}\n\nexport function overrideWidgetPropertiesForThemeSwitch(defaultTheme) {\n return (dispatch, getState) => {\n const { questions } = getState();\n const widgetKeysUpdated = {\n '529467003477f3512000001f': ['frameWidth', 'frameHeight'], // Smooth Signature\n '52f8550f0019ace53000000b': ['frameWidth', 'frameHeight'], // Short Scrollable Terms\n '529cd0ea8afa8f742d000004': ['frameWidth', 'frameHeight', 'required'], // Image Slider\n '538dddaa976bf61129000004': ['frameWidth', 'frameHeight'], // Multiple Text Fields\n '5273bb4faa80af0979000005': ['required'], // Youtube Widget\n '52a8531850e4cbc101000004': ['required'], // Progress Bar\n '52934dbf3be147110a000030': ['frameWidth', 'frameHeight'], // Date Picker\n '52961c97e3e5266570000004': ['frameWidth'] // Checklist\n };\n for (const question of questions) {\n if (!(question.selectedField in widgetKeysUpdated)) {\n continue;\n }\n let widgetProp = null;\n const propsToBeUpdated = widgetKeysUpdated[question.selectedField];\n for (const prop of propsToBeUpdated) {\n if (defaultTheme === 'v2') {\n widgetProp = WidgetDefaultPropsForNewTheme;\n } else {\n widgetProp = WidgetDefaultPropsForOldTheme;\n }\n if (widgetProp[question.selectedField] && widgetProp[question.selectedField][prop] && widgetProp[question.selectedField][prop].value) {\n question[prop] = widgetProp[question.selectedField][prop].value;\n } else {\n // eslint-disable-next-line\n question[prop] = question[prop];\n }\n }\n }\n if (questions.length > 0) updateMultipleFormQuestions(questions, false, true, false, true)(dispatch, getState);\n };\n}\n\nexport function switchNewDefaultTheme(isNDT) {\n return (dispatch, getState) => {\n const { formProperties } = getState();\n const newThemeID = isNDT ? '5e6b428acc8c4e222d1beb91' : '566a91c2977cdfcd478b4567';\n const newDefaultTheme = isNDT ? 'v2' : 'v1';\n\n endpoints.updateDefaultTheme(newThemeID).then(resp => {\n if (resp.responseCode === 200) {\n dispatch({ type: types.USER_DEFAULT_THEME_UPDATE, newThemeID });\n\n overrideQuestionPropertiesForThemeSwitch(newDefaultTheme)(dispatch, getState);\n overrideWidgetPropertiesForThemeSwitch(newDefaultTheme)(dispatch, getState);\n overrideFormPropertiesForThemeSwitch(newDefaultTheme)(dispatch, getState);\n\n updateFormProperty({ themeID: newThemeID, defaultTheme: newDefaultTheme }, false, true, true)(dispatch, getState).then(res => {\n if (res.type === 'UPDATE_SUCCEED') {\n endpoints.updateFormPropertyWithTheme(formProperties.id).then(response => { global.location.reload(); console.log('SUCCC', response); });\n }\n });\n }\n }).catch(err => {\n console.log('User default theme cannot be updated ', err); // eslint-disable-line\n });\n };\n}\n\nexport function updateSelectedFITBFieldId(fieldId) {\n return (dispatch, getState) => {\n const { selectedFITBFieldId } = getState().ui;\n if (selectedFITBFieldId !== fieldId) {\n dispatch({ type: types.UI_SELECTED_FITB_FIELD_ID, fieldId });\n }\n };\n}\n\nexport function ssoPrefillToggle(nextStatus, ssoData) {\n return (dispatch, getState) => {\n const { questions } = getState();\n const isNDT = getState().formProperties.themeID === '5e6b428acc8c4e222d1beb91';\n const { ssoProtected } = getState().formProperties;\n\n // If ssoPrefill is enabled, ssoProtected must also be enabled\n const formPropsWillUpdate = nextStatus && ssoProtected !== '1' ? { ssoPrefill: 'Yes', ssoProtected: '1' } : { ssoPrefill: nextStatus ? 'Yes' : 'No' };\n updateFormProperty(formPropsWillUpdate)(dispatch, getState).then(res => {\n if (res.type === 'UPDATE_SUCCEED') {\n const mappedFields = questions.filter(q => q.ssoPrefillKey && q.ssoPrefillKey !== '');\n if (nextStatus && mappedFields.length === 0) {\n const ssoObject = Object.entries(ssoData).filter(item => typeof item[1] === 'object').map(data => {\n const tempObj = { ...data[1] };\n tempObj.key = data[0];\n return tempObj;\n });\n\n const fieldTypesToMap = ['control_email', 'control_fullname'];\n fieldTypesToMap.forEach(type => {\n const formFields = questions.filter(q => q.type === type);\n const orderedQuestions = sortBy(formFields, q => parseInt(q.order, 10));\n const fieldSSO = ssoObject.filter(data => data.question_type === type);\n if (fieldSSO.length > 0 && formFields.length > 0) {\n let skey = '';\n if (type === 'control_fullname') {\n const firstName = fieldSSO.find(p => p.sub_type === 'first');\n const firstObj = firstName ? { first: firstName.key } : [];\n const lastName = fieldSSO.find(p => p.sub_type === 'last');\n const lastObj = lastName ? { last: lastName.key } : [];\n\n skey = { ...firstObj, ...lastObj };\n } else if (type === 'control_email') {\n skey = fieldSSO[0].key;\n }\n if (orderedQuestions && orderedQuestions[0] && orderedQuestions[0].qid) {\n updateFormQuestion(orderedQuestions[0].qid, { ssoPrefillKey: skey })(dispatch, getState);\n updateFormQuestion(orderedQuestions[0].qid, { readonly: 'Yes' })(dispatch, getState);\n }\n }\n });\n }\n\n const mappedQuestions = questions.filter(q => q.ssoPrefillKey && q.ssoPrefillKey !== '');\n mappedQuestions.forEach(question => {\n let propsWillUpdate = {\n readonly: nextStatus ? 'Yes' : 'No'\n };\n\n if (question.type === 'control_phone') {\n propsWillUpdate = {\n ...propsWillUpdate,\n inputMask: !nextStatus && isNDT ? 'enable' : 'disable'\n };\n }\n\n updateFormQuestion(question.qid, propsWillUpdate)(dispatch, getState);\n });\n }\n });\n };\n}\n\nexport function updateUserSettings(data, callAPI = true) {\n return dispatch => {\n if (callAPI === false) {\n dispatch({ type: types.USER_PROPERTIES_UPDATE, data });\n } else {\n endpoints.updateUserSettings(data).then(resp => {\n if (resp.responseCode === 200) {\n dispatch({ type: types.USER_PROPERTIES_UPDATE, data });\n }\n });\n }\n };\n}\n\nexport function showErrorIconForIntegrations({\n accountId, formID, integrationName = 'zendesk', value = true, callAPI = true\n}) {\n return dispatch => {\n if (callAPI) {\n endpoints.showErrorIconForIntegrations({ accountId, formID }).then(resp => {\n if ([400, 401].indexOf(resp.responseCode) > -1 || (resp.responseCode === 200 && resp.content.reconnect === true)) {\n dispatch({ type: types.UI_SET_INTEGRATION_ERROR, name: integrationName, value: value });\n }\n });\n } else {\n dispatch({ type: types.UI_SET_INTEGRATION_ERROR, name: integrationName, value: value });\n }\n };\n}\n\nexport function saveAutoDeleteSubmissionsConfig(data) {\n return dispatch => {\n endpoints.saveAutoDeleteSubmissionConfig(data).then(resp => {\n if (resp.responseCode === 200) {\n dispatch({ type: types.FORM_PROPERTY_UPDATING, prop: resp.content || {}, saveToUndoStack: false });\n dispatch({ type: types.FORM_PROPERTY_UPDATE_SUCCESS, prop: resp.content });\n }\n });\n };\n}\n\nexport function getAutoDeleteIntervalFromUser() {\n return dispatch => {\n endpoints.getAutoDeleteIntervalFromUser().then(resp => {\n if (resp.responseCode === 200) {\n dispatch({ type: types.USER_PROPERTIES_FETCH_SUCCESS, user: resp.content });\n }\n }).catch(err => {\n dispatch({ type: types.USER_PROPERTIES_FETCH_ERROR, error: err });\n });\n };\n}\n\nexport function getFormOwnerSettings(formOwner) {\n return (dispatch, getState) => {\n try {\n const { ui: { userInvitationKey } } = getState();\n endpoints.getUserSettingsByUsername(formOwner, userInvitationKey).then(resp => {\n if (resp.responseCode === 200) {\n dispatch({ type: types.FORM_OWNER_PROPERTIES_FETCH_SUCCESS, payload: resp.content });\n }\n }).catch(err => {\n dispatch({ type: types.FORM_OWNER_PROPERTIES_FETCH_FAILURE, error: err });\n });\n } catch (e) {\n dispatch({ type: types.FORM_OWNER_PROPERTIES_FETCH_FAILURE, error: e });\n }\n };\n}\n\nexport function updateAppPickerSideMode(value) {\n return dispatch => {\n dispatch({ type: types.UI_APP_PICKER_SIDE_MODE, value });\n };\n}\n\nexport function updateAppPickerPulse(value) {\n return dispatch => {\n dispatch({ type: types.UI_APP_PICKER_PULSE, value });\n };\n}\n\nexport function updateAppPickerTooltip(value) {\n return dispatch => {\n dispatch({ type: types.UI_APP_PICKER_TOOLTIP, value });\n };\n}\n\nexport function updateLimitLevel() {\n return (dispatch, getState) => {\n const { questions } = getState();\n const fieldPerForm = global.fieldPerFormLimitOfFormOwner;\n\n if ((global.JOTFORM_ENV === 'ENTERPRISE') || fieldPerForm === undefined || fieldPerForm === null || fieldPerForm === -1) {\n return;\n }\n\n if (questions.length < Math.floor(fieldPerForm * 0.70)) {\n dispatch({ type: types.UI_LIMIT_LEVEL, value: null });\n } else if (questions.length >= Math.floor(fieldPerForm * 0.70) && questions.length < Math.floor(fieldPerForm * 0.9)) {\n dispatch({ type: types.UI_LIMIT_LEVEL, value: LIMIT_LEVELS.NORMAL });\n } else if (questions.length >= Math.floor(fieldPerForm * 0.9) && questions.length < fieldPerForm) {\n dispatch({ type: types.UI_LIMIT_LEVEL, value: LIMIT_LEVELS.WARNING });\n } else if (questions.length >= fieldPerForm) {\n dispatch({ type: types.UI_LIMIT_LEVEL, value: LIMIT_LEVELS.DANGER });\n }\n };\n}\n\nexport function showLimitMessagePopover({ target, placement } = {}) {\n return dispatch => {\n dispatch({ type: types.UI_SHOW_LIMIT_MESAGE_POPOVER, target, placement });\n };\n}\n\nexport function setFieldLimitReachedWithSelectedQuestions(value) {\n return dispatch => {\n dispatch({ type: types.UI_FIELD_LIMIT_REACHED_WITH_SELECTED_QUESTIONS, value });\n };\n}\n\nexport function fetchUserTeamRoles() {\n return dispatch => {\n endpoints.fetchUserTeamRoles().then(resp => {\n if (resp.responseCode === 200) {\n dispatch({ type: types.USER_PROPERTIES_UPDATE, data: { teamRoles: resp.content } });\n }\n });\n };\n}\n\nexport function fetchTeamMembers(teamID) {\n return dispatch => {\n endpoints.fetchTeamMembers(teamID).then(resp => {\n if (resp.responseCode === 200) {\n dispatch({ type: types.TEAM_MEMBERS_FETCH_SUCCESS, members: resp.content });\n }\n });\n };\n}\n\nexport function fetchTeamProperties(teamID) {\n return dispatch => {\n endpoints.fetchTeamProperties(teamID).then(resp => {\n if (resp.responseCode === 200) {\n dispatch({ type: types.TEAM_PROPERTIES_FETCH_SUCCESS, properties: resp.content });\n }\n });\n };\n}\n\nexport function fetchSalesforceObjects(formID) {\n return dispatch => {\n try {\n endpoints.fetchSalesforceObjects(formID).then(resp => {\n if (resp.responseCode === 200) {\n dispatch({ type: types.FETCH_SALESFORCE_OBJECTS_SUCCESS, data: resp.content });\n }\n if (resp.responseCode >= 400) {\n console.log('An error occured.');\n }\n });\n } catch (e) {\n console.log('An error occured ', e);\n }\n };\n}\n\nexport function fetchSalesforceFields({ object, formID }) {\n return dispatch => {\n try {\n endpoints.fetchSalesforceFields({ object, formID }).then(resp => {\n if (resp.responseCode === 200) {\n dispatch({ type: types.FETCH_SALESFORCE_FIELDS_SUCCESS, data: { [object]: resp.content } });\n }\n if (resp.responseCode >= 400) {\n console.log('An error occured.');\n }\n });\n } catch (e) {\n console.log('An error occured ', e);\n }\n };\n}\n\nexport function fetchSalesforceMultipleObjectFields(objects) {\n return dispatch => {\n try {\n endpoints.fetchSalesforceMultipleObjectFields(objects).then(resp => {\n if (resp.responseCode === 200) {\n dispatch({ type: types.FETCH_SALESFORCE_FIELDS_SUCCESS, data: resp.content });\n }\n if (resp.responseCode >= 400) {\n console.log('An error occured.');\n }\n });\n } catch (e) {\n console.log('An error occured ', e);\n }\n };\n}\n\nexport function setSalesforceModalProps(props) {\n return dispatch => {\n dispatch({ type: types.SALESFORCE_MODAL_SET_PROPS, data: props });\n };\n}\n\nexport function setSalesforceModalActionId(actionId) {\n return dispatch => {\n dispatch({ type: types.SALESFORCE_MODAL_SET_ACTION_ID, data: actionId });\n };\n}\n\nexport function setSalesforceModalVisibility(isVisible) {\n return dispatch => {\n dispatch({ type: types.SALESFORCE_MODAL_SET_VISIBILITY, data: isVisible });\n };\n}\n\nexport function setSalesforceModalButtons(buttons) {\n return dispatch => {\n dispatch({ type: types.SALESFORCE_MODAL_SET_BUTTONS, data: buttons });\n };\n}\n\nexport function toggleHIPAAPINModal(prop) {\n return {\n type: types.UI_TOGGLE_HIPAA_PIN_MODAL, prop\n };\n}\n\nexport function handleInvoiceActions(formID, invoiceInfo) {\n return (dispatch, getState) => {\n const { formProperties: { lastQuestionID = '0' }, ui: { limitLevel } } = getState();\n if (limitLevel === LIMIT_LEVELS.DANGER) {\n addNotification({\n message: notificationMessages.FORM_FIELD_LIMIT_EXCEEDED_ERROR_TEXT,\n autoDismiss: 5,\n level: 'warning'\n })(dispatch);\n return new Promise(\n resolve => {\n resolve();\n }\n );\n }\n return new Promise((resolve, reject) => {\n dispatch({ type: types.FORM_PROPERTY_UPDATING, prop: invoiceInfo, saveToUndoStack: false });\n addToQueue(endpoints.buildInvoice, { formID, invoiceInfo }, resp => {\n const responseObj = Utils.parseJSON(resp);\n if (!isUndefined(responseObj) && responseObj.responseCode === 401) {\n handleCustomNavigation(`/login?rp=${global.location.href}`, '_self', true);\n return reject({ type: 'UNAUTHORIZED' });\n } if (isUndefined(responseObj) || !responseObj || !responseObj.content) {\n reject({ type: 'ERROR_ON_RESPONSE' });\n return errorPromise(() => {\n addNotification({\n message: notificationMessages.ERROR_ON_UPDATE_FORM_TEXT,\n dismissible: false,\n actions: notificationMessages.ERROR_RELOAD_BUTTON,\n level: 'error',\n backdrop: true\n })(dispatch, getState);\n });\n }\n\n const { formProperties, questions = [] } = responseObj.content;\n dispatch({ type: types.FORM_PROPERTY_UPDATING, prop: { ...formProperties, lastQuestionID } });\n dispatch({ type: types.FORM_PROPERTY_UPDATE_SUCCESS });\n a11yAnnounce(t('Form updated!'));\n const { questions: allQuestions } = getState();\n questions.forEach(question => {\n const { qid, type, order } = question || {};\n dispatch({ type: types.FORM_PROPERTY_UPDATING, prop: { ...formProperties, lastQuestionID: parseInt(qid, 10) - 1 } });\n dispatch({ type: types.FORM_PROPERTY_UPDATE_SUCCESS });\n createQuestion({ type }, dispatch, getState, order, undefined, allQuestions, false);\n dispatch({\n type: types.FORM_QUESTION_CREATE_SUCCESS, question, tempID: qid, saveToUndoStack: false, isDuplicated: false\n });\n dispatch({ type: types.FORM_STAGED_QUESTION_UPDATING, qid: qid.toString(), tempID: qid.toString() });\n dispatch({ type: types.FORM_STAGED_FULL_QUESTION_SAVE_SUCCESS, qid });\n const { stagedQuestions } = getState();\n const unsynchronizedProps = !isEmpty(stagedQuestions) ? stagedQuestions.filter(k => k.qid === qid) : [];\n unsynchronizedProps.forEach(q => {\n if (!isUndefined(q.props)) {\n updateFormQuestion(qid, q.props)(dispatch, getState);\n }\n });\n dispatch({ type: types.FORM_STAGED_QUESTION_UPDATE_SUCCESS, qid: qid, tempID: qid });\n });\n // TODO :: More than one questions can be added via this flow.\n // Therefore, more proper message should be announced\n a11yAnnounce(t('New field added.'));\n\n handleFormHeightChange()(dispatch, getState);\n resolve({ type: types.UPDATE_SUCCEED });\n return successPromise();\n }, err => {\n dispatch({ type: types.FORM_PROPERTY_UPDATE_ERROR, error: err });\n reject({ type: 'ERROR_ON_REQUEST', error: err });\n networkCallFailed(notificationMessages.ERROR_ON_UPDATE_FORM_TEXT)(dispatch, getState);\n })(dispatch, getState);\n });\n };\n}\n\nexport function addUserToUsers(user) {\n return dispatch => {\n dispatch({ type: 'ADD_USER_TO_USERS', user });\n };\n}\n\nexport function deleteUserFromUsers(user) {\n return dispatch => {\n dispatch({ type: 'DELETE_USER_FROM_USER', user });\n };\n}\n\nexport function updateUsersSelectedQuestion(user) {\n return dispatch => {\n dispatch({ type: 'UPDATE_USERS_SELECTED_QUESTION', user });\n };\n}\n\nexport function findCalculationMissingFields() {\n return (dispatch, getState) => {\n const { formProperties: { calculations = [] }, questions = [] } = getState();\n const isQuestionExist = id => {\n return Boolean(questions.find(question => {\n if (id.indexOf('|') !== -1) {\n const [fid, subfid] = id.split('|');\n const hasField = question.qid === fid;\n const hasSubfield = Array.isArray(question.fields) && question.fields.some(({ id: fieldId, fieldID }) => subfid === fieldId || subfid === fieldID);\n return hasField && hasSubfield;\n }\n return question.qid === id;\n }));\n };\n const calculationErrors = calculations.reduce((result, current) => {\n const { operands, resultField } = current;\n if (operands) {\n const fields = current.operands.split(',');\n const isFieldDeleted = fields.find(field => !isQuestionExist(field));\n if (isFieldDeleted) {\n result[resultField] = true;\n }\n }\n return result;\n }, {});\n dispatch({ type: types.UI_CALCULATION_ERRORS, data: calculationErrors });\n };\n}\n\nexport function setVariantCode(code) {\n return dispatch => {\n dispatch({\n type: types.PDF_IMPORT_UI_SET_VARIANT_CODE,\n payload: { code },\n });\n };\n}\n\nexport * from './commonShareActions';\nexport * from './AI';\nexport * from './payment';\n","import { foldMap, map } from 'sanctuary';\nimport { parseBlotId, setBlotId } from '@jotforminc/jotform-common';\n\nconst expandField = field => o => (\n o.type !== 'selectbox'\n ? o\n : map(x => ({ ...x, qid: o.qid, id: setBlotId(field.id)(x.name) }))(o.options)\n);\n\n// expandInlineOptions :: Field -> [Option] -> [Option]\nexport const expandInlineOptions = field => foldMap(Array)(expandField(field));\n\nconst mergeField = field => (\n field.type !== 'control_dropdown'\n ? field\n : ({\n ...field,\n options: [{\n ...field,\n options: field.options,\n id: setBlotId(field.id)('selectbox'),\n type: 'selectbox'\n }]\n })\n);\n\n// mergeInlineOptions :: Field -> [Option] -> [Option]\nexport const mergeInlineOptions = fields => {\n if (!fields || !Array.isArray(fields)) return fields;\n return map(mergeField)(fields);\n};\n\nexport const getOptionId = option => (\n option.type === 'selectbox'\n ? parseBlotId(option.id).id\n : option.id\n);\n\nexport const getIds = option => ids => (\n option.type === 'selectbox'\n ? map(x => parseBlotId(x).id)(ids)\n : ids\n);\n\nconst buildOption = name => fieldId => label => ({\n id: setBlotId(fieldId)(name),\n label,\n name: String(name),\n type: 'selectbox',\n});\n\n// TODO: refactor, and test\nexport const getOptionsForSelectbox = value => field => (\n value.split('\\n').map((o, i) => buildOption(`option${i + 1}`)(field.id)(o))\n);\n","import {\n pipe, filter, justs, get, concat, map, elem, reduce\n} from 'sanctuary';\n\n// TODO: string type check\nconst getId = o => get(_ => true)('id')(o); // eslint-disable-line\n\n// TODO: use get for option for safety\nconst options = acc => x => concat(acc)(map(getId)(x.options));\nconst notElem = xs => x => !elem(x)(xs);\n\nconst getOptions = xs => reduce(options)([])(xs);\n\n// fieldOptionsDiff :: [Field] -> [Field] -> [OptionId]\nconst fieldOptionsDiff = xs => ys => (\n pipe([\n filter(notElem(getOptions(xs))),\n justs\n ])(getOptions(ys))\n);\n\nexport default fieldOptionsDiff;\n","import compose from 'lodash/fp/compose';\nimport join from 'lodash/fp/join';\nimport split from 'lodash/fp/split';\nimport filter from 'lodash/fp/filter';\n\nimport { getQuestionOptions } from './index';\n\nconst map = fn => f => f.map(fn);\n\nconst getDynamicColumns = compose(\n join('|'),\n map(column => column.text),\n);\n\n// When the question is dynamic mcolumns should be got from dcolumns\nexport const normalizeColumns = ({\n mrows, mcolumns, inputType, dcolumns\n}) => ({\n mcolumns: inputType === 'Dynamic' ? getDynamicColumns(dcolumns) : mcolumns,\n mrows,\n});\n\nconst buildArray = question => (\n Array.from({ length: question.rows.length * question.columns.length })\n);\n\nconst inputTypeConverter = inputType => {\n switch (inputType) {\n case 'Radio Button': return 'radio';\n case 'Check Box': return 'checkbox';\n case 'Text Box': return 'text';\n case 'Drop Down': return 'select-one';\n default: return 'text';\n }\n};\n\nconst findColIndex = fieldIndex => questionColumnsLength => (fieldIndex % questionColumnsLength);\nconst findRowIndex = fieldIndex => questionRowsLength => Math.floor(fieldIndex / questionRowsLength);\n\n// TODO: error handling\nconst findDynamicInputType = question => fieldIndex => {\n return question.dcolumns[findColIndex(fieldIndex)(question.columns.length)].type;\n};\n\nconst normalizeInputType = question => index => (\n question.inputType === 'Dynamic'\n ? findDynamicInputType(question)(index)\n : question.inputType\n);\n\nconst getFieldType = question => compose(\n inputTypeConverter,\n normalizeInputType(question)\n);\n\nconst fieldId = question => fieldIndex => {\n const rowIndex = findRowIndex(fieldIndex)(question.columns.length);\n const colIndex = findColIndex(fieldIndex)(question.columns.length);\n\n return `input_${question.qid}_${rowIndex}_${colIndex}`;\n};\n\nconst fieldName = question => fieldIndex => {\n const rowIndex = findRowIndex(fieldIndex)(question.columns.length);\n const colIndex = findColIndex(fieldIndex)(question.columns.length);\n\n switch (question.inputType) {\n case 'Radio Button':\n return `q${question.qid}_radioTable${question.qid}[${rowIndex}]`;\n case 'Check Box':\n return `q${question.qid}_checkboxTable${question.qid}[${rowIndex}][]`;\n case 'Text Box':\n return `q${question.qid}_textboxMatrix${question.qid}[${rowIndex}][]`;\n case 'Dynamic':\n return `q${question.qid}_dynamicMatrix${question.qid}[${rowIndex}][${colIndex}]`;\n case 'Drop Down':\n return `q${question.qid}_typeA${question.qid}[${rowIndex}][]`;\n default:\n return '';\n }\n};\n\nconst fieldValue = question => fieldIndex => fieldType => {\n const colIndex = findColIndex(fieldIndex)(question.columns.length);\n\n if (question.inputType === 'Radio Button') {\n return question.columns[colIndex];\n }\n if (question.inputType === 'Dynamic' && fieldType === 'radio') {\n return question.dcolumns[colIndex] && question.dcolumns[colIndex].text;\n }\n if (question.inputType === 'Dynamic' && fieldType === 'checkbox') {\n return question.dcolumns[colIndex] && question.dcolumns[colIndex].text;\n }\n if (question.inputType === 'Check Box') {\n return question.columns[colIndex] && question.columns[colIndex];\n }\n return '';\n};\n\nconst getOptions = question => fieldIndex => fieldType => {\n const colIndex = findColIndex(fieldIndex)(question.columns.length);\n\n if (question.inputType === 'Dynamic' && fieldType === 'select-one') {\n return getQuestionOptions(question.dcolumns[colIndex]);\n }\n if (question.inputType === 'Drop Down' && fieldType === 'select-one') {\n return getQuestionOptions({ options: question.dropdown });\n }\n\n return [];\n};\n\nconst setField = question => (_, i) => {\n const fieldType = getFieldType(question)(i);\n return {\n fieldType,\n fieldId: fieldId(question)(i),\n fieldName: fieldName(question)(i),\n fieldValue: fieldValue(question)(i)(fieldType),\n fieldOptions: getOptions(question)(i)(fieldType),\n };\n};\n\nconst toFields = question => compose( // eslint-disable-line\n map(setField(question)),\n buildArray,\n)(question);\n\nconst normalize = question => {\n const { mcolumns, mrows } = normalizeColumns(question);\n const rows = split('|')(mrows);\n const columns = split('|')(mcolumns);\n const rowsCleared = filter(item => item !== '')(rows);\n const columnsCleared = filter(item => item !== '')(columns);\n\n return {\n ...question,\n mrows: join('|')(rowsCleared),\n mcolumns: join('|')(columnsCleared),\n rows: rowsCleared,\n columns: columnsCleared,\n };\n};\n\nexport const matrixQuestionFields = compose(\n toFields,\n normalize\n);\n","// import map from 'lodash/fp/map';\nimport compose from 'lodash/fp/compose';\nimport S from 'sanctuary';\nimport { getQuestionOptions } from './index';\nimport { matrixQuestionFields as matrix } from './matrix';\nimport { isWidgetSupported, WIDGET_KEYS } from '../../components/pdfImporter/helpers';\n\nconst map = f => xs => xs.map(f);\n\nexport const getRadioFieldName = qid => `q${qid}_typeA${qid}`;\n\nconst fullname = question => {\n return [\n {\n fieldName: 'first',\n fieldType: 'text',\n fieldValue: '',\n fieldId: `first_${question.qid}`,\n fieldOptions: getQuestionOptions(question),\n order: 0\n },\n {\n fieldName: 'last',\n fieldType: 'text',\n fieldValue: '',\n fieldId: `last_${question.qid}`,\n fieldOptions: getQuestionOptions(question),\n order: 0\n },\n ];\n};\n\n// getAllInlineFields :: Question -> [FieldOptions]\nconst getAllInlineFields = fields => S.reduce(xs => x => S.concat(xs)(x.options))([])(fields);\nconst getInlineRect = id => {\n const element = global.document.getElementById(id);\n if (element) {\n const {\n left, top, right, bottom, height\n } = element.getBoundingClientRect();\n return [bottom, height, left, right, top];\n }\n return [0, 0, 0, 0, 0];\n};\n\nconst inlineToAnnotation = {\n textbox: 'text',\n datebox: 'text',\n selectbox: 'select-one',\n};\n\nconst inlineFieldTypeToInput = t => inlineToAnnotation[t] || t;\n\nexport const inline = qid => fields => (\n S.map(o => ({\n fieldName: `q${qid}_inline[${o.id}]`,\n fieldType: inlineFieldTypeToInput(o.type),\n fieldValue: o.name,\n fieldId: o.id,\n fieldOptions: [],\n rect: getInlineRect(o.id),\n order: 0\n }))(getAllInlineFields(fields))\n);\n\n// TODO: use S.map without index\nconst radio = question => (\n map((o, i) => ({\n fieldName: getRadioFieldName(question.qid),\n fieldType: 'radio',\n fieldValue: o,\n fieldId: `input_${question.qid}_${i}`,\n order: i + 1\n }))(getQuestionOptions(question))\n);\n\nconst checkbox = question => (\n map((o, i) => ({\n fieldName: '',\n fieldType: 'checkbox',\n fieldValue: o,\n fieldId: `input_${question.qid}_${i}`,\n order: i + 1\n }))(getQuestionOptions(question))\n);\n\nconst time = question => {\n const { qid } = question;\n return [\n {\n fieldName: `#q${qid}_time${qid}[hourSelect]`,\n fieldType: 'text',\n fieldValue: '',\n fieldId: `input_${qid}_hourSelect`,\n fieldOptions: getQuestionOptions(question),\n order: 0\n },\n ];\n};\n\nconst phone = question => {\n return question.inputMask === 'enable' ? [\n {\n fieldName: 'full',\n fieldType: 'tel',\n fieldValue: '',\n fieldId: `input_${question.qid}_full`,\n fieldOptions: getQuestionOptions(question),\n order: 0\n },\n ]\n : ([\n {\n fieldName: 'area',\n fieldType: 'tel',\n fieldValue: '',\n fieldId: `input_${question.qid}_area`,\n fieldOptions: getQuestionOptions(question),\n order: 0\n },\n {\n fieldName: 'phone',\n fieldType: 'tel',\n fieldValue: '',\n fieldId: `input_${question.qid}_phone`,\n fieldOptions: getQuestionOptions(question),\n order: 0\n }\n ]);\n};\n\nconst address = question => {\n return [\n {\n fieldName: 'addr_line1',\n fieldType: 'text',\n fieldValue: '',\n fieldId: `input_${question.qid}_addr_line1`,\n fieldOptions: getQuestionOptions(question),\n order: 0\n },\n {\n fieldName: 'addr_line2',\n fieldType: 'text',\n fieldValue: '',\n fieldId: `input_${question.qid}_addr_line2`,\n fieldOptions: getQuestionOptions(question),\n order: 0\n },\n {\n fieldName: 'city',\n fieldType: 'text',\n fieldValue: '',\n fieldId: `input_${question.qid}_city`,\n fieldOptions: getQuestionOptions(question),\n order: 0\n },\n {\n fieldName: 'state',\n fieldType: 'text',\n fieldValue: '',\n fieldId: `input_${question.qid}_state`,\n fieldOptions: getQuestionOptions(question),\n order: 0\n },\n {\n fieldName: 'postal',\n fieldType: 'text',\n fieldValue: '',\n fieldId: `input_${question.qid}_postal`,\n fieldOptions: getQuestionOptions(question),\n order: 0\n },\n ];\n};\n\nconst birthdate = question => {\n const inputs = ['day', 'month', 'year'];\n\n return inputs.map(input => ({\n fieldName: input,\n fieldType: 'select-one',\n fieldValue: '',\n fieldId: `input_${question.qid}_${input}`,\n fieldOptions: getQuestionOptions(question),\n order: 0,\n }));\n};\n\nexport const getFields = question => {\n switch (question.type) {\n case 'control_calculation':\n case 'control_textbox':\n case 'control_email':\n case 'control_number':\n case 'control_spinner':\n case 'control_textarea':\n return [{\n fieldName: 'fieldName',\n fieldType: 'text',\n fieldValue: '',\n fieldId: `input_${question.qid}`,\n fieldOptions: getQuestionOptions(question),\n order: 0,\n }];\n case 'control_datetime':\n return [{\n fieldName: '',\n fieldType: 'text',\n fieldValue: '',\n fieldId: `input_${question.qid}`,\n fieldOptions: getQuestionOptions(question),\n order: 0,\n }];\n case 'control_dropdown':\n return [{\n fieldName: 'fieldName',\n fieldType: 'select-one',\n fieldValue: '',\n fieldId: `input_${question.qid}`,\n fieldOptions: getQuestionOptions(question),\n order: 0,\n }];\n case 'control_yesno':\n return [{\n fieldName: 'fieldName',\n fieldType: 'text',\n fieldValue: '',\n fieldId: `id_${question.qid}`,\n fieldOptions: getQuestionOptions(question),\n order: 0,\n }];\n case 'control_signature':\n return [{\n fieldName: 'fieldName',\n fieldType: 'li',\n fieldValue: '',\n fieldId: `id_${question.qid}`,\n fieldOptions: getQuestionOptions(question),\n order: 0,\n }];\n case 'control_autoincrement':\n return [{\n fieldName: 'fieldName',\n fieldType: 'text',\n fieldValue: '',\n fieldId: `hidden_${question.qid}`,\n fieldOptions: getQuestionOptions(question),\n order: 0,\n }];\n case 'control_fullname':\n return fullname(question);\n case 'control_time':\n return time(question);\n case 'control_address':\n return address(question);\n case 'control_phone':\n return phone(question);\n case 'control_checkbox':\n return checkbox(question);\n case 'control_radio':\n return radio(question);\n case 'control_matrix':\n return matrix(question);\n case 'control_inline':\n return inline(question.qid)(question.fields);\n case 'control_birthdate':\n return birthdate(question);\n case 'control_widget':\n if (isWidgetSupported(question.selectedField)) {\n return [{\n fieldName: 'fieldName',\n fieldType: 'li',\n fieldValue: '',\n fieldId: `id_${question.qid}`,\n fieldOptions: getQuestionOptions(question),\n order: 0,\n }];\n }\n if ([WIDGET_KEYS.terms_conditions, WIDGET_KEYS.short_scrollable_terms].indexOf(question.selectedField) > -1) {\n return [{\n fieldName: 'fieldName',\n fieldType: 'checkbox',\n fieldValue: '',\n fieldId: `id_${question.qid}`,\n fieldOptions: getQuestionOptions(question),\n order: 0,\n }];\n }\n return [];\n default:\n return [];\n }\n};\n\nconst findRect = rectFinder => question => field => ({\n ...field,\n fieldRect: rectFinder(question)(field.fieldId)\n});\n\nconst setNewlyCreated = field => ({\n ...field,\n newlyCreated: true\n});\n\n// TODO:refactor use composition or pattern matching instead of conditional\nconst getQuestionFields = rectFinder => question => compose(\n map(setNewlyCreated),\n map(findRect(rectFinder)(question)),\n getFields,\n)(question);\n\nexport default getQuestionFields;\n","// TODO: use pattern matching instead of condition\nexport default questionType => baseType => ({\n fieldName, fieldId, timestamp, fieldValue\n}) => radioName => {\n if (baseType === 'control_radio' && !radioName && (questionType !== 'control_inline')) {\n return { id: `custom-${fieldName}-${timestamp}-${fieldValue}`, name: `custom-${fieldName}-${timestamp}` };\n }\n if (baseType === 'control_radio' && radioName && (questionType !== 'control_inline')) {\n return { id: `${radioName}-${fieldValue}`, name: radioName };\n }\n return {\n id: `custom-${fieldId}-${timestamp}`, name: `custom-${fieldId}-${timestamp}`\n };\n};\n","import { compose } from 'redux';\nimport generateAnnotationIdAndName from './generateAnnotationIdAndName';\nimport { WIDGET_KEYS } from '../../components/pdfImporter/helpers';\n\nconst baseObj = {\n pageIndex: 0,\n pinned: false,\n selected: false,\n jfCustom: 1,\n};\n\nconst typeByWidgetKey = widgetKey => {\n switch (widgetKey) {\n case WIDGET_KEYS.terms_conditions:\n case WIDGET_KEYS.short_scrollable_terms:\n return 'control_checkbox';\n case WIDGET_KEYS.smooth_signature:\n return 'signature';\n case WIDGET_KEYS.take_photo:\n case WIDGET_KEYS.image_upload_preview:\n case WIDGET_KEYS.annotate_picture:\n return 'image';\n default:\n return 'control_textbox';\n }\n};\n\n// TODO: use pattern matching\n// one question can have multiple different field types, so we want to look sub-field type to determine the type of annotation\nexport const findType = ({ questionType, fieldType, widgetKey }) => {\n if (questionType === 'control_signature') return 'signature';\n if (questionType === 'control_textarea') return 'control_textarea';\n if (fieldType === 'text') return 'control_textbox';\n if (fieldType === 'checkbox') return 'control_checkbox';\n if (fieldType === 'radio' || fieldType === 'radiobox') return 'control_radio';\n if (fieldType === 'select-one') return 'control_dropdown';\n if (fieldType === 'select-multiple') return 'control_dropdown';\n if (fieldType === 'signaturebox') return 'signature';\n if (fieldType === 'choice') return 'control_dropdown';\n if (questionType === 'control_widget') return typeByWidgetKey(widgetKey);\n return 'control_textbox';\n};\n\nconst setType = questionType => widgetKey => fieldType => base => ({ ...base, type: findType({ questionType, fieldType, widgetKey }) });\nconst setRect = rect => base => ({ ...base, rect });\n\n// TODO: handle id generation differently for radio with pattern matching\n\nconst setIdName = questionType => field => radioName => base => {\n return {\n ...base,\n ...generateAnnotationIdAndName(questionType)(base.type)(field)(radioName)\n };\n};\nconst setQID = qid => base => ({ ...base, qid });\n\nconst setTextProps = base => (\n base.type === 'control_textbox'\n ? {\n ...base,\n textProps: {\n fontFamily: 'Helv',\n fontSize: '0'\n }\n }\n : base\n);\n\nconst setMaxLength = base => (base.type === 'control_textbox' ? { ...base, maxLength: 0 } : base);\nconst setExportValue = base => (base.type === 'control_checkbox' ? { ...base, exportValue: 'Yes' } : base);\nconst setValue = fieldValue => base => (base.type === 'control_radio' ? { ...base, value: fieldValue } : base);\nconst setOptions = (options = []) => base => (base.type === 'control_dropdown' ? { ...base, options } : base);\nconst setPageIndex = pageIndex => base => ({ ...base, pageIndex });\nconst getMultipleSelections = fieldType => (fieldType === 'select-multiple' ? 'Yes' : 'No');\nconst setMultipleSelections = fieldType => base => (\n base.type === 'control_dropdown'\n ? { ...base, multipleSelections: getMultipleSelections(fieldType) }\n : base\n);\nconst setNewlyCreated = newlyCreated => base => ({ ...base, newlyCreated: newlyCreated });\n\nconst build = ({\n fieldType, fieldValue, fieldOptions, fieldRect, timestamp, fieldId, fieldName, newlyCreated, pageIndex: annPageIndex\n}) => question => ({ radioName, pageIndex = 0 }) => compose(\n setNewlyCreated(newlyCreated),\n setPageIndex(annPageIndex || pageIndex),\n setOptions(fieldOptions),\n setMultipleSelections(fieldType),\n setRect(fieldRect),\n setExportValue,\n setMaxLength,\n setTextProps,\n setQID(question.qid),\n setIdName(question.type)({\n fieldType, fieldValue, timestamp, fieldId, fieldName\n })(radioName),\n setValue(fieldValue),\n setType(question.type)(question.selectedField)(fieldType),\n)(baseObj);\n\nexport default build;\n","import map from 'lodash/fp/map';\nimport compose from 'lodash/fp/compose';\nimport buildAnnotation from './buildAnnotation';\n\nconst build = config => question => field => (\n buildAnnotation(field)(question)(config)\n);\n\nconst buildAnnotations = config => question => compose(\n map(build(config)(question))\n);\n\nexport default buildAnnotations;\n","import map from 'lodash/fp/map';\nimport reduce from 'lodash/fp/reduce';\nimport compose from 'lodash/fp/compose';\n\nimport { calculateWidth, calculateHeight } from '../../components/pdfImporter/helpers';\n\nconst defaultSizes = {\n text: {\n width: 0,\n height: 0,\n count: 0\n },\n radio: {\n width: 0,\n height: 0,\n count: 0\n },\n checkbox: {\n width: 0,\n height: 0,\n count: 0,\n },\n 'select-one': {\n width: 0,\n height: 0,\n count: 0,\n },\n 'select-multiple': {\n width: 0,\n height: 0,\n count: 0,\n },\n textarea: {\n width: 0,\n height: 0,\n count: 0,\n },\n signature: {\n width: 0,\n height: 0,\n count: 0,\n },\n};\n\nconst sum = ({ width, height, count }) => rect => ({\n height: calculateHeight(rect) + height,\n width: calculateWidth(rect) + width,\n count: count + 1,\n});\n\nconst getName = annotation => {\n if (annotation.type === 'control_dropdown') {\n return annotation.multipleSelections === 'Yes' ? 'select-multiple' : 'select-one';\n }\n if (annotation.type === 'control_textbox') return 'text';\n if (annotation.type === 'signature') return 'signature';\n const xs = annotation.type.split('_');\n return xs && xs.length === 2 ? xs[1] : 'no-field-name';\n};\n\nconst isSupported = name => Object.keys(defaultSizes).includes(name);\n\nconst calc = acc => annotation => {\n const name = getName(annotation);\n\n return !isSupported(name)\n ? acc\n : {\n ...acc,\n [name]: {\n ...acc[name],\n ...sum(acc[name])(annotation.rect)\n }\n };\n};\n\nconst sumSizes = acc => ([head, ...tail]) => (\n !head\n ? acc\n : sumSizes(calc(acc)(head))(tail)\n);\n\nconst getMean = sizes => name => ({\n name,\n width: sizes[name].count && Math.floor(sizes[name].width / sizes[name].count),\n height: sizes[name].count && Math.floor(sizes[name].height / sizes[name].count)\n});\n\nconst toObject = (acc, item) => ({\n ...acc,\n [item.name]: {\n width: item.width,\n height: item.height\n }\n});\n\nconst keys = o => Object.keys(o);\n\nconst mean = sizes => compose(\n reduce(toObject)({}),\n map(getMean(sizes)),\n keys,\n)(sizes);\n\nexport default compose(\n mean,\n sumSizes(defaultSizes),\n);\n","import compose from 'lodash/fp/compose';\nimport getOr from 'lodash/fp/getOr';\nimport findIndex from 'lodash/findIndex';\nimport find from 'lodash/find';\nimport $ from 'sanctuary-def';\nimport invert from 'lodash/invert';\nimport S from './sanctuary';\nimport {\n getFieldType, isOrderable, calculateOrder, getRect\n} from '../../components/pdfImporter/helpers';\nimport { normalizeFieldId } from './rectFinder';\nimport { getSelectedFieldAnnotationId as getAnnotationId } from './index';\n\nconst setBase = () => ({\n rect: [],\n fieldName: null,\n fieldId: null,\n fieldValue: null,\n qid: null,\n questionType: null,\n fieldType: null,\n mappedAnnotations: [],\n pinnedAnnotations: [],\n connectField: false,\n order: null,\n});\n\nconst getFieldKey = annotationId => (pdfFields = {}) => compose(\n o => o[annotationId],\n invert\n)(pdfFields);\n\nconst valueWithIndex = (annotationId = '') => (value = '') => ({\n text: value,\n index: annotationId.indexOf(value)\n});\n\nconst isValueAtEnd = annotationId => value => (value.index > -1) // it's in the string\n && value.index + value.text.length === annotationId.length; // and there is no anything else after it\n\nexport const valueIsInAnnotationID = annotationId => compose(\n isValueAtEnd(annotationId),\n valueWithIndex(annotationId)\n);\n\nconst compareEqual = (s1, s2) => (typeof s1 === 'string' ? s1.replace(/\\s/g, ' ') : s1) === (typeof s2 === 'string' ? s2.replace(/\\s/g, ' ') : s2);\n\nconst getFieldIndex = ({ type, pdfDetails, options }) => annotationId => {\n let found;\n\n const fields = Array.isArray(pdfDetails.pdfFields) ? pdfDetails.pdfFields : [];\n switch (type) {\n case 'control_radio':\n found = find(fields, ({ value }) => valueIsInAnnotationID(annotationId)(value));\n\n return found\n ? findIndex(options.split('|'), o => compareEqual(o, found.value))\n : -1;\n case 'control_checkbox':\n found = find(fields, ({ name }) => compareEqual(name, annotationId));\n return found\n ? findIndex(options.split('|'), o => compareEqual(o, found.value))\n : -1;\n default: return -1;\n }\n};\n\nconst findColumnIndex = annotationId => rows => findIndex(rows, ({ type, name, value }) => (\n type === 'radio' ? `${name}-${value}` === annotationId : name === annotationId\n));\n\nconst getMatrixFieldIndexes = pdfDetails => annotationId => {\n const fields = Array.isArray(pdfDetails.pdfFields) ? pdfDetails.pdfFields : [];\n return fields.reduce((acc, rows, rowIndex) => {\n const columnIndex = findColumnIndex(annotationId)(rows);\n return columnIndex !== -1 ? `${rowIndex}_${columnIndex}` : acc;\n }, '0_0');\n};\n\n// getInlineFieldId :: String -> [PDFField] -> String\nconst getInlineFieldId = annotationId => (\n S.pipe([\n S.filter(x => x.name === annotationId),\n S.head,\n S.chain(S.get(S.is($.String))('value')),\n S.fromMaybe('')\n ])\n);\n\nconst setFieldIdByQuestionType = ({\n type, qid, pdfDetails, liteMode, timeFormat, allowTime, options\n}) => annotationId => {\n switch (type) {\n case 'control_inline': {\n return getInlineFieldId(annotationId)(getOr({}, 'pdfFields', pdfDetails));\n }\n case 'control_fullname': {\n const fieldKey = getFieldKey(annotationId)(pdfDetails.pdfFields);\n return `${fieldKey}_${qid}`;\n }\n case 'control_time': {\n const fieldKey = getFieldKey(annotationId)(pdfDetails.pdfFields);\n const field = timeFormat === 'AM/PM' ? 'ampm' : 'minuteSelect';\n const range = fieldKey === 'rangeTime' ? 'Range' : '';\n return `input_${qid}_${field}${range}`;\n }\n\n case 'control_datetime': {\n const fieldKey = getFieldKey(annotationId)(pdfDetails.pdfFields);\n if (fieldKey === 'liteMode' && liteMode === 'Yes') return `lite_mode_${qid}`;\n if (fieldKey === 'time' && allowTime === 'Yes') {\n const field = timeFormat === 'AM/PM' ? 'ampm' : 'min';\n return `${field}_${qid}`;\n }\n return `${fieldKey}_${qid}`;\n }\n\n case 'control_phone':\n case 'control_address': {\n const fieldKey = getFieldKey(annotationId)(pdfDetails.pdfFields);\n return `input_${qid}_${fieldKey}`;\n }\n case 'control_radio': {\n const isOtherRadio = getOr('', 'otherRadio.value', pdfDetails) && annotationId.indexOf('-other') > -1;\n const isOtherInput = pdfDetails.otherInput === annotationId;\n if (isOtherRadio) {\n return `other_${qid}`;\n }\n if (isOtherInput) {\n return `input_${qid}`;\n }\n return `input_${qid}_${getFieldIndex({ type, pdfDetails, options })(annotationId)}`;\n }\n case 'control_checkbox': {\n const isOtherCheckbox = getOr('', 'otherCheckbox.name', pdfDetails) === annotationId;\n const isOtherInput = pdfDetails.otherInput === annotationId;\n if (isOtherCheckbox) {\n return `other_${qid}`;\n }\n if (isOtherInput) {\n return `input_${qid}`;\n }\n return `input_${qid}_${getFieldIndex({ type, pdfDetails, options })(annotationId)}`;\n }\n case 'control_matrix': {\n return `input_${qid}_${getMatrixFieldIndexes(pdfDetails)(annotationId)}`;\n }\n case 'control_yesno':\n case 'control_signature': {\n return `id_${qid}`;\n }\n case 'control_autoincrement': {\n return `hidden_${qid}`;\n }\n case 'control_birthdate': {\n return `input_${qid}_${getFieldKey(annotationId)(pdfDetails.pdfFields)}`;\n }\n default: return `input_${qid}`;\n }\n};\n\nconst setFieldId = question => annotation => base => ({\n ...base,\n fieldId: setFieldIdByQuestionType(question)(\n // if there is a parentId of the annotation we'll use that to find the field id,\n // because it means it's duplicate, so that we can draw path etc. to the parent form field\n S.fromMaybe(annotation.id)(getAnnotationId(annotation))\n )\n});\n\nconst setFieldType = document => base => ({\n ...base,\n fieldType: getFieldType(document.querySelector(normalizeFieldId(base.fieldId)))\n});\n\nconst setFieldName = document => base => {\n const field = document.querySelector(normalizeFieldId(base.fieldId));\n return {\n ...base,\n fieldName: field ? field.name : null,\n };\n};\n\nconst setFieldValue = document => base => {\n const field = document.querySelector(normalizeFieldId(base.fieldId));\n return {\n ...base,\n fieldValue: field ? field.value : null,\n };\n};\n\nconst setLabelId = document => base => {\n const label = document.getElementById(`label_${base.fieldId}`);\n return {\n ...base,\n labelId: label ? label.id : null\n };\n};\n\nconst setRect = document => question => base => {\n const input = document.querySelector(normalizeFieldId(base.fieldId));\n const label = document.getElementById(`label_${base.fieldId}`);\n return {\n ...base,\n rect: getRect(document)(question, input, label),\n };\n};\n\nconst setMappedAnnotations = annotation => base => ({\n ...base,\n mappedAnnotations: [annotation.id]\n});\n\nconst setQuestionIdAndType = ({ qid, type }) => base => ({\n ...base,\n qid: qid || '',\n questionType: type || ''\n});\n\nconst setOrder = document => question => base => {\n const field = document.querySelector(normalizeFieldId(base.fieldId));\n return {\n ...base,\n order: isOrderable(field, base.questionType)\n ? calculateOrder(document)(field, question) : null\n };\n};\n\nconst getSelectedField = document => question => annotation => (question ? compose(\n setOrder(document)(question),\n setQuestionIdAndType(question),\n setMappedAnnotations(annotation),\n setRect(document)(question),\n setLabelId(document),\n setFieldValue(document),\n setFieldName(document),\n setFieldType(document),\n setFieldId(question)(annotation),\n setBase\n)(annotation) : setBase());\n\nexport default getSelectedField;\n","import S from 'sanctuary';\nimport * as $ from 'sanctuary-def';\nimport generateAnnotationIdAndName from './generateAnnotationIdAndName';\n\nconst isNumber = x => S.is($.Number)(x) && !S.equals(x)(NaN);\n\nconst validate = a => {\n if (!S.is($.Object)(a)) return S.Nothing; // null, undefined\n if (S.equals(a)({})) return S.Nothing; // empty object\n\n // validate rectangle\n if (S.prop('length')(S.filter(isNumber)(a.rect)) !== 4) return S.Nothing;\n\n // validate a.type and questionType\n\n return S.Just(a);\n};\n\nconst clone = questionType => a => {\n // const id = `mert-${Date.now()}`;\n const height = Math.abs(a.rect[1] - a.rect[3]) + 3;\n\n const timestamp = Date.now();\n\n const { id, name } = generateAnnotationIdAndName(questionType)(a.type)({\n fieldName: a.name,\n fieldId: 'dublicate',\n timestamp,\n fieldValue: a.value + timestamp\n })(a.name);\n\n return {\n ...a,\n rect: [a.rect[0], a.rect[1] - height, a.rect[2], a.rect[3] - height],\n id,\n name,\n selected: false,\n parentId: a.parentId || a.id,\n newlyCreated: true\n };\n};\n\n// cloneAnnotation :: Annotation -> Maybe Annotation\nconst cloneAnnotation = questionType => a => S.pipe([\n validate,\n S.map(clone(questionType))\n])(a);\n\nexport default cloneAnnotation;\n","/* eslint-disable max-lines */\nimport groupBy from 'lodash/groupBy';\nimport uniq from 'lodash/uniq';\nimport {\n isUndefined, omit, map, head, getOr\n} from 'lodash/fp';\nimport { flushSync } from 'react-dom';\nimport $ from 'sanctuary-def';\nimport S from '../libs/pdfImport/sanctuary';\n\nimport * as types from '../constants/actionTypes';\nimport {\n getConnectField,\n getAnnotation,\n getAnnotationType,\n getQuestionPdfDetails,\n getQuestionAnnotations,\n getQuestionType,\n getSelectedFormField,\n getSelectedFormFieldPinnedAnnotations,\n getQuestionSelectedField,\n isPDFImporter,\n getQuestion,\n getSelectedAnnotations,\n getAnnotationSelection,\n getRadioNameByQuestionId,\n getAllAnnotations,\n getAnnotationIDs,\n getPageDistanceFromOrigin,\n getNewlyCreatedAnnotations,\n getScale,\n getPDFPageSettings,\n getDublicatedAnnotations,\n getIsAnnotationDragging,\n isAdmin\n} from '../reducers/pdfImport';\nimport {\n updateFormQuestion,\n updateSelectedQuestion,\n addToQueue,\n successPromise,\n leftPanelToggle,\n updateFormProperty,\n addNotification,\n} from './index';\nimport {\n supportedField,\n normalizeFieldName,\n calculatePdfDetails,\n unsetPDFDetailsField,\n fieldNameByAnnotation,\n canPin,\n updatePDFFieldsOrder,\n updatePDFFieldsForOption,\n updatePDFDetailsForMatrix,\n getFieldIndex,\n getOperationName,\n pdfDetailsDefault,\n createOptionField,\n canUpdateQuestion,\n updateAnnotationRectWithDeltaCoordinates,\n canDeleteAnnotation,\n getAnnotationsWithQId,\n findPageIndex,\n removeQuestionDOMClone,\n createQuestionDOMClone,\n canCreateAnnotationByFieldType,\n isFieldMapped,\n calculateBoundary,\n shouldSkipAnnotationCreation,\n formFieldMappedAnnotations as calcFormFieldMappedAnnotations,\n getDefaultProps,\n isWidgetSupported,\n getCustomFieldType,\n canMoveAnnotation,\n includes,\n oneToManyFields,\n pull,\n getPropFromFirstSelected,\n hasNoDiff\n} from '../components/pdfImporter/helpers';\n\nimport { getQuestionOptions } from '../libs/pdfImport';\nimport fieldOptionsDiff from '../libs/pdfImport/fieldOptionsDiff';\nimport getQuestionFields, { getRadioFieldName, inline, getFields } from '../libs/pdfImport/getQuestionFields';\nimport buildAnnotations from '../libs/pdfImport/buildAnnotations';\nimport { findType } from '../libs/pdfImport/buildAnnotation';\nimport rectFinder from '../libs/pdfImport/rectFinder';\nimport getAnnotationSizes from '../libs/pdfImport/getAnnotationSizes';\nimport getSelectedField from '../libs/pdfImport/getSelectedField';\nimport cloneAnnotation from '../libs/pdfImport/cloneAnnotation';\nimport { DUPLICATE_ANNOTATION } from '../constants/notificationMessages';\nimport { endpoints } from '../libs/api';\n\nexport const setErrorMessage = message => dispatch => {\n dispatch({\n type: types.PDF_IMPORT_UI_SET_ERROR_MESSAGE,\n message\n });\n};\n\nexport const setMapperWidth = (width, lastAction) => (dispatch, getState) => {\n const { pdfImport: { ui: { mapperWidth } } } = getState();\n\n if (mapperWidth.width === width) {\n return;\n }\n\n dispatch({\n type: types.PDF_IMPORT_UI_SET_MAPPER_WIDTH,\n width,\n lastAction\n });\n};\n\nexport const setPDFPageSettings = settings => dispatch => {\n dispatch({\n type: types.PDF_IMPORT_UI_SET_PDF_PAGE_SETTINGS,\n payload: settings,\n });\n};\n\nexport const setScale = scale => (dispatch, getState) => {\n const { pdfImport: { ui: { scale: currScale } } } = getState();\n\n if (scale === currScale) {\n return;\n }\n\n dispatch({\n type: types.PDF_IMPORT_UI_SET_SCALE,\n scale\n });\n};\n\nexport const setAnnotationDragging = isDragging => dispatch => {\n dispatch({\n type: types.PDF_IMPORT_UI_DRAG_ANNOTATION,\n isDragging\n });\n};\n\nexport const setAnnotationResizing = isResizing => dispatch => {\n dispatch({\n type: types.PDF_IMPORT_UI_RESIZE_ANNOTATION,\n isResizing\n });\n};\n\nexport const setSelectionSource = selectionSource => dispatch => {\n dispatch({\n type: types.PDF_IMPORT_UI_SET_SELECTION_SOURCE,\n selectionSource\n });\n};\n\nexport const setAnnotationSelection = (selection = []) => (dispatch, getState) => {\n global.document.body.removeEventListener('keydown', global.removeAnnotationWithKeyCallback);\n if (selection && selection.length) {\n global.removeAnnotationWithKeyCallback = e => {\n if (e.key === 'Backspace' && getState().pdfImport.ui.questionSelectionSource === 'pdf') {\n e.preventDefault();\n disconnectField(selection)(dispatch, getState);\n }\n };\n global.document.body.addEventListener('keydown', global.removeAnnotationWithKeyCallback);\n }\n dispatch({\n type: types.PDF_IMPORT_SET_ANNOTATION_SELECTION,\n payload: {\n prevSelection: getAnnotationSelection(getState()),\n selection: uniq(selection)\n }\n });\n};\n\nconst updateAnnotation = annotation => (dispatch, getState) => {\n dispatch({\n type: types.PDF_IMPORT_UPDATE_ANNOTATION,\n payload: annotation\n });\n\n addToQueue(\n endpoints.updateAnnotations,\n { formID: getState().form.id, annotations: [annotation] },\n () => successPromise(),\n () => { }\n )(dispatch, getState);\n};\n\nconst filterOutAnnotationsWithMissingRect = (ann = []) => (dispatch, getState) => {\n const { annotations, toRemove } = ann.reduce((acc, a) => {\n if (!a.rect || !Array.isArray(a.rect)) {\n const question = getQuestion(getState())(a.qid);\n if (question) {\n resetPDFDetails()(dispatch, getState);\n }\n\n return { annotations: acc.annotations, toRemove: [...acc.toRemove, a.id] };\n }\n return { annotations: [...acc.annotations, a], toRemove: acc.toRemove };\n }, { annotations: [], toRemove: [] });\n\n if (toRemove.length > 0) {\n addToQueue(\n endpoints.deleteAnnotations,\n { formID: getState().form.id, annotations: toRemove },\n () => successPromise(),\n () => { }\n )(dispatch, getState);\n }\n\n return annotations;\n};\n\nexport const setAnnotations = (annotations, questions) => (dispatch, getState) => {\n const annotationsWithQId = getAnnotationsWithQId(questions ? questions : getState().questions);\n annotations.forEach((pageAnnotations, pageIndex) => {\n const filteredPageAnnotations = filterOutAnnotationsWithMissingRect(pageAnnotations)(dispatch, getState);\n const annotationsWithQuestionId = annotationsWithQId(filteredPageAnnotations).filter(a => !Number.isNaN(parseFloat(a.qid)));\n\n dispatch({\n type: types.PDF_IMPORT_PAGE_ANNOTATIONS_FETCH_SUCCESS,\n payload: {\n pageIndex,\n annotations: annotationsWithQuestionId\n }\n });\n });\n};\n\nexport const fetchAnnotations = () => (dispatch, getState) => {\n const hasAnnotations = getAllAnnotations(getState()).length > 0;\n\n if (hasAnnotations) {\n return;\n }\n\n endpoints.fetchPDFAnnotations(getState().form.id).then(response => {\n const decodedAnnotations = S.justs((response.content || []).map(annotation => {\n try {\n return S.Just(JSON.parse(annotation.value));\n } catch (e) {\n console.log('fetchAnnotations::JSONParsingError=', e);\n return S.Nothing;\n }\n }));\n const groupedByPages = groupBy(decodedAnnotations, 'pageIndex');\n setAnnotations(Object.values(groupedByPages))(dispatch, getState);\n });\n};\n\nexport const setSelectedField = field => (dispatch, getState) => {\n const mappedAnnotationId = getOr('', 'mappedAnnotations.0', field);\n if (mappedAnnotationId) {\n setAnnotationSelection([mappedAnnotationId])(dispatch, getState);\n }\n\n if (field && field.qid === null) { // form field has been deselected, so field.qid is null\n getSelectedFormFieldPinnedAnnotations(getState()).forEach(id => { // set annotations to false\n dispatch({\n type: types.PDF_IMPORT_SET_PINNED_ANNOTATION,\n payload: { id, value: false },\n });\n });\n }\n // control if the field is already mapped or not, if yes change mapped prop to true,\n // because when the user first clicks form field we fire this action, but we don't know yet\n // if it's mapped or not.\n // TODO: find the question and look at the it's pdfDetails property for the field\n // If there is any set mapped to true\n dispatch({\n type: types.PDF_IMPORT_SET_SELECTED_FORM_FIELD,\n payload: {\n ...field\n }\n });\n};\n\nconst parentOrId = annotation => (annotation.parentId ? annotation.parentId : annotation.id);\nconst getDuplicates = annotation => (dispatch, getState) => (\n withDuplicateAnnotations([parentOrId(annotation)])(dispatch, getState) // eslint-disable-line\n);\n\nconst constant = x => () => x;\n\nexport const deleteAnnotations = annotation => config => (dispatch, getState) => S.pipe([\n S.ifElse(c => c.source === 'form')(() => getDuplicates(annotation)(dispatch, getState))(() => [annotation.id]),\n map(a => constant(a)(disconnectField([a])(dispatch, getState))), // eslint-disable-line\n])(config);\n\nconst getSelectedFormFieldByAnnotations = annotationId => getState => {\n const { qid } = getAnnotation(getState(), annotationId);\n const { type, pdfDetails } = getQuestion(getState())(qid);\n const { fieldName, fieldValue } = fieldNameByAnnotation(annotationId, type, pdfDetails);\n return {\n qid, questionType: type, fieldName, fieldValue, mappedAnnotations: [annotationId]\n };\n};\n\nexport const resetPDFDetails = (annotationId = '') => (dispatch, getState) => {\n const {\n qid, questionType, fieldName, mappedAnnotations, fieldValue\n } = (annotationId !== '' ? getSelectedFormFieldByAnnotations(annotationId)(getState) : getSelectedFormField(getState())) || {};\n if (!supportedField(questionType)) return Promise.reject(new Error('Unsupported field'));\n const widgetID = getQuestionSelectedField(getState())(qid);\n\n const pdfDetails = unsetPDFDetailsField(\n normalizeFieldName(questionType)(fieldName)(widgetID),\n questionType,\n mappedAnnotations,\n widgetID,\n fieldValue,\n )(getQuestionPdfDetails(getState())(qid), getQuestionAnnotations(getState(), qid));\n\n return updateFormQuestion(qid, { pdfDetails: JSON.stringify(pdfDetails) }, false, true, false, false, true)(dispatch, getState);\n};\n\nexport const setHoveredAnnotation = id => dispatch => {\n dispatch({\n type: types.PDF_IMPORT_SET_HOVERED_ANNOTATION,\n payload: { id },\n });\n};\n\nexport const mapFieldWithAnnotation = () => (dispatch, getState) => {\n const selectedFormField = getSelectedFormField(getState());\n\n if (!selectedFormField || !selectedFormField.pinnedAnnotations) return Promise.reject('No form field selected');\n\n const {\n questionType, qid, fieldName, fieldValue, pinnedAnnotations\n } = selectedFormField;\n\n if (!supportedField(questionType)) return Promise.reject('Unsupported form field');\n\n const annotationsToMap = pinnedAnnotations.map(p => getAnnotation(getState(), p));\n\n // Disconnect annotations if it's already mapped with a form field\n annotationsToMap.forEach(a => {\n if (a.parentId) {\n updateAnnotation(omit(['parentId'])(a))(dispatch, getState);\n }\n if (a.qid && !a.parentId) {\n const exQuestionType = getQuestionType(getState())(a.qid);\n if (exQuestionType) {\n resetPDFDetails()(dispatch, getState);\n }\n }\n });\n\n const annotations = getQuestionAnnotations(getState(), qid);\n\n const widgetID = getQuestionSelectedField(getState())(qid);\n\n const normalizedFieldName = normalizeFieldName(questionType)(fieldName)(widgetID);\n const originalPdfDetails = getQuestionPdfDetails(getState())(qid);\n const { order, fieldId } = selectedFormField;\n\n const pdfDetails = calculatePdfDetails(\n normalizedFieldName,\n fieldValue,\n questionType,\n annotationsToMap,\n order,\n widgetID,\n fieldId,\n )(originalPdfDetails, annotations);\n\n return updateFormQuestion(\n qid, { pdfDetails: JSON.stringify(pdfDetails) }, false, true, false, false, true\n )(dispatch, getState)\n .then(() => {\n dispatch({ // normalize selectedFormField after question update for better UI experience\n type: types.PDF_IMPORT_UPDATE_SELECTED_FORM_FIELD,\n payload: { mappedAnnotations: [...annotationsToMap.map(a => a.id)], connectField: false },\n });\n\n annotationsToMap.forEach(a => {\n // set qid of newly mapped annotations\n dispatch({\n type: types.PDF_IMPORT_UPDATE_ANNOTATION_QID,\n payload: { id: a.id, qid },\n });\n setHoveredAnnotation('')(dispatch, getState);\n });\n });\n};\n\nconst isSameRadioGroup = question => annotation => {\n const fieldName = getOr(null, 'pdfDetails.fieldName', question);\n return (annotation && fieldName && (annotation.name === fieldName));\n};\n\n// TODO: test this function\nexport const setAnnotationPinned = (id, value) => (dispatch, getState) => {\n const state = getState();\n\n // if we want to toggle pinned, there must be a selectedFormField and it's connectField prop must be true\n if (getConnectField(state) === false) return;\n\n const selectedFormField = getSelectedFormField(state);\n\n // radio buttons should have same name group\n const { qid } = selectedFormField;\n const question = getQuestion(getState())(qid);\n const annotation = getAnnotation(getState(), id);\n if (question && question.type === 'control_radio' && !isSameRadioGroup(question)(annotation)) return false;\n\n // user wants to pin a pdf field, but is it possible?\n if (value === true && !canPin(selectedFormField, getAnnotationType(getState(), id))) return;\n\n // find all pinnedAnnotations but filtered out the current one\n const otherPinnedAnnotations = getSelectedFormFieldPinnedAnnotations(state).filter(a => a !== id);\n\n // The user cancels pin of an annotation, so we cancel the pin of other pinned annotations, in case the\n // question supports one-to-many connection\n if (value === false) {\n otherPinnedAnnotations.forEach(a => {\n dispatch({\n type: types.PDF_IMPORT_SET_PINNED_ANNOTATION,\n payload: { id: a, value },\n });\n });\n }\n dispatch({\n type: types.PDF_IMPORT_SET_PINNED_ANNOTATION,\n payload: { id, value },\n });\n\n return value;\n};\n\nexport const selectAnnotation = ({ id, qid, isCardForm }) => (dispatch, getState) => {\n updateSelectedQuestion(qid, true)(dispatch, getState);\n\n const question = getQuestion(getState())(qid);\n const annotation = getAnnotation(getState(), id);\n const selectedField = getSelectedField(global.document)(question)(annotation);\n const shouldDelay = isCardForm || (question && question.type === 'control_inline');\n\n setTimeout(() => {\n setSelectedField(selectedField)(dispatch, getState);\n }, shouldDelay ? 400 : 0);\n};\n\nexport const updatePDFFieldsForSortedOptions = (indexes, qid) => (dispatch, getState) => {\n const originalPdfDetails = getQuestionPdfDetails(getState())(qid);\n\n if (!originalPdfDetails || !originalPdfDetails.pdfFields) return Promise.reject('Unable to access pdfFields');\n\n const pdfDetails = {\n ...originalPdfDetails,\n pdfFields: updatePDFFieldsOrder(indexes, originalPdfDetails.pdfFields),\n };\n updateFormQuestion(\n qid, { pdfDetails: JSON.stringify(pdfDetails) }, false, true, false, false, true\n )(dispatch, getState).then(() => {\n // TODO: use field defaults to unset selected form field\n setSelectedField({\n rect: [],\n fieldName: null,\n fieldId: null,\n fieldValue: null,\n qid: null,\n questionType: null,\n fieldType: null,\n mappedAnnotations: [],\n pinnedAnnotations: [],\n connectField: false,\n order: null,\n })(dispatch, getState);\n });\n};\n\n// TODO: refactor this function. We want to call this function from the pdfImporter middleware.\nexport const updatePDFFieldsForNewOption = (qid, propPath, text) => (dispatch, getState) => {\n if (isPDFImporter(getState())) {\n const operation = getOperationName(propPath, text);\n\n if (operation === null) return;\n\n const originalPdfDetails = getQuestionPdfDetails(getState())(qid);\n\n const questionType = getQuestionType(getState())(qid);\n\n if (!originalPdfDetails || !originalPdfDetails.pdfFields) return Promise.reject('Unable to access pdfFields');\n\n const pdfDetails = {\n ...originalPdfDetails,\n pdfFields: updatePDFFieldsForOption({ propPath, text }, questionType, originalPdfDetails.pdfFields),\n };\n\n if (operation === 'delete') {\n // disconnect option if it's possible\n const index = getFieldIndex(propPath, operation);\n\n const field = originalPdfDetails.pdfFields[index];\n const { fieldName } = originalPdfDetails;\n\n if (field) {\n const aId = (questionType === 'control_checkbox')\n ? field.name\n : `${fieldName}-${field.value}`; // radio id\n\n if (aId) {\n disconnectField([aId])(dispatch, getState); // eslint-disable-line\n }\n }\n }\n\n updateFormQuestion(\n qid, { pdfDetails: JSON.stringify(pdfDetails) }, false, true, false, false, true\n )(dispatch, getState).then(() => {\n setSelectedField({\n rect: [],\n fieldName: null,\n fieldId: null,\n fieldValue: null,\n qid: null,\n questionType: null,\n fieldType: null,\n mappedAnnotations: [],\n pinnedAnnotations: [],\n connectField: false,\n order: null,\n })(dispatch, getState);\n });\n\n // create pdf fields and connect them\n if (operation === 'create' && (questionType === 'control_radio' || questionType === 'control_checkbox')) {\n const options = getQuestionOptions(getQuestion(getState())(qid));\n const optionOrder = options.length; // last option index\n // if single/multi-choice question add option annotation on the pdf\n const selectedFormField = {\n qid,\n questionType,\n fieldType: questionType === 'control_radio' ? 'radio' : 'checkbox',\n fieldName: questionType === 'control_radio' ? getRadioFieldName(qid) : '',\n fieldValue: `Type option ${optionOrder}`,\n fieldId: `input_${qid}_${optionOrder - 1}`,\n pageIndex: findPageIndex({ window: global.window, document: global.document }),\n order: optionOrder,\n newlyCreated: true,\n };\n\n // when we create a new option with enter key, the dom of the option may not ready yet, so we wait fo 100ms\n setTimeout(() => addAnnotationToPDF(selectedFormField)(dispatch, getState), 100); // eslint-disable-line\n }\n }\n};\n\n// We use this function only when a new single/multiple choice is created, not when the user updates.\n// But we can use it with updates also, so used this name for compatibility.\n// Look at the updatePDFDetailsForMatrix for a full update/create implementation\nconst updatePDFDetailsForChoice = question => {\n return {\n ...pdfDetailsDefault[question.type],\n pdfFields: question.options.split('|')\n .map(() => {\n return createOptionField(question.type);\n })\n };\n};\n\nconst pdfDetailsCreateMapper = {\n control_checkbox: updatePDFDetailsForChoice,\n control_radio: updatePDFDetailsForChoice,\n control_matrix: updatePDFDetailsForMatrix,\n};\n\nexport const createAnnotations = ({ annotations }) => queue => (dispatch, getState) => {\n // update here store with new annotations for optimistic UI\n annotations.forEach(annotation => {\n dispatch({\n type: types.PDF_IMPORT_CREATE_ANNOTATION,\n selectionSource: 'form', // change ui.selectionSource to define action src correctly and trigger autoScroll\n payload: annotation\n });\n });\n\n return queue(\n endpoints.createAnnotations,\n { formID: getState().form.id, annotations },\n () => successPromise(),\n () => { }\n )(dispatch, getState); // TODO: remove created annotations from the state in this case\n};\n\nconst timestamp = field => ({ ...field, timestamp: Date.now() });\n\nconst getInitialPdfDetails = state => question => existingQuestion => {\n // it's an existing question, so we want to return it's pdfDetails from the state\n let existing;\n if (existingQuestion) {\n existing = getQuestionPdfDetails(state)(question.qid);\n }\n if (existing) return existing;\n\n // it's a new question\n return pdfDetailsCreateMapper[question.type]\n ? pdfDetailsCreateMapper[question.type](question) // for checkbox/radio/matrix a custom structure is necessary\n : pdfDetailsDefault[question.type]; // build an empty structure\n};\n\nexport const addAnnotations = ({\n qid, questionType, fields, existingQuestion = false, pageIndex, duplicateAnnotation, annotation // eslint-disable-line\n}) => queue => (dispatch, getState) => {\n const question = getQuestion(getState())(qid);\n\n if (!questionType || !question || !fields || fields.length === 0) {\n return Promise.reject('Missing paramaters for addAnnotations');\n }\n\n const config = {\n radioName: getRadioNameByQuestionId(getState())(qid, questionType),\n pageIndex,\n };\n\n const annotations = duplicateAnnotation\n ? S.maybe([])(a => [a])(cloneAnnotation(questionType)(annotation))\n : buildAnnotations(config)(question)(map(timestamp)(fields));\n\n createAnnotations({ annotations })(queue)(dispatch, getState);\n\n if (duplicateAnnotation) {\n // Select duplicated annotation\n const { id } = head(annotations);\n selectAnnotation({ id, qid })(dispatch, getState);\n setAnnotationSelection([id])(dispatch, getState);\n\n // we don't want to update mapping of the question with duplicated annotation, so we return\n return Promise.resolve(annotations);\n }\n\n const { selectedField: widgetID } = question;\n\n // TODO:refactor make point free\n const pdfDetails = fields.reduce((acc, field, i) => {\n return calculatePdfDetails(\n normalizeFieldName(questionType)(field.fieldName)(widgetID),\n field.fieldValue,\n questionType,\n [annotations[i]], // TODO: maybe fieldsWithAnnations is better\n field.order,\n widgetID,\n field.fieldId,\n )(\n acc,\n existingQuestion ? getQuestionAnnotations(getState(), qid) : annotations,\n );\n }, getInitialPdfDetails(getState())(question)(existingQuestion));\n\n return updateFormQuestion(\n qid, { pdfDetails: JSON.stringify(pdfDetails) }, false, true, false, false, true\n )(dispatch, getState)\n .then(() => {\n // Get first annotation's id to initiate selection operations\n const { id } = head(annotations);\n // Set mappedAnnotations to indicate selectedFormField is mapped\n selectAnnotation({ id, qid })(dispatch, getState);\n // Set annotationSelection to create resizable/draggable area\n setAnnotationSelection([id])(dispatch, getState);\n\n return annotations;\n });\n};\n\n// TODO: temporary array, delete it when you're done with checking\nconst supportedForAddingAnnotations = [\n 'control_textbox',\n 'control_fullname',\n 'control_email',\n 'control_number',\n 'control_spinner',\n 'control_datetime',\n 'control_textarea',\n 'control_dropdown',\n 'control_signature',\n 'control_address',\n 'control_phone',\n 'control_checkbox',\n 'control_radio',\n 'control_matrix',\n 'control_time',\n 'control_inline',\n 'control_calculation',\n 'control_autoincrement',\n 'control_birthdate',\n 'control_yesno'\n];\n\nconst hasSupportForAddingAnnottions = ({ selectedField, type }) => {\n if (type === 'control_widget') {\n return isWidgetSupported(selectedField);\n }\n\n return supportedForAddingAnnotations.indexOf(type) !== -1;\n};\n\n// TODO: move this function in the library\nconst getPageDistances = annotations => distance => {\n const boundary = calculateBoundary(map(a => a.rect)(annotations));\n const top = distance.top + Math.abs(boundary[1] - boundary[3]) + 3;\n const left = distance.left + Math.abs(boundary[0] - boundary[2]) + 3;\n return {\n left,\n top,\n };\n};\n\nexport const handleQuestionCreation = action => (dispatch, getState) => {\n // annotation creation depends on the form fields to be fully present(also the animation should be finished) on the page,\n // so we delay the start of the creation for some time.\n setTimeout(() => {\n const {\n question, isDuplicated = false, duplicateAnnotation = false, annotation\n } = action;\n // In order to disable annotation creation on desired actions, extra checks are added to continue add annotation flow\n // e.g. on field settings panel 'Duplicate' action is triggering 'FORM_QUESTION_CREATE_SUCCESS' action type, this was causing unwanted annotation creation\n if (shouldSkipAnnotationCreation(isDuplicated)(getState())) {\n updateFormQuestion(question.qid, {\n pdfDetails: null\n }, false, true, false, false, false)(dispatch, getState);\n return;\n }\n\n let fields = [];\n\n if (supportedField(question.type) && hasSupportForAddingAnnottions(question)) { // HERE\n const cloned = createQuestionDOMClone(question)(getAnnotationSizes(getAllAnnotations(getState())));\n const pageIndex = findPageIndex({ window: global.window, document: global.document });\n const { top } = getPageDistanceFromOrigin(getState())(pageIndex);\n const distance = { left: 20, top: top + 20 };\n const { height: pdfHeight, width: pdfWidth, yOffset = 0 } = getPDFPageSettings(getState())(pageIndex);\n const annotationType = findType({\n questionType: question.type,\n fieldType: getFields(question)[0].fieldType,\n widgetKey: question.selectedField\n });\n const defaultSize = getOr({}, `formProperties.importedPdfDefaultAnnotationSizes.${annotationType}`, getState());\n const config = {\n fieldType: annotationType,\n distance,\n preserve: true,\n pdfHeight: pdfHeight - yOffset,\n pdfWidth,\n defaultWidth: Math.max(0, defaultSize.width),\n defaultHeight: Math.max(0, defaultSize.height),\n };\n fields = getQuestionFields(rectFinder(cloned)(config))(question);\n\n addAnnotations({\n qid: question.qid, questionType: question.type, fields, pageIndex, duplicateAnnotation, annotation\n })(addToQueue)(dispatch, getState)\n .then(annotations => {\n const distances = getPageDistances(annotations)(getPageDistanceFromOrigin(getState())(pageIndex));\n\n dispatch({\n type: types.PDF_IMPORT_SET_PAGE_DISTANCE,\n payload: { pageIndex, left: 0, top: distances.top + 20 } // put a bottom margin\n });\n });\n\n removeQuestionDOMClone(cloned);\n }\n\n // if we have question type in the mapper, it means we want to update pdfDetails for the created question.\n // TODO: We want to delete above code when we finish implementing multiple annotation for the question created, because\n // it'll create the pdfDetails automatically for us. But if we delete that feature we'll need to activate this code again.\n if (!duplicateAnnotation && question && pdfDetailsCreateMapper[question.type] && !hasSupportForAddingAnnottions(question)) {\n updateFormQuestion(question.qid, {\n pdfDetails: pdfDetailsCreateMapper[question.type](question)\n }, false, true, false, false, false)(dispatch, getState);\n }\n }, 500);\n};\n\nexport const addToPDF = ({\n qid,\n questionType,\n fieldType,\n fieldName,\n fieldValue,\n order,\n fieldId = Math.random(),\n pageIndex,\n newlyCreated = false,\n}) => (dispatch, getState) => {\n const question = getQuestion(getState())(qid);\n const cloned = createQuestionDOMClone(question)(getAnnotationSizes(getAllAnnotations(getState())));\n const distance = getPageDistanceFromOrigin(getState())(pageIndex);\n\n const annotationType = findType({ questionType: question.type, fieldType, widgetKey: question.selectedField });\n const defaultSize = getOr({}, `formProperties.importedPdfDefaultAnnotationSizes.${annotationType}`, getState());\n const {\n width: pdfWidth, height: pdfHeight, yOffset = 0\n } = getPDFPageSettings(getState())(pageIndex);\n const config = {\n distance,\n preserve: false,\n pdfHeight: pdfHeight - yOffset,\n pdfWidth,\n defaultWidth: Math.max(0, defaultSize.width),\n defaultHeight: Math.max(0, defaultSize.height),\n fieldType: getCustomFieldType(question, fieldType),\n };\n\n const fields = [{\n fieldType: getCustomFieldType(question, fieldType),\n fieldValue,\n fieldOptions: getQuestionOptions(question),\n fieldId,\n fieldName,\n order,\n newlyCreated,\n fieldRect: rectFinder(cloned)(config)(question)(fieldId)\n }];\n\n removeQuestionDOMClone(cloned);\n\n return addAnnotations({\n qid, questionType, fields, existingQuestion: true, pageIndex\n })(addToQueue)(dispatch, getState);\n};\n\nconst pdfDetailsUpdateMapper = {\n // TODO: we don't need to update pdfDetails if column or row names are updated.\n control_matrix: updatePDFDetailsForMatrix,\n};\n\nconst addOthers = (questionType, qid) => (dispatch, getState) => {\n const fieldName = questionType === 'control_radio' ? getRadioFieldName(qid) : `q${qid}_typeA${qid}[other]`;\n const fieldValue = 'other';\n\n const options = getQuestionOptions(getQuestion(getState())(qid));\n const optionOrder = options.length; // last option index\n // if single/multi-choice question add option annotation on the pdf\n const selectedFormField = {\n qid,\n questionType,\n fieldType: questionType === 'control_radio' ? 'radio' : 'checkbox',\n fieldName,\n fieldValue,\n fieldId: `other_${qid}`,\n pageIndex: findPageIndex({ window: global.window, document: global.document }),\n order: optionOrder + 1,\n newlyCreated: true,\n };\n\n // when we create a new option with enter key, the dom of the option may not ready yet, so we wait fo 100ms\n setTimeout(() => addAnnotationToPDF(selectedFormField)(dispatch, getState), 100); // eslint-disable-line\n\n const selectedFormFieldInput = {\n qid,\n questionType,\n fieldType: 'text',\n fieldName: `q${qid}_typeA${qid}[other]`,\n fieldValue: '',\n fieldId: `input_${qid}`,\n pageIndex: findPageIndex({ window: global.window, document: global.document }),\n order: null,\n newlyCreated: true,\n };\n setTimeout(() => addAnnotationToPDF(selectedFormFieldInput)(dispatch, getState), 100); // eslint-disable-line\n};\n\nconst getRadioOtherIDs = question => {\n if (question.type !== 'control_radio') return [];\n const ids = [];\n const otherRadioValue = getOr(null, 'pdfDetails.otherRadio.value', question);\n const otherFieldName = getOr('', 'pdfDetails.fieldName', question);\n const otherInput = getOr(null, 'pdfDetails.otherInput', question);\n\n if (otherRadioValue && otherFieldName) ids.push(`${otherFieldName}-${otherRadioValue}`);\n if (otherInput) ids.push(otherInput);\n\n return ids;\n};\n\nconst getCheckboxOtherIDs = question => {\n if (question.type !== 'control_checkbox') return [];\n const ids = [];\n const otherCheckboxName = getOr(null, 'pdfDetails.otherCheckbox.name', question);\n const otherCheckboxInput = getOr(null, 'pdfDetails.otherInput', question);\n\n if (otherCheckboxName) ids.push(otherCheckboxName);\n if (otherCheckboxInput) ids.push(otherCheckboxInput);\n return ids;\n};\n\nconst removeOthers = (questionType, question) => (dispatch, getState) => (\n [...getRadioOtherIDs(question), ...getCheckboxOtherIDs(question)]\n .forEach((id) => disconnectField([id])(dispatch, getState)) // eslint-disable-line\n);\n\nconst isOther = (question, payloadData) => (\n question && (question.type === 'control_radio' || question.type === 'control_checkbox') && payloadData.allowOther\n);\n\nexport const addAnnotationToPDF = selectedFormField => (dispatch, getState) => {\n const { pageIndex, rect = [0, 0, 0, 0, 0] } = selectedFormField;\n const [, fieldTop] = rect;\n const { top, left } = getPageDistanceFromOrigin(getState())(pageIndex);\n const distances = { left, top: top + fieldTop + 10 };\n\n dispatch({\n type: types.PDF_IMPORT_SET_PAGE_DISTANCE,\n payload: { pageIndex, ...distances, left: 24 }\n });\n\n addToPDF(selectedFormField)(dispatch, getState)\n .then(annotations => {\n // Move vertically as much as the height of the newly created annotations\n const newDistances = getPageDistances(annotations)(getPageDistanceFromOrigin(getState())(pageIndex));\n dispatch({\n type: types.PDF_IMPORT_SET_PAGE_DISTANCE,\n payload: { pageIndex, ...newDistances, left: 20 }\n });\n });\n};\n\n// We can automate annotations delete and disconnect operation for question settings change\nconst updateDatetimeAnnotations = question => payloadData => (dispatch, getState) => {\n if (payloadData.liteMode === 'Yes') {\n annotationHelper(question, 'year', 'remove')(dispatch, getState);\n annotationHelper(question, 'month', 'remove')(dispatch, getState);\n annotationHelper(question, 'day', 'remove')(dispatch, getState);\n annotationHelper(question, 'lite', 'add')(dispatch, getState);\n }\n if (payloadData.liteMode === 'No') {\n annotationHelper(question, 'liteMode', 'remove')(dispatch, getState);\n annotationHelper(question, 'month', 'add')(dispatch, getState);\n annotationHelper(question, 'day', 'add')(dispatch, getState);\n annotationHelper(question, 'year', 'add')(dispatch, getState);\n }\n if (payloadData.allowTime === 'No') {\n annotationHelper(question, 'time', 'remove')(dispatch, getState);\n }\n if (payloadData.allowTime === 'Yes') {\n annotationHelper(question, 'time', 'add')(dispatch, getState);\n }\n};\n\nconst updateTimeAnnotations = question => payloadData => (dispatch, getState) => {\n if (payloadData.range === 'Yes') {\n const { qid, type: questionType, name: qname } = question;\n const selectedFormField = {\n qid,\n questionType,\n fieldType: 'text',\n fieldName: `q${qid}_${qname}[timeInputRange]`,\n fieldValue: '',\n fieldId: `input_${qid}_timeInputRange`,\n pageIndex: findPageIndex({ window: global.window, document: global.document }),\n newlyCreated: true,\n };\n addAnnotationToPDF(selectedFormField)(dispatch, getState);\n }\n if (payloadData.range === 'No') {\n disconnectField([getOr(null, 'pdfDetails.pdfFields.rangeTime', question)])(dispatch, getState); // eslint-disable-line\n }\n};\n\nconst addressAnnotationName = {\n st1: 'addr_line1',\n st2: 'addr_line2',\n city: 'city',\n state: 'state',\n country: 'country',\n zip: 'postal'\n};\n\nconst removeAddressAnnotations = question => payloadData => (dispatch, getState) => {\n if (payloadData.subfields) {\n const annotationsToRemove = Object.keys(addressAnnotationName).filter(key => payloadData.subfields.indexOf(key) === -1);\n annotationsToRemove.forEach(annotationName => {\n disconnectField([getOr(null, `pdfDetails.pdfFields.${addressAnnotationName[annotationName]}`, question)])(dispatch, getState); // eslint-disable-line\n });\n }\n};\n\nconst matrixAnnotationType = {\n 'Radio Button': 'radio',\n 'Check Box': 'checkbox',\n 'Text Box': 'text',\n 'Drop Down': 'choice',\n 'Currency Box': 'text',\n 'Numeric Text Box': 'text',\n 'Emoji Slider': 'text',\n Dynamic: 'text',\n};\n\nconst getAnnotationByAnnotationId = questionAnnotations => id => (questionAnnotations.find(annot => annot.id === id) || {});\n\nconst fixRectByType = type => rect => {\n if (rect) {\n const [left, top, right, bot] = rect;\n if (['Check Box', 'Radio Button'].indexOf(type) > -1) {\n const minSize = Math.min(Math.abs(right - left), Math.abs(top - bot));\n return [left, top, left + minSize, top + minSize];\n }\n return rect;\n }\n return null;\n};\n\nconst sanitizePDFFields = pdfFields => pdfFields.map(f => (\n f.filter(r => r.name)[f.length - 1]\n)).filter(a => a);\n\nconst updateMatrixAnnotations = question => payloadData => (dispatch, getState) => {\n const isPdfConnected = getOr('Yes', 'formProperties.importedPdfIsConnected', getState());\n if (!question.pdfDetails || isPdfConnected === 'No') {\n return;\n }\n const {\n pdfDetails: { pdfFields },\n mrows,\n mcolumns,\n featureSet\n } = question;\n const rows = mrows.split('|');\n const cols = mcolumns.split('|');\n const pdfFieldsRowCount = pdfFields.length;\n const pdfFieldsColumnCount = pdfFields[0].length;\n let annotationsToRemove = [];\n\n const setMatrixAnnotationsByPdfFields = (pdfFieldsCount, existingMatrixData, newFieldMatrixData) => {\n if (pdfFieldsCount > existingMatrixData.length) {\n annotationsToRemove = pdfFields[pdfFieldsCount - 1].filter(f => f.name);\n } else if (pdfFieldsCount < existingMatrixData.length) {\n const { qid, type: questionType, inputType } = question;\n\n newFieldMatrixData.forEach((matrixItem, i) => {\n const selectedFormField = {\n qid,\n questionType,\n fieldType: matrixAnnotationType[inputType],\n fieldName: '',\n fieldValue: matrixItem,\n fieldId: `input_${qid}_${existingMatrixData.length - 1}_${i}`,\n pageIndex: findPageIndex({ window: global.window, document: global.document }),\n newlyCreated: true,\n };\n addAnnotationToPDF(selectedFormField)(dispatch, getState);\n });\n }\n };\n\n if (payloadData.mrows && !featureSet.includes('useIds')) {\n setMatrixAnnotationsByPdfFields(pdfFieldsRowCount, rows, cols);\n } else if (payloadData.mcolumns && !featureSet.includes('useDcols')) {\n setMatrixAnnotationsByPdfFields(pdfFieldsColumnCount, cols, rows);\n } else if (payloadData.dcolumns) {\n if (pdfFieldsColumnCount > question.dcolumns.length) {\n annotationsToRemove = sanitizePDFFields(pdfFields);\n }\n } else if (payloadData.drows) {\n setMatrixAnnotationsByPdfFields(pdfFieldsRowCount, rows, payloadData.drows);\n }\n if (annotationsToRemove.length > 0) {\n annotationsToRemove.forEach(ann => (\n (ann.name && ann.type) && disconnectField([ann.type === 'radio' ? `${ann.name}-${ann.value}` : ann.name]))(dispatch, getState).catch());\n }\n\n if (payloadData.inputType || payloadData.dcolumns) {\n const questionAnnotations = getQuestionAnnotations(getState(), question.qid);\n const { qid, type: questionType } = question;\n const matrixAnnotations = [];\n question.pdfDetails.pdfFields.forEach((row, i) => {\n row.forEach((col, j) => {\n if (col.name) {\n const annotationDetails = getAnnotationByAnnotationId(questionAnnotations)(col.type === 'radio' ? `${col.name}-${col.value}` : col.name);\n matrixAnnotations.push({\n fieldId: `input_${question.qid}_${i}_${j}`,\n row: i,\n col: j,\n rect: annotationDetails.rect,\n pageIndex: annotationDetails.pageIndex,\n ...(col.value ? { value: col.value } : {})\n });\n }\n });\n });\n\n const isColumnDeleted = pdfFields[0].length > question.dcolumns.length;\n if (questionAnnotations.length > 0 && !isColumnDeleted) {\n setAnnotationSelection([])(dispatch, getState);\n handleQuestionDelete({ qid })(dispatch, getState);\n }\n let annotationsPageIndex = 0;\n const fields = matrixAnnotations.map(({\n rect, fieldId, row, col, pageIndex, value = ''\n }) => {\n annotationsPageIndex = pageIndex;\n // BUGFIX :: #4889020 - #5273406\n // Create Multi-type column annotations regarding the dcolumn type.\n const fieldType = (question?.inputType === 'Dynamic' || !!payloadData.dcolumns)\n ? matrixAnnotationType[question.dcolumns[col].type]\n : matrixAnnotationType[payloadData.inputType];\n // BUGFIX #15134801 :: Use col index to find value since related col cannot be found with row index.\n const tempValue = payloadData.inputType === 'Radio Button' ? (cols[row] || cols[col]) : value;\n const fieldValue = (question?.inputType === 'Dynamic' && !!payloadData.dcolumns && fieldType === 'radio')\n ? payloadData.dcolumns[col].text\n : tempValue;\n\n return {\n qid,\n questionType,\n fieldType,\n fieldName: `input_${qid}_${row}_${col}`,\n fieldValue,\n fieldId,\n pageIndex,\n newlyCreated: false,\n fieldRect: fixRectByType(payloadData.inputType)(rect)\n };\n });\n addAnnotations({\n qid: question.qid, questionType: question.type, fields, pageIndex: annotationsPageIndex\n })(addToQueue)(dispatch, getState);\n }\n};\n\nconst annotationHelper = (question, prop, action) => (dispatch, getState) => {\n if (action === 'add') {\n const { qid, type: questionType } = question;\n const selectedFormField = {\n qid,\n questionType,\n fieldType: 'text',\n fieldName: prop,\n fieldValue: '',\n fieldId: `${prop}_${qid}`,\n pageIndex: findPageIndex({ window: global.window, document: global.document }),\n newlyCreated: true,\n };\n addAnnotationToPDF(selectedFormField)(dispatch, getState);\n } else {\n disconnectField([getOr(null, `pdfDetails.pdfFields.${prop}`, question)])(dispatch, getState);\n }\n};\n\nconst updateFullNameAnnotations = question => payloadData => (dispatch, getState) => {\n const options = ['middle', 'prefix', 'suffix'];\n try {\n const payload = Object.entries(payloadData).find(([key, _value]) => options.includes(key));\n if (payloadData.prefixChoices || payloadData.prefixChoices === '') {\n disconnectField([getOr(null, 'pdfDetails.pdfFields.prefix', question)])(dispatch, getState);\n }\n if (payload) {\n annotationHelper(question, payload[0], payload[1] === 'Yes' ? 'add' : 'remove')(dispatch, getState);\n }\n } catch (error) {\n console.log('Error on full name annotation update: ', error);\n }\n};\n\nexport const handleQuestionUpdate = ({ qid, payload }) => (dispatch, getState) => {\n const question = getQuestion(getState())(qid);\n const isPdfConnected = getOr('Yes', 'formProperties.importedPdfIsConnected', getState());\n\n if (!question || isPdfConnected !== 'Yes') return;\n const { type: questionType } = question;\n\n // we are interested by the matrix update for now, so we check it:\n if (question && pdfDetailsUpdateMapper[questionType] && canUpdateQuestion[questionType](payload)) {\n // Attention! If we return always true from the canUpdateQuestion function we'll enter into an infinite loop\n // here, becuase after the question updated we update the question again, so ...\n updateFormQuestion(\n qid, { pdfDetails: pdfDetailsUpdateMapper[questionType](question) }, false, true, false, false, false\n )(dispatch, getState);\n }\n\n const payloadData = getOr({}, '0', payload);\n if (isOther(question, payloadData)) {\n switch (payloadData.allowOther) {\n case 'Yes':\n addOthers(questionType, qid)(dispatch, getState);\n break;\n case 'No':\n removeOthers(questionType, question)(dispatch, getState);\n break;\n default:\n break;\n }\n }\n\n if (questionType === 'control_datetime') {\n updateDatetimeAnnotations(question)(payloadData)(dispatch, getState);\n }\n if (questionType === 'control_matrix') {\n updateMatrixAnnotations(question)(payloadData)(dispatch, getState);\n }\n if (questionType === 'control_address') {\n removeAddressAnnotations(question)(payloadData)(dispatch, getState);\n }\n if (questionType === 'control_time') {\n updateTimeAnnotations(question)(payloadData)(dispatch, getState);\n }\n if (questionType === 'control_fullname') {\n updateFullNameAnnotations(question)(payloadData)(dispatch, getState);\n }\n};\n\nconst handleSubmitDelete = qid => (dispatch, getState) => {\n const {\n formProperties: { importedPdfEnablePreviewButton },\n ui: { newFormType }\n } = getState();\n // Skip when preview button option is already disabled or\n // 'control_button' is deleted for layout change process from legacy to card\n if (importedPdfEnablePreviewButton !== 'Yes' || newFormType === 'cardForm') return;\n\n const previewButtons = getOr([], 'questions', getState()).filter(q => q.type === 'control_button'\n && q.qid !== qid\n && q.preview === 'Yes');\n\n if (previewButtons.length === 0) {\n updateFormProperty({ importedPdfEnablePreviewButton: 'No' }, false)(dispatch, getState);\n }\n};\n\nexport const handleQuestionDelete = ({ qid }) => (dispatch, getState) => {\n const question = getQuestion(getState())(qid);\n\n if (question && question.type === 'control_button') {\n // disable 'importedPdfEnablePreviewButton' when no other preview button left after deletion\n handleSubmitDelete(qid)(dispatch, getState);\n }\n\n if (question && hasSupportForAddingAnnottions(question)) {\n const annotations = getQuestionAnnotations(getState(), qid);\n const annotationsIds = annotations.map(a => a.id);\n\n return handleDeleteAnnotations(annotationsIds)(dispatch, getState);\n }\n return Promise.resolve();\n};\n\nexport const handleQuestionDeleteMultiple = ([qid, ...tail]) => (dispatch, getState) => {\n if (!qid) return;\n handleQuestionDelete({ qid })(dispatch, getState);\n handleQuestionDeleteMultiple(tail)(dispatch, getState);\n};\n\nexport const deleteAnnotationQID = id => dispatch => {\n dispatch({\n type: types.PDF_IMPORT_UPDATE_ANNOTATION_QID,\n payload: {\n id,\n qid: null\n },\n });\n};\n\nexport const disconnectField = annotations => (dispatch, getState) => {\n if (!annotations) {\n return;\n }\n let deleteQueue = annotations.filter(a => a);\n annotations.filter(a => a).forEach(annotationId => {\n // get question id from annotation state\n const ann = getAnnotation(getState(), annotationId); // default\n const question = getQuestion(getState())(ann.qid);\n if (!ann) { return; }\n\n if (!canDeleteAnnotation(ann.type)) {\n deleteQueue = deleteQueue.filter(item => item !== ann?.id);\n return Promise.reject(`Unknown annotation type: ${ann}`);\n }\n\n // call resetPDFDetails from actions/index to disconnect annotation\n if (ann.qid && annotationId.indexOf('dublicate') === -1 && question) {\n resetPDFDetails(annotationId)(dispatch, getState);\n }\n if (annotationId.indexOf('dublicate') === -1) {\n const duplicateAnnotations = withDuplicateAnnotations([parentOrId(ann)])(dispatch, getState)\n .filter(dupAnn => dupAnn !== annotationId && dupAnn.indexOf('dublicate') > -1);\n\n deleteQueue = [...deleteQueue, ...duplicateAnnotations];\n }\n\n if (getNewlyCreatedAnnotations(getState()).length === 0) {\n dispatch({ type: types.PDF_IMPORT_RESET_PAGE_DISTANCE });\n }\n });\n return handleDeleteAnnotations(deleteQueue)(dispatch, getState);\n};\n\nconst handleDeleteAnnotations = annotationIDList => (dispatch, getState) => {\n if (annotationIDList.length === 0) {\n return;\n }\n\n // remove annotation selection\n setAnnotationSelection([])(dispatch, getState);\n // unset mappedAnnotation since it's not mapped anymore\n setSelectedField({ mappedAnnotations: [] })(dispatch, getState);\n // deselect form question, if delete operation is coming from annotation\n if (annotationIDList.every(id => id.indexOf('dublicate') !== -1)) {\n updateSelectedQuestion(undefined, true)(dispatch, getState);\n }\n\n annotationIDList.forEach(a => {\n const ann = getAnnotation(getState(), a); // default\n if (!ann) { return; }\n dispatch({\n type: types.PDF_IMPORT_DELETE_ANNOTATION,\n payload: {\n id: ann.id,\n pageIndex: ann.pageIndex\n }\n });\n });\n\n if (getNewlyCreatedAnnotations(getState()).length === 0) {\n dispatch({ type: types.PDF_IMPORT_RESET_PAGE_DISTANCE });\n }\n\n // call API.deleteAnnotations\n return addToQueue(\n endpoints.deleteAnnotations,\n { formID: getState().form.id, annotations: annotationIDList },\n () => successPromise(),\n () => { }\n )(dispatch, getState);\n};\n\nexport const deleteAllAnnotations = formID => (dispatch, getState) => {\n const annotationIDs = getAnnotationIDs(getState());\n\n if (annotationIDs.length > 0) {\n return addToQueue(\n endpoints.deleteAnnotations,\n { formID: formID, annotations: annotationIDs },\n () => successPromise(),\n () => { }\n )(dispatch, getState);\n }\n};\n\nexport const clearPinnedAnnotations = (annotations = []) => (dispatch, getState) => (\n annotations.forEach(id => setAnnotationPinned(id, false)(dispatch, getState))\n);\n\nexport const updateAnnotationsRect = ({\n annotationIds = [],\n deltaRect: {\n deltaLowerX, deltaLowerY, deltaUpperX, deltaUpperY\n },\n pageIndex = 0\n}) => (dispatch, getState) => {\n if (hasNoDiff({\n deltaLowerX, deltaLowerY, deltaUpperX, deltaUpperY\n })) {\n return;\n }\n flushSync(() => {\n const selectedAnnotations = getSelectedAnnotations(annotationIds, getState());\n const annotationsWithNewRects = selectedAnnotations\n .map(updateAnnotationRectWithDeltaCoordinates({\n deltaLowerX, deltaLowerY, deltaUpperX, deltaUpperY, pageIndex\n }))\n .map(a => {\n if (a.pageIndex !== pageIndex) {\n dispatch({\n type: types.PDF_IMPORT_UPDATE_ANNOTATION_PAGE,\n payload: { id: a.id, oldPageIndex: a.pageIndex, pageIndex }\n });\n }\n dispatch({\n type: types.PDF_IMPORT_UPDATE_ANNOTATION_RECT,\n payload: { id: a.id, rect: a.rect, pageIndex }\n });\n return { ...a, pageIndex }; // updateAnnotationPageIndex\n });\n addToQueue(\n endpoints.updateAnnotations,\n { formID: getState().form.id, annotations: annotationsWithNewRects },\n () => successPromise(),\n () => { }\n )(dispatch, getState);\n });\n};\n\nexport const moveSelectedAnnotation = (xAxis, yAxis) => (dispatch, getState) => {\n const selectedAnnotations = getAnnotationSelection(getState());\n const firstAnnotation = getAnnotation(getState(), selectedAnnotations[0]);\n const annotationPage = getOr(0, 'pageIndex', firstAnnotation);\n const pageSettings = getOr({}, `pdfImport.ui.pageSettings.${annotationPage}`, getState());\n if (firstAnnotation && canMoveAnnotation(firstAnnotation, pageSettings, { xAxis, yAxis })) {\n updateAnnotationsRect({\n annotationIds: selectedAnnotations,\n deltaRect: {\n deltaLowerX: xAxis,\n deltaLowerY: yAxis,\n deltaUpperX: xAxis,\n deltaUpperY: yAxis,\n },\n pageIndex: annotationPage\n })(dispatch, getState);\n }\n};\n\nexport const setDefaultAnnotationSize = ({\n annotationId,\n}) => (dispatch, getState) => {\n const selectedAnnotations = getSelectedAnnotations([annotationId], getState());\n if (selectedAnnotations[0]) {\n const defaultAnnotationSizes = getOr({}, 'formProperties.importedPdfDefaultAnnotationSizes', getState());\n const annotation = selectedAnnotations[0];\n const [lowerX = 0, lowerY = 0, upperX = 0, upperY = 0] = getOr([], 'rect', annotation);\n updateFormProperty({\n importedPdfDefaultAnnotationSizes: JSON.stringify({\n ...defaultAnnotationSizes,\n [annotation.type]: { width: (upperX) - (lowerX), height: (upperY) - (lowerY) }\n })\n }, false)(dispatch, getState);\n }\n};\n\nexport const setAnnotationCreatedStatus = (id, value) => (dispatch, getState) => {\n dispatch({\n type: types.PDF_IMPORT_SET_NEWLY_CREATED_ANNOTATION,\n payload: { id, value },\n });\n\n if (getNewlyCreatedAnnotations(getState()).length === 0) {\n dispatch({ type: types.PDF_IMPORT_RESET_PAGE_DISTANCE });\n }\n\n const annotation = getAnnotation(getState(), id);\n addToQueue(\n endpoints.updateAnnotations,\n { formID: getState().form.id, annotations: [{ ...annotation, newlyCreated: value }] },\n () => successPromise(),\n () => { }\n )(dispatch, getState);\n};\n\nexport const onAnnotationDragStop = o => (dispatch, getState) => {\n const selectedAnnotations = getSelectedAnnotations(o.annotationIds, getState());\n const annotationId = getOr('', '0.id', selectedAnnotations);\n const multiple = selectedAnnotations.length > 1;\n const annotationNewlyCreated = getOr(false, '0.newlyCreated', selectedAnnotations);\n\n if (!multiple && annotationNewlyCreated) {\n // newly created annotations are not new anymore\n setAnnotationCreatedStatus(annotationId, false)(dispatch, getState);\n }\n\n updateAnnotationsRect(o)(dispatch, getState);\n};\n\nexport const onAnnotationResizeStop = o => (dispatch, getState) => {\n const selectedAnnotations = getSelectedAnnotations(o.annotationIds, getState());\n const annotationId = getOr('', '0.id', selectedAnnotations);\n const multiple = selectedAnnotations.length > 1;\n\n updateAnnotationsRect(o)(dispatch, getState);\n if (!multiple && !hasNoDiff(o.deltaRect)) {\n setDefaultAnnotationSize({ annotationId })(dispatch, getState);\n }\n};\n\nexport const handleLeftPanelClick = (target, ref) => (dispatch, getState) => {\n const { isLeftPanelOpen } = getState().ui;\n\n if (!target.classList.contains('field-name') && ref && !ref.contains(target) && isLeftPanelOpen) {\n leftPanelToggle(!isLeftPanelOpen)(dispatch, getState);\n }\n};\n\nexport const onSelectionAreaClick = ({ pageIndex, x, y }) => (dispatch, getState) => {\n const state = getState();\n const selectedFormField = getSelectedFormField(state);\n const { selectedQuestionId } = state.ui;\n const scale = getScale(state);\n const canAdd = selectedFormField\n && selectedFormField.fieldType\n && canCreateAnnotationByFieldType(selectedFormField.fieldType)\n && !isFieldMapped(selectedFormField, selectedQuestionId)\n && (selectedFormField.connectField === true);\n\n if (!canAdd) return Promise.resolve('No form field selected');\n\n // set mouse click position as starting point for pages\n dispatch({\n type: types.PDF_IMPORT_SET_PAGE_DISTANCE,\n payload: { pageIndex, top: y / scale, left: x / scale }\n });\n\n return addToPDF({ ...selectedFormField, pageIndex })(dispatch, getState)\n .then(() => {\n // reset cursor position for the current page\n dispatch({\n type: types.PDF_IMPORT_SET_PAGE_DISTANCE,\n payload: { pageIndex, top: 0, left: 0 }\n });\n });\n};\n\nexport const removeWelcomeThumbnail = () => (dispatch, getState) => {\n const { formProperties: { importedPdfWelcomeThumbnail } } = getState();\n if (importedPdfWelcomeThumbnail) {\n endpoints.deleteImageS3(importedPdfWelcomeThumbnail).then(() => (\n updateFormProperty({ importedPdfWelcomeThumbnail: '' }, false)(dispatch, getState)\n ));\n }\n};\n\nexport const updateImportedPDF = (file, pdfPassword = '') => (dispatch, getState) => {\n const { formProperties } = getState();\n const { id: formId } = formProperties;\n const { hash } = global.location;\n const updateLines = !!hash && hash.indexOf('updateLines') !== -1;\n return endpoints.updateImportedPDF(formId, file, updateLines, pdfPassword).then(response => {\n if (response.responseCode !== 200) {\n throw new Error(response.message);\n }\n const s3Url = response.content;\n\n // reset annotations' status\n const newlyCreatedAnnotations = getNewlyCreatedAnnotations(getState());\n newlyCreatedAnnotations.forEach(id => setAnnotationCreatedStatus(id, false)(dispatch, getState));\n\n dispatch({\n type: types.FORM_PROPERTY_UPDATING,\n prop: {\n importedPDF: s3Url.replace('?nc=1', '')\n }\n });\n global.isPDFImporter = 1;\n dispatch({\n type: types.FORM_PROPERTY_UPDATE_SUCCESS,\n });\n // Remove previous pdf's thumbnail\n removeWelcomeThumbnail()(dispatch, getState);\n });\n};\n\nconst selected = question => x => ({\n ...x,\n qid: question.qid,\n questionType: question.type,\n pageIndex: findPageIndex({ window: global.window, document: global.document }),\n order: null,\n newlyCreated: true\n});\n\nexport const createInlinePDFField = (fields, question) => (dispatch, getState) => (\n S.pipe([\n inline(question.qid),\n S.map(selected(question)),\n S.map(x => addAnnotationToPDF(x)(dispatch, getState))\n ])(fields)\n);\n\nconst toSelectedFormField = question => field => ({\n qid: question.qid,\n questionType: question.type,\n fieldName: field,\n mappedAnnotations: calcFormFieldMappedAnnotations(field, '', question),\n fieldValue: '',\n deleteDisconnected: true\n});\n\nexport const deleteInlinePDFFields = (fields, question) => (dispatch, getState) => (\n // TODO: create a PromiseType for type checking: https://bit.ly/36Reiei to remove `unchecked`\n S.unchecked.pipe([\n S.map(toSelectedFormField(question)),\n S.unchecked.map(() => resetPDFDetails()(dispatch, getState))\n ])(fields)\n);\n\nexport const handleQuestionUpdating = ({ qid, payload }) => (dispatch, getState) => {\n const question = getQuestion(getState())(qid);\n\n if (question.type !== 'control_inline') return Promise.resolve();\n\n if (isUndefined(payload.fields)) return Promise.resolve();\n\n const next = payload.fields || [];\n const prev = question.fields || [];\n\n const fieldsToDelete = fieldOptionsDiff(next)(prev);\n\n return deleteInlinePDFFields(\n fieldsToDelete, question\n )(dispatch, getState);\n};\n\nexport const formFieldMappedAnnotations = (...params) => (dispatch, getState) => (\n // We filter out annotations that don't exists. We should log this case, because we can't\n // have a form field mapped with and an unexisting annotation.\n calcFormFieldMappedAnnotations(...params).filter(id => getAnnotation(getState(), id) !== null)\n);\n\nexport const resetPDFSettings = () => {\n return (dispatch, getState) => {\n const {\n formProperties: { isHIPAA, emails },\n ui: { device, deviceType },\n user: { email }\n } = getState();\n\n const isMobile = device !== 'isDesktop' || deviceType !== 'mouseOnly';\n\n const defaultProps = getDefaultProps({\n isHIPAA: isHIPAA === '1',\n isMobile,\n email\n });\n\n updateFormProperty({\n ...defaultProps,\n ...(isHIPAA === '1' && {\n importedPDFNotificationPassword: '',\n importedPDFAutorespondPassword: '',\n emails: emails.map(e => ({ ...e, pdfattachment: '0', pdfPassword: '' }))\n })\n }, false)(dispatch, getState);\n };\n};\n\nexport const duplicateAnnotation = id => (dispatch, getState) => {\n const state = getState();\n // TODO: error handling\n const annotation = getAnnotation(state, id);\n const question = getQuestion(state)(annotation.qid);\n handleQuestionCreation({ annotation, question, duplicateAnnotation: true })(dispatch, getState);\n};\n\nexport const withDuplicateAnnotations = annotations => (dispatch, getState) => S.pipe([\n S.head,\n S.map(getDublicatedAnnotations(getState())),\n S.map(S.map(S.prop('id'))),\n S.maybe(annotations)(S.flip(S.concat)(annotations))\n])(annotations);\n\n// getSelection :: State -> [String]\nconst getSelection = S.gets(S.is($.Array($.String)))(['pdfImport', 'annotations', 'selection']);\n\nexport const duplicateWithShortcut = () => (dispatch, getState) => S.pipe([\n getSelection,\n S.chain(S.head),\n S.map(id => duplicateAnnotation(id)(dispatch, getState)),\n S.map(() => addNotification({\n uid: 'copied_annotation',\n uuid: 'copied_annotation',\n autoDismiss: 2,\n message: DUPLICATE_ANNOTATION,\n })(dispatch))\n])(getState());\n\n// we need to set annotation pinned, because mapping step looks pinnedAnnotations to map the field\n// but after the mapping has been completed we need it to set to false because we don't want to display\n// mapping menu etc.\nconst connectAnnotation = ({ id, pinned }) => (dispatch, getState) => (\n setAnnotationPinned(id, !pinned)(dispatch, getState)\n && mapFieldWithAnnotation()(dispatch, getState)\n && setAnnotationPinned(id, false)(dispatch, getState)\n);\n\nconst addAnnotationToSelection = ({ id, selectedAnnotationsIds }) => (dispatch, getState) => {\n const selection = selectedAnnotationsIds.indexOf(id) === -1 ? [...selectedAnnotationsIds, id] : pull(selectedAnnotationsIds)(id);\n setAnnotationSelection(selection)(dispatch, getState);\n};\n\nconst parentIdFixer = (annotation, newParentId) => (dispatch, getState) => {\n if (newParentId.indexOf('dublicate') > -1) {\n return;\n }\n addToQueue(\n endpoints.updateAnnotations,\n { formID: getState().form.id, annotations: [{ ...annotation, parentId: newParentId }] },\n () => successPromise(),\n () => { }\n )(dispatch, getState);\n};\n\nconst parentIdFixerLogic = (id, qid) => (dispatch, getState) => {\n const el = document.querySelector(`[data-annotation-id=\"${id}\"]`);\n if (el && el.classList.contains('isCorrupted')) {\n const annotation = getAnnotation(getState(), id);\n const question = getQuestion(getState())(qid);\n switch (true) {\n case !!question.pdfDetails?.pdfFields?.liteMode:\n if (getAnnotation(getState(), question.pdfDetails?.pdfFields?.liteMode)) {\n parentIdFixer(annotation, question.pdfDetails?.pdfFields?.liteMode)(dispatch, getState);\n }\n break;\n case !!question.pdfDetails?.fieldName:\n if (getAnnotation(getState(), question.pdfDetails?.fieldName)) {\n parentIdFixer(annotation, question.pdfDetails?.fieldName)(dispatch, getState);\n }\n break;\n default:\n return;\n }\n }\n};\n\n// DocumentViewer actions\nexport const onAnnotationClick = (e, pageIndex, id) => (dispatch, getState) => {\n const isCardForm = getOr('', 'formProperties.formType', getState()) === 'cardForm';\n const { pinned, qid } = getAnnotation(getState(), id);\n\n if (isAdmin(getState()) && id.indexOf('dublicate') > -1) {\n parentIdFixerLogic(id, qid)(dispatch, getState);\n }\n\n const { connectField = false, fieldType = '' } = getSelectedFormField(getState()) || {};\n const selectedAnnotationsIds = getAnnotationSelection(getState());\n const firstSelectedPageIndex = getPropFromFirstSelected(selectedAnnotationsIds)('pageIndex');\n const multiple = selectedAnnotationsIds.length > 1;\n\n if ((e.ctrlKey || e.metaKey) && pageIndex === firstSelectedPageIndex) {\n e.preventDefault();\n return addAnnotationToSelection({ id, selectedAnnotationsIds })(dispatch, getState);\n }\n if (multiple && selectedAnnotationsIds.indexOf(id) !== -1) { // don't select annotaion if there is more than one selected and it's in the selected ones\n return;\n }\n // Check fieldType to decide connection flow\n // if the selected is one of the type on 'manyToManyField' array allow multiple annotation selection and apply confirmation state\n // otherwise don't allow multiple annotation selection and skip confirmation state\n if (includes(oneToManyFields)(fieldType)) {\n setAnnotationPinned(id, !pinned)(dispatch, getState);\n } else {\n connectAnnotation({ id, pinned })(dispatch, getState);\n }\n if (!connectField) {\n // Set selectedField and selectedQuestionID to correct current selected quetion with respect to annotation\n selectAnnotation({ id, qid, isCardForm })(dispatch, getState);\n }\n // Set annotations.selection to set selected annotation\n setAnnotationSelection([id])(dispatch, getState);\n // Set selection source as 'pdf' on clicks on pdf side\n setSelectionSource('pdf')(dispatch, getState);\n};\n\nexport const onPageLoadSuccess = settings => (dispatch, getState) => {\n setPDFPageSettings(settings)(dispatch, getState);\n};\n\nexport const onAnnotationMouseEnter = id => (dispatch, getState) => {\n const isAnnotationDragging = getIsAnnotationDragging(getState());\n\n if (!isAnnotationDragging) {\n setHoveredAnnotation(id)(dispatch, getState);\n }\n};\n\nexport const onAnnotationMouseLeave = () => (dispatch, getState) => {\n const isAnnotationDragging = getIsAnnotationDragging(getState());\n\n if (!isAnnotationDragging) {\n setHoveredAnnotation('')(dispatch, getState);\n }\n};\n\nexport const onEmptyAreaClick = () => (dispatch, getState) => {\n // funcs are wrapped into settimeout. Temporary fix for browser crash on google.\n setTimeout(() => {\n setAnnotationSelection([])(dispatch, getState); // for unselection\n updateSelectedQuestion()(dispatch, getState); // for remove selected question\n }, 0);\n};\n\nexport const onAnnotationsSelect = (selectedAnnotationIDs = []) => (dispatch, getState) => {\n const newlyCreatedAnnotations = getNewlyCreatedAnnotations(getState());\n\n selectedAnnotationIDs.forEach(id => {\n if (newlyCreatedAnnotations.indexOf(id) !== -1) {\n setAnnotationCreatedStatus(id, false)(dispatch, getState);\n }\n });\n\n setAnnotationSelection(selectedAnnotationIDs)(dispatch, getState);\n};\n","var _rect, _path, _path2;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nconst SvgRocket = props => /*#__PURE__*/React.createElement(\"svg\", _extends({\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 36 36\"\n}, props), _rect || (_rect = /*#__PURE__*/React.createElement(\"rect\", {\n width: 36,\n height: 36,\n rx: 4,\n fill: \"#586DD8\"\n})), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M19.125 18C19.7463 18 20.25 17.4963 20.25 16.875C20.25 16.2537 19.7463 15.75 19.125 15.75C18.5037 15.75 18 16.2537 18 16.875C18 17.4963 18.5037 18 19.125 18Z\",\n fill: \"white\"\n})), _path2 || (_path2 = /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M14.9951 23.473L15.3169 23.6017C15.3398 23.6109 15.363 23.589 15.3552 23.5656C14.8955 22.1866 13.8134 21.1045 12.4344 20.6448C12.411 20.637 12.3891 20.6602 12.3983 20.6831L12.527 21.0049C12.8514 21.816 12.4262 22.7329 11.5974 23.0092L11.4526 23.0575C11.0797 23.1818 10.6747 23.1699 10.3097 23.0239L10.2167 22.9867C9.48186 22.6927 9 21.981 9 21.1896V12.1667C9 10.4178 10.4178 9 12.1667 9H23.8333C25.5822 9 27 10.4178 27 12.1667V23.8333C27 25.5822 25.5822 27 23.8333 27H14.8104C14.019 27 13.3073 26.5181 13.0133 25.7833L12.9761 25.6903C12.8301 25.3253 12.8182 24.9203 12.9425 24.5474L12.9908 24.4026C13.2671 23.5738 14.184 23.1486 14.9951 23.473ZM11.9996 19.4998C11.9996 19.4998 12.3746 17.9998 13.4996 17.2498C14.6246 16.4998 14.9996 17.2498 14.9996 17.2498C14.9996 17.2498 16.4996 11.9998 23.9996 11.9998C23.9996 19.4998 18.7496 20.9998 18.7496 20.9998C18.7496 20.9998 19.4996 21.3748 18.7496 22.4998C17.9996 23.6248 16.4996 23.9998 16.4996 23.9998C16.4996 21.5145 14.4849 19.4998 11.9996 19.4998Z\",\n fill: \"white\"\n})));\nexport default SvgRocket;","import { t } from '@jotforminc/translation';\nimport propTypes from 'prop-types';\n\nconst roleTexts = {\n owner: 'Owner',\n collaborator: 'Collaborator',\n team_admin: 'Team Admin',\n form_collaborator: 'Creator'\n};\n\nexport const getRoleText = role => {\n const roleText = roleTexts[role] ?? roleTexts.collaborator;\n return t(roleText);\n};\n\nexport const collaboratorPropType = propTypes.shape({\n color: propTypes.string,\n avatarUrl: propTypes.string,\n username: propTypes.string,\n name: propTypes.string,\n email: propTypes.string,\n role: propTypes.string,\n teamAvatar: propTypes.object\n});\n","import React from 'react';\nimport { TeamImage } from '@jotforminc/enterprise-components';\nimport propTypes from 'prop-types';\n\n/**\n * Given an object return if at least one of its properties\n * are defined.\n * @param {object} obj object to check.\n * @returns true if at least one propety is truthy.\n */\nexport const isSomeDefined = obj => (\n Object.entries(obj).some(([_, v]) => !v));\n\nexport const CollaboratorAvatar = ({\n color,\n avatarUrl,\n isTeamMember = false,\n teamAvatar = {}\n}) => (\n \n {isTeamMember && isSomeDefined(teamAvatar) && (\n \n )}\n \n);\n\nCollaboratorAvatar.propTypes = {\n color: propTypes.string.isRequired,\n avatarUrl: propTypes.string.isRequired,\n isTeamMember: propTypes.bool,\n teamAvatar: propTypes.object\n};\n","import React from 'react';\nimport { t } from '@jotforminc/translation';\nimport { collaboratorPropType, getRoleText } from './constants';\nimport { CollaboratorAvatar } from './CollaboratorAvatar';\n\n/**\n * A single collaborator with its tooltip\n * displayed on the collaborator avatar group.\n */\nexport const SingleCollaborator = ({\n collaborator: {\n color,\n avatarUrl,\n username,\n name,\n email,\n role,\n isTeamMember,\n teamAvatar\n }\n}) => (\n \n
\n \n
\n
{name || t('Guest User')}
\n {\n email && (\n \n {email}\n
\n )\n }\n
\n
\n {getRoleText(role)}\n
\n \n \n);\n\nSingleCollaborator.propTypes = {\n collaborator: collaboratorPropType.isRequired,\n};\n","import React from 'react';\nimport { t } from '@jotforminc/translation';\nimport { collaboratorPropType, getRoleText } from './constants';\nimport { CollaboratorAvatar } from './CollaboratorAvatar';\n\n/**\n * A single line describing a single collaborator.\n */\nexport const CollaboratorsListItem = ({\n collaborator: {\n color,\n avatarUrl,\n username,\n name,\n email,\n role,\n isTeamMember,\n teamAvatar\n }\n}) => (\n
\n \n
\n
{name || t('Guest User')}
\n {\n email && (\n \n {email}\n
\n )\n }\n
\n
\n {getRoleText(role)}\n
\n \n);\n\nCollaboratorsListItem.propTypes = {\n collaborator: collaboratorPropType.isRequired,\n};\n","import React from 'react';\nimport propTypes from 'prop-types';\nimport { CollaboratorsListItem } from './CollaboratorsListItem';\nimport { collaboratorPropType } from './constants';\n\n/**\n * Show a list of all collaborators and their roles.\n */\nexport const CollaboratorsList = ({\n collaborators = [],\n}) => (\n
\n
\n {\n collaborators.map(collaborator => (\n \n ))\n }\n
\n
\n);\n\nCollaboratorsList.propTypes = {\n collaborators: propTypes.arrayOf(collaboratorPropType)\n};\n","import React from 'react';\nimport propTypes from 'prop-types';\nimport { SingleCollaborator } from './SingleCollaborator';\nimport { CollaboratorsList } from './CollaboratorsList';\nimport './style.scss';\n\n/**\n * Shows all the collaborators in the form.\n *\n * @param {object} props\n * @param {object[]} props.collaborators List of collaborator data.\n * @param {number} props.hideCollaboratorsAfter Number of collaborators to shown\n * before the additional collaborators are hidden behind a badge.\n * @param {number} props.combineTooltipsAfter Minimum number of collaborators to start\n * showing the combined tooltip on hover.\n */\nexport const CollaboratorAvatars = ({\n collaborators = [],\n hideCollaboratorsAfter = 3,\n combineTooltipsAfter = 3\n}) => {\n const hasHiddenCollaborators = collaborators.length > hideCollaboratorsAfter;\n const isTooltipsCombined = collaborators.length > combineTooltipsAfter;\n\n return (\n
\n {\n collaborators.slice(0, hideCollaboratorsAfter).map(collaborator => (\n \n ))\n }\n {hasHiddenCollaborators && (\n
{`+${collaborators.length - hideCollaboratorsAfter}`}
\n )}\n {isTooltipsCombined && (\n \n )}\n\n
\n );\n};\n\nCollaboratorAvatars.propTypes = {\n collaborators: propTypes.array,\n hideCollaboratorsAfter: propTypes.number,\n combineTooltipsAfter: propTypes.number\n};\n","import React, { useEffect } from 'react';\nimport { func, object, string } from 'prop-types';\nimport {\n CollaborationModal, ALL_TEXTS, ASSET_IDENTIFIER, GA_AD_FORM_TRACKING_ITEMS, GA_FORM_TRACKING_ITEMS, userPropType,\n GA_SUFFIXES, createGaAttributes, gaDataLayerPushClose, hasAdwordsModeOn, mapCallbacksToGaTrackingItems, setEPActions\n} from '@jotforminc/ep-utils';\n\nconst AddCollaboratorModal = ({\n user,\n modalProps,\n onClose,\n logAbTestAction,\n variantCode,\n onPrimaryClick,\n onFormSubmit\n}) => {\n const { AB_TEST: { ADD_COLLABORATOR_MODAL } } = ASSET_IDENTIFIER;\n const target = ADD_COLLABORATOR_MODAL;\n\n const isAdForm = hasAdwordsModeOn();\n let { [target]: gaFormTrackingItems } = isAdForm ? GA_AD_FORM_TRACKING_ITEMS : GA_FORM_TRACKING_ITEMS;\n if (variantCode === '27612') {\n gaFormTrackingItems[0].selector = '#input_224';\n }\n\n const gaAttributes = createGaAttributes(target);\n const gaAttributesClose = createGaAttributes(target, GA_SUFFIXES.CLOSE);\n\n useEffect(() => {\n const actionData = { action: 'seen', target };\n\n logAbTestAction(actionData);\n setEPActions({ asset: target, ...actionData });\n }, []);\n\n const handleCloseClick = () => {\n logAbTestAction({ action: 'click', target: `closeButton-${target}` });\n setEPActions({ asset: target, target: 'closeButton', action: 'click' });\n };\n\n const handleClose = () => {\n gaDataLayerPushClose(gaAttributes);\n\n const actionData = { action: 'close', target };\n logAbTestAction(actionData);\n setEPActions({ asset: target, ...actionData });\n\n onClose();\n };\n\n const handleContactSalesClick = () => {\n logAbTestAction({ action: 'click', target: `contactSalesButton-${target}` });\n setEPActions({ asset: target, target: 'contactSalesButton', action: 'click' });\n\n onPrimaryClick();\n };\n\n const handleLearnMoreClick = () => {\n logAbTestAction({ action: 'click', target: `learnMoreButton-${target}` });\n setEPActions({ asset: target, target: 'learnMoreButton', action: 'click' });\n };\n\n const handleFormSubmit = () => {\n const actionData = { action: 'formSubmit', target };\n\n logAbTestAction(actionData);\n setEPActions({ asset: target, ...actionData });\n\n onFormSubmit();\n };\n\n gaFormTrackingItems = mapCallbacksToGaTrackingItems(gaFormTrackingItems, [handleContactSalesClick, handleLearnMoreClick]);\n\n return (\n \n );\n};\n\nAddCollaboratorModal.propTypes = {\n user: userPropType.isRequired,\n modalProps: object,\n onClose: func,\n logAbTestAction: func,\n onPrimaryClick: func,\n onFormSubmit: func,\n variantCode: string\n};\n\nAddCollaboratorModal.defaultProps = {\n modalProps: {},\n onClose: f => f,\n logAbTestAction: f => f,\n onPrimaryClick: f => f,\n onFormSubmit: f => f,\n variantCode: ''\n};\n\nexport default AddCollaboratorModal;\n","import React, {\n useEffect, useRef\n} from 'react';\nimport ReactDOM from 'react-dom';\nimport { t } from '@jotforminc/translation';\nimport { func, instanceOf } from 'prop-types';\nimport '@jotforminc/jotform.css';\nimport { handleCustomNavigation, setCookie } from '@jotforminc/utils';\nimport {\n ASSET_IDENTIFIER, ALL_TEXTS, CTA_URLS, SDR_SOURCES, userPropType,\n GA_SUFFIXES, saveCustomerAsHubspotFormByUsername, createGaAttributes, setEPActions\n} from '@jotforminc/ep-utils';\nimport EnterpriseIcon from '../../../assets/svg/addCollaboratorBanner/rocket.svg';\nimport { AddCollaboratorModal } from '../../Modals';\n\nconst AddCollaboratorBanner = ({\n user, modalRoot, logAbTestAction, initEpCollaborationLinkAndLearnMoreABTest\n}) => {\n const sectionRef = useRef();\n\n const { AB_TEST: { ADD_COLLABORATOR_BANNER: target } } = ASSET_IDENTIFIER;\n const { ADD_COLLABORATOR_BANNER: { LEARN_MORE_URL } } = CTA_URLS;\n\n const gaAttributes = createGaAttributes(target);\n const gaAttributesCs = createGaAttributes(target, GA_SUFFIXES.APPLY_NOW);\n const gaAttributesLm = createGaAttributes(target, GA_SUFFIXES.LEARN_MORE);\n\n useEffect(() => {\n const actionData = { action: 'seen', target };\n\n logAbTestAction(actionData);\n setEPActions({ asset: target, ...actionData });\n }, []);\n\n const handleModalClose = () => {\n ReactDOM.unmountComponentAtNode(modalRoot);\n };\n\n const renderAddCollaboratorModal = (epCollabLogAbTestAction, variantCode) => {\n const isModalRootElement = modalRoot instanceof window.Element;\n if (!isModalRootElement) return;\n ReactDOM.render(\n ,\n modalRoot\n );\n };\n\n const handleLearnMoreClick = () => {\n logAbTestAction({ action: 'click', target: `learnMoreButton-${target}` });\n setEPActions({ asset: target, target: 'learnMoreButton', action: 'click' });\n\n saveCustomerAsHubspotFormByUsername({ lastProductAssetInteraction: SDR_SOURCES.FORM_BUILDER_ADD_COLLABORATORS_BANNER });\n };\n\n const handleContactSalesClick = async () => {\n const { isTestVariant, variantCode, epCollabLogAbTestAction } = await initEpCollaborationLinkAndLearnMoreABTest();\n\n epCollabLogAbTestAction({ action: 'click', target: `contactSalesButton-${target}` });\n setCookie('abNote', `epCollaborationLinkAndLearnMore-${isTestVariant ? variantCode : 'control'}`, 30);\n\n if (variantCode === '27611') {\n handleCustomNavigation(`${CTA_URLS.ADD_COLLABORATOR_BANNER.CONTACT_SALES_URL}/#lets-talk`);\n } else {\n renderAddCollaboratorModal(epCollabLogAbTestAction, variantCode);\n }\n\n logAbTestAction({ action: 'click', target: `contactSalesButton-${target}` });\n setEPActions({ asset: target, target: 'contactSalesButton', action: 'click' });\n\n saveCustomerAsHubspotFormByUsername({ lastProductAssetInteraction: SDR_SOURCES.FORM_BUILDER_ADD_COLLABORATORS_BANNER });\n };\n\n return (\n
\n \n
\n \n
\n
{t(ALL_TEXTS.GET_YOUR_TEAM_ONBOARD)}
\n

{t(ALL_TEXTS.GET_YOUR_TEAM_EXPLANATION_V2)}

\n
\n
\n
\n \n {t(ALL_TEXTS.CONTACT_SALES)}\n \n \n {t(ALL_TEXTS.LEARN_MORE)}\n \n
\n
\n \n \n );\n};\n\nAddCollaboratorBanner.propTypes = {\n user: userPropType.isRequired,\n modalRoot: instanceOf(window.Element).isRequired,\n logAbTestAction: func,\n initEpCollaborationLinkAndLearnMoreABTest: func.isRequired\n};\n\nAddCollaboratorBanner.defaultProps = {\n logAbTestAction: f => f\n};\n\nexport default AddCollaboratorBanner;\n","import React, { useCallback } from 'react';\nimport { elementType } from 'prop-types';\nimport { ABTestManager } from '@jotforminc/abtest-manager';\nimport { userPropType } from '@jotforminc/ep-utils';\nimport '../../styles/loader.scss';\nimport { AddCollaboratorBanner } from '../Banners';\n\n// A/B Test: epCollaborationLinkAndLearnMore\nconst AddAndManageUsersAbTester = ({\n user,\n ...props\n}) => {\n const initEpCollaborationLinkAndLearnMoreABTest = useCallback(async () => {\n const abTestManager = new ABTestManager({\n isTestEnabled: false,\n testName: 'epCollaborationLinkAndLearnMore',\n controlVariantCode: '27601',\n urlParam: 'epclalm',\n testVariantCode: [\n { code: '27611', urlParam: 'epclalml' },\n { code: '27612', urlParam: 'epclalmlm' }\n ],\n user,\n cacheVariantCodeAtLocalStorage: true\n });\n\n const [isTestVariant, variantCode] = await abTestManager.isTestVariant();\n const epCollabLogAbTestAction = abTestManager.registerABTestAction;\n\n return { isTestVariant, variantCode, epCollabLogAbTestAction };\n }, [user]);\n\n return (\n \n );\n};\n\nAddAndManageUsersAbTester.propTypes = {\n user: userPropType.isRequired,\n ControlComponent: elementType.isRequired,\n TestComponent: elementType.isRequired\n};\n\nexport default AddAndManageUsersAbTester;\n","import React from 'react';\nimport {\n Button,\n Dialog,\n DialogIcon,\n DialogTitle,\n DialogActions,\n DialogBody,\n DialogDescription\n} from '@jotforminc/magnet';\nimport { IconExclamationCircle } from '@jotforminc/svg-icons';\nimport { t, translationRenderer } from '@jotforminc/translation';\n\n/**\n * Pops up when the user attempts to generate\n * a new collabration link.\n */\nexport const CollaborationLinkDialog = ({\n open,\n onClose,\n onGenerate\n}) => {\n return (\n \n \n \n \n {t('Do you want to Generate a New Link?')}\n \n \n {translationRenderer('Generating a new link will [1[disable the old link]].')({\n renderer1: title1 => {title1},\n })}\n
\n {translationRenderer('[1[Anyone with the old link]] will no longer be able to view this app.',)({\n renderer1: title1 => {title1},\n })}\n
\n
\n \n \n {t('Cancel')}\n \n \n {t('Yes, Generate a New Link')}\n \n \n \n );\n};\n","import React, { useRef, useState, useEffect } from 'react';\nimport { t } from '@jotforminc/translation';\nimport { Button } from '@jotforminc/magnet';\nimport CopyToClipboard from 'react-copy-to-clipboard';\nimport { IconLinkDiagonal, IconArrowsRotate, IconCheckCircleFilled } from '@jotforminc/svg-icons';\nimport { logJotFormEvents } from '../../libs/Utils';\n\nexport const CollaborationInputPanel = ({\n user,\n formID,\n isCollaborationTokenGenerated,\n isLinkCopiedToClipboard,\n handleCopy,\n collaborationToken,\n setIsDialogOpen,\n}) => {\n const buttonRef = useRef(null);\n const [copyButtonWidth, setCopyButtonWidth] = useState(undefined);\n\n useEffect(() => {\n if (buttonRef.current && !copyButtonWidth) {\n setCopyButtonWidth(buttonRef.current?.getBoundingClientRect().width);\n }\n }, [setCopyButtonWidth, copyButtonWidth]);\n\n const collaborationLink = `${global.location.origin}/${global.__BASE_ROUTE_PATH}/${formID}?iak=${collaborationToken.token}`;\n const [protocol, restOfTheLink] = collaborationLink.split('://');\n\n const onOpenModal = () => {\n setIsDialogOpen(true);\n // action log for link modal opened.\n logJotFormEvents('form-builder', {\n actor: user.username,\n action: 'CollaborationLinkModalOpened',\n target: formID,\n }, user.account_type.name);\n };\n\n return (\n
\n
\n
\n \n {`${protocol}://`}\n \n \n \n \n \n
\n \n
\n \n {t(isLinkCopiedToClipboard ? 'Copied!' : 'Copy Link')}\n \n
\n \n
\n
\n );\n};\n","import React, { useCallback, useState } from 'react';\nimport { t, translationRenderer } from '@jotforminc/translation';\nimport { isEnterprise } from '@jotforminc/enterprise-utils';\nimport { AddAndManageUsersAbTester } from '@jotforminc/enterprise-promotions';\nimport { IconLinkDiagonal, IconClockFilled } from '@jotforminc/svg-icons';\nimport { getLocalTimeLabel } from '@jotforminc/utils';\nimport { CollaborationLinkDialog } from './CollaborationLinkDialog';\nimport { CollaborationInputPanel } from './CollaborationInputPanel';\nimport { logJotFormEvents } from '../../libs/Utils';\n\nfunction getReadableTime(seconds) {\n let readableTime;\n\n if (seconds < 60) {\n readableTime = t('Less than one minute');\n } else {\n const date = new Date(seconds * 1000);\n const days = date.getUTCDate() - 1;\n const hours = date.getUTCHours() + (days * 24);\n const minutes = date.getUTCMinutes();\n readableTime = `${hours} ${getLocalTimeLabel(hours, 'hours', t)}, ${minutes} ${getLocalTimeLabel(minutes, 'minutes', t)}`;\n }\n\n return translationRenderer('Expires in: [1[{readableTime}]] later')({\n renderer1: () => readableTime\n });\n}\n\nconst CollaborationPanel = ({\n user,\n formID,\n collaborationToken,\n isCollaborationTokenGenerated,\n isLinkCopiedToClipboard,\n handleCopy,\n regenerateCollaborationToken\n}) => {\n const addAndManageUsersModalRootEl = document.querySelector('#portal-root');\n const [isDialogOpen, setIsDialogOpen] = useState(false);\n\n const onGenerate = useCallback(() => {\n regenerateCollaborationToken();\n // action log for link regeneration.\n logJotFormEvents('form-builder', {\n actor: user.username,\n action: 'CollaborationLinkRegenerated',\n target: formID,\n }, user.account_type.name);\n\n setIsDialogOpen(false);\n }, [regenerateCollaborationToken, setIsDialogOpen]);\n\n const onCloseModal = () => {\n setIsDialogOpen(false);\n // action log for link modal closed without any action.\n logJotFormEvents('form-builder', {\n actor: user.username,\n action: 'CollaborationModalClosedWithouthAction',\n target: formID,\n }, user.account_type.name);\n };\n\n return (\n
\n
\n
\n
\n
\n \n
\n
\n \n { t('COLLABORATION LINK') }\n \n {t('Send this link to your co-workers to edit this form simultaneously.') }\n
\n
\n \n
\n {!isEnterprise() && (\n <>\n
\n \n \n {getReadableTime(collaborationToken.dueTime)}\n \n
\n {/* enterpsie promotions: add & manage users */}\n {/* A/B Test: epCollaborationLinkAndLearnMore */}\n \n \n )}\n
\n \n
\n );\n};\n\nexport default CollaborationPanel;\n","import React from 'react';\nimport {\n bool, func, shape\n} from 'prop-types';\nimport { Dialog } from '@jotforminc/dialog';\n\nimport { t } from '@jotforminc/translation';\n\nconst DeleteActionButtonsDialog = ({\n onPropertyChange = f => f,\n formProperties = {},\n dialogProps: {\n itemID,\n itemStep,\n itemTitle\n } = {},\n isOpen = false,\n onClose = f => f\n}) => {\n const removeSelectedItem = () => {\n const { thankYouSelectedPDFs, thankYouFillAnotherFormSettings } = formProperties;\n\n if (itemStep === 'downloadPDF') {\n let updatedSettings = [];\n if (itemID !== 'all') {\n const oldSettings = Array.isArray(thankYouSelectedPDFs) ? thankYouSelectedPDFs : [];\n updatedSettings = [...oldSettings.filter(pdf => pdf.pdfId !== itemID)];\n }\n onPropertyChange({\n thankYouDownloadPDF: updatedSettings.some(pdf => pdf.isSelected) ? 'Yes' : 'No',\n thankYouSelectedPDFs: JSON.stringify([...updatedSettings])\n });\n }\n\n if (itemStep === 'fillAnotherForm') {\n let updatedSettings = [];\n if (itemID !== 'all') {\n const oldSettings = Array.isArray(thankYouFillAnotherFormSettings) ? thankYouFillAnotherFormSettings : [];\n updatedSettings = oldSettings.filter(settings => settings.targetFormID !== itemID);\n }\n onPropertyChange({\n thankYouFillAnotherForm: updatedSettings.length > 0 ? 'Yes' : 'No',\n thankYouFillAnotherFormSettings: JSON.stringify([...updatedSettings]),\n });\n }\n\n if (itemStep === 'editSubmission') {\n onPropertyChange({\n thankYouEditSubmission: 'No'\n });\n }\n\n if (itemStep === 'viewCompletedTask') {\n onPropertyChange({\n thankYouViewCompletedTask: 'No'\n });\n }\n\n if (itemStep === 'fillAgain') {\n onPropertyChange({\n thankYouFillAgain: 'No',\n thankYouFillAgainSettings: []\n });\n }\n\n if (itemStep === 'visitURL') {\n onPropertyChange({\n thankYouVisitURL: 'No',\n thankYouVisitURLText: '',\n thankYouVisitURLPageURL: '',\n thankYouVisitURLImageSource: ''\n });\n }\n\n onClose();\n };\n\n const isAllButtonsSelected = itemID === 'all' && itemStep !== 'fillAgainStep' && itemStep !== 'editSubmissionStep';\n const isAnotherFormDeleted = itemStep === 'fillAnotherForm' && !isAllButtonsSelected;\n const removeButtonText = isAllButtonsSelected ? 'Remove Buttons' : 'Remove Button';\n\n return (\n \n );\n};\n\nDeleteActionButtonsDialog.propTypes = {\n onPropertyChange: func,\n formProperties: shape({}),\n dialogProps: shape({}),\n isOpen: bool,\n onClose: func\n};\n\nexport default DeleteActionButtonsDialog;\n","import PropTypes from 'prop-types';\nimport React from 'react';\nimport classNames from 'classnames';\n\nconst Icon = props => {\n const cx = classNames({\n ji: true,\n [`ji-${props.name}`]: props.name,\n [props.className]: props.className,\n });\n return ();\n};\n\nIcon.propTypes = {\n name: PropTypes.string,\n className: PropTypes.string,\n};\n\nexport default Icon;\n","/* eslint-disable global-require */\nimport PropTypes from 'prop-types';\nimport React from 'react';\n\nconst GLYPHS = {\n 'accessibility-count': require('../assets/icons/accessibility-count.svg'),\n accessibilityWarning: require('../assets/icons/accessibilityWarning.svg'),\n drag_icon: require('../assets/icons/drag_icon.svg'), // special svg\n duplicateBottom: require('../assets/icons/duplicateBottom.svg'), // special svg\n duplicateMid: require('../assets/icons/duplicateMid.svg'), // special svg\n duplicateTop: require('../assets/icons/duplicateTop.svg'), // special svg\n fav_icon_avg: require('../assets/icons/fav_icon_avg.svg'), // special svg\n formWarnings: require('../assets/icons/formWarnings.svg'),\n copilot: require('../assets/icons/copilot.svg'),\n pdfImport_arrow: require('../assets/icons/pdfImport_arrow.svg'),\n pdfImport_cancel: require('../assets/icons/pdfImport_cancel.svg'),\n pdfImport_duplicate: require('../assets/icons/pdfImport_duplicate.svg'),\n pdfImport_error: require('../assets/icons/pdfImport_error.svg'),\n pdfImport_lock: require('../assets/icons/pdfImport_lock.svg'),\n pdfImport_pdfLoadError: require('../assets/icons/pdfImport_pdfLoadError.svg'),\n pdfImport_pdfUploader: require('../assets/icons/pdfImport_pdfUploader.svg'),\n pdfImport_plus: require('../assets/icons/pdfImport_plus.svg'),\n pdfImport_trash: require('../assets/icons/pdfImport_trash.svg'),\n pdfImport_zoom_in: require('../assets/icons/pdfImport_zoom_in.svg'),\n pdfImport_zoom_out: require('../assets/icons/pdfImport_zoom_out.svg'),\n protected_switch: require('../assets/icons/protected_switch.svg'),\n iconSalesforceReverse: require('../assets/icons/iconSalesforceReverse.svg'),\n iconSalesforce: require('../assets/icons/iconSalesforce.svg'),\n searchBranding21: require('../assets/icons/searchBranding21.svg'),\n searchBranding21Focus: require('../assets/icons/searchBranding21Focus.svg'),\n textAlignCenter: require('../assets/icons/textAlignCenter.svg'),\n textAlignLeft: require('../assets/icons/textAlignLeft.svg'),\n textAlignRight: require('../assets/icons/textAlignRight.svg'),\n};\n\nconst DEFAULT_CLASS = 'ji-svg';\n\nconst IconSVG = ({ name = '', style = {}, className = '' }) => {\n const svgClasses = `${DEFAULT_CLASS} ${className}`;\n const SVGComponent = GLYPHS[name]?.default;\n\n return (\n \n );\n};\n\nIconSVG.propTypes = {\n name: PropTypes.oneOf(Object.keys(GLYPHS)),\n style: PropTypes.shape(),\n className: PropTypes.string\n};\n\nexport default IconSVG;\n","import { PaymentFields } from '../../constants/Fields';\n\n// TODO :: REFACTOR\nexport function getPaymentFieldsFilitered(accountType, userCountry, username, {\n excludedGatewayType = '', excludedGatewayBuilderLabel, productTypeFilter = '', isWepay = false, nameAPM\n} = {}) {\n let newPaymentFields = [...PaymentFields];\n\n // This payment fields will be rendered for admins only\n // const formID = global.window.location.pathname.split('/build/')[1];\n const adminOnlyPaymentFields = ['control_payoneer'];\n const adminOnlyAPMList = [''];\n\n // const ewayCountries = ['AU', 'NZ', 'HK', 'SG', 'MY']; // eslint-disable-line no-undef\n\n // Remove admin-only gateways and APMs\n // eslint-disable-next-line max-len\n const testUsernameList = ['admin', 'ozlem', 'olivia', 'SensePass', 'dobkins', 'jayadams', 'gokhankovanlilar', 'daisy', 'sylas', 'Welvin', 'Ariel_P', 'Alexander_G', 'johnjotformdoe', 'sinanusluer', 'meliskayahipaa', 'meliskayaeu', 'iyzico', 'sevki', 'miracbaydogan', 'ender', 'meliskaya', 'mustafa'];\n if (!testUsernameList.includes(username) || window.JOTFORM_ENV === 'ENTERPRISE') {\n newPaymentFields = newPaymentFields.filter(paymentField => !adminOnlyPaymentFields.includes(paymentField.type) && !adminOnlyAPMList.includes(paymentField.nameAPM));\n }\n\n for (let i = 0; i <= newPaymentFields.length - 1; i++) {\n const field = newPaymentFields[i];\n // skip deleted\n if (field === undefined) { continue; }\n\n if (field.type === 'control_payment' && field.nameAPM && nameAPM && field.nameAPM === nameAPM) {\n // for APMs that support multi-gateway\n newPaymentFields.splice(i, 1);\n } else {\n // Make field related changes\n switch (field.type) {\n case 'control_wepay':\n if (!isWepay) {\n newPaymentFields.splice(i, 1);\n break;\n }\n break;\n\n case excludedGatewayType:\n if (field.nameAPM !== 'appleAndGooglePay') {\n if (field.name === excludedGatewayBuilderLabel) {\n newPaymentFields.splice(i, 1);\n }\n }\n break;\n\n default:\n }\n }\n }\n\n if (productTypeFilter !== '') {\n return newPaymentFields.filter(element => element.productTypes.include(productTypeFilter));\n }\n return newPaymentFields;\n}\n\nexport function getPaymentByType(type) {\n for (let i = 0; i < PaymentFields.length; i++) {\n if (type === PaymentFields[i].type) {\n return PaymentFields[i];\n }\n }\n}\n\nexport function getPaymentByAPM(nameAPM) {\n for (let i = 0; i < PaymentFields.length; i++) {\n if (nameAPM === PaymentFields[i].nameAPM) {\n return PaymentFields[i];\n }\n }\n}\n\nexport function getPaymentByTypeAndName(type, name) {\n return PaymentFields.find(f => f.type === type && f.name === name);\n}\n","import PropTypes from 'prop-types';\nimport React, { Component } from 'react';\nimport { connect } from 'react-redux';\nimport { bindActionCreators } from 'redux';\nimport { t } from '@jotforminc/translation';\nimport { a11yClickHandler } from '@jotforminc/utils';\n\nimport * as actions from '../../actions';\nimport Icon from '../Icon';\nimport IconSVG from '../IconSVG';\n\nclass EmptyLine extends Component {\n constructor(props) {\n super(props);\n\n this.emptyLineMouseEnter = this.emptyLineMouseEnter.bind(this);\n this.emptyLineClick = this.emptyLineClick.bind(this);\n this.emptyLineKeydown = this.emptyLineKeydown.bind(this);\n }\n\n emptyLineMouseEnter(obj) {\n const isDragging = global.document.querySelector('.app').classList.contains('isDraggingFormElement');\n if (isDragging) {\n obj.currentTarget.classList.add('stage-Hidden');\n }\n }\n\n emptyLineMouseLeave(obj) {\n const isDragging = global.document.querySelector('.app').classList.contains('isDraggingFormElement');\n if (isDragging) {\n obj.currentTarget.classList.remove('stage-Hidden');\n }\n }\n\n emptyLineClick() {\n this.props.actions.leftPanelToggle(true);\n }\n\n emptyLineKeydown(e) {\n const { actions: { leftPanelToggle } } = this.props;\n a11yClickHandler(e, () => {\n leftPanelToggle(true);\n setTimeout(() => {\n document.querySelector('#fieldsNav-fields')?.focus();\n }, 500);\n });\n }\n\n render() {\n const defaultMessage = this.props.isMobile ? t('Add your first question here.') : t('Drag your first question here from the left.');\n const message = this.props.message || defaultMessage;\n const renderIcon = !this.props.isCardForm\n ? : (\n \n );\n\n return (\n this.emptyLineClick()}\n onKeyDown={this.emptyLineKeydown}\n tabIndex={0}\n >\n \n
\n {\n this.props.isMobile\n ? \n : renderIcon\n }\n
\n
{ message }
\n \n \n );\n }\n}\n\nfunction mapDispatchToProps(dispatch) {\n return {\n actions: bindActionCreators(actions, dispatch)\n };\n}\n\nfunction mapStateToProps(state) {\n return {\n ui: state.ui\n };\n}\n\nEmptyLine.propTypes = {\n message: PropTypes.string,\n isMobile: PropTypes.bool,\n isCardForm: PropTypes.bool,\n actions: PropTypes.shape({\n leftPanelToggle: PropTypes.func,\n }),\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(EmptyLine);\n","import PropTypes from 'prop-types';\nimport React from 'react';\nimport { isSafari } from '@jotforminc/utils';\nimport { formatCurrency, deFormatCurrency } from '../../libs/Utils';\n\nexport default class ContentEditable extends React.Component {\n constructor(props) {\n super(props);\n this.emitChange = this.emitChange.bind(this);\n this.handleBlur = this.handleBlur.bind(this);\n this.handleFocus = this.handleFocus.bind(this);\n this.handleKeyDown = this.handleKeyDown.bind(this);\n this.handleKeyUp = this.handleKeyUp.bind(this);\n this.handleMouseUp = this.handleMouseUp.bind(this);\n this.handleOnPaste = this.handleOnPaste.bind(this);\n this.handleButtonClick = this.handleButtonClick.bind(this);\n this.handleDoubleClick = this.handleDoubleClick.bind(this);\n this.handleSelectionChange = this.handleSelectionChange.bind(this);\n this.lastHtml = (props.format && props.format === 'currency') ? deFormatCurrency(props.text) : props.text;\n }\n\n validatePrice(text) {\n const validateInput = /^([0-9]*)(\\.[0-9]{0,2})?$/;\n const isInputValid = text.match(validateInput);\n\n if (!isInputValid) {\n return false;\n }\n\n return true;\n }\n\n handleKeyDown(key) {\n // cntrl+b & cntrl+i effect contenteditable content. It is prevented because we don't support this for question labels\n const disabledStyleKeys = [66, 73]; // b, i\n if ((key.ctrlKey || key.metaKey) && disabledStyleKeys.includes(key.keyCode)) {\n key.preventDefault();\n return false;\n }\n const metaKeyAvailableKeys = [65, 67, 86, 88, 89, 90]; // a,c,v,x,y,z\n const keyNamesForBlur = ['Enter', 'Escape', 'Backspace'];\n const keyCodesForBlur = [13, 27, 8];\n\n if ((key.ctrlKey || key.metaKey) && metaKeyAvailableKeys.indexOf(key.keyCode) !== -1) {\n return true;\n } if ((keyNamesForBlur.indexOf(key.key) !== -1 || keyCodesForBlur.indexOf(key.keyCode) !== -1)) {\n if (this.props.disableStripSpaces !== false || (this.props.disableStripSpaces !== false && !key.shiftKey) || (!this.props.replaceNewlineToBr && !key.shiftKey)) {\n this.props.handleKeyCommand(key.key, key);\n }\n\n // add '\\n' instead of '
' of shift+enter key pressed in the firefox\n const uaFirefox = global.navigator.userAgent.toLowerCase().indexOf('firefox') !== -1;\n if (uaFirefox && key.shiftKey) {\n global.document.execCommand('insertHTML', false, '\\n');\n key.preventDefault();\n }\n\n return false;\n } if (key.metaKey || key.ctrlKey) {\n // this.props.handleKeyCommand('meta', key);\n return false;\n }\n return false;\n }\n\n handleButtonClick(evt) {\n const event = evt.nativeEvent;\n const uaFirefox = global.navigator.userAgent.toLowerCase().indexOf('firefox') !== -1; // Firefox fires both button click and\n // keypress events, so we disable this\n // for Firefox.\n if (!event.x && !event.y && !event.clientX && !event.clientY && !uaFirefox) {\n evt.preventDefault();\n this.insertHtmlAtCursor(' ');\n }\n }\n\n insertHtmlAtCursor(html) {\n let range;\n let node;\n if (global.getSelection && global.getSelection().getRangeAt) {\n range = global.getSelection().getRangeAt(0);\n node = range.createContextualFragment(html);\n range.insertNode(node);\n global.getSelection().collapseToEnd();\n global.getSelection().modify('move', 'forward', 'character');\n } else if (global.document.selection && global.document.selection.createRange) {\n global.document.selection.createRange().pasteHTML(html);\n global.document.selection.collapseToEnd();\n global.document.selection.modify('move', 'forward', 'character');\n }\n }\n\n emitChange(evt) {\n if (!evt || !evt.target) return;\n\n const { maxLength, format, onChange } = this.props;\n\n // firefox <=44 does not support support innerText\n let text = evt.target.innerText || evt.target.textContent || '';\n\n // If a content editable is empty firefox inserts a br tag in it. And this causes placeholders to be hidden.\n // Workaround for shitty safari and firefox. #1242823\n if (text.trim() === '') {\n this.htmlEl.innerHTML = '';\n evt.target.classList.remove('inlineEditNotEmpty');\n } else if (!evt.target.classList.contains('inlineEditNotEmpty')) {\n evt.target.classList.add('inlineEditNotEmpty');\n }\n // To fix firefox & safari cursor problem dom change disabled. - berkay\n // if (evt.target.textContent.trim() !== evt.target.innerText.trim()) { // Sanitize here.\n // this.htmlEl.innerHTML = evt.target.innerText;\n // }\n\n text = this.stripBlankSpaces(text);\n if (format === 'currency' && !this.validatePrice(text)) {\n this.htmlEl.innerHTML = this.lastHtml;\n text = this.lastHtml;\n }\n\n if (onChange && text !== this.lastHtml) {\n const event = { target: { value: text } };\n if (maxLength && text.length > maxLength) {\n this.htmlEl.innerHTML = this.lastHtml;\n text = this.lastHtml;\n return onChange(event);\n }\n onChange(event);\n }\n this.lastHtml = text;\n }\n\n stripBlankSpaces(_text = '') {\n let text = _text;\n if (this.props.disableStripSpaces !== false) {\n text = text.replace(/\\n/g, '');\n text = text.replace(/\\n/g, '');\n } else if (this.props.replaceNewlineToBr) {\n text = text.replace(/\\n/g, '
');\n }\n return text;\n }\n\n reset(html = '') {\n this.lastHtml = html;\n }\n\n fullSelection() {\n if (!this.htmlEl || !this.htmlEl.childNodes || this.htmlEl.childNodes.length === 0) return;\n let range;\n let selection;\n if (global.document.body.createTextRange) {\n range = global.document.body.createTextRange();\n range.moveToElementText(this.htmlEl);\n range.select();\n } else if (global.getSelection) {\n selection = global.document.getSelection();\n range = global.document.createRange();\n range.selectNodeContents(this.htmlEl);\n selection.removeAllRanges();\n selection.addRange(range);\n }\n }\n\n focus() {\n this.htmlEl.focus();\n }\n\n blur() {\n this.htmlEl.blur();\n }\n\n handleFocus(event) {\n if (this.props.format === 'currency') {\n this.htmlEl.textContent = deFormatCurrency(event.target.textContent);\n }\n if (this.props.onFocus) {\n this.props.onFocus(event);\n }\n }\n\n handleBlur(event) {\n const _event = { target: { textContent: event.target.textContent, innerHTML: event.target.innerHTML, innerText: event.target.innerText } }; // For disable firefox <38 mutations\n if (this.props.format === 'currency') {\n this.htmlEl.textContent = formatCurrency(_event.target.textContent);\n }\n // this.emitChange(_event);\n if (this.props.onBlur) {\n this.props.onBlur(_event);\n }\n }\n\n handleKeyUp(event) {\n this.handleSelectionChange();\n if (this.props.onKeyUp) {\n this.props.onKeyUp(event);\n }\n }\n\n handleMouseUp(event) {\n this.handleSelectionChange();\n if (this.props.onMouseUp) {\n this.props.onMouseUp(event);\n }\n }\n\n handleOnPaste(event) {\n let text = event.target.innerText || event.target.textContent || '';\n const pastedText = (event.clipboardData || window.clipboardData).getData('text');\n\n const { maxLength, format } = this.props;\n\n if (maxLength && pastedText.length > maxLength) {\n const clippedText = pastedText.substring(0, maxLength);\n this.htmlEl.innerHTML = clippedText;\n text = clippedText;\n event.preventDefault();\n }\n\n if (format === 'currency' && !this.validatePrice(text)) {\n this.htmlEl.innerHTML = this.lastHtml;\n text = this.lastHtml;\n }\n }\n\n // We need to avoid opening right panel on double click to text\n handleDoubleClick(e) {\n if (e && e.stopPropagation) {\n e.stopPropagation();\n }\n }\n\n handleSelectionChange() {\n if (this.props.onSelect) {\n try {\n this.props.onSelect(global.getSelection().getRangeAt(0));\n } catch (e) {\n this.props.onSelect(null);\n }\n }\n }\n\n render() {\n const editableProps = {\n ...this.props,\n ref: e => { this.htmlEl = e; },\n onInput: this.emitChange,\n onBlur: this.handleBlur,\n onFocus: this.handleFocus,\n onKeyDown: this.handleKeyDown,\n onKeyUp: this.handleKeyUp,\n onMouseUp: this.handleMouseUp,\n onPaste: this.handleOnPaste,\n contentEditable: !this.props.disabled,\n placeholder: this.props.placeholder,\n onDoubleClick: this.handleDoubleClick,\n dangerouslySetInnerHTML: { __html: this.props.text },\n 'data-gramm': false\n };\n let allProps = {};\n if (this.props.children && this.props.children.props && this.props.children.type) {\n if (this.props.children.type === 'button') { // onClick fix.\n allProps = { onClick: this.handleButtonClick };\n }\n allProps = Object.assign(allProps, editableProps, this.props.children.props);\n } else {\n allProps = editableProps;\n }\n\n const childrenType = (this.props.children && this.props.children.type) || null;\n const elementType = ((childrenType && !isSafari()) || (childrenType === 'button' && isSafari())) ? childrenType : 'div';\n\n delete allProps.handleKeyCommand;\n delete allProps.text; // Don't pass it to div! for react 15 warning\n delete allProps.disableStripSpaces; // Same as above\n delete allProps.replaceNewlineToBr;\n return React.createElement(elementType, allProps, null);\n }\n}\n\nContentEditable.propTypes = {\n disabled: PropTypes.bool,\n text: PropTypes.string,\n placeholder: PropTypes.string,\n onChange: PropTypes.func,\n onSelect: PropTypes.func,\n disableStripSpaces: PropTypes.bool,\n replaceNewlineToBr: PropTypes.bool,\n onFocus: PropTypes.func,\n onBlur: PropTypes.func,\n onKeyUp: PropTypes.func,\n onMouseUp: PropTypes.func,\n children: PropTypes.oneOfType([PropTypes.string, PropTypes.shape()]),\n handleKeyCommand: PropTypes.func,\n format: PropTypes.oneOf(['text', 'currency'])\n};\n\nContentEditable.defaultProps = {\n format: 'text'\n};\n","import PropTypes from 'prop-types';\nimport React from 'react';\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport scrollIntoView from 'scroll-into-view';\nimport set from 'lodash/set';\nimport isEmpty from 'lodash/isEmpty';\nimport isUndefined from 'lodash/isUndefined';\nimport ReactQuill from 'react-quill';\nimport icons from 'quill/ui/icons';\nimport { t } from '@jotforminc/translation';\nimport { isSafari, stripSlashes, escapeHTML } from '@jotforminc/utils';\n\nimport * as actions from '../../actions';\nimport * as pdfImportActions from '../../actions/pdfImport';\nimport * as Utils from '../../libs/Utils';\n// import stripHtmlTags from '../../libs/strip_tags';\n// import extractText from '../../libs/extract_text';\nimport ContentEditable from './contenteditable';\n\n/* eslint-disable max-len */\nicons.bold = ' ';\nicons.italic = ' ';\nicons.link = ' ';\n/* eslint-enable max-len */\n\nclass InlineEditor extends React.Component {\n constructor(props) {\n super(props);\n this.handleFocus = this.handleFocus.bind(this);\n this.onQuillFocus = this.onQuillFocus.bind(this);\n this.handleKeyCommand = this.handleKeyCommand.bind(this);\n this.handleContentEditableChange = this.handleContentEditableChange.bind(this);\n this.handleEditorChange = this.handleEditorChange.bind(this);\n this.sanitizeAndDecode = this.sanitizeAndDecode.bind(this);\n this.validatePriceOnSave = this.validatePriceOnSave.bind(this);\n this.handleKeyUp = this.handleKeyUp.bind(this);\n this.isChildPropDifferent = this.isChildPropDifferent.bind(this);\n this.scrollEditorIntoView = this.scrollEditorIntoView.bind(this);\n this.renderContentEditable = this.renderContentEditable.bind(this);\n this.renderEditor = this.renderEditor.bind(this);\n this.handleBlur = this.handleBlur.bind(this);\n this.focusToEditor = this.focusToEditor.bind(this);\n this.handleShiftEnter = this.handleShiftEnter.bind(this);\n this.removeSpacesFromEnd = this.removeSpacesFromEnd.bind(this);\n this.shouldUseEditor = this.shouldUseEditor.bind(this);\n this.removeExtraBr = this.removeExtraBr.bind(this);\n this.stripSeparators = this.stripSeparators.bind(this);\n this.onSelectionChange = this.onSelectionChange.bind(this);\n this.currentLocale = this.getCurrentLocale();\n this.state = {\n isEditorAvailable: this.shouldUseEditor()\n };\n\n if (this.state.isEditorAvailable) {\n // Overwriting quill modules for certain preventions\n this.quillModules = {\n toolbar: [\n ['bold', 'italic', 'link', ...this.props.additionalToolbarElements]\n ],\n keyboard: {\n bindings: {\n tab: false,\n handleEnter: {\n key: 13,\n handler: () => {\n this.editor.editor.blur();\n }\n },\n linebreak: {\n key: 13,\n shiftKey: true,\n handler: range => {\n this.handleShiftEnter(range, this.editor.editor);\n }\n }\n }\n }\n };\n }\n }\n\n UNSAFE_componentWillMount() {\n if (this.props.renderHtmlTags !== false) {\n const text = this.normalizeHtml(this.sanitizedText);\n const quillEditorValue = text.replace(/\\n/g, '
');\n this.setState({ text, quillEditorValue });\n } else {\n this.setState({ text: this.sanitizedText });\n }\n }\n\n componentDidMount() {\n const { focusToElement, isMobile } = this.props;\n if (focusToElement && !isMobile) {\n this.focusToEditor();\n }\n\n // Quill editor blur event binding (do not use onBlur of ReactQuill due to async nature of it)\n if (this.state.isEditorAvailable && this.editor && this.editor.editor && this.editor.editor.scrollingContainer) {\n this.editor.editor.scrollingContainer.addEventListener('blur', this.handleBlur);\n }\n\n if (this.props.uniqueGlobalName) global[this.props.uniqueGlobalName] = this.editor;\n }\n\n UNSAFE_componentWillReceiveProps(nextProps) {\n const text = this.sanitizeAndDecode(nextProps.text);\n const currentText = this.sanitizeAndDecode(this.state.text);\n\n if (this.sanitizedText !== text && currentText !== text) {\n this.setState({ text });\n const quillEditorValue = text.replace(/\\n/g, '
');\n this.setState({ text, quillEditorValue });\n }\n\n if (this.props.isArrayModeEnabled && nextProps.focusToElement && !this.props.focusToElement) {\n setTimeout(() => {\n this.focusToEditor();\n this.editor.fullSelection();\n }, 0);\n }\n\n const arePropsChanged = nextProps.ui.device !== this.props.ui.device || nextProps.useEditor !== this.props.useEditor || nextProps.renderHtmlTags !== this.props.renderHtmlTags;\n\n if (arePropsChanged) {\n this.setState({\n isEditorAvailable: this.shouldUseEditor()\n });\n }\n }\n\n // Please be carefull when modifying here, it is very important for saving user text.\n shouldComponentUpdate(nextProps) {\n const nextPropsText = this.sanitizeAndDecode(nextProps.text);\n const updatedCurrentLocale = this.getCurrentLocale();\n if (this.currentLocale !== updatedCurrentLocale) {\n this.currentLocale = updatedCurrentLocale;\n return true;\n }\n return this.sanitizedText !== nextPropsText || this.isChildPropDifferent(nextProps, 'className') || this.isChildPropDifferent(nextProps, 'style');\n }\n\n onQuillFocus(range, source, editor) {\n const text = editor.getText().trim();\n const { id } = this.props;\n if (!id) {\n return;\n }\n const { isRightPanelOpen, isLeftPanelOpen, hasTouch } = this.props.ui;\n\n setTimeout(() => {\n if (id && id.toString().toLowerCase() !== 'form' && global.sortableDragStatus !== true) {\n this.props.actions.updateSelectedQuestion(id, false); // Update selected on focus\n }\n }, 0);\n if (text === this.props.defaultValue) {\n this.editor.editor.setSelection(0, text.length); // Full Select\n }\n if (hasTouch && (isRightPanelOpen || isLeftPanelOpen)) {\n this.props.actions.leftPanelToggle(false);\n this.props.actions.rightPanelToggle(false);\n }\n\n this.props.focusCallback();\n }\n\n onSelectionChange(range) {\n if (range) this.props.onSelectionChange(range);\n }\n\n getCurrentLocale() {\n if (global.Translations && global.Translations.default) {\n return global.Translations.default.currentLocale;\n } if (global.Translations && global.Translations.currentLocale) {\n return global.Translations.currentLocale;\n }\n }\n\n getExtractedQuillValue(content) {\n const { type } = this.props;\n if (content && typeof content.match === 'function') {\n const pattern = new RegExp('
(.*?)
');\n // To allow
tags for descriptions\n if (type === 'description') {\n const regex = new RegExp(pattern, 'gm');\n const matches = content.match(regex);\n const contents = [];\n if (matches) {\n matches.forEach(m => {\n const match = m.match(pattern);\n const strToPush = (match[1] === '
' ? '' : match[1]);\n contents.push(strToPush);\n });\n }\n return this.removeSpacesFromEnd(contents.length > 0 ? contents.join('\\n') : content);\n }\n const matches = content.match(pattern);\n return (matches ? matches[1] : content);\n } return content;\n }\n\n get editorInstance() {\n return this.editor;\n }\n\n handleShiftEnter(range, quill) {\n const { type } = this.props;\n // To allow newlines for card descriptions\n if (type === 'description') {\n const currentLeaf = quill.getLeaf(range.index)[0];\n const nextLeaf = quill.getLeaf(range.index + 1)[0];\n quill.insertText(range.index, '\\n');\n quill.insertText(range.index + 1, ' ');\n quill.setSelection(range.index + 1, 'silent');\n if (nextLeaf && currentLeaf.parent === nextLeaf.parent) {\n quill.deleteText(range.index + 1, 1);\n }\n }\n }\n\n removeSpacesFromEnd(content) {\n let _content = content;\n let i = content.length - 1;\n while (_content[i] === '\\n' || _content[i] === ' ') {\n _content = _content.slice(0, -1);\n i--;\n }\n return _content;\n }\n\n removeExtraBr() {\n const quill = this.editor ? this.editor.editor : null;\n if (quill && quill.root) {\n const extraLine = quill.root.querySelector('.inlineQuillEdit:last-child');\n if (extraLine && extraLine.childElementCount === 1 && extraLine.querySelector('br')) {\n extraLine.remove();\n }\n }\n }\n\n shouldUseEditor() {\n const {\n useEditor,\n renderHtmlTags,\n ui: {\n device\n }\n } = this.props;\n return device === 'isDesktop' && useEditor && renderHtmlTags;\n }\n\n get sanitizedText() {\n return this.sanitizeAndDecode(this.props.text);\n }\n\n get question() {\n const question = this.props.questions.filter(q => q.qid === this.props.id);\n return question && question[0] ? question[0] : false;\n }\n\n isChildPropDifferent(nextProps, propKey) {\n const { children } = this.props;\n const nextChildren = nextProps.children;\n return !isUndefined(children) && !isUndefined(nextChildren) && !isUndefined(children.props) && children.props[propKey] !== nextChildren.props[propKey];\n }\n\n sanitizeAndDecode(text) {\n if (this.props.sanitizeText === true) {\n if (this.props.sanitizeFunction) {\n return this.props.sanitizeFunction(text);\n }\n return Utils.sanitizeAndDecode(text);\n }\n return text;\n }\n\n normalizeHtml(_text = '') {\n let text = _text;\n const span = global.document.createElement('div');\n span.innerHTML = stripSlashes(text);\n text = span.innerHTML;\n return text;\n }\n\n validatePriceOnSave(text) {\n const makeArray = string => string.split('');\n const checkIfAllZero = list => list.every(c => c === '0');\n\n const textAsArray = makeArray(text);\n const hasDot = textAsArray.includes('.');\n const valuesToBeZero = ['Free', '', '.'];\n const isAllZero = !hasDot && text.length > 1 && checkIfAllZero(textAsArray);\n\n // this also checks if one or both sides are empty\n const isBothSidesZero = hasDot && checkIfAllZero(makeArray(text.split('.')[0])) && checkIfAllZero(makeArray(text.split('.')[1]));\n\n if (\n valuesToBeZero.includes(text)\n || isAllZero\n || isBothSidesZero\n ) {\n return '0';\n }\n\n return text;\n }\n\n handleKeyCommand(keyCommand, keyEvent) {\n const text = keyEvent.target.textContent;\n if (keyCommand === 'Backspace') {\n if (this.props.isArrayModeEnabled && text === '') {\n // this.arrayOperation = 'delete';\n // this.editor.blur();\n keyEvent.preventDefault();\n }\n } else if (keyCommand === 'Enter' || keyCommand === 'Escape') {\n if (this.props.isArrayModeEnabled) {\n if (keyCommand === 'Enter') {\n if (!text) return keyEvent.preventDefault();\n this.arrayOperation = 'add';\n }\n }\n\n this.editor.blur();\n if (!this.props.isArrayModeEnabled && global.sortableDragStatus !== true) {\n // setTimeout is very important! if we remove this inline edit is not working in ie based browsers\n setTimeout(() => {\n this.props.actions.updateSelectedQuestion();\n });\n }\n keyEvent.preventDefault();\n } else if (keyCommand === 'meta') {\n keyEvent.preventDefault();\n }\n }\n\n handleFocus() {\n const { text } = this.state;\n const { isRightPanelOpen, isLeftPanelOpen, hasTouch } = this.props.ui;\n\n if (text === this.props.defaultValue) {\n this.editor.fullSelection();\n }\n if (hasTouch && (isRightPanelOpen || isLeftPanelOpen)) {\n this.props.actions.leftPanelToggle(false);\n this.props.actions.rightPanelToggle(false);\n }\n\n // this.scrollEditorIntoView();\n this.props.focusCallback();\n }\n\n focusToEditor() {\n if (this.props.useEditor) {\n this.editor.editor.focus();\n } else {\n this.editor.focus();\n }\n }\n\n stripSeparators(text) {\n return text.replace(/[^\\0-~]/g, str => {\n const escaped = '000'.concat(str.charCodeAt().toString(16));\n const result = '\\\\u'.concat(escaped.slice(-4));\n\n return result.match(/\\\\u2029/) ? '' : str;\n });\n }\n\n handleBlur(event) {\n const {\n stripSeparators, id, propPath, formProperties: { pageTitleChanged }\n } = this.props;\n const { isEditorAvailable } = this.state;\n\n this.removeExtraBr();\n let text = this.props.renderHtmlTags ? event.target.innerHTML : event.target.textContent;\n\n // Sanitize text\n text = this.stripBlankSpaces(text);\n text = this.sanitizeAndDecode(text);\n // Strip paragraph separators from the text\n text = stripSeparators ? this.stripSeparators(text) : text;\n text = isEditorAvailable ? this.getExtractedQuillValue(text) : text;\n\n if (propPath.includes('products') && this.props.format === 'currency') {\n text = this.validatePriceOnSave(text);\n }\n // In case text became different\n if (this.state.text !== text) {\n if (this.question && ['control_checkbox', 'control_radio'].indexOf(this.question.type) > -1 && this.question.options) {\n text = text.trim();\n }\n this.setState({ text });\n }\n\n let prop = {};\n set(prop, propPath, text);\n\n if (global.buildermode === 'card' && propPath === 'welcomePage[0].title') {\n this.props.actions.updateFormProperty({ pageTitleChanged: 'Yes' });\n }\n\n if (id === 'Form' && text !== this.sanitizedText) {\n if (propPath === 'title') {\n if (isEmpty(text)) {\n text = this.props.text;\n this.setState({ text });\n }\n\n if (pageTitleChanged === 'No') {\n set(prop, 'pagetitle', text); // Hacky way if prop is title update pagetitle too.\n if (global.buildermode === 'card') {\n set(prop, 'welcomePage[0].title', text); // Hacky way if prop is title update pagetitle too.\n }\n }\n }\n // added for disabling instant save\n if (this.props.disableSave) {\n this.props.handlePropChanged(prop);\n } else if (propPath.include('products')) {\n const params = {\n pid: this.props.pid,\n prop: { [propPath.split('.')[1]]: text },\n isInlineChange: true\n };\n\n this.props.actions.updateProduct({ ...params });\n } else {\n this.props.actions.updateFormProperty(prop);\n }\n } else if (text !== this.sanitizedText || !text || this.props.isArrayModeEnabled) {\n if (text !== this.sanitizedText || !text) {\n const defaultName = Utils.makeQuestionName(this.question.text, id, this.props.questions);\n if (propPath === 'text' && this.question.name && text && (defaultName === this.question.name)) {\n set(prop, 'name', Utils.makeQuestionName(text, id, this.props.questions));\n }\n\n if (isUndefined(text)) { // Fixt undef text\n text = '';\n } else if (text.substring(text.length - 2, text.length) === ' *') {\n if (this.question.required !== 'Yes') {\n prop.text = prop.text.substring(0, prop.text.length - 1);\n Object.assign(prop, { required: 'Yes' });\n }\n }\n const isWorkflowFormBuilder = this.props.ui.currentLocation === 'workflow';\n const isQuestionRelatedToWorkflow = isWorkflowFormBuilder && this.props.questions.find(q => q.name === 'heading' && q.qid === id);\n this.props.actions.updateFormQuestion(id, this.props.propModifier(prop), !isWorkflowFormBuilder, !isQuestionRelatedToWorkflow);\n this.props.pdfImportActions.updatePDFFieldsForNewOption(id, propPath, prop[propPath]);\n }\n\n if (this.props.isArrayModeEnabled && ['add', 'delete'].indexOf(this.arrayOperation) > -1) {\n const [propName, index] = propPath.split('|');\n const isAddOperation = this.arrayOperation === 'add';\n let focusIndex = parseInt(index, 10) + (isAddOperation ? 1 : -1);\n if (focusIndex < 0) focusIndex = 0;\n const newPropPath = `${propName}||${isAddOperation ? '' : '|'}${index}`;\n prop = { [newPropPath]: text };\n this.props.actions.updateFormQuestion(id, prop);\n this.props.actions.setFocusedInlineEditInfo({ qid: id, [propName]: focusIndex });\n this.arrayOperation = null;\n this.props.pdfImportActions.updatePDFFieldsForNewOption(id, newPropPath, text);\n }\n\n // If user is filling first header, and if it equals the page title we need to update title too.\n const isPageTitleEqualsPageText = t(this.props.pageTitle) === this.sanitizedText || this.props.pageTitle === this.sanitizedText;\n if (this.props.isFirstHeader && isPageTitleEqualsPageText) {\n this.props.actions.updateFormProperty({ pagetitle: text, title: text });\n }\n }\n }\n\n stripBlankSpaces(_text = '') {\n let text = _text;\n if (!this.props.allowBreakSpaces) {\n text = text.replace(/\\n/g, '');\n text = text.replace(/\\n/g, '');\n } else if (this.props.replaceNewlineToBr) {\n text = text.replace(/\\n/g, '
');\n }\n\n return text;\n }\n\n handleKeyUp() {\n // this.scrollEditorIntoView();\n }\n\n scrollEditorIntoView() {\n const { activeElement } = global.document;\n\n if (!isSafari() && activeElement) {\n try {\n scrollIntoView(activeElement, {\n time: 0,\n align: {\n top: 0.5,\n left: 0\n }\n });\n } catch (e) {\n // Nothing.\n }\n }\n }\n\n handleContentEditableChange(event) {\n this.props.actions.onInlineEditInput(this.props.id, this.props.propPath, event.target.value);\n }\n\n handleEditorChange(content) {\n const contentValue = this.state.isEditorAvailable ? this.getExtractedQuillValue(content) : content;\n this.removeExtraBr();\n this.setState({\n quillEditorValue: content\n });\n this.props.actions.onInlineEditInput(this.props.id, this.props.propPath, contentValue);\n }\n\n renderContentEditable() {\n const {\n isBlock,\n children,\n placeholder,\n renderHtmlTags,\n allowBreakSpaces,\n replaceNewlineToBr,\n ariaLabel,\n maxLength\n } = this.props;\n\n const { text } = this.state;\n\n const inlineEditStyle = isBlock ? { width: '100%' } : null;\n\n return (\n { this.editor = el; }}\n format={this.props.format}\n maxLength={maxLength}\n {...ariaLabel ? { 'aria-label': t(ariaLabel) } : {}}\n >\n {children}\n \n );\n }\n\n renderEditor() {\n return (\n { this.editor = el; }}\n onFocus={this.onQuillFocus}\n onChange={this.handleEditorChange}\n onChangeSelection={this.onSelectionChange}\n placeholder={this.props.placeholder ? t(this.props.placeholder) : ''}\n />\n );\n }\n\n render() {\n const { isBlock } = this.props;\n const { text, isEditorAvailable } = this.state;\n\n // const styles = Object.assign({}, { display: this.props.isBlock ? 'block' : 'inline' });\n const styles = isBlock ? { display: 'inline-block', width: '100%' } : { display: 'inline-block' };\n const editorClass = text && text.length ? 'editorHasText' : 'editorNoText';\n return (\n \n {isEditorAvailable ? this.renderEditor() : this.renderContentEditable()}\n \n );\n }\n}\n\nInlineEditor.defaultProps = {\n text: 'Inline Editor',\n defaultValue: 'Click to edit..',\n placeholder: 'Type a question',\n sanitizeText: false,\n renderHtmlTags: false,\n allowBreakSpaces: false,\n replaceNewlineToBr: true,\n useEditor: false,\n additionalToolbarElements: [],\n stripSeparators: false,\n focusCallback: f => f,\n onSelectionChange: f => f,\n ariaLabel: '',\n propModifier: f => f,\n maxLength: null,\n sanitizeFunction: null\n};\n\nInlineEditor.propTypes = {\n text: PropTypes.string,\n defaultValue: PropTypes.string,\n placeholder: PropTypes.string,\n id: PropTypes.string,\n propPath: PropTypes.string,\n type: PropTypes.string,\n focusToElement: PropTypes.bool,\n isFirstHeader: PropTypes.bool,\n isMobile: PropTypes.bool,\n pageTitle: PropTypes.string,\n sanitizeText: PropTypes.bool,\n renderHtmlTags: PropTypes.bool,\n allowBreakSpaces: PropTypes.bool,\n replaceNewlineToBr: PropTypes.bool,\n additionalToolbarElements: PropTypes.array,\n children: PropTypes.oneOfType([PropTypes.shape(), PropTypes.func]),\n isBlock: PropTypes.bool,\n actions: PropTypes.shape({\n updateFormQuestion: PropTypes.func,\n updateFormProperty: PropTypes.func,\n updateSelectedQuestion: PropTypes.func,\n setFocusedInlineEditInfo: PropTypes.func,\n }),\n disableSave: PropTypes.bool,\n handlePropChanged: PropTypes.func,\n focusCallback: PropTypes.func,\n onSelectionChange: PropTypes.func,\n questions: PropTypes.arrayOf(PropTypes.shape()),\n ui: PropTypes.shape(),\n isArrayModeEnabled: PropTypes.bool, // enter key adds inline\n useEditor: PropTypes.bool,\n stripSeparators: PropTypes.bool,\n uniqueGlobalName: PropTypes.string,\n format: PropTypes.oneOf(['text', 'currency']),\n ariaLabel: PropTypes.string,\n propModifier: PropTypes.func,\n maxLength: PropTypes.number,\n sanitizeFunction: PropTypes.func\n};\n\nfunction mapDispatchToProps(dispatch) {\n return {\n actions: bindActionCreators(actions, dispatch),\n pdfImportActions: bindActionCreators(pdfImportActions, dispatch),\n };\n}\n\nfunction mapStateToProps(state) {\n return {\n questions: state.questions,\n ui: state.ui,\n formProperties: state.formProperties\n };\n}\nexport default connect(mapStateToProps, mapDispatchToProps, null, { forwardRef: true })(InlineEditor);\n","import React, { useCallback, useEffect, useState } from 'react';\nimport {\n func, number, bool, element, instanceOf, oneOfType\n} from 'prop-types';\nimport { IconMinus, IconPlus } from '@jotforminc/svg-icons';\nimport { Button } from '@jotforminc/magnet';\n\nimport '../styles/style.scss';\n\nconst floatNum = num => Number(num.toFixed(2));\n\nconst isValidElement = el => el && el instanceof Element;\n\nconst calcTouchSpace = e => Math.hypot(\n e.touches[0].pageX - e.touches[1].pageX,\n e.touches[0].pageY - e.touches[1].pageY\n);\n\nconst Zoom = ({\n scale,\n onChangeScale,\n maxScale,\n minScale,\n scaleFactor,\n pinchToZoom,\n doubleTapToZoom,\n pinchContainer\n}) => {\n const [zoomRate, setZoomRate] = useState(scale);\n const isMobile = 'ontouchstart' in document.documentElement;\n let pinchTimer;\n let prevHypo;\n\n const onTouchStart = useCallback(e => {\n if (e.touches.length === 2) {\n e.preventDefault();\n prevHypo = calcTouchSpace(e);\n }\n }, []);\n\n const onTouchMove = useCallback(e => {\n if (e.touches.length === 2) {\n clearTimeout(pinchTimer);\n // To minimize flickering effect and prevent scale change on touchstart.\n pinchTimer = setTimeout(() => {\n e.preventDefault();\n const currHypo = calcTouchSpace(e) / prevHypo;\n const res = Math.min(Math.max(minScale, currHypo), maxScale);\n setZoomRate(floatNum(res));\n }, 10);\n }\n }, []);\n\n const doubleTapListener = useCallback(() => {\n setZoomRate(zoomRate > 1.25 ? 0.75 : 1.5);\n }, []);\n\n const onPinch = el => {\n el.addEventListener('touchstart', onTouchStart, { passive: false });\n el.addEventListener('touchmove', onTouchMove, { passive: false });\n };\n\n useEffect(() => {\n return () => {\n if (isValidElement(pinchContainer)) {\n pinchContainer.removeEventListener('touchstart', onTouchStart, { passive: false });\n pinchContainer.removeEventListener('touchmove', onTouchMove, { passive: false });\n pinchContainer.removeEventListener('dblclick', doubleTapListener);\n }\n };\n }, []);\n\n useEffect(() => {\n if (doubleTapToZoom && isValidElement(pinchContainer) && isMobile) {\n pinchContainer.addEventListener('dblclick', doubleTapListener);\n } else if (!doubleTapToZoom && isValidElement(pinchContainer)) {\n pinchContainer.removeEventListener('dblclick', doubleTapListener);\n }\n }, [doubleTapToZoom, pinchContainer]);\n\n useEffect(() => {\n if (pinchToZoom && isValidElement(pinchContainer)) {\n prevHypo = 0;\n onPinch(pinchContainer, { onChangeScale, maxScale, minScale });\n } else if (!pinchToZoom && isValidElement(pinchContainer)) {\n pinchContainer.removeEventListener('touchstart', onTouchStart, { passive: false });\n pinchContainer.removeEventListener('touchmove', onTouchMove, { passive: false });\n }\n }, [pinchToZoom, pinchContainer]);\n\n useEffect(() => {\n onChangeScale(zoomRate);\n }, [zoomRate]);\n\n const changeScale = val => {\n const calScale = floatNum(scale + val);\n const newScale = calScale > maxScale || calScale < minScale ? scale : calScale;\n setZoomRate(floatNum(newScale));\n };\n\n return (\n \n changeScale(scaleFactor)}\n colorStyle=\"secondary\"\n size=\"small\"\n />\n changeScale(-scaleFactor)}\n colorStyle=\"secondary\"\n size=\"small\"\n />\n \n );\n};\n\nZoom.defaultProps = {\n scale: 1,\n maxScale: 2.5,\n minScale: 0.25,\n scaleFactor: 0.25,\n onChangeScale: () => {},\n pinchToZoom: false,\n doubleTapToZoom: false,\n pinchContainer: null\n};\n\nZoom.propTypes = {\n scale: number,\n maxScale: number,\n minScale: number,\n scaleFactor: number,\n onChangeScale: func,\n pinchToZoom: bool,\n doubleTapToZoom: bool,\n pinchContainer: oneOfType([instanceOf(HTMLDocument), element])\n};\n\nexport default Zoom;\n","import React, { useEffect, useState } from 'react';\nimport PropTypes from 'prop-types';\nimport { connect } from 'react-redux';\nimport debounce from 'lodash/debounce';\nimport getOr from 'lodash/fp/getOr';\n\nimport { usePrevious } from '@jotforminc/hooks';\nimport { ZoomControl } from '@jotforminc/zoom-control';\nimport { setScale as setScaleAction } from '../../actions/pdfImport';\nimport { isRandomToolActive } from './helpers';\nimport { getPDFPageSettings } from '../../reducers/pdfImport';\n\nconst handleFloating = (val, precision) => parseFloat(val.toFixed(precision ? precision : 2));\nconst getWindowWidth = () => global.window.innerWidth;\n\nconst calcScale = (pageWidth, mapperWidth, isMappingMode, scale) => {\n if (isRandomToolActive()) {\n return;\n }\n\n const splitWidth = (getWindowWidth() * mapperWidth) / 100;\n let calcVal = (splitWidth && pageWidth) && handleFloating(splitWidth / (pageWidth + 50), 1);\n // When calculated scale val is bigger than 1.5(which means 150% zoom) on nonmappable mode,\n // don't let it go through change it with defined max val(1.5)\n calcVal = !isMappingMode && calcVal > 1.5 ? 1.5 : calcVal;\n\n return calcVal ? calcVal : scale;\n};\n\nconst Zoom = ({\n pageWidth,\n isMappingMode = false,\n // states\n device,\n actionType,\n scale,\n mapperWidth,\n // action\n setScale\n}) => {\n const [initWindowWidth, setInitWindowWidth] = useState(getWindowWidth());\n const [manuallyAdjustedVal, setManuallyAdjustedVal] = useState(null);\n const prevMapperWidth = usePrevious(mapperWidth);\n\n const handleScale = val => {\n if (val && val !== scale) {\n setScale(val);\n }\n };\n\n const handleScaleonWinResize = () => {\n const currWindowWidth = getWindowWidth();\n // Ignore height changes on window\n if (initWindowWidth === currWindowWidth) {\n return;\n }\n\n const currMapperWidth = (device === 'isMobile' || !isMappingMode) ? 100 : mapperWidth;\n // Update initial windowWidth for further comparison\n setInitWindowWidth(currWindowWidth);\n // Set scale val within half a sec, if windowWidth changed\n handleScale(calcScale(pageWidth, currMapperWidth, isMappingMode, scale));\n };\n\n const handleZoom = s => {\n handleScale(s);\n setManuallyAdjustedVal(s);\n };\n\n useEffect(() => {\n // Set mapperWidth to 100 as default, because we don't have any splitView on mobile or nonmapping mode\n handleScale(calcScale(pageWidth, (device === 'isMobile' || !isMappingMode) ? 100 : mapperWidth, isMappingMode, scale));\n // Change scale on window resize as well\n global.window.addEventListener('resize', handleScaleonWinResize);\n\n return () => {\n // Remove tracking for win resize\n global.window.removeEventListener('resize', handleScaleonWinResize);\n };\n }, []);\n\n useEffect(() => {\n if (actionType === 'resize' && manuallyAdjustedVal) {\n // Don't change scale on increasing value of mapperWidth\n if (mapperWidth > prevMapperWidth) {\n return;\n }\n\n setManuallyAdjustedVal(null);\n }\n\n const isMaximized = actionType === 'maximize' && manuallyAdjustedVal;\n\n debounce(handleScale, actionType === 'resize' ? 0 : 500)(\n isMaximized ? manuallyAdjustedVal : calcScale(pageWidth, mapperWidth, isMappingMode, scale)\n );\n }, [mapperWidth]);\n\n return (\n \n );\n};\n\nZoom.propTypes = {\n isMappingMode: PropTypes.bool\n};\n\nconst mapStateToProps = state => ({\n mapperWidth: state.pdfImport.ui.mapperWidth.width,\n actionType: state.pdfImport.ui.mapperWidth.lastAction,\n device: state.ui.device,\n scale: state.pdfImport.ui.scale,\n pageWidth: getOr(762, 'width', getPDFPageSettings(state)(0))\n});\n\nconst mapDispatchToProps = {\n setScale: setScaleAction\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(Zoom);\n","import React from 'react';\nimport { connect } from 'react-redux';\nimport getOr from 'lodash/fp/getOr';\nimport { t } from '@jotforminc/translation';\n\nimport { displaySignupPrompt } from '../../actions';\nimport { SIGNUP_BUTTON_NAMES, APP_NAME, LIMIT_BY_CODE } from '../../libs/pdfImport/constants';\nimport { logJotFormEvents } from '../../libs/Utils';\nimport { endpoints } from '../../libs/api';\n\nconst PageSignupWarning = ({\n pageIndex,\n username,\n accountType,\n displaySignup,\n formID,\n variantCode = ''\n}) => {\n if (accountType === 'GUEST' && (pageIndex + 1) > LIMIT_BY_CODE[variantCode]) {\n return (\n
\n
\n \n

\n {t('Sign up to convert more pages')}\n

\n {\n displaySignup(true, t('Sign up to convert more pages'), false, newUserInfo => {\n const newUserName = getOr('', 'username', newUserInfo);\n const newUser = getOr(false, 'newUser', newUserInfo);\n const newAccountType = getOr('', 'accountType', newUserInfo);\n\n logJotFormEvents('pdf-import', {\n actor: newUserName,\n action: newUser ? 'Signup' : 'Login',\n target: 'Guest - Smart PDF Forms field detection limit'\n }, newAccountType);\n\n endpoints.updateFieldDetection(formID).finally(() => {\n global.location.reload();\n });\n }, APP_NAME, SIGNUP_BUTTON_NAMES);\n\n logJotFormEvents('pdf-import', {\n actor: username,\n action: 'Click',\n target: 'Guest - Smart PDF Forms field detection limit'\n }, accountType);\n }}\n >\n {t('Sign up')}\n \n
\n
\n );\n }\n\n return null;\n};\n\nconst mapDispatchToProps = {\n displaySignup: displaySignupPrompt\n};\n\nconst mapStateToProps = state => ({\n accountType: state.user.accountType,\n username: state.user.username,\n formID: state.formProperties.id,\n variantCode: state.pdfImport.ui.variantCode\n});\n\nexport default connect(mapStateToProps, mapDispatchToProps)(PageSignupWarning);\n","// This file contains helper functions for pdf-import components\nimport getOr from 'lodash/fp/getOr';\nimport compose from 'lodash/fp/compose';\nimport floor from 'lodash/fp/floor';\nimport identity from 'lodash/fp/identity';\nimport head from 'lodash/fp/head';\nimport domtoimage from 'dom-to-image-more';\n\nconst getRoundFunction = round => (round ? floor : identity);\n\nexport const calculatePosSize = (p1, p2, scale, round = true) => ({\n width: getRoundFunction(round)(Math.abs(p2.x - p1.x) * scale),\n height: getRoundFunction(round)(Math.abs(p2.y - p1.y) * scale),\n bottom: getRoundFunction(round)(Math.min(p1.y, p2.y) * scale),\n top: getRoundFunction(round)(Math.max(p1.y, p2.y) * scale),\n left: getRoundFunction(round)(Math.min(p1.x, p2.x) * scale),\n right: getRoundFunction(round)(Math.max(p1.x, p2.x) * scale)\n});\n\nexport const pageClickCoordinate = canvas => event => {\n const pageIndex = Number(canvas.parentElement.dataset.pageNumber) - 1;\n const canvasRect = canvas.getBoundingClientRect();\n\n return {\n pageIndex: isNaN(pageIndex) ? 0 : pageIndex, // eslint-disable-line\n x: Math.abs(canvasRect.x - event.pageX),\n y: Math.abs(canvasRect.y - event.pageY)\n };\n};\n\nexport const testRegex = reg => str => reg.test(str);\nexport const isAnnotationOrChildElement = compose(\n testRegex(/PDFA|PDFRND|PDF-button/),\n getOr('', 'className')\n);\n\nexport const boundaryOfTwoRect = (r1, r2) => {\n return [\n Math.min(r1[0], r2[0]),\n Math.min(r1[1], r2[1]),\n Math.max(r1[2], r2[2]),\n Math.max(r1[3], r2[3])\n ];\n};\n\nexport const calculateBoundary = xs => {\n // TODO: why do we need to check the length of xs?\n return xs.length > 0 ? xs.reduce((acc, item) => {\n return item ? boundaryOfTwoRect(acc, item) : acc;\n }) : [];\n};\n\nexport const isDifferentAnnDragging = (hoveredAnnId, selectedAnn, isDragging) => (\n hoveredAnnId && selectedAnn && isDragging && selectedAnn.map(a => a.id).indexOf(hoveredAnnId) === -1\n);\n\nexport const getPropFromFirstSelected = ann => prop => (\n getOr(null, `0.${prop}`, ann)\n);\n\nexport const isTextContent = compose(\n className => className === 'react-pdf__Page__textContent',\n getOr('', 'parentElement.className')\n);\n\nexport const isAnnotationContent = target => compose(\n el => el && el.contains(target),\n ann => ann && document.querySelector(`[data-annotation-id=\"${ann.id}\"]`),\n head\n);\n\nexport const setDataset = propName => domEl => getOr(null, `dataset.${propName}`, domEl);\n\n// newly created annotations will be placed to the first zone that will be in the viewport\nexport const annotationZoneStyles = (scale, pageSettings) => {\n const { height: pageHeight } = pageSettings || ({ height: 0 });\n const zone = [40, pageHeight - 132, 150, pageHeight - 32];\n\n const {\n width, height, bottom, left\n } = calculatePosSize({ x: zone[0], y: zone[1] }, { x: zone[2], y: zone[3] }, scale);\n\n return {\n width, height, bottom, left, position: 'absolute', opacity: 0, pointerEvents: 'none'\n };\n};\n\nexport const handleTextCopy = e => {\n const clipboardData = e.clipboardData || global.window.clipboardData;\n\n if (clipboardData) {\n const selectedText = global.window.getSelection().toString().replace(/\\s{2,}/g, ' ');\n if (selectedText) {\n clipboardData.setData('Text', selectedText);\n e.preventDefault();\n }\n }\n};\n\nconst isHorizontal = (rotation = 0) => (\n Math.floor(rotation / 90) % 2 === 0\n);\n\nexport const getSizes = (settings = { rotation: 0 }) => (\n isHorizontal(settings.rotation)\n // There are four rotation cases: first two cases width and height don't change but\n // in the last two we need to replace with and height values\n ? ({ width: settings.width, height: settings.height })\n : ({ width: settings.height, height: settings.width })\n);\n\nexport const getPDFPageSettings = pageSettigs => pageIndex => {\n const settings = getOr({}, `[${pageIndex}]`, pageSettigs);\n\n return {\n ...settings,\n ...getSizes(settings)\n };\n};\n\nexport const getDomImage = (pageSetting, thumbnailConfig) => {\n const { width: thumbnailWidth, quality } = thumbnailConfig;\n const { width, height, pageIndex } = pageSetting;\n const currCanvas = global.document.querySelector(`[data-page-number=\"${pageIndex + 1}\"] canvas`);\n\n return domtoimage.toPng(currCanvas, { width: thumbnailWidth, height: (thumbnailWidth / width) * height, quality });\n};\n\nexport const keepAnnotationOnPageBoundary = (deltaRect, pageSizes) => {\n const { pageHeight = 0, pageWidth = 0 } = pageSizes || {};\n if (pageWidth <= 0 || pageHeight <= 0) {\n return deltaRect;\n }\n\n const {\n deltaLowerX, deltaLowerY, deltaUpperX, deltaUpperY\n } = deltaRect;\n return {\n deltaLowerX: Math.abs(deltaLowerX) > pageWidth ? 0 : deltaLowerX,\n deltaLowerY: Math.abs(deltaLowerY) > pageHeight ? 0 : deltaLowerY,\n deltaUpperX: Math.abs(deltaUpperX) > pageWidth ? 0 : deltaUpperX,\n deltaUpperY: Math.abs(deltaUpperY) > pageHeight ? 0 : deltaUpperY\n };\n};\n\nexport const getPageIndexFromPoint = mouseEvent => {\n const { pageX, pageY } = mouseEvent || {};\n const elementsFromPoint = document.elementsFromPoint || document.msElementsFromPoint;\n const pageEl = Array.from(elementsFromPoint.call(document, pageX, pageY) || []).find(elem => elem.matches('.PDFV-canvas'));\n\n return pageEl ? parseInt(pageEl.dataset.pageNumber, 10) - 1 : null;\n};\n","import PropTypes from 'prop-types';\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport throttle from 'lodash/throttle';\n\nimport './style.scss';\n\nconst handleSelectionThrottle = throttle((pTarget, e, onCollide, that) => {\n that.handleSelection(pTarget, e, onCollide);\n}, 300);\n\nconst _userSelectString = `\n -webkit-touch-callout: none !important;\n -webkit-user-select: none !important;\n -khtml-user-select: none !important;\n -moz-user-select: none !important;\n -ms-user-select: none !important;\n user-select: none !important;\n`;\n\nconst enableUserSelect = () => {\n const docBody = global.document.getElementsByTagName('body')[0];\n const currentStyle = docBody.getAttribute('style') || '';\n const newStyle = currentStyle.replace(new RegExp(_userSelectString, 'g'), '');\n docBody.setAttribute('style', newStyle);\n};\n\nconst disableUserSelect = () => {\n const docBody = global.document.getElementsByTagName('body')[0];\n const currentStyle = docBody.getAttribute('style') || '';\n if (currentStyle.indexOf(_userSelectString) === -1) {\n const newStyle = [currentStyle, _userSelectString].join('');\n docBody.setAttribute('style', newStyle);\n }\n};\n\nconst deselectText = () => {\n if (global.getSelection) {\n if (global.getSelection().empty) { // Chrome\n global.getSelection().empty();\n } else if (global.getSelection().removeAllRanges) { // Firefox\n global.getSelection().removeAllRanges();\n }\n } else if (global.document.selection) { // IE?\n global.document.selection.empty();\n }\n};\n\nexport default class Selectable extends React.Component {\n constructor(props) {\n super(props);\n\n this.handleMouseEvent = this.handleMouseEvent.bind(this);\n this.renderHelper = this.renderHelper.bind(this);\n this.state = {\n beginSelection: false,\n classList: [],\n hasValidSelectionArea: false,\n selectionCoords: {},\n style: null\n };\n const { treshold } = this.props;\n this.selectionTreshold = treshold || 1;\n }\n\n handleSelection(querySelector, e, callback) {\n if (typeof callback === 'function') {\n const { treshold } = this.props;\n // eslint-disable-next-line react/no-find-dom-node\n const originatingTarget = ReactDOM.findDOMNode(this);\n const targetElements = originatingTarget.querySelectorAll(querySelector);\n const returnElements = [...targetElements].filter(targetElement => {\n return this.doObjectsCollide(this.selectionArea, targetElement, treshold) ? targetElement : false;\n });\n\n callback(returnElements, e);\n }\n }\n\n // eslint-disable-next-line complexity\n handleMouseEvent(e) {\n const {\n nativeEvent: {\n which, clientX, clientY, x: nx, y: ny, pageX, pageY\n }, type, target\n } = e;\n const {\n filter, onCollide, target: pTarget, onSelect, onSelectionEnd\n } = this.props;\n const x = clientX || nx;\n const y = clientY || ny;\n let canTriggerSelection = true;\n\n if (typeof filter === 'function') {\n canTriggerSelection = filter(target);\n }\n\n if (which === 1) { // Left click.\n const { selectionCoords, beginSelection, hasValidSelectionArea } = this.state;\n switch (type) {\n case 'mousemove':\n if (\n beginSelection\n && Math.abs(pageY - selectionCoords.beginY) > this.selectionTreshold\n && Math.abs(pageX - selectionCoords.beginX) > this.selectionTreshold\n ) {\n this.setState({\n hasValidSelectionArea: true,\n style: {\n width: Math.abs(x - selectionCoords.beginX) + 1 || 'inherit',\n height: Math.abs(y - selectionCoords.beginY) + 1 || 'inherit',\n top: Math.min(pageY, selectionCoords.beginY) || 0,\n left: Math.min(pageX, selectionCoords.beginX) || 0\n },\n classList: ['selectionArea-visible']\n });\n\n if (hasValidSelectionArea && typeof onCollide === 'function') {\n // this.handleSelection(pTarget, e, onCollide);\n handleSelectionThrottle(pTarget, e, onCollide, this);\n }\n\n disableUserSelect();\n deselectText();\n } else {\n this.setState({\n hasValidSelectionArea: false,\n classList: ['selectionArea-hideAfter']\n });\n }\n if (hasValidSelectionArea) {\n e.preventDefault();\n }\n break;\n case 'mouseup':\n if (typeof onSelectionEnd === 'function') {\n onSelectionEnd(e);\n }\n this.setState({\n beginSelection: false,\n hasValidSelectionArea: false,\n selectionCoords: {},\n classList: ['selectionArea-hideAfter']\n });\n if (hasValidSelectionArea) {\n this.handleSelection(pTarget, e, onSelect);\n }\n enableUserSelect();\n break;\n case 'mouseleave':\n this.setState({\n beginSelection: false,\n hasValidSelectionArea: false,\n selectionCoords: {},\n classList: ['selectionArea-hideAfter']\n });\n\n if (beginSelection) {\n enableUserSelect();\n }\n break;\n case 'mousedown':\n if (canTriggerSelection) {\n this.setState({\n beginSelection: true,\n selectionCoords: {\n beginX: x,\n beginY: y\n }\n });\n }\n if (hasValidSelectionArea) {\n this.setState({\n style: {\n width: 0,\n height: 0,\n top: y || 0,\n left: x || 0\n }\n });\n }\n break;\n default:\n break;\n }\n }\n }\n\n // https://github.com/unclecheese/react-selectable/blob/master/src/getBoundsForNode.js\n getBoundsForNode(node) {\n const rect = node.getBoundingClientRect();\n\n return {\n top: rect.top + global.document.body.scrollTop,\n left: rect.left + global.document.body.scrollLeft,\n offsetWidth: node.offsetWidth,\n offsetHeight: node.offsetHeight\n };\n }\n\n // https://github.com/unclecheese/react-selectable/blob/master/src/doObjectsCollide.js\n coordsCollide(aTop, aLeft, bTop, bLeft, aWidth, aHeight, bWidth, bHeight, tolerance) {\n const toleranceDistance = (typeof tolerance === 'undefined') ? 0 : tolerance;\n\n return !(\n (((aTop + aHeight) - toleranceDistance) < bTop)\n || ((aTop + toleranceDistance) > (bTop + bHeight))\n || (((aLeft + aWidth) - toleranceDistance) < bLeft)\n || ((aLeft + toleranceDistance) > (bLeft + bWidth))\n );\n }\n\n // https://github.com/unclecheese/react-selectable/blob/master/src/doObjectsCollide.js\n doObjectsCollide(a, b, tolerance) {\n const aObj = (a instanceof global.HTMLElement) ? this.getBoundsForNode(a) : a;\n const bObj = (b instanceof global.HTMLElement) ? this.getBoundsForNode(b) : b;\n\n return this.coordsCollide(\n aObj.top,\n aObj.left,\n bObj.top,\n bObj.left,\n aObj.offsetWidth,\n aObj.offsetHeight,\n bObj.offsetWidth,\n bObj.offsetHeight,\n tolerance\n );\n }\n\n renderHelper() {\n const { classList, style } = this.state;\n\n return (\n { this.selectionArea = c; }}\n />\n );\n }\n\n render() {\n const { disabled, className, children } = this.props;\n\n return (\n \n {!disabled && this.renderHelper()}\n {children}\n \n );\n }\n}\n\nSelectable.defaultProps = {\n children: null,\n className: '',\n disabled: false,\n filter: () => {},\n onCollide: () => {},\n onSelect: () => {},\n target: '',\n treshold: 1,\n onSelectionEnd: () => {}\n};\n\nSelectable.propTypes = {\n children: PropTypes.node,\n className: PropTypes.string,\n disabled: PropTypes.bool,\n filter: PropTypes.func,\n onCollide: PropTypes.func,\n onSelect: PropTypes.func,\n target: PropTypes.string,\n treshold: PropTypes.number,\n onSelectionEnd: PropTypes.func\n};\n","const SPACE_BETWEEN_PDF_PAGES = 16;\n\nconst RND_HANDLERS = [\n { name: 'top', type: 'edge' },\n { name: 'right', type: 'edge' },\n { name: 'bottom', type: 'edge' },\n { name: 'left', type: 'edge' },\n { name: 'topRight', type: 'corner' },\n { name: 'bottomRight', type: 'corner' },\n { name: 'bottomLeft', type: 'corner' },\n { name: 'topLeft', type: 'corner' }\n];\n\nconst RND_GUIDES = [\n { name: 'top', axis: 'x' },\n { name: 'right', axis: 'y' },\n { name: 'bottom', axis: 'x' },\n { name: 'left', axis: 'y' }\n];\n\nconst FIELDS_WITH_FIXED_RATIO = ['control_radio', 'control_checkbox'];\nconst VERY_LARGE_NUMBER = 999999999999;\nconst MAX_TEXT_ELEMENT_PER_PAGE = 200;\n\nexport {\n SPACE_BETWEEN_PDF_PAGES,\n RND_HANDLERS,\n RND_GUIDES,\n FIELDS_WITH_FIXED_RATIO,\n VERY_LARGE_NUMBER,\n MAX_TEXT_ELEMENT_PER_PAGE\n};\n","/* eslint react/prop-types: 0 */\nimport React, { memo } from 'react';\nimport getOr from 'lodash/fp/getOr';\n\nimport {\n calculatePosSize\n} from './utils/helpers';\n\nconst setStyle = ({\n scale, selected, mouseOver, coordinates, rndCoordinates, multiple, resizeDirection, annotationContentStyle\n}) => {\n const {\n width, height, bottom, left, right, top\n } = coordinates;\n const fontSize = getOr(16, 'fontSize', annotationContentStyle) * scale;\n const base = {\n ...annotationContentStyle,\n fontSize,\n width,\n height\n };\n const {\n bottom: rndBottom,\n left: rndLeft,\n right: rndRight,\n top: rndTop\n } = rndCoordinates;\n\n if (selected && multiple) {\n switch (resizeDirection) {\n case 'top':\n case 'topRight':\n case 'right':\n return { ...base, bottom: Math.abs(bottom - rndBottom), left: Math.abs(left - rndLeft) };\n case 'bottom':\n case 'bottomRight':\n return { ...base, top: Math.abs(top - rndTop), left: Math.abs(left - rndLeft) };\n case 'bottomLeft':\n case 'left':\n return { ...base, top: Math.abs(top - rndTop), right: Math.abs(right - rndRight) };\n case 'topLeft':\n return { ...base, bottom: Math.abs(bottom - rndBottom), right: Math.abs(right - rndRight) };\n default:\n return { ...base, bottom: Math.abs(bottom - rndBottom), left: Math.abs(left - rndLeft) };\n }\n }\n if (selected && !multiple) {\n return { fontSize, width: '100%', height: '100%' };\n }\n if (mouseOver) {\n return base;\n }\n\n return { ...base, bottom, left };\n};\n\nconst Annotation = memo(({\n // annotation's props\n i,\n id,\n qid,\n type,\n mouseOver,\n selected,\n rect,\n scale,\n pageIndex,\n rndCoordinates = {},\n multiple = false,\n resizeDirection,\n annotationClassName,\n annotationContentStyle,\n onAnnotationMouseEnter,\n onAnnotationMouseLeave,\n onAnnotationClick,\n AnnotationContent,\n readOnly,\n selectedAnnotationsIds,\n hoveredAnnotationId,\n onRender,\n isAnnotationsComponent = false\n}) => {\n React.useEffect(() => {\n onRender();\n }, [rect]);\n // Since disconnected annotations are depricated, render will be allowed for connected ones only\n if (!qid || (isAnnotationsComponent && !(readOnly || (selectedAnnotationsIds.indexOf(id) === -1 && id !== hoveredAnnotationId)))) {\n return null;\n }\n const coordinates = calculatePosSize({ x: rect[0], y: rect[1] }, { x: rect[2], y: rect[3] }, scale, false);\n\n return (\n
{\n onAnnotationMouseEnter(id);\n }}\n onMouseLeave={() => {\n onAnnotationMouseLeave();\n }}\n onClick={e => {\n onAnnotationClick(e, pageIndex, id);\n }}\n onKeyDown={e => {\n if (e.key === 'Enter') {\n onAnnotationClick(e, pageIndex, id);\n }\n }}\n >\n {AnnotationContent(id, mouseOver)}\n
\n );\n});\n\nAnnotation.displayName = 'Annotation';\n\nexport default Annotation;\n","/* eslint react/prop-types: 0 */\nimport React, { memo } from 'react';\nimport Annotation from './Annotation';\n\nconst Annotations = memo(({\n pageIndex,\n annotations,\n selectedAnnotationsIds,\n readOnly,\n hoveredAnnotationId,\n scale,\n onRender = f => f,\n annotationProps\n}) => {\n return (\n <>\n {annotations.map((annotation, i) => (\n \n ))}\n \n );\n});\n\nAnnotations.displayName = 'Annotations';\n\nexport default Annotations;\n","import compose from 'lodash/fp/compose';\nimport getOr from 'lodash/fp/getOr';\nimport { SPACE_BETWEEN_PDF_PAGES } from './constants';\n\nconst setBase = () => ({\n scaleY: 0,\n scaleSpace: 0,\n deltaPageSettings: [],\n direction: 'curr'\n});\n\nconst setScaleY = ({ scale, y }) => base => ({\n ...base,\n scaleY: y / scale\n});\n\nconst getDeltaPageSettings = ({ pageSettings, pageIndex, newPageIndex }) => base => {\n switch (base.direction) {\n case 'next': return { ...base, deltaPageSettings: pageSettings.slice(pageIndex, newPageIndex + 1) };\n case 'prev': return { ...base, deltaPageSettings: pageSettings.slice(newPageIndex + 1, pageIndex + 1) };\n case 'curr': return { ...base, deltaPageSettings: pageSettings[pageIndex] ? [pageSettings[pageIndex]] : [] };\n default: return base;\n }\n};\n\nconst setScaleSpace = ({ scale, pageIndex, newPageIndex }) => base => {\n return {\n ...base,\n scaleSpace: Math.abs(newPageIndex - pageIndex) * (SPACE_BETWEEN_PDF_PAGES / scale)\n };\n};\n\nconst getAnnotationDirection = ({ pageIndex, newPageIndex }) => base => {\n if (pageIndex === newPageIndex) {\n return { ...base, direction: 'curr' };\n }\n return { ...base, direction: newPageIndex > pageIndex ? 'next' : 'prev' };\n};\n\nconst getDeltaHeight = (deltaPageSettings = []) => deltaPageSettings.reduce((prev, next) => {\n return prev + getOr(0, 'height', next) - getOr(0, 'yOffset', next);\n}, 0);\n\nconst calcY = ({\n pageSettings, pageIndex, rectY\n}) => ({\n direction, deltaPageSettings, scaleY, scaleSpace\n}) => {\n const deltaHeight = getDeltaHeight(deltaPageSettings);\n const { height: currHeight, yOffset: currYoffset } = pageSettings[pageIndex] || {};\n\n switch (direction) {\n case 'next': return deltaHeight - scaleY + scaleSpace - rectY;\n case 'prev': return currHeight - currYoffset - deltaHeight - scaleY - scaleSpace - rectY;\n case 'curr': return Math.abs(deltaHeight - scaleY + scaleSpace) - rectY;\n default: return 0;\n }\n};\n\nconst calcYCoordinateOnDragStop = o => compose(\n calcY(o),\n getDeltaPageSettings(o),\n getAnnotationDirection(o),\n setScaleSpace(o),\n setScaleY(o),\n setBase\n)(o);\n\nexport default calcYCoordinateOnDragStop;\n","import round from 'lodash/round';\nimport calcYCoordinateOnDragStop from './calcYCoordinateOnDragStop';\nimport { keepAnnotationOnPageBoundary } from './helpers';\n\nconst calcDeltaX = ({\n x, scale, lowerX, pageSettings, pageIndex, newPageIndex\n}) => {\n const { width: currWidth, xOffset: currXOffset } = pageSettings[pageIndex] || {};\n const { width: newWidth, xOffset } = pageSettings[newPageIndex] || {};\n const deltaWidth = (newWidth - xOffset - (currWidth - currXOffset)) / 2;\n\n return round(deltaWidth + (x / scale) - lowerX, 2);\n};\n\nconst getDeltaRectOnDragStop = ({\n rect, newPosition, scale = 1, pageSettings = [], pageIndex = 0, newPageIndex = 0\n}) => {\n const { width, height } = pageSettings[pageIndex] || {};\n const [lowerX = 0, , , upperY = 0] = rect;\n const { x = 0, y = 0 } = newPosition;\n\n const deltaX = calcDeltaX({\n x, scale, lowerX, pageSettings, pageIndex, newPageIndex\n });\n\n const deltaY = height > 0 ? round(calcYCoordinateOnDragStop({\n y,\n pageSettings,\n pageIndex,\n newPageIndex,\n scale,\n rectY: upperY\n }), 2) : 0;\n\n return keepAnnotationOnPageBoundary({\n deltaLowerX: deltaX,\n deltaLowerY: deltaY,\n deltaUpperX: deltaX,\n deltaUpperY: deltaY\n }, { width, height });\n};\n\nexport default getDeltaRectOnDragStop;\n","import round from 'lodash/round';\n\nconst calcDelta = (val, scale) => round(scale ? val / scale : val, 2);\n\nconst getDeltaRectOnResizeStop = ({ // eslint-disable-line\n direction,\n deltaPosition,\n scale,\n lockDeltas = {}\n}) => {\n let [deltaLowerX, deltaLowerY, deltaUpperX, deltaUpperY] = [0, 0, 0, 0];\n const { width, height } = deltaPosition;\n const deltaX = calcDelta(width, scale);\n const deltaY = calcDelta(height, scale);\n const {\n lockDeltaUpperY, lockDeltaLowerX, lockDeltaLowerY, lockDeltaUpperX, lockAspectRatio\n } = lockDeltas;\n if (/top/i.test(direction)) {\n deltaUpperY += deltaY;\n }\n if (/right/i.test(direction)) {\n deltaUpperX += deltaX;\n }\n if (/bottom/i.test(direction)) {\n deltaLowerY -= deltaY;\n }\n if (/left/i.test(direction)) {\n deltaLowerX -= deltaX;\n }\n if (lockDeltaUpperY) { // up\n const newDelta = calcDelta(lockDeltaUpperY, scale);\n deltaUpperY = newDelta;\n if (lockAspectRatio) {\n if (/left/i.test(direction)) {\n deltaLowerX = -newDelta;\n } else {\n deltaUpperX = newDelta;\n }\n }\n }\n if (lockDeltaLowerY) { // bottom\n const newDelta = calcDelta(lockDeltaLowerY, scale);\n deltaLowerY = newDelta;\n if (lockAspectRatio) {\n if (/left/i.test(direction)) {\n deltaLowerX = newDelta;\n } else {\n deltaUpperX = -newDelta;\n }\n }\n }\n if (lockDeltaLowerX) { // left\n const newDelta = calcDelta(lockDeltaLowerX, scale);\n deltaLowerX = newDelta;\n if (lockAspectRatio) {\n if (/top/i.test(direction)) {\n deltaUpperY = -newDelta;\n } else {\n deltaLowerY = newDelta;\n }\n }\n }\n if (lockDeltaUpperX) { // right\n const newDelta = calcDelta(lockDeltaUpperX, scale);\n deltaUpperX = newDelta;\n if (lockAspectRatio) {\n if (/top/i.test(direction)) {\n deltaUpperY = newDelta;\n } else {\n deltaLowerY = -newDelta;\n }\n }\n }\n return {\n deltaLowerX, deltaLowerY, deltaUpperX, deltaUpperY\n };\n};\n\nexport default getDeltaRectOnResizeStop;\n","import { FIELDS_WITH_FIXED_RATIO, RND_HANDLERS } from './constants';\n\n// Decide whether allow vertical/horizontal resizing or not\nexport const shouldLockAspectRatio = type => FIELDS_WITH_FIXED_RATIO.indexOf(type) > -1;\n// Handle RND handler's className and 'enableResizing' props\nexport const setHandlers = (forClass, annotationType, disableHandlers) => (\n RND_HANDLERS.reduce((acc, handler) => {\n let isEnabled = true;\n if (shouldLockAspectRatio(annotationType)) {\n isEnabled = handler.type === 'corner';\n }\n if (disableHandlers) {\n isEnabled = false;\n }\n return { ...acc, [handler.name]: forClass ? `PDFRND-resizeHandler-${handler.name}` : isEnabled };\n }, {})\n);\n","// Decide update frequency on annotation with respect to direction type\n// Some directions of movement(which contains top or left don't need to update rect\nexport const shouldUpdateCoorOnResize = direction => /top/i.test(direction) || /left/i.test(direction);\n\nexport const setRNDGuidesOnMove = (newX, newY, pageWidth, pageHeight) => ({\n x: {\n length: pageWidth,\n translate: newX\n },\n y: {\n length: pageHeight,\n translate: newY\n }\n});\n\nexport const getAlignmentStyle = (axis, coor, guideOffset, invertedAxis) => ({\n [axis === 'x' ? 'width' : 'height']: `${coor[axis].length}px`,\n transform: `\n translate${axis.toUpperCase()}(-${coor[axis].translate}px)\n ${guideOffset ? `translate${invertedAxis.toUpperCase()}(${guideOffset}px)` : ''}`\n});\n","import React from 'react';\nimport Styled from 'styled-components';\n\nimport { RND_GUIDES } from './utils/constants';\nimport { getAlignmentStyle } from './utils/setRNDGuides';\n\nconst Guide = Styled.div`\n ${({ name }) => `\n position: absolute;\n ${name}: 0;\n border-${name}: 1px solid #ff18ff;\n `}\n\n &.y {\n top: 0;\n width: 1px;\n }\n &.x {\n left: 0;\n height: 1px;\n }\n\n @keyframes appearSmoothly {\n from { opacity: 0; }\n to { opacity: 1; }\n }\n\n animation: appearSmoothly .1s ease-in forwards;\n`;\n\nconst RndGuides = ({\n guideCoor,\n highlight,\n guideOffset\n}) => RND_GUIDES.map(guide => {\n const { name, axis } = guide;\n const regex = new RegExp(name, 'i');\n const shouldHighlight = regex.test(highlight);\n const invertedAxis = axis === 'x' ? 'y' : 'x';\n\n if (shouldHighlight) {\n return (\n \n );\n }\n\n return null;\n});\n\nexport default RndGuides;\n","import { VERY_LARGE_NUMBER } from './constants';\n\nconst CLOSENESS_LIMIT = 125;\n\nconst closestZero = nums => {\n return Object.entries(nums).reduce((acc, [key, val]) => {\n if (Math.abs(val) < Math.abs(acc[1])) {\n return [key, val];\n }\n return acc;\n }, ['', VERY_LARGE_NUMBER]);\n};\n\nconst filterAnnotations = (d, { coordinates, annotationIds }) => {\n if (annotationIds.indexOf(d.id) === -1 && d.qid) {\n const [, bottom,, top] = d.rect;\n const { top: topCurr, height } = coordinates;\n\n return Math.abs(top - (topCurr - height)) <= CLOSENESS_LIMIT || Math.abs(topCurr - bottom) <= CLOSENESS_LIMIT;\n }\n\n return false;\n};\n\nconst getSnapDirection = direction => direction.split('x')[1].toLowerCase();\n\nconst getSnapDistance = (annotations, curr, direction) => {\n const shapeDistance = annotations\n .filter(d => filterAnnotations(d, curr))\n .reduce(\n (acc, d) => {\n const [left, bottom, right, top] = d.rect;\n const topxTop = top - curr.coordinates.top;\n const bottomxBottom = bottom - (curr.coordinates.top - curr.coordinates.height);\n const leftxLeft = left - curr.coordinates.left;\n const rightxRight = right - (curr.coordinates.left + curr.coordinates.width);\n const topxBottom = top - (curr.coordinates.top - curr.coordinates.height);\n const bottomxTop = bottom - curr.coordinates.top;\n const leftxRight = left - (curr.coordinates.left + curr.coordinates.width);\n const rightxLeft = right - curr.coordinates.left;\n const centerxCenter = ((right + left) / 2) - ((curr.coordinates.left + curr.coordinates.left + curr.coordinates.width) / 2);\n let xSnapDistances = {\n leftxLeft,\n leftxRight,\n rightxLeft,\n rightxRight,\n centerxCenter // only for drag\n };\n let ySnapDistances = {\n topxTop,\n bottomxBottom,\n topxBottom,\n bottomxTop\n };\n\n if (direction) {\n if (/left/i.test(direction)) {\n xSnapDistances = { leftxLeft, rightxLeft };\n }\n if (/right/i.test(direction)) {\n xSnapDistances = { rightxRight, leftxRight };\n }\n if (/top/i.test(direction)) {\n ySnapDistances = { topxTop, bottomxTop };\n }\n if (/bottom/i.test(direction)) {\n ySnapDistances = { bottomxBottom, topxBottom };\n }\n }\n\n const [snapDirectionY, magnetY] = closestZero(ySnapDistances);\n const [snapDirectionX, magnetX] = closestZero(xSnapDistances);\n\n if (Math.abs(magnetX) < Math.abs(acc.magnetX)) {\n acc.magnetX = magnetX;\n acc.snapDirectionX = getSnapDirection(snapDirectionX);\n }\n if (Math.abs(magnetY) < Math.abs(acc.magnetY)) {\n acc.magnetY = magnetY;\n acc.snapDirectionY = getSnapDirection(snapDirectionY);\n }\n\n return acc;\n },\n { magnetX: VERY_LARGE_NUMBER, magnetY: VERY_LARGE_NUMBER }\n );\n return shapeDistance;\n};\n\nexport default getSnapDistance;\n","const calcCoordinatesForRnd = ({\n top = 0, pageHeight = 0, pageWidth = 0, pageYOffset = 0, pageXOffset = 0, scale = 1\n}) => {\n const pageHeightWithoutOffset = Math.abs((pageHeight - pageYOffset) * scale);\n const pageWidthWithoutOffset = Math.abs((pageWidth - pageXOffset) * scale);\n\n return {\n pageWidthWithoutOffset,\n pageHeightWithoutOffset,\n yAxis: pageHeightWithoutOffset - top\n };\n};\n\nexport default calcCoordinatesForRnd;\n","import { calculateBoundary } from './helpers';\nimport { shouldLockAspectRatio } from './setRNDHandlers';\n\nconst calcRatio = ({\n deltaRect,\n direction,\n boundryRect,\n lockRatio = false\n}) => {\n const { boundryWidth, boundryHeight } = {\n boundryWidth: Math.abs(boundryRect[0] - boundryRect[2]),\n boundryHeight: Math.abs(boundryRect[1] - boundryRect[3])\n };\n\n const {\n deltaLowerX, deltaUpperX,\n deltaLowerY, deltaUpperY\n } = deltaRect;\n\n const incX = (deltaLowerX || deltaUpperX);\n const incY = (deltaLowerY || deltaUpperY);\n\n let ratioX = 1;\n let ratioY = 1;\n\n switch (direction) {\n case 'top':\n case 'right':\n case 'topRight':\n ratioX = (boundryWidth + incX) / boundryWidth;\n ratioY = (boundryHeight + incY) / boundryHeight;\n break;\n case 'bottom':\n case 'bottomRight':\n ratioX = (boundryWidth + incX) / boundryWidth;\n ratioY = (boundryHeight - incY) / boundryHeight;\n break;\n case 'left':\n case 'topLeft':\n ratioX = (boundryWidth - incX) / boundryWidth;\n ratioY = (boundryHeight + incY) / boundryHeight;\n break;\n case 'bottomLeft':\n ratioX = (boundryWidth - incX) / boundryWidth;\n ratioY = (boundryHeight - incY) / boundryHeight;\n break;\n default:\n break;\n }\n\n if (lockRatio) {\n const minRatio = Math.min(ratioX, ratioY);\n return { ratioX: minRatio, ratioY: minRatio };\n }\n\n return { ratioX, ratioY };\n};\n\nconst resizeRect = ({\n rect, boundryRect, direction, ratioX, ratioY\n}) => {\n const [blx, bly, bux, buy] = boundryRect;\n const [lx, ly, ux, uy] = rect;\n let [nlx, nly, nux, nuy] = [0, 0, 0, 0];\n\n const width = Math.abs(ux - lx) * ratioX;\n const height = Math.abs(uy - ly) * ratioY;\n\n switch (direction) {\n case 'left':\n case 'bottom':\n case 'bottomLeft':\n nux = bux + (ratioX * (ux - bux));\n nlx = nux - width;\n nuy = buy + (ratioY * (uy - buy));\n nly = nuy - height;\n break;\n case 'right':\n case 'top':\n case 'topRight':\n nlx = blx + (ratioX * (lx - blx));\n nux = nlx + width;\n nly = bly + (ratioY * (ly - bly));\n nuy = nly + height;\n break;\n case 'bottomRight':\n nlx = blx + (ratioX * (lx - blx));\n nux = nlx + width;\n nuy = buy + (ratioY * (uy - buy));\n nly = nuy - height;\n break;\n case 'topLeft':\n nux = bux + (ratioX * (ux - bux));\n nlx = nux - width;\n nly = bly + (ratioY * (ly - bly));\n nuy = nly + height;\n break;\n default:\n [nlx, nly, nux, nuy] = rect;\n break;\n }\n\n return [nlx, nly, nux, nuy];\n};\n\nconst resizeMultipleAnnotationsAtOnce = ({ annotations, direction, deltaRect }) => {\n const boundryRect = calculateBoundary(annotations.map(o => o.rect));\n const ratio = calcRatio({\n deltaRect,\n direction,\n boundryRect,\n lockRatio: annotations.some(a => shouldLockAspectRatio(a.type))\n });\n\n return annotations.map(a => ({\n ...a,\n rect: resizeRect({\n ...ratio,\n rect: a.rect,\n boundryRect,\n direction\n })\n }));\n};\n\nexport default resizeMultipleAnnotationsAtOnce;\n","/* eslint react/prop-types: 0 */\nimport React, { useState } from 'react';\nimport { Rnd } from 'react-rnd';\nimport classNames from 'classnames';\nimport getOr from 'lodash/fp/getOr';\nimport constant from 'lodash/fp/constant';\nimport isNumber from 'lodash/isNumber';\nimport {\n func, bool\n} from 'prop-types';\n\nimport getDeltaRectOnDragStop from './utils/getDeltaRectOnDragStop';\nimport getDeltaRectOnResizeStop from './utils/getDeltaRectOnResizeStop';\nimport { setHandlers, shouldLockAspectRatio } from './utils/setRNDHandlers';\nimport RndGuides from './RndGuides';\nimport { setRNDGuidesOnMove, shouldUpdateCoorOnResize } from './utils/setRNDGuides';\nimport getSnapDistance from './utils/getSnapDistance';\nimport calcCoordinatesForRnd from './utils/calcCoordinatesForRnd';\nimport resizeMultipleAnnotationsAtOnce from './utils/resizeMultipleAnnotationsAtOnce';\nimport { getPageIndexFromPoint } from './utils/helpers';\n\nconst NEAR_DISTANCE = 5;\n\nconst calcDragAxis = (lockX, lockY) => {\n if (lockX && lockY) return 'none';\n if (lockX) return 'y';\n if (lockY) return 'x';\n return 'both';\n};\n\nconst calcLock = (magnet, lockThreshold, scale, coordinate) => (Math.abs(magnet) <= (lockThreshold / scale) ? coordinate + (magnet * scale) : null);\nconst calcSnapDirectionX = snapDirectionX => (snapDirectionX === 'center' ? 'left' : snapDirectionX);\nconst calcGuideOffsetX = (snapDirectionX, width, defaultOffset) => (snapDirectionX === 'center' ? (width / 2) + (defaultOffset) : defaultOffset);\nconst invertY = (y, pageHeight) => pageHeight - y;\nconst shouldHighlight = (lockX, lockY, { snapDirectionX, snapDirectionY }) => (\n `${lockX ? snapDirectionX : ''}${lockY ? snapDirectionY : ''}`\n);\n\nconst getCurrSnapDistance = ({\n scale, pageAnnotations, invertedY, x, width, height, annotationIds, direction\n}) => {\n const {\n magnetY, magnetX, snapDirectionX, snapDirectionY\n } = getSnapDistance(pageAnnotations, {\n coordinates: {\n left: x / scale,\n top: (invertedY / scale),\n width: width / scale,\n height: height / scale\n },\n annotationIds\n }, direction || null);\n\n return ({\n currLockX: calcLock(magnetX, NEAR_DISTANCE, scale, x),\n snapDirectionX,\n currLockY: calcLock(magnetY, NEAR_DISTANCE, scale, invertedY),\n snapDirectionY\n });\n};\n\nconst calcLockDelta = ({\n currLockY, currLockX, delta, direction, coordinates\n}) => {\n const currLockDeltas = {};\n if (/bottom/i.test(direction)) {\n currLockDeltas.lockDeltaLowerY = currLockY ? currLockY - (delta.height + coordinates.top) : null;\n }\n if (/top/i.test(direction)) {\n currLockDeltas.lockDeltaUpperY = currLockY ? currLockY - coordinates.top : null;\n }\n if (/left/i.test(direction)) {\n currLockDeltas.lockDeltaLowerX = currLockX ? currLockX - coordinates.left : null;\n }\n if (/right/i.test(direction)) {\n currLockDeltas.lockDeltaUpperX = currLockX ? currLockX + (delta.width - coordinates.left) : null;\n }\n return currLockDeltas;\n};\n\nconst RndWrapper = ({\n children,\n pageAnnotations,\n selectedAnnotations,\n coordinates,\n rect,\n pageSettings,\n pageIndex,\n scale,\n enableResizing,\n hovered,\n setAnnotationDragging,\n setAnnotationResizing,\n AnnotationNavigation,\n onAnnotationDragStop,\n onAnnotationResizeStop,\n onResize,\n multipleResize\n}) => {\n const {\n height: pageHeight,\n width: pageWidth,\n yOffset: pageYOffset,\n xOffset: pageXOffset\n } = pageSettings[pageIndex] || {};\n const {\n width, height, top, left\n } = coordinates;\n\n const { pageHeightWithoutOffset, pageWidthWithoutOffset, yAxis } = calcCoordinatesForRnd({\n top, pageHeight, pageWidth, pageYOffset, pageXOffset, scale\n });\n const [lockX, setLockX] = useState(null);\n const [lockY, setLockY] = useState(null);\n const [lockDeltas, setLockDeltas] = useState({});\n const [highlight, setHighlight] = useState('');\n const [guideOffset, setGuideOffset] = useState(null);\n // states\n const [guideCoor, setGuideCoor] = useState({ x: { length: pageWidth * scale, translate: left }, y: { length: pageHeight * scale, translate: yAxis } });\n const [isMoving, setisMoving] = useState(false);\n const multiple = selectedAnnotations.length > 1;\n const annotationType = getOr('', '0.type', selectedAnnotations);\n const annotationNewlyCreated = getOr(false, '0.newlyCreated', selectedAnnotations);\n const annotationIds = selectedAnnotations.map(a => a.id);\n const disableHandlers = () => {\n if (multipleResize) {\n return false;\n }\n return multiple;\n };\n\n return (\n {\n // BUGFIX #4664411 :: Prevent dragging event after resizing annotations on mobile.\n if (e.type === 'touchend' && (e.target.className.indexOf('resizeHandler') > -1 || e.target.className.indexOf('react-pdf__Page') > -1)) {\n return;\n }\n\n setAnnotationDragging(false);\n setisMoving(false);\n\n const newPageIndex = getPageIndexFromPoint(e, pageIndex);\n if (!isNumber(newPageIndex)) {\n return;\n }\n\n onAnnotationDragStop({\n annotationIds,\n deltaRect: getDeltaRectOnDragStop({\n rect,\n newPosition: { x: lockX || x, y: lockY ? invertY(lockY, pageHeightWithoutOffset) : y },\n scale,\n pageIndex,\n newPageIndex,\n pageSettings\n }),\n pageIndex: newPageIndex\n });\n\n setLockX(null);\n setLockY(null);\n setGuideOffset(null);\n setHighlight('');\n }}\n onResizeStop={(e, direction, ref, deltaPosition) => {\n setAnnotationResizing(false);\n setisMoving(false);\n const deltaRect = getDeltaRectOnResizeStop({\n direction, deltaPosition, scale, lockDeltas\n });\n onAnnotationResizeStop({\n annotationIds,\n deltaRect,\n pageIndex,\n direction,\n resizedAnnotations: resizeMultipleAnnotationsAtOnce({\n annotations: selectedAnnotations,\n direction,\n deltaRect\n })\n });\n\n setLockDeltas({});\n setGuideOffset(null);\n setHighlight('');\n }}\n onDragStart={e => {\n // BUGFIX #4664411 :: Enable annotation resizing on mobile browsers.\n if (e.type === 'touchstart' && e.target.className.indexOf('resizeHandler') > -1) {\n setAnnotationResizing(true);\n setisMoving(true);\n return;\n }\n if (!e.target.dataset.disableDrag) {\n setAnnotationDragging(true);\n setisMoving(true);\n }\n }}\n onResizeStart={() => setAnnotationResizing(true) || setisMoving(true)}\n onDrag={(e, { x, y }) => {\n // snap guides\n const invertedY = invertY(y, pageHeightWithoutOffset);\n const {\n currLockX, currLockY, snapDirectionY, snapDirectionX\n } = getCurrSnapDistance({\n ...{\n scale, pageAnnotations, invertedY, x, width: coordinates.width, height: coordinates.height, annotationIds\n }\n });\n\n if (snapDirectionX && (currLockY || currLockX)) {\n setGuideOffset({ x: calcGuideOffsetX(snapDirectionX, coordinates.width, 0), y: null });\n setGuideCoor(setRNDGuidesOnMove(x, y, pageWidthWithoutOffset, pageHeightWithoutOffset));\n }\n setHighlight(shouldHighlight(currLockX, currLockY, { snapDirectionX: calcSnapDirectionX(snapDirectionX), snapDirectionY }));\n // snap guides end\n }}\n onResize={(e, direction, ref, delta, position) => {\n const { x, y } = position;\n\n // snap guides\n const invertedY = invertY(y, pageHeightWithoutOffset);\n if (shouldUpdateCoorOnResize(direction)) {\n setGuideCoor(setRNDGuidesOnMove(x, y, pageWidthWithoutOffset, pageHeightWithoutOffset));\n }\n const {\n currLockX, currLockY, snapDirectionY, snapDirectionX\n } = getCurrSnapDistance({\n ...{\n scale, pageAnnotations, invertedY, x, width: coordinates.width + delta.width, height: coordinates.height + delta.height, annotationIds, direction\n }\n });\n const ld = {\n ...lockDeltas,\n ...calcLockDelta({\n currLockY, currLockX, delta, direction, coordinates\n }),\n lockAspectRatio: shouldLockAspectRatio(annotationType)\n };\n\n setLockDeltas(ld);\n const deltaRect = getDeltaRectOnResizeStop({\n direction, deltaPosition: delta, scale, lockDeltas\n });\n const resizedAnnotations = resizeMultipleAnnotationsAtOnce({\n annotations: selectedAnnotations,\n direction,\n deltaRect\n });\n onResize({ resizedAnnotations, direction });\n\n setGuideOffset({\n x: calcGuideOffsetX(snapDirectionX, coordinates.width + delta.width, currLockX - x),\n y: invertedY - currLockY\n });\n setHighlight(shouldHighlight(\n currLockX, currLockY, { snapDirectionX: calcSnapDirectionX(snapDirectionX), snapDirectionY }\n ));\n // snap guides end\n }}\n >\n {children}\n {isMoving && }\n \n \n );\n};\n\nRndWrapper.propTypes = {\n AnnotationNavigation: func,\n onAnnotationDragStop: func,\n onAnnotationResizeStop: func,\n onResize: func,\n multipleResize: bool\n};\n\nRndWrapper.defaultProps = {\n AnnotationNavigation: constant(null),\n onAnnotationDragStop: constant(null),\n onAnnotationResizeStop: constant(null),\n onResize: constant(null),\n multipleResize: false\n};\n\nexport default RndWrapper;\n","/* eslint react/prop-types: 0 */\nimport React, { memo, useEffect, useState } from 'react';\nimport Annotation from './Annotation';\nimport RndWrapper from './RndWrapper';\n\nimport {\n calculateBoundary, calculatePosSize, isDifferentAnnDragging\n} from './utils/helpers';\n\nconst AnnotationsWithRND = memo(({\n pageIndex,\n pageSettings,\n annotations,\n selectedAnnotations,\n scale,\n hoveredAnnotationId,\n rndProps,\n annotationProps,\n onRender = f => f\n}) => {\n const [resizeDirection, setResizeDirection] = useState(null);\n const [resizedAnnotations, setResizedAnnotations] = useState(selectedAnnotations);\n\n useEffect(() => {\n setResizedAnnotations(selectedAnnotations);\n }, [selectedAnnotations]);\n\n const rect = calculateBoundary(selectedAnnotations.map(a => a.rect));\n const rndCoordinates = calculatePosSize({ x: rect[0], y: rect[1] }, { x: rect[2], y: rect[3] }, scale, false);\n\n const {\n isAnnotationDragging,\n AnnotationNavigation,\n ...otherRndProps\n } = rndProps;\n\n const isDiffAnnDrag = isDifferentAnnDragging(hoveredAnnotationId, selectedAnnotations, isAnnotationDragging);\n\n const handleResize = a => {\n setResizeDirection(a.direction);\n setResizedAnnotations(a.resizedAnnotations);\n };\n\n return (\n \n {\n resizedAnnotations.map((annotation, i) => {\n return (\n 1}\n mouseOver={false}\n resizeDirection={resizeDirection}\n {...{\n i,\n scale,\n pageIndex,\n rndCoordinates,\n onRender,\n ...annotationProps\n }}\n />\n );\n })\n }\n \n );\n});\n\nAnnotationsWithRND.displayName = 'AnnotationsWithRND';\n\nexport default AnnotationsWithRND;\n","/* eslint react/prop-types: 0 */\nimport React, { memo, useCallback } from 'react';\nimport Annotation from './Annotation';\nimport RndWrapper from './RndWrapper';\n\nimport { calculatePosSize } from './utils/helpers';\n\nconst HoveredAnnotation = memo(({\n pageIndex,\n pageSettings,\n annotations,\n selectedAnnotationsIds,\n scale,\n hoveredAnnotation,\n hoveredAnnotationId,\n selectedAnnotations,\n rndProps,\n annotationProps,\n onRender = f => f\n}) => {\n const {\n setAnnotationDragging,\n setAnnotationResizing,\n onAnnotationDragStop,\n onAnnotationResizeStop\n } = rndProps;\n\n const getCoordinates = useCallback(() => {\n const { rect: [x, y, ux, uy] } = hoveredAnnotation || {};\n return calculatePosSize({ x, y }, { x: ux, y: uy }, scale, false);\n }, [hoveredAnnotation]);\n\n return (\n \n -1}\n key={`hovered-page-${pageIndex}`}\n i=\"hoveredAnnotation\"\n mouseOver\n multiple={selectedAnnotations.length > 1}\n {...{\n scale,\n pageIndex,\n onRender,\n ...annotationProps\n }}\n />\n \n );\n});\n\nHoveredAnnotation.displayName = 'HoveredAnnotation';\n\nexport default HoveredAnnotation;\n","/* eslint react/prop-types: 0 */\nimport React, { useState } from 'react';\nimport { Page } from 'react-pdf';\nimport Selectable from '@jotforminc/selectable';\n\nimport {\n isAnnotationOrChildElement, isTextContent, setDataset, annotationZoneStyles, getPropFromFirstSelected\n} from './utils/helpers';\nimport { MAX_TEXT_ELEMENT_PER_PAGE } from './utils/constants';\nimport Annotations from './Annotations';\nimport AnnotationsWithRND from './AnnotationsWithRND';\nimport HoveredAnnotation from './HoveredAnnotation';\n\nimport 'react-pdf/dist/esm/Page/AnnotationLayer.css';\nimport './style/style.scss';\n\nconst PageContainer = ({\n i,\n scale,\n onPageLoad,\n onPageRender,\n isLastPage,\n handleLastPageRender,\n isMappingMode,\n pagesRenderedPlusOne,\n selectedPageIndex,\n pageSettings,\n annotations = [],\n readOnly,\n selectedAnnotations = [],\n hoveredAnnotationId,\n hoveredAnnotation,\n CustomPageElement,\n annotationProps,\n rndProps,\n activeTextLayer,\n setActiveTextLayer,\n setIsFullyLoaded,\n renderTextLayer,\n onRender = f => f\n}) => {\n const [currRenderedPage, setCurrRenderedPage] = useState(false);\n const [totalTextElements, setTotalTextElements] = useState(0);\n\n const onLoadSuccess = page => {\n const { viewBox, rotation } = page.getViewport();\n const [xOffset, yOffset, width, height] = viewBox;\n\n if (onPageLoad) {\n onPageLoad({\n width, height, yOffset, xOffset, pageIndex: i, rotation\n });\n }\n\n page.getTextContent().then(({ items }) => {\n setTotalTextElements(items.length);\n });\n };\n\n const onRenderSuccess = () => {\n onPageRender(i);\n\n if (isLastPage && currRenderedPage !== i) {\n handleLastPageRender(i);\n setIsFullyLoaded(true);\n }\n\n setCurrRenderedPage(i);\n };\n\n const selectedAnnotationsIds = selectedAnnotations.map(a => a?.id);\n const firstSelectedPageIndex = getPropFromFirstSelected(selectedAnnotations)('pageIndex');\n const isHoveredSelected = selectedAnnotationsIds.indexOf(hoveredAnnotationId) !== -1;\n\n const handleClick = e => {\n const annotationEl = e.target.className.indexOf('PDFA') !== -1;\n if (!annotationEl && totalTextElements <= MAX_TEXT_ELEMENT_PER_PAGE) {\n setActiveTextLayer(i);\n }\n };\n\n return (\n \n {(isMappingMode && pagesRenderedPlusOne >= i + 1) && (\n <>\n \n {\n (!readOnly && !isHoveredSelected && hoveredAnnotation && hoveredAnnotation.rect && hoveredAnnotation?.pageIndex === i) && (\n a.pageIndex === i)}\n {...{\n scale,\n onRender,\n hoveredAnnotation,\n hoveredAnnotationId,\n selectedAnnotations,\n rndProps,\n annotationProps,\n selectedAnnotationsIds\n }}\n />\n )\n }\n {\n (!readOnly && selectedAnnotations.length > 0 && firstSelectedPageIndex === i) && (\n a.pageIndex === i)}\n {...{\n scale,\n onRender,\n hoveredAnnotationId,\n rndProps,\n annotationProps,\n selectedAnnotations,\n selectedAnnotationsIds\n }}\n />\n )\n }\n id).join('-')}\n annotations={annotations.filter(a => a.pageIndex === i)}\n {...{\n onRender,\n readOnly,\n scale,\n hoveredAnnotationId,\n annotationProps,\n selectedAnnotationsIds\n }}\n />\n \n )}\n \n \n );\n};\n\nconst Pages = props => {\n const {\n onAnnotationsSelect,\n pagesRenderedPlusOne,\n numPages,\n readOnly,\n onRender = f => f\n } = props;\n\n const [activeTextLayer, setActiveTextLayer] = useState(null);\n const triggerSelection = eventTarget => !isAnnotationOrChildElement(eventTarget) && !isTextContent(eventTarget);\n\n const selectMultiple = selectedElements => {\n const selectedAnnotationIDs = selectedElements.map(el => setDataset('annotationId')(el));\n onAnnotationsSelect(selectedAnnotationIDs);\n onRender(selectedAnnotationIDs);\n };\n\n return (new Array(pagesRenderedPlusOne)).fill(1).map((_, i) => {\n return readOnly ? (\n \n ) : (\n \n \n \n );\n });\n};\n\nexport default Pages;\n","/* eslint react/prop-types: 0 */\nimport React from 'react';\n\nimport {\n pageClickCoordinate,\n isAnnotationOrChildElement,\n isTextContent,\n isAnnotationContent\n} from './utils/helpers';\n\nconst AnnotationSelection = ({\n children,\n noAnnotationSelected,\n isMappingMode,\n onSelectionAreaClick,\n onEmptyAreaClick,\n readOnly,\n selectedAnnotations\n}) => {\n const handleMouseDown = e => {\n const {\n dataset: { annotationId, disableUnset }\n } = e.target;\n\n // Skip if click hit to annotation/restricted item or selection is already empty\n const skip = (!readOnly && isAnnotationOrChildElement(e.target)) // edit mode only\n || isTextContent(e.target) || isAnnotationContent(e.target)(selectedAnnotations) || noAnnotationSelected || disableUnset || annotationId;\n\n // not clicked on an annotation(not on an annotation)\n if (!annotationId) {\n const canvas = e.target;\n if (canvas) {\n onSelectionAreaClick(pageClickCoordinate(canvas)(e));\n }\n }\n\n if (skip) return;\n\n onEmptyAreaClick();\n };\n\n return (\n \n {children}\n \n );\n};\n\nexport default AnnotationSelection;\n","import React, {\n useEffect, useMemo, useRef, useState\n} from 'react';\nimport scrollIntoView from 'smooth-scroll-into-view-if-needed';\nimport classNames from 'classnames';\nimport {\n array,\n func,\n number,\n oneOf,\n shape\n} from 'prop-types';\nimport { translationRenderer, t } from '@jotforminc/translation';\n\nconst PageNavigation = ({\n thumbnails,\n numPages,\n onThumbnailClick,\n customThumbnailElement,\n NavigationWrapper,\n currentPageIndex\n}) => {\n const pdfvNavRef = useRef(null);\n const [loaded, setLoaded] = useState(false);\n const pageList = useMemo(() => Array.from(Array(numPages).keys()), [numPages]);\n\n useEffect(() => {\n if (Object.keys(thumbnails).length === numPages) {\n setLoaded(true);\n }\n }, [thumbnails]);\n\n useEffect(() => {\n const pdfvNav = pdfvNavRef.current;\n\n if (pdfvNav) {\n const pages = Array.from(document.querySelectorAll('.PDFV-navigation-imgCont'));\n if (pages.length > currentPageIndex) {\n const target = pages[currentPageIndex];\n\n scrollIntoView(target, {\n scrollMode: 'if-needed',\n behavior: 'smooth',\n inline: 'center', // Center horizontally the scrolled element\n block: 'center',\n boundary: pdfvNav\n });\n }\n }\n }, [currentPageIndex]);\n\n return (\n \n \n {pageList.map(i => (\n onThumbnailClick(i)}\n onKeyDown={e => {\n if (e.key === 'Enter') {\n onThumbnailClick(i);\n }\n }}\n role=\"button\"\n aria-label={t(`click to navigate Page ${i + 1}`)}\n tabIndex={-1}\n >\n \n {customThumbnailElement(i)}\n
\n {translationRenderer('Page [1[{curPage}]] of [2[{numPages}]]')({\n renderer1: () => i + 1,\n renderer2: () => numPages\n })}\n
\n \n ))}\n \n
\n );\n};\n\nPageNavigation.propTypes = {\n thumbnails: shape({}),\n numPages: number,\n onThumbnailClick: func,\n customThumbnailElement: oneOf([array, func]),\n NavigationWrapper: func,\n currentPageIndex: number\n};\n\nPageNavigation.defaultProps = {\n thumbnails: [],\n numPages: 0,\n onThumbnailClick: () => {},\n customThumbnailElement: () => null,\n NavigationWrapper: ({ children }) => <>{children}, // eslint-disable-line react/prop-types\n currentPageIndex: 0\n};\n\nexport default PageNavigation;\n","/* eslint-disable jsx-a11y/no-noninteractive-tabindex */\nimport React, { useState, useEffect, useRef } from 'react';\nimport {\n oneOfType, string, number, bool, element, func, array, object, shape\n} from 'prop-types';\nimport { Document, pdfjs } from 'react-pdf';\nimport { fetchPDFJSWorker } from '@jotforminc/utils';\n\nimport { t as translate } from '@jotforminc/translation';\nimport throttle from 'lodash/throttle';\nimport { handleTextCopy, getDomImage, getSizes } from './utils/helpers';\nimport Pages from './Pages';\nimport AnnotationSelection from './AnnotationSelection';\nimport PageNavigation from './PageNavigation';\n\nconst options = {\n isEvalSupported: false,\n cMapUrl: `https://unpkg.com/pdfjs-dist@${pdfjs.version}/cmaps/`\n};\n\nconst DocumentViewer = ({\n documentHeadingText,\n isMappingMode,\n url,\n wrapperClassName,\n scale,\n pdfPassword,\n selectedPageIndex,\n annotations,\n loading,\n customContent,\n hoveredAnnotationId,\n hoveredAnnotation,\n onAnnotationMouseEnter,\n onAnnotationMouseLeave,\n onAnnotationClick,\n annotationClassName,\n selectedAnnotations,\n isAnnotationDragging,\n setAnnotationDragging,\n onSelectionAreaClick,\n onEmptyAreaClick,\n setAnnotationResizing,\n AnnotationNavigation,\n onAnnotationsSelect,\n onLastPageRender,\n onDocLoad,\n onPageLoadSuccess,\n onDocLoadError,\n onAnnotationDragStop,\n onAnnotationResizeStop,\n AnnotationContent,\n CustomPageElement,\n renderNavigation,\n readOnly,\n onThumbnailClick,\n customThumbnailElement,\n thumbnailConfig,\n NavigationWrapper,\n multipleResize,\n annotationContentStyle,\n onLoadError,\n onDocumentWrapperScroll,\n documentWrapperRef,\n currentPageIndex,\n renderTextLayer,\n onPassword,\n onRender = f => f\n}) => {\n const [status, setStatus] = useState('init');\n const [numPages, setNumPages] = useState(null);\n const [pagesRendered, setPagesRendered] = useState(null);\n const [thumbnails, setThumbnails] = useState({});\n const [pageSettings, setPageSettings] = useState([]);\n const [pageSettingsLoaded, setPageSettingsLoaded] = useState({});\n const [isFullyLoaded, setIsFullyLoaded] = useState(false);\n const [pdfJSWorkerURL, setPdfJSWorkerURL] = useState(null);\n\n const pdfViewerRef = useRef(false);\n\n useEffect(() => {\n const workerURL = fetchPDFJSWorker(pdfjs, pdfjs.version);\n setPdfJSWorkerURL(workerURL);\n pdfViewerRef.current.addEventListener('copy', handleTextCopy);\n\n return () => {\n if (pdfViewerRef.current) {\n pdfViewerRef.current.removeEventListener('copy', handleTextCopy);\n }\n };\n }, []);\n\n const scrollHandler = scrollBoundaryRef => {\n if (scrollBoundaryRef && scrollBoundaryRef.current) {\n const pageContainers = Array.from(scrollBoundaryRef.current.querySelectorAll('.react-pdf__Page'));\n const foundIndex = pageContainers.findIndex(c => c.getBoundingClientRect().bottom > 65);\n if (foundIndex !== -1) {\n onDocumentWrapperScroll(foundIndex);\n }\n }\n };\n\n useEffect(() => {\n if (!onDocumentWrapperScroll) return;\n const scrollBoundaryRef = documentWrapperRef || pdfViewerRef;\n const throttledHandler = throttle(() => scrollHandler(scrollBoundaryRef), 100);\n scrollBoundaryRef.current.addEventListener('scroll', throttledHandler);\n\n return () => {\n if (scrollBoundaryRef.current) {\n scrollBoundaryRef.current.removeEventListener('scroll', throttledHandler);\n }\n };\n }, [currentPageIndex]);\n\n const pagesRenderedPlusOne = Math.min(pagesRendered + 1, numPages);\n\n const getPageThumbnail = () => {\n pageSettings.forEach(pageSetting => {\n const imagePromise = getDomImage(pageSetting, thumbnailConfig);\n imagePromise.then(img => {\n setThumbnails(t => ({ ...t, [pageSetting.pageIndex]: img }));\n });\n });\n };\n\n useEffect(() => {\n if (renderNavigation && isFullyLoaded) {\n getPageThumbnail();\n }\n }, [isFullyLoaded]);\n\n const onDocLoadSuccess = ({ numPages: nPages }) => {\n setNumPages(nPages);\n setPagesRendered(0);\n\n if (typeof onDocLoad === 'function') {\n onDocLoad();\n }\n };\n\n const onPageRender = () => {\n setPagesRendered(pagesRendered + 1);\n };\n\n const onPageLoad = settings => {\n if (!pageSettingsLoaded[settings.pageIndex]) {\n setPageSettingsLoaded({ ...pageSettingsLoaded, [settings.pageIndex]: true });\n setStatus('loaded');\n const rePageSettings = { ...settings, ...getSizes(settings) };\n onPageLoadSuccess(rePageSettings);\n setPageSettings([...pageSettings, rePageSettings].sort((a, b) => a.pageIndex - b.pageIndex));\n }\n };\n\n const handleLastPageRender = lastPageIndex => {\n onLastPageRender(lastPageIndex);\n };\n\n const annotationProps = {\n annotationClassName,\n onAnnotationMouseEnter,\n onAnnotationMouseLeave,\n onAnnotationClick,\n annotationContentStyle,\n AnnotationContent\n };\n\n const rndProps = {\n isAnnotationDragging,\n AnnotationNavigation,\n setAnnotationDragging,\n setAnnotationResizing,\n onAnnotationDragStop,\n onAnnotationResizeStop,\n multipleResize\n };\n\n return (\n <>\n {renderNavigation && numPages && (\n \n )}\n \n {customContent && customContent(status)}\n \n {(status === 'init' && loading) && loading()}\n
\n \n {pdfJSWorkerURL ? (\n onDocLoadError(setStatus)}\n onLoadError={onLoadError}\n // eslint-disable-next-line no-unneeded-ternary\n onPassword={onPassword ? onPassword : handlePassword => { handlePassword(pdfPassword); }}\n >\n {numPages && (\n \n )}\n \n ) : null}\n
\n \n \n \n \n );\n};\n\nDocumentViewer.propTypes = {\n url: string.isRequired,\n onDocLoad: func,\n isMappingMode: bool,\n scale: number,\n loading: oneOfType([func, element]),\n customContent: oneOfType([func, element]),\n AnnotationNavigation: oneOfType([func, element]),\n onAnnotationsSelect: func,\n onLastPageRender: func,\n onPageLoadSuccess: func,\n onDocLoadError: func,\n onAnnotationDragStop: func,\n onAnnotationResizeStop: func,\n wrapperClassName: func,\n annotationClassName: func,\n onAnnotationMouseEnter: func,\n onAnnotationMouseLeave: func,\n onAnnotationClick: func,\n pdfPassword: string,\n selectedPageIndex: number,\n annotations: array,\n selectedAnnotations: array,\n hoveredAnnotationId: string,\n hoveredAnnotation: object,\n isAnnotationDragging: bool,\n setAnnotationDragging: func,\n onSelectionAreaClick: func,\n onEmptyAreaClick: func,\n setAnnotationResizing: func,\n documentHeadingText: string,\n AnnotationContent: oneOfType([func, element]),\n CustomPageElement: oneOfType([func, element]),\n renderNavigation: bool,\n readOnly: bool,\n multipleResize: bool,\n onThumbnailClick: func,\n customThumbnailElement: oneOfType([func, element]),\n thumbnailConfig: shape({\n width: number,\n pageIndexes: array,\n quality: number\n }),\n NavigationWrapper: func,\n annotationContentStyle: shape({}),\n onLoadError: func,\n onDocumentWrapperScroll: func,\n documentWrapperRef: object,\n currentPageIndex: number,\n renderTextLayer: bool,\n onPassword: func,\n onRender: func\n};\nDocumentViewer.defaultProps = {\n isMappingMode: false,\n onDocLoad: null,\n scale: 1,\n loading: null,\n customContent: null,\n AnnotationNavigation: null,\n pdfPassword: '',\n selectedPageIndex: 0,\n hoveredAnnotationId: '',\n hoveredAnnotation: null,\n isAnnotationDragging: false,\n annotations: [],\n selectedAnnotations: [],\n wrapperClassName: () => { },\n annotationClassName: () => { },\n onAnnotationsSelect: () => { },\n onLastPageRender: () => { },\n onPageLoadSuccess: () => { },\n onDocLoadError: () => { },\n onAnnotationDragStop: () => { },\n onAnnotationResizeStop: () => { },\n onAnnotationMouseEnter: () => { },\n onAnnotationMouseLeave: () => { },\n onAnnotationClick: () => { },\n setAnnotationDragging: () => { },\n onSelectionAreaClick: () => { },\n onEmptyAreaClick: () => { },\n setAnnotationResizing: () => { },\n documentHeadingText: '',\n AnnotationContent: () => null,\n CustomPageElement: () => null,\n renderNavigation: false,\n readOnly: false,\n multipleResize: false,\n onThumbnailClick: () => { },\n customThumbnailElement: () => null,\n thumbnailConfig: {\n width: 180,\n pageIndexes: [],\n quality: 0.2\n },\n NavigationWrapper: ({ children }) => <>{children}, // eslint-disable-line react/prop-types\n annotationContentStyle: {},\n onLoadError: () => null,\n onDocumentWrapperScroll: null,\n documentWrapperRef: null,\n currentPageIndex: 0,\n renderTextLayer: true,\n onPassword: () => { },\n onRender: f => f\n};\n\nexport default DocumentViewer;\n","import React from 'react';\nimport classNames from 'classnames';\nimport IconSVG from '../IconSVG';\n\nconst renderButton = (onClick, icon, className, disableUnselect) => (\n \n \n \n);\n\nconst AnnotationButtons = ({\n showOk = false,\n showCancel = false,\n showDuplicate = false,\n showDelete = false,\n onClickOk,\n onClickCancel,\n onClickDelete,\n onClickDuplicate,\n className = ''\n}) => {\n return (\n \n );\n};\n\nexport default AnnotationButtons;\n","import React from 'react';\nimport { connect } from 'react-redux';\nimport getOr from 'lodash/fp/getOr';\nimport classNames from 'classnames';\n\nimport AnnotationButtons from './AnnotationButtons';\nimport { canRenderAnnotationNav } from './helpers';\nimport {\n getAnnotationSelection,\n getSelectedAnnotations,\n getSelectedFormField,\n getIsAnnotationDragging\n} from '../../reducers/pdfImport';\nimport {\n duplicateAnnotation,\n setAnnotationPinned,\n setAnnotationSelection,\n setHoveredAnnotation,\n mapFieldWithAnnotation,\n disconnectField,\n} from '../../actions/pdfImport';\n\nconst AnnotationNavigation = ({\n selectedAnnotationIDs,\n annotationId,\n selectedFormField,\n pinned,\n selected,\n connectField,\n isAnnotationDragging,\n duplicateAnn,\n setAnnPinned,\n setAnnSelection,\n setHoveredAnn,\n mapFieldWithAnn,\n disconnectAnnotations,\n}) => {\n const multiple = selectedAnnotationIDs.length > 1;\n\n if (canRenderAnnotationNav(annotationId, pinned, selectedFormField, selected, isAnnotationDragging)) {\n return (\n {\n e.stopPropagation();\n disconnectAnnotations(selectedAnnotationIDs);\n }}\n {...(multiple ? {} : {\n showDuplicate: selected && !pinned && !connectField,\n showOk: pinned,\n showCancel: pinned,\n onClickOk: e => {\n e.stopPropagation();\n mapFieldWithAnn(selectedFormField);\n setAnnPinned(annotationId, false);\n setAnnSelection([annotationId]);\n },\n onClickCancel: e => {\n e.stopPropagation();\n setAnnPinned(annotationId, false);\n setHoveredAnn('');\n },\n onClickDuplicate: e => {\n e.stopPropagation();\n duplicateAnn(annotationId);\n }\n })}\n />\n );\n }\n\n return null;\n};\n\nconst mapStateToProps = state => {\n const selectedAnnotationIDs = getAnnotationSelection(state);\n const selectedAnnotations = getSelectedAnnotations(selectedAnnotationIDs, state);\n const selectedFormField = getSelectedFormField(state);\n const first = getOr('', '0', selectedAnnotations);\n\n return ({\n selectedAnnotationIDs,\n annotationId: first.id || '',\n selectedFormField,\n pinned: first.pinned || false,\n selected: first.selected || false,\n connectField: getOr(false, 'selected', selectedFormField),\n isAnnotationDragging: getIsAnnotationDragging(state)\n });\n};\n\nconst mapDispatchToProps = {\n duplicateAnn: duplicateAnnotation,\n setAnnPinned: setAnnotationPinned,\n setAnnSelection: setAnnotationSelection,\n setHoveredAnn: setHoveredAnnotation,\n mapFieldWithAnn: mapFieldWithAnnotation,\n disconnectAnnotations: disconnectField\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(AnnotationNavigation);\n","import React from 'react';\nimport { connect } from 'react-redux';\nimport { bindActionCreators } from 'redux';\nimport getOr from 'lodash/fp/getOr';\nimport DocumentViewer from '@jotforminc/document-viewer';\nimport classNames from 'classnames';\nimport { t, translationRenderer } from '@jotforminc/translation';\n\nimport PDFLoading from '../../components/pdfImporter/PDFLoading';\nimport AnnotationNavigation from '../../components/pdfImporter/AnnotationNavigation';\nimport PDFUploader from '../../components/pdfImporter/PDFUploader';\nimport {\n fetchAnnotations,\n onAnnotationClick,\n onPageLoadSuccess,\n onAnnotationMouseEnter,\n onAnnotationMouseLeave,\n setAnnotationDragging,\n setAnnotationResizing,\n onSelectionAreaClick,\n onEmptyAreaClick,\n onAnnotationsSelect,\n onAnnotationDragStop,\n onAnnotationResizeStop,\n updateImportedPDF,\n setErrorMessage\n} from '../../actions/pdfImport';\nimport {\n getAllAnnotations,\n getSelectedAnnotations,\n getAnnotationSelection,\n getIsAnnotationDragging,\n getSelectedPageIndex,\n getHoveredAnnotationId,\n getAnnotation,\n getSelectedFormField,\n getNewlyCreatedAnnotations,\n getQuestion,\n getAnnotationIDs,\n isAdmin\n} from '../../reducers/pdfImport';\nimport {\n highlightType,\n isDifferentAnnDragging,\n countHasNewlyCreated,\n isRandomToolActive\n} from '../../components/pdfImporter/helpers';\n\nconst getCorrectedURL = url => (\n url ? url.replace(/(https?:\\/\\/)(.*?\\/)(.*)/g, `$1${global.window.location.host}/$3`).replace('?nc=1', '') : ''\n);\n\nconst getAnnotationClassName = (id, mouseOver, isDiffAnnDrag, selectedFormField, selectedQuestionId, state) => {\n const {\n qid = null, type, selected, newlyCreated = false, parentId = ''\n } = getAnnotation(state, id) || {};\n const highlight = highlightType(selectedQuestionId, {\n id, qid, type, mouseOver, newlyCreated, selected\n }, selectedFormField);\n const { connectField = false } = selectedFormField;\n\n return (classNames({\n PDFA: 1,\n selected: selected && !connectField,\n [highlight]: !isDiffAnnDrag,\n isCorrupted: isAdmin(state) && !!parentId && !getAnnotationIDs(state).includes(parentId)\n }));\n};\n\nconst getWrapperClassName = (status, isMappingMode, hasNewlyCreated, selectedFormField) => {\n const { connectMode = false } = selectedFormField;\n const isRandomTool = isRandomToolActive();\n\n return (classNames({\n 'PDFV-viewContainer': 1,\n [status]: 1,\n connectState: isMappingMode && connectMode && status === 'loaded',\n onMappingMode: isMappingMode,\n hasNewlyCreated: !isRandomTool && isMappingMode && hasNewlyCreated && !connectMode && status === 'loaded',\n }));\n};\n\nconst getCustomDocContent = (hasNewlyCreated, { connectMode = false }, isMappingMode) => isMappingMode && (\n
\n \n {(hasNewlyCreated && !connectMode) ? (\n translationRenderer(`Drag & Drop [1[{hasNewlyCreated}]] newly added [2[${hasNewlyCreated ? 'fields' : 'field'}]] on suitable areas on the PDF`)({\n renderer1: () => {hasNewlyCreated},\n renderer2: field => field\n })) : t('Add or select the matching field on PDF')}\n \n
\n);\n\nconst getAnnotationContent = (id, mouseOver, selectedFormField, selectedQuestionId, state) => {\n const {\n qid = null, type, selected, newlyCreated = false\n } = getAnnotation(state, id) || {};\n const highlight = highlightType(selectedQuestionId, {\n id, qid, type, mouseOver, newlyCreated, selected\n }, selectedFormField);\n const { order = false } = selectedFormField;\n const text = getOr('', 'text', getQuestion(state)(qid));\n\n return (\n <>\n {(highlight === 'fieldSelection' && order) && (\n
\n {order}\n
\n )}\n \n \n );\n};\n\nconst handleDocLoadError = (file, pdfPassword = '') => (dispatch, getState) => {\n updateImportedPDF(file, pdfPassword)(dispatch, getState).catch(e => {\n const errorMsg = e && e.message ? e.message.split(' - ').pop() : 'An unknown error occurred';\n\n setErrorMessage(errorMsg)(dispatch, getState);\n });\n};\n\nconst onDocLoadError = setStatus => (dispatch, getState) => (\n setStatus(val)}\n importPDF={(file, pdfPassword) => handleDocLoadError(file, pdfPassword)(dispatch, getState)}\n mode=\"error\"\n {...{ accountType: 'ADMIN' }}\n />\n);\n\nconst mapStateToProps = (state, { isMappingMode }) => {\n const selectedFormField = getSelectedFormField(state) || {};\n const selectedQuestionId = getOr(null, 'ui.selectedQuestionId', state);\n const hoveredAnnotationId = getHoveredAnnotationId(state);\n const isAnnotationDragging = getIsAnnotationDragging(state);\n const selectedAnnotations = getSelectedAnnotations(getAnnotationSelection(state), state);\n const isDifferentAnnotationDragging = isDifferentAnnDragging(hoveredAnnotationId, selectedAnnotations, isAnnotationDragging);\n const hasNewlyCreated = countHasNewlyCreated(global.document)(getNewlyCreatedAnnotations(state));\n const { connectField } = selectedFormField;\n\n return ({\n renderTextLayer: !connectField,\n url: getCorrectedURL(state.formProperties.importedPDF),\n scale: getOr(1, 'pdfImport.ui.scale', state),\n loading: () => ,\n customContent: () => getCustomDocContent(hasNewlyCreated, selectedFormField, isMappingMode),\n wrapperClassName: status => getWrapperClassName(status, isMappingMode, hasNewlyCreated, selectedFormField),\n selectedPageIndex: getSelectedPageIndex(state),\n pdfPassword: getOr('', 'formProperties.importedPdfOriginalUserPassword', state),\n documentHeadingText: t('Original PDF'),\n annotations: getAllAnnotations(state),\n annotationClassName: (id, mouseOver) => getAnnotationClassName(\n id, mouseOver, isDifferentAnnotationDragging, selectedFormField, selectedQuestionId, state\n ),\n selectedAnnotations,\n AnnotationNavigation: AnnotationNavigation,\n hoveredAnnotationId,\n hoveredAnnotation: getAnnotation(state, hoveredAnnotationId),\n isAnnotationDragging,\n isAnnotationResizing: state.pdfImport.ui.isAnnotationResizing,\n AnnotationContent: (id, mouseOver) => getAnnotationContent(\n id, mouseOver, selectedFormField, selectedQuestionId, state\n )\n });\n};\n\n// ownProps are the props that are passed to this container component during the rendering\nconst onPageLoadProxy = ownProps => o => (dispatch, getState) => {\n if (ownProps && ownProps.onPageLoad) {\n ownProps.onPageLoad(o);\n }\n // go fetch the annotations for this document if this is rendered in mapping mode\n if (ownProps && ownProps.isMappingMode) {\n onPageLoadSuccess(o)(dispatch, getState);\n }\n};\n\nconst mapDispatchToProps = (dispatch, ownProps) => bindActionCreators({\n onDocLoad: fetchAnnotations,\n onDocLoadError,\n onAnnotationClick,\n onPageLoadSuccess: onPageLoadProxy(ownProps),\n onAnnotationMouseEnter,\n onAnnotationMouseLeave,\n setAnnotationDragging,\n setAnnotationResizing,\n onAnnotationDragStop,\n onAnnotationResizeStop,\n onSelectionAreaClick,\n onEmptyAreaClick,\n onAnnotationsSelect\n}, dispatch);\n\nconst DocumentViewerContainer = props => ;\n\nexport default connect(mapStateToProps, mapDispatchToProps)(DocumentViewerContainer);\n","import React, { Fragment, useState } from 'react';\nimport PropTypes from 'prop-types';\n\nimport Zoom from './Zoom';\nimport PageSignupWarning from './PageSignupWarning';\nimport DocumentViewerContainer from '../../containers/PDFImporter/DocumentViewerContainer';\n\nconst DocumentViewer = ({\n isMappingMode,\n onPageLoad = () => { }\n}) => {\n const [loaded, setLoaded] = useState(false);\n\n const handleDocLoad = o => {\n onPageLoad(o);\n setLoaded(true);\n };\n\n return (\n \n \n {loaded && }\n \n );\n};\n\nDocumentViewer.propTypes = {\n isMappingMode: PropTypes.bool.isRequired,\n onPageLoad: PropTypes.func\n};\n\nexport default DocumentViewer;\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { IconXmark } from '@jotforminc/svg-icons';\n\nexport const ModalContext = React.createContext(null);\n\nexport default class Modal extends Component {\n constructor(props) {\n super(props);\n\n this.state = {\n show: true\n };\n\n this.handleClickOutside = this.handleClickOutside.bind(this);\n this.toggle = this.toggle.bind(this);\n }\n\n componentDidMount() {\n const { closeOnClickOutside, onModalOpen } = this.props;\n\n if (closeOnClickOutside) {\n global.document.addEventListener('click', this.handleClickOutside, true);\n }\n\n if (typeof onModalOpen === 'function') {\n this.props.onModalOpen();\n }\n }\n\n componentWillUnmount() {\n if (this.props.closeOnClickOutside) {\n global.document.removeEventListener('click', this.handleClickOutside, true);\n }\n }\n\n handleClickOutside(e) {\n if (this.props.closable && this.modalRef && !this.modalRef.firstChild.contains(e.target) && this.state.show) {\n this.toggle(false);\n }\n }\n\n toggle(newState = null) {\n const { onModalClose, closable, root } = this.props;\n const show = newState === null ? !this.state.show : newState;\n\n // initiate the close animation\n if (closable) {\n this.setState({ show });\n }\n // initiate onModalClose action if there is any\n if (typeof onModalClose === 'function' && !show) {\n onModalClose();\n }\n // wait for closing animation then remove modal from dom\n setTimeout(() => {\n if (this.modalRef) root.unmount();\n }, 400);\n }\n\n render() {\n const { show } = this.state;\n const { children, customClass, closable } = this.props;\n\n return (\n { this.modalRef = r; }}\n >\n
\n
\n {closable && (\n this.toggle(false)}\n >\n \n \n )}\n \n {children}\n \n
\n
\n \n );\n }\n}\n\nModal.propTypes = {\n children: PropTypes.oneOfType([\n PropTypes.arrayOf(PropTypes.node),\n PropTypes.node\n ]).isRequired,\n onModalOpen: PropTypes.func,\n onModalClose: PropTypes.func,\n closeOnClickOutside: PropTypes.bool,\n closable: PropTypes.bool,\n customClass: PropTypes.string\n};\n\nModal.defaultProps = {\n customClass: null,\n closable: true,\n closeOnClickOutside: true,\n onModalOpen: null,\n onModalClose: null\n};\n","import React, { useEffect, useState } from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\n\nconst lines = [\n 'full', 'half', 'half',\n 'full', 'threeQuarter', 'threeQuarter',\n 'full', 'half', 'half', 'full'\n];\n\nconst PDFLoading = ({\n text = 'UPLOADING',\n customClass = '',\n fullPageMode = false,\n timeoutText = ''\n}) => {\n const [showSubText, setSubText] = useState(false);\n\n useEffect(() => {\n if (timeoutText) {\n setTimeout(() => {\n setSubText(!showSubText);\n }, 15000);\n }\n }, [timeoutText]);\n\n return (\n \n
\n {lines.map((line, i) => {\n return
;\n })}\n
\n {text && (\n
\n
{text}
\n
\n )}\n
\n );\n};\n\nPDFLoading.propTypes = {\n text: PropTypes.string,\n customClass: PropTypes.string,\n fullPageMode: PropTypes.bool,\n timeoutText: PropTypes.string,\n};\n\nexport default PDFLoading;\n","import React from 'react';\nimport { t } from '@jotforminc/translation';\n\nimport IconSVG from '../IconSVG';\n\nconst PDFNotifier = ({\n icon,\n text = '',\n buttonProp,\n subText = ''\n}) => (\n
\n
\n
\n {icon && }\n

\n {text && (\n <>\n {t(text)}\n
\n \n )}\n {subText && t(subText)}\n

\n
\n {buttonProp && (\n \n {t(buttonProp?.text)}\n \n )}\n
\n
\n);\n\nexport default PDFNotifier;\n","\n \n\n","\n \n\n","import React, { useState, useRef } from 'react';\nimport { t } from '@jotforminc/translation';\nimport Modal, { ModalContext } from './Modal';\nimport IconSVG from '../IconSVG';\nimport { isPasswordCorrect } from './helpers';\n\nconst svg = isVisible => (\n \n {isVisible\n // eslint-disable-next-line max-len\n ? \n : }\n \n);\n\nconst PDFPasswordModal = ({\n onSuccess, fileData, root\n}) => {\n const [warning, setWarning] = useState(null);\n const [passVis, setPassVis] = useState(false);\n\n const passwdIRef = useRef(false);\n\n const onClick = async ({ toggle }) => {\n const { value: password } = passwdIRef.current;\n\n if (password.length === 0) {\n setWarning('The password cannot be empty');\n passwdIRef.current.focus();\n return;\n }\n\n const isCorrect = await isPasswordCorrect(fileData)(password);\n\n if (isCorrect) {\n onSuccess(password);\n toggle(false);\n } else {\n setWarning('The password is incorrect');\n passwdIRef.current.focus();\n passwdIRef.current.value = '';\n }\n };\n\n return (\n passwdIRef.current.focus()}\n >\n \n {context => (\n
\n \n

{t('This PDF is protected')}

\n

\n {t('This PDF is requires a password to open the file.')}\n
\n {t('Please enter to continue.')}\n

\n
\n
\n e.key === 'Enter' && onClick(context)}\n />\n setPassVis(!passVis)}\n >\n {svg(passVis)}\n \n
\n onClick(context)}\n >\n {t('Continue')}\n \n {warning && (\n \n {t(warning)}\n \n )}\n
\n
\n )}\n
\n \n );\n};\n\nexport default PDFPasswordModal;\n","export const isTouchableDevice = () => {\n return 'ontouchstart' in window || global.window.navigator.msMaxTouchPoints;\n};\n\nexport const offset = 15;\nexport const getXY = (e, el) => {\n const { offsetLeft = 0, offsetTop = 0, scrollTop = 0 } = el || {};\n\n return {\n x: (isTouchableDevice()\n ? e.touches[0].clientX - offsetLeft\n : e.clientX - offsetLeft\n ) || 0,\n y: (isTouchableDevice()\n ? e.touches[0].clientY - (offsetTop - scrollTop)\n : e.clientY - offsetTop\n ) || 0\n };\n};\n\nexport const handleOpencv = (imgRef, points, canvasRef) => {\n const { cv } = global.window;\n // calculate scale and set image to orjinal size\n const oldWidth = imgRef.current.clientWidth;\n\n if (imgRef.current.naturalWidth > imgRef.current.naturalHeight) {\n imgRef.current.setAttribute('style', 'height: 1000px;');\n } else {\n imgRef.current.setAttribute('style', 'width: 1000px;');\n }\n const scaleValue = imgRef.current.clientWidth / oldWidth;\n const matDest = cv.imread(imgRef.current);\n\n // Find the corners\n // foundCountour has 2 channels (seemingly x/y), has a depth of 4, and a type of 12. Seems to show it's a CV_32S 'type', so the valid data is in data32S??\n const corner1 = new cv.Point(points.p1.x * scaleValue, points.p1.y * scaleValue);\n const corner2 = new cv.Point(points.p2.x * scaleValue, points.p2.y * scaleValue);\n const corner3 = new cv.Point(points.p3.x * scaleValue, points.p3.y * scaleValue);\n const corner4 = new cv.Point(points.p4.x * scaleValue, points.p4.y * scaleValue);\n // Order the corners\n const cornerArray = [corner1, corner2, corner3, corner4];\n // Sort by Y position (to get top-down)\n cornerArray.sort((item1, item2) => {\n if (item1.y < item2.y) return -1;\n if (item1.y > item2.y) return 1;\n return 0;\n });\n // Determine left/right based on x position of top and bottom 2\n const tl = cornerArray[0].x < cornerArray[1].x ? cornerArray[0] : cornerArray[1];\n const tr = cornerArray[0].x > cornerArray[1].x ? cornerArray[0] : cornerArray[1];\n const bl = cornerArray[2].x < cornerArray[3].x ? cornerArray[2] : cornerArray[3];\n const br = cornerArray[2].x > cornerArray[3].x ? cornerArray[2] : cornerArray[3];\n\n // Calculate the max width/height\n const widthBottom = Math.hypot(br.x - bl.x, br.y - bl.y);\n const widthTop = Math.hypot(tr.x - tl.x, tr.y - tl.y);\n const theWidth = (widthBottom > widthTop) ? widthBottom : widthTop;\n const heightRight = Math.hypot(tr.x - br.x, tr.y - br.y);\n const heightLeft = Math.hypot(tl.x - bl.x, tr.y - bl.y);\n const theHeight = (heightRight > heightLeft) ? heightRight : heightLeft;\n\n // Transform\n const finalDestCoords = cv.matFromArray(4, 1, cv.CV_32FC2, [0, 0, theWidth - 1, 0, theWidth - 1, theHeight - 1, 0, theHeight - 1]);\n const srcCoords = cv.matFromArray(4, 1, cv.CV_32FC2, [tl.x, tl.y, tr.x, tr.y, br.x, br.y, bl.x, bl.y]);\n const dsize = new cv.Size(theWidth, theHeight);\n const M = cv.getPerspectiveTransform(srcCoords, finalDestCoords);\n const finalDest = new cv.Mat();\n cv.warpPerspective(matDest, finalDest, M, dsize, cv.INTER_LINEAR, cv.BORDER_CONSTANT, new cv.Scalar());\n cv.imshow(canvasRef.current.id, finalDest);\n};\n","import React from 'react';\nimport {\n func,\n object,\n shape,\n Element\n} from 'prop-types';\n\nimport { getXY, isTouchableDevice, offset } from './Utils';\n\nconst CropTrapezoid = ({\n imgRef,\n points,\n setShowMagnifierGlass,\n setMousePos,\n setPoints\n}) => {\n const { height: imgHeight = 0, right: imgRight = 0 } = imgRef.current ? imgRef.current.getBoundingClientRect() : {};\n const handleMouseUp = () => {\n setShowMagnifierGlass(false);\n };\n\n const handleMouseMove = e => {\n const pos = getXY(e, imgRef.current.parentElement);\n\n if (pos.y > imgHeight || pos.y < 0 || pos.x > imgRight || pos.x < 0) return;\n\n setShowMagnifierGlass(true);\n setPoints({ ...points, [e.target.dataset.key]: pos });\n setMousePos(pos);\n };\n\n return (\n
\n {Object.keys(points).map(key => (\n \n ))}\n
\n );\n};\n\nCropTrapezoid.propTypes = {\n imgRef: shape({ current: Element }),\n points: object,\n setShowMagnifierGlass: func,\n setMousePos: func,\n setPoints: func,\n};\n\nexport default CropTrapezoid;\n","import React, { useState, useEffect } from 'react';\nimport { connect } from 'react-redux';\nimport { bindActionCreators } from 'redux';\nimport { t } from '@jotforminc/translation';\nimport { withRouter } from 'react-router-dom';\nimport { IconArrowFlipLeft, IconCheck, IconCrop } from '@jotforminc/svg-icons';\nimport {\n string,\n func,\n object,\n shape,\n Element\n} from 'prop-types';\n\nimport * as actions from '../../../actions';\nimport { loadScript } from '../../../libs/Utils';\nimport { handleOpencv } from './Utils';\nimport PDFLoading from '../PDFLoading';\n\nconst Menu = ({\n imgRef,\n points,\n setShowCropBox,\n canvasRef,\n formID,\n setImageUrl,\n history,\n importImage\n}) => {\n const [showUsePhotoButton, setShowUsePhotoButton] = useState(false);\n const [isLoading, setIsLoading] = useState(false);\n\n useEffect(() => {\n loadScript('https://cdn.jsdelivr.net/gh/wallat/compiled-opencvjs/v4.2.0/opencv.js', 'opencvScript');\n }, []);\n\n const cropImage = () => {\n handleOpencv(imgRef, points, canvasRef, setShowCropBox);\n setShowCropBox(false);\n setShowUsePhotoButton(true);\n };\n\n const retake = () => {\n setImageUrl('');\n };\n\n const usePhoto = () => {\n canvasRef.current.toBlob(blob => {\n setIsLoading(true);\n const file = new global.File([blob], 'fileName.jpg', { type: 'image/jpeg' });\n importImage(file)\n .then(() => {\n history.push(`/${global.__BASE_ROUTE_PATH}/${formID}`);\n })\n .finally(() => {\n setIsLoading(false);\n });\n }, 'image/jpeg');\n };\n\n if (isLoading) {\n return (\n \n );\n }\n\n return (\n
\n \n \n {t('Retake')}\n \n {!showUsePhotoButton && (\n \n \n {t('Crop Photo')}\n \n )}\n {showUsePhotoButton && (\n \n \n {t('Use Photo')}\n \n )}\n
\n );\n};\n\nconst mapStateToProps = state => ({\n formID: state.formProperties.id,\n});\n\nconst mapDispatchToProps = dispatch => ({\n ...bindActionCreators(actions, dispatch)\n});\n\nMenu.propTypes = {\n imgRef: shape({ current: Element }).isRequired,\n points: object.isRequired,\n setShowCropBox: func.isRequired,\n canvasRef: shape({ current: Element }).isRequired,\n formID: string.isRequired,\n setImageUrl: func.isRequired\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(withRouter(Menu));\n","import React from 'react';\nimport { IconPlusSm } from '@jotforminc/svg-icons';\nimport { t } from '@jotforminc/translation';\nimport { string, object } from 'prop-types';\n\nimport { offset } from './Utils';\n\nconst MagnifierGlass = ({\n imagePath,\n mousePos\n}) => {\n const ZOOM = 3;\n\n return (\n
\n \n \n
\n );\n};\n\nMagnifierGlass.propTypes = {\n imagePath: string.isRequired,\n mousePos: object.isRequired\n};\n\nexport default MagnifierGlass;\n","import React, { useRef, useState } from 'react';\nimport { string, func } from 'prop-types';\nimport { t } from '@jotforminc/translation';\n\nimport CropTrapezoid from './CropTrapezoid';\nimport Menu from './Menu';\nimport MagnifierGlass from './MagnifierGlass';\n\nconst ImageProcess = ({\n imageUrl,\n setImageUrl\n}) => {\n const [showCropBox, setShowCropBox] = useState(true);\n const [points, setPoints] = useState({\n p1: { x: 0, y: 0 },\n p2: { x: 0, y: 0 },\n p3: { x: 0, y: 0 },\n p4: { x: 0, y: 0 }\n });\n const [mousePos, setMousePos] = useState({ x: 0, y: 0 });\n const [showMagnifierGlass, setShowMagnifierGlass] = useState(false);\n\n const imgRef = useRef();\n const canvasRef = useRef();\n\n const setInitPoints = e => {\n if (e.target) {\n const { right = 0, height = 0 } = e.target.getBoundingClientRect();\n const HANDLER_SIZE = 28;\n\n setPoints({\n p1: { x: HANDLER_SIZE, y: HANDLER_SIZE },\n p2: { x: right - HANDLER_SIZE, y: HANDLER_SIZE },\n p3: { x: right - HANDLER_SIZE, y: height - HANDLER_SIZE },\n p4: { x: HANDLER_SIZE, y: height - HANDLER_SIZE }\n });\n }\n };\n\n return (\n
\n
\n {showCropBox && (\n <>\n
\n \n \n \n
\n {showMagnifierGlass && (\n \n )}\n \n )}\n \n
\n \n
\n );\n};\n\nImageProcess.propTypes = {\n imageUrl: string.isRequired,\n setImageUrl: func.isRequired\n};\n\nexport default ImageProcess;\n","import React, {\n useEffect,\n useRef,\n forwardRef,\n useState\n} from 'react';\nimport { createRoot } from 'react-dom/client';\nimport { connect } from 'react-redux';\nimport PropTypes from 'prop-types';\nimport getOr from 'lodash/fp/getOr';\nimport { t } from '@jotforminc/translation';\nimport { handleCustomNavigation } from '@jotforminc/utils';\nimport { IconFileFilled } from '@jotforminc/svg-icons';\n\nimport { Button } from '@jotforminc/magnet';\nimport { updateFormProperty as updateFormPropertyAction } from '../../actions/index';\nimport { setErrorMessage } from '../../actions/pdfImport';\nimport { isFileProtected, getFileAsTypedArray } from './helpers';\nimport { endpoints } from '../../libs/api';\nimport { logJotFormEvents } from '../../libs/Utils';\nimport IconSVG from '../IconSVG';\nimport PDFNotifier from './PDFNotifier';\nimport PDFPasswordModal from './PDFPasswordModal';\nimport ImageProcess from './ImageUploader/ImageProcess';\n\nconst isUploadedFileValid = (file, docAllowed) => {\n const MAX_PDF_FILE_SIZE = 15728640; // 15 MB to Bytes\n\n if (file.type !== 'application/pdf' && (!docAllowed || ['application/msword', 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'].indexOf(file.type) === -1)) {\n return {\n valid: false,\n msg: 'The file you are uploading is not in correct format. Please upload a proper PDF file.'\n };\n }\n if (file.size > MAX_PDF_FILE_SIZE) {\n return {\n valid: false,\n msg: 'The PDF you are uploading exceeds 15 MB file size limit. Please try to reduce your PDF file size or try uploading another PDF form.'\n };\n }\n\n return { valid: true, msg: '' };\n};\n\nconst renderPDFPasswordModal = (onSuccess, fileData) => {\n const portal = global.document.getElementById('portal-root');\n const root = createRoot(portal);\n root.render(\n \n );\n};\n\nconst handleClone = (username, accountType, formID) => {\n endpoints.copyPDFImportedForm(formID)\n .then(({ responseCode, message }) => {\n if (responseCode === 200) {\n logJotFormEvents('pdf-import', {\n actor: username,\n action: 'Complete',\n target: 'Demo form created'\n }, accountType);\n // redirect to newly created demo form\n handleCustomNavigation(`/${global.__BASE_ROUTE_PATH}/${formID}`, '_self');\n } else {\n global.console.warn(message);\n }\n });\n};\n\nconst UploadInput = forwardRef(({ onChange, docAllowed }, fRef) => (\n <>\n \n \n \n));\n\nconst ErrorView = ({\n errorMessage, fRef, onChange, docAllowed\n}) => (\n
\n \n

\n {t('Failed to load PDF file.')}\n
\n {t('Please try reuploading your PDF.')}\n

\n \n {errorMessage &&
{t(errorMessage)}
}\n
\n);\n\nconst UploadView = ({\n errorMessage,\n fRef,\n onChange,\n accountType,\n username,\n formID,\n docAllowed,\n}) => {\n const { hash = null } = global.location;\n\n return (\n
\n {errorMessage && (\n \n )}\n \n \n

{t('Convert your document to online form')}

\n {t('Drag and drop your document here or')}\n \n { /* dummy button */}\n \n {t('.doc, .docx, .pdf')}\n {hash && hash.indexOf('tdf=1') > -1 && (\n handleClone(username, accountType, formID)}\n className=\"PDFU-tryDemo\"\n >\n {t('Try Demo Form')}\n \n )}\n
\n \n );\n};\n\nconst PDFUploader = ({\n errorMessage,\n mode,\n username,\n accountType,\n setViewerStat,\n importPDF,\n formID,\n docAllowed,\n setErrorMsg,\n device\n}) => {\n const [imageUrl, setImageUrl] = useState('');\n const inputRef = useRef();\n\n useEffect(() => {\n // Trigger file select automatically on pdf file update mode\n if (mode === 'update') {\n inputRef.current.click();\n }\n\n if (mode === 'error') {\n setViewerStat('failed');\n }\n }, []);\n\n const handleCorrectPassword = file => pdfPassword => {\n importPDF(file, pdfPassword);\n };\n\n const importFile = async file => {\n const { valid, msg } = isUploadedFileValid(file, docAllowed);\n\n if (!valid) {\n return setErrorMsg(msg);\n }\n\n const typedArray = await getFileAsTypedArray(file);\n const fileProtected = file.type === 'application/pdf'\n ? await isFileProtected(typedArray)\n : { isProtected: false, modifyContent: false };\n\n if (fileProtected.isProtected) {\n const typedProtectedArray = await getFileAsTypedArray(file);\n renderPDFPasswordModal(handleCorrectPassword(file), typedProtectedArray);\n } else {\n importPDF(file); // it's not protected so upload it\n }\n };\n\n const onChange = async e => {\n const file = e.target.files[0];\n try {\n await importFile(file);\n } catch (err) {\n setErrorMsg(err.message);\n }\n\n if (errorMessage) {\n setErrorMsg('');\n }\n };\n\n const onCapture = e => {\n if (e.target.files && e.target.files.length > 0) {\n const file = e.target.files[0];\n const imageFileUrl = URL.createObjectURL(file);\n setImageUrl(imageFileUrl);\n }\n };\n\n if (mode === 'error') {\n return (\n \n );\n }\n\n if (imageUrl) {\n return ;\n }\n\n return (\n \n );\n};\n\nPDFUploader.propTypes = {\n importPDF: PropTypes.func.isRequired,\n mode: PropTypes.oneOf(['import', 'update', 'error']),\n setViewerStat: PropTypes.func,\n};\n\n// Container\nconst mapDispatchToProps = {\n updateFormProperty: updateFormPropertyAction,\n setErrorMsg: setErrorMessage\n};\n\nconst mapStateToProps = state => ({\n docAllowed: global.window.JOTFORM_ENV !== 'ENTERPRISE' && state.formProperties.isHIPAA !== '1',\n errorMessage: getOr('', 'pdfImport.ui.errorMessage', state),\n device: getOr('', 'ui.device', state)\n});\n\nexport default connect(mapStateToProps, mapDispatchToProps)(PDFUploader);\n","import compose from 'lodash/fp/compose';\nimport reduce from 'lodash/fp/reduce';\nimport map from 'lodash/fp/map';\nimport getOr from 'lodash/fp/getOr';\nimport { VERY_LARGE_NUMBER } from './constants';\n\nconst isInViewport = viewport => rect => (\n (rect.top >= -60 || rect.bottom >= -60) // favor a little top rectanges\n && rect.left >= 0\n && (rect.bottom <= viewport.height || rect.bottom <= viewport.height)\n && rect.right <= viewport.width\n);\n\nconst withIndex = viewport => (rect, i) => ({ rect, index: i, inViewport: isInViewport(viewport)(rect) });\n\nconst getIndex = zone => getOr(0, 'index', zone);\n\nconst minimumTopDistanceReducer = (acc, curr) => {\n if (curr.inViewport !== acc.inViewport) return curr.inViewport ? curr : acc; // prioritize the page that's in the viewport\n return (Math.abs(curr.rect.top) < Math.abs(acc.rect.top) ? curr : acc);\n};\n\nconst findPageIndexFromViewport = viewport => zones => (\n compose(\n getIndex,\n reduce(minimumTopDistanceReducer)({ rect: { top: VERY_LARGE_NUMBER }, index: 0, inViewport: false }),\n map.convert({ cap: false })(withIndex(viewport))\n )(zones)\n);\n\nexport default findPageIndexFromViewport;\n","import {\n map, justs, concat, gets\n} from 'sanctuary';\nimport compose from 'lodash/fp/compose';\nimport { calculateBoundary } from './helpers';\n\nconst inspect = message => (o) => { // eslint-disable-line\n console.log(message); // eslint-disable-line\n console.log(o); // eslint-disable-line\n return o;\n};\n\n// safeProp :: [String] -> a -> Maybe b\nconst safeProp = path => o => gets(() => true)(path)(o);\n\n// getRects :: [Annotation] -> [Maybe Rectangle]\nconst getRects = map(safeProp(['rect']));\n\n// geometryFieldRect :: [Annotation] -> [Annotation] -> Rectangle\nconst geometryFieldRect = annotationsToMap => compose(\n calculateBoundary,\n justs,\n concat(getRects(annotationsToMap)),\n map(safeProp(['rect'])),\n);\n\nexport default geometryFieldRect;\n","/* eslint-disable max-lines */\n/* eslint-disable camelcase */\n// This file contains helper functions for pdf-import components\nimport isUndefined from 'lodash/isUndefined';\nimport flatten from 'lodash/flatten';\nimport isArray from 'lodash/isArray';\nimport values from 'lodash/values';\nimport isElement from 'lodash/isElement';\nimport getOr from 'lodash/fp/getOr';\nimport compose from 'lodash/fp/compose';\nimport split from 'lodash/fp/split';\nimport join from 'lodash/fp/join';\nimport has from 'lodash/fp/has';\nimport cloneDeep from 'lodash/fp/cloneDeep';\nimport { generateFileName } from '@jotforminc/answer-utils';\nimport { closest, fetchPDFJSWorker } from '@jotforminc/utils';\n\nimport findPageIndexFromViewport from '../../libs/pdfImport/findPageIndexFromViewport';\nimport { getWidthByHeight } from '../../libs/pdfImport/index';\nimport geometryFieldRect from './geometryFieldRect';\nimport { normalizeFieldId } from '../../libs/pdfImport/rectFinder';\nimport { getImportedPdfIsConnected } from '../../reducers/pdfImport';\nimport { LIMIT_BY_CODE } from '../../libs/pdfImport/constants';\n\nconst map = fn => f => f.map(fn);\nconst not = f => (...args) => !f(...args);\nconst isDefined = not(isUndefined);\n\nexport const WIDGET_KEYS = {\n adobe_sign: '53bfd5c2ec70ec9f25000005',\n narrative_fields: '5294d72eb1dd20af46000006',\n smooth_signature: '529467003477f3512000001f',\n date_picker: '52934dbf3be147110a000030',\n date_time_single: '528eea9eec60d3b530000005',\n terms_conditions: '52948fb29322cd302b00000c',\n short_scrollable_terms: '52f8550f0019ace53000000b',\n take_photo: '529c8286a75dae5e7f000005',\n image_upload_preview: '5295b800485bd19f5d000005',\n annotate_picture: '5d493b3b3ecd623d69000045'\n};\n\n// When you add a new supported field, take into consideration the mappableTypes too\nexport const supportedFields = [\n 'control_textbox',\n 'control_datetime',\n 'control_signature',\n 'control_widget',\n 'control_textarea',\n 'control_email',\n 'control_address',\n 'control_matrix',\n 'control_checkbox',\n 'control_radio',\n 'control_fullname',\n 'control_phone',\n 'control_dropdown',\n 'control_number',\n 'control_spinner',\n 'control_time',\n 'control_inline',\n 'control_calculation',\n 'control_autoincrement',\n 'control_birthdate',\n 'control_yesno'\n];\n\n// These questions could be mapped with multiple pdf fields\nexport const oneToManyFields = ['textarea'];\nexport const supportedFieldTypesForAnnotationCreation = [\n 'text', 'email', 'textarea', 'number', 'tel', 'li', 'checkbox', 'radio', 'select-one', 'select-multiple',\n];\nexport const deletableAnnotations = [ // annotation types\n 'control_textbox',\n 'control_textarea',\n 'control_number',\n 'control_spinner',\n 'signature',\n 'control_checkbox',\n 'control_radio',\n 'control_dropdown',\n 'image',\n 'control_datetime'\n];\n\nexport const supportedField = questionType => (supportedFields.findIndex(field => field === questionType) !== -1);\nexport const canCreateAnnotationByFieldType = fieldType => (\n supportedFieldTypesForAnnotationCreation.findIndex(field => field === fieldType) !== -1\n);\nexport const canDeleteAnnotation = annotationType => (\n deletableAnnotations.findIndex(field => field === annotationType) !== -1\n);\n\n// keys are the form field(input) types, values in the array are the annotation types set by the backend\nconst mappableTypes = {\n text: ['control_textbox', 'control_number', 'control_datetime', 'control_textarea'],\n textarea: ['control_textarea', 'control_textbox'],\n email: ['control_textbox'],\n checkbox: ['control_checkbox'],\n radio: ['control_radio'],\n tel: ['control_textbox'],\n 'select-one': ['control_dropdown'],\n // form field type for signature is
  • (for both e-signature and adobe sign).\n // We can use question type as a fallback for field type checking\n li: ['signature', 'control_textbox'],\n number: ['control_number', 'control_textbox']\n};\n\nexport const isWidgetSupported = widgetId => WIDGET_KEYS.narrative_fields !== widgetId && Object.values(WIDGET_KEYS).indexOf(widgetId) > -1;\n\n/* Written for control_matrix pdfDetails.pdfFields\n Expected type is array, but for some reason sometimes the data on backend is seen as object.\n This safely uses that object, but if the root cause is found, this check should be removed. */\nconst objToArray = row => (Array.isArray(row) ? row : Object.values(row));\n\nconst matrixColFinder = annotation => field => {\n return field.type === 'radio'\n ? (`${field.name}-${field.value}` === annotation)\n : field.name === annotation;\n};\n\nconst matrixColumnReducer = annotation => (acc, row, rowIndex) => {\n const colIndex = row.findIndex(matrixColFinder(annotation));\n if (colIndex !== -1) { // we found the annotation to delete\n // we don't break the iteration even though we've found the annotation. the last found wins\n acc.rowIndex = rowIndex;\n acc.colIndex = colIndex;\n }\n return acc;\n};\n\nconst matrixIndexesByAnnotation = pdfFields => annotation => (\n pdfFields.reduce(matrixColumnReducer(annotation), { rowIndex: null, colIndex: null })\n);\n\nconst unsetReplacer = field => {\n return field.type === 'radio'\n ? { name: null, type: null, value: null }\n : { name: null, type: null };\n};\n\nconst replaceMatrixAt = ({ rowIndex, colIndex }) => pdfFields => replacer => {\n if (rowIndex === null || colIndex === null) return pdfFields;\n\n // TODO: immutability is hard with JS, so we can use some sort of lenses or immerjs for this kind of operation\n return pdfFields.slice(0, rowIndex) // first part of the parent rows\n .concat([ // row that contains the element to change\n pdfFields[rowIndex].slice(0, colIndex)\n .concat([replacer(pdfFields[rowIndex][colIndex])])\n .concat(pdfFields[rowIndex].slice(colIndex + 1))\n ])\n .concat(pdfFields.slice(rowIndex + 1)); // the rest of the row array\n};\n\n// unsetMatrixAnnotation :: pdfFields[[]] -> annotation -> pdfFields[[]]\nexport const unsetMatrixAnnotation = pdfFields => annotation => (\n replaceMatrixAt(\n matrixIndexesByAnnotation(pdfFields)(annotation)\n )(pdfFields)(unsetReplacer)\n);\n\nconst getScopedInputPosition = (scopedInput, isCardForm) => {\n const scoped = scopedInput;\n const parent = closest(scoped, '.PDFC');\n\n if (!parent) return { top: 0, right: 0, height: 0 };\n\n const cardFormActiveFieldScale = 5;\n const getPercantage = (val, percantage = cardFormActiveFieldScale) => (percantage / 100) * val;\n const getInnerPos = (a, b) => a - b;\n const correctPos = pos => (isCardForm ? pos - getPercantage(pos) : pos);\n const { top: parentTop, right: parentRight } = parent.getBoundingClientRect();\n\n if (scoped.style.display === 'none') {\n scoped.style.display = 'inline-block';\n }\n\n const { top: childTop, right: childRight, height: childHeight } = scoped.getBoundingClientRect();\n\n return {\n top: correctPos(getInnerPos(childTop, parentTop)),\n right: correctPos(getInnerPos(parentRight, childRight)),\n height: childHeight\n };\n};\n\nconst highlightMappingInput = fieldId => {\n const inputs = global.document.querySelectorAll('[selectedInput]');\n const scopedInput = global.document.querySelectorAll(normalizeFieldId(fieldId));\n // remove previously selected/s\n if (inputs && inputs.length > 0) {\n inputs.forEach(input => {\n input.removeAttribute('selectedInput');\n });\n }\n // add current selected/s\n if (scopedInput && scopedInput.length > 0) {\n scopedInput.forEach(input => {\n input.setAttribute('selectedInput', '1');\n });\n }\n};\n\nconst handleScopedInputSelector = selectedFormField => props => {\n const {\n order, questionType, labelId, fieldId, qid, timeFormat, fieldType\n } = selectedFormField;\n const { isCardForm, isNewDefaultTheme } = props;\n\n switch (questionType) {\n case 'control_inline':\n return {\n scoped: `blot-${fieldId}`,\n highlight: fieldId\n };\n case 'control_time':\n const isRange = fieldId.indexOf('Range') > -1;\n const dataAttrSel = '[name*=\"Range\"]';\n const timeInputType = timeFormat === 'AM/PM' ? 'ampm' : 'minuteSelect';\n\n return {\n scoped: `input_${qid}_${timeInputType}${isRange ? 'Range' : ''}`,\n highlight: `.time-dropdown${isRange ? dataAttrSel : `:not(${dataAttrSel})`}`\n };\n case 'control_datetime':\n if (isCardForm) {\n const isTime = fieldType === 'select-one';\n const timeType = timeFormat === 'AM/PM' ? 'ampm' : 'min';\n\n return {\n scoped: isTime ? `${timeType}_${qid}` : `lite_mode_${qid}`,\n highlight: isTime ? `[name*=\"q${qid}_date\"]` : `#lite_mode_${qid}`\n };\n }\n // Fix only when selecting time related inputs\n if (fieldType === 'select-one') {\n return {\n scoped: `${timeFormat === 'AM/PM' ? 'ampm' : 'min'}_${qid}`,\n highlight: `.time-dropdown[name*=\"q${qid}_date${qid}\"]`\n };\n }\n if (isNewDefaultTheme && fieldId) {\n return {\n scoped: fieldId,\n highlight: fieldId\n };\n }\n /* falls through */\n default:\n return {\n scoped: order && labelId ? labelId : fieldId,\n highlight: fieldId\n };\n }\n};\n\nconst handleHorizontalGap = ({ order, questionType }, isCardForm) => {\n const extraGap = isCardForm ? 98 : 48;\n\n return (order && questionType !== 'control_inline') ? extraGap : 2;\n};\n\n// Check if selector is valid\nexport const isSelectorValid = selector => {\n try {\n global.document.createDocumentFragment().querySelector(selector);\n } catch (e) {\n return false;\n }\n\n return true;\n};\n\nexport const handleMappingButtonPosition = selectedFormField => ({ isCardForm, isNewDefaultTheme }) => {\n const { scoped, highlight } = handleScopedInputSelector(selectedFormField)({ isCardForm, isNewDefaultTheme });\n const scopedInput = global.document.getElementById(scoped);\n\n if (scopedInput) {\n const { top, right, height } = getScopedInputPosition(scopedInput, isCardForm);\n\n if ((top || right) && height) {\n highlightMappingInput(highlight); // Highlight scoped input\n\n return {\n top: top + ((height - 34) / 2), // (input height - button height) / 2 to centralize button position\n right: right - handleHorizontalGap(selectedFormField, isCardForm) // Extract conditional gap to leave space between input and button\n };\n }\n }\n // Fallback for unexpected things(Align button to center right of the PDFC)\n return {\n top: '50%',\n transform: 'translateY(-50%)',\n right: isCardForm ? 4 : 0\n };\n};\n\nexport const handleMappingOrderNumber = (fieldId, isCardForm) => {\n const scopedInput = global.document.getElementById(fieldId);\n\n if (scopedInput) {\n const { top, right, height } = getScopedInputPosition(scopedInput, isCardForm);\n const extraGap = 34; // 34px(indicator width)\n\n if ((top || right) && height) {\n return {\n top: top + ((height - 20) / 2), // (input height - indicator height) / 2 to centralize button position\n right: right + extraGap\n };\n }\n }\n // Fallback for unexpected things(Align indicator to center left of the PDFC)\n return {\n top: '50%',\n transform: 'translateY(-50%)',\n left: '-36px' // 34px(indicator width) + 2px(gap)\n };\n};\n\nconst boundingClientRectDefaults = {\n left: 0, top: 0, right: 0, bottom: 0\n};\n/* eslint-disable max-len */\nconst pdfImporterThankYouSendEmail = t => (`\n \n`);\n\nconst pdfImporterThankYouDownloadButton = t => (`\n \n \n ${t('Download PDF')}\n \n`);\n\n// if you gonna change buttons in `pdfImporterThankYouHTML`,\n// update `pdfImporterThankYouButton` in BUILDER -> /src/modules/form-properties-editor/PDFImporterSettings.js\nexport const pdfImporterThankYouHTML = (t, isHIPAA, hideButtons, hideTyButtonsOnNewForms) => (`\n
    \n \"\"\n
    \n

    Thank You!

    \n

    ${t('Your submission has been received')}

    \n
    \n ${(hideButtons || hideTyButtonsOnNewForms)\n ? ''\n : (`
    \n
    \n ${isHIPAA ? '' : pdfImporterThankYouSendEmail(t)}\n ${pdfImporterThankYouDownloadButton(t)}\n
    \n `)\n }\n
    \n`);\n/* eslint-enable max-len */\n\nexport const includes = a => item => a.includes(item);\n\nexport const notIncludes = a => item => !includes(a)(item);\n\n// calculateWidth :: Rect[x1, y1, x2, y2] -> Int\nexport const calculateWidth = rect => (\n (rect && rect.length === 4)\n ? parseInt(Math.abs(rect[2] - rect[0]), 10)\n : 0\n);\n\n// calculateHeight :: Rect[x1, y1, x2, y2] -> Int\nexport const calculateHeight = rect => (\n (rect && rect.length === 4)\n ? parseInt(Math.abs(rect[3] - rect[1]), 10)\n : 0\n);\n\n// Check if current element is in viewport\nconst isInViewport = ({\n top, left, bottom, right\n}) => {\n const { window: { innerHeight, innerWidth }, document: { documentElement } } = global;\n\n return (\n bottom >= 0\n && right >= 0\n && top <= (innerHeight || documentElement.clientHeight)\n && left <= (innerWidth || documentElement.clientWidth));\n};\n// Check if rect is valid\nconst isRectValid = rect => (rect && rect.width !== 0 && rect.height !== 0);\n// Get rect by selector\nconst getClientRect = selector => {\n const el = isSelectorValid(selector) && global.document.querySelector(selector);\n\n return el && el.getBoundingClientRect();\n};\n// find bounding rectangle by selector\nexport const rectBySelector = (s, qid) => {\n let rect = getClientRect(s);\n // We need to check rect's width and height independently to check whether it is hidden or not\n if ((!isRectValid(rect) || !rect) && qid) {\n rect = getClientRect(`#id_${qid}`);\n }\n\n return isRectValid(rect) && isInViewport(rect) ? [rect.left, rect.top, rect.right, rect.bottom] : false;\n};\n\n// Check that the users could pin or not, looking selected form field and clicked annotation\nexport const canPin = (selectedFormField, annotationType) => {\n if (!selectedFormField || !selectedFormField.questionType || !selectedFormField.fieldType) return false;\n if (!annotationType) return false;\n if (!supportedField(selectedFormField.questionType)) return false;\n\n if (notIncludes(getOr([], selectedFormField.fieldType, mappableTypes))(annotationType)) return false;\n\n // check if we have already pinned pdf fields, but the selectedFormField does not support multiple fields mapping\n if (selectedFormField.pinnedAnnotations\n && selectedFormField.pinnedAnnotations.length > 0\n && notIncludes(oneToManyFields)(selectedFormField.fieldType)) return false;\n\n // our default is true\n return true;\n};\n\nexport const selector = (pageIndex, i) => `#page-${pageIndex}-annotation-${i}`;\nexport const selectorByAnnotatationID = aId => `[data-annotation-id=\"${aId}\"]`;\n\nexport const domRectByAnnotationID = aId => (rectBySelector(selectorByAnnotatationID(aId)));\n\n// calculate a point on the rectangle for the start\n// rect: [left, top, right, bottom]\nexport const startPoint = rect => ({\n x: parseInt(rect[2], 10),\n y: parseInt(((rect[3] - rect[1]) / 2) + rect[1], 10),\n});\n\n// calculate a point on the rectangle for the end\n// rect: [left, top, right, bottom]\nexport const endPoint = rect => ({\n x: parseInt(rect[0], 10),\n y: parseInt(((rect[3] - rect[1]) / 2) + rect[1], 10),\n});\n\n// TODO: refactor this function\nexport const getRect = document => (question, input, label) => {\n if (!input) return [0, 0, 0, 0];\n\n const { type: questionType, qid } = question;\n let rect = {};\n\n switch (questionType) {\n case 'control_calculation':\n case 'control_textbox':\n case 'control_email':\n case 'control_datetime':\n case 'control_textarea':\n case 'control_dropdown':\n case 'control_signature':\n case 'control_widget':\n case 'control_autoincrement':\n rect = document.querySelector(`#id_${qid}`).getBoundingClientRect();\n break;\n case 'control_radio':\n case 'control_checkbox':\n rect = label\n ? label.getBoundingClientRect()\n : input.getBoundingClientRect();\n break;\n case 'control_fullname':\n case 'control_address':\n case 'control_phone':\n case 'control_matrix':\n case 'control_number':\n case 'control_spinner':\n case 'control_inline':\n case 'control_birthdate':\n case 'control_yesno':\n rect = input.getBoundingClientRect();\n break;\n default:\n rect = { ...boundingClientRectDefaults };\n break;\n }\n\n return [rect.left, rect.top, rect.right, rect.bottom];\n\n // TODO: Handle other checkbox and option input\n // In order to achive this goal we have to disable \"pointer-event: none\" on input fields, because\n // it disables click events on the inputs, so we can't access e.target seperataly for other and it's checkbox\n // If we find a way to disable this property, we need to change selectors above.\n};\n\nexport const isIncludesElements = (target, elements = []) => (\n includes(elements)(getOr('', 'tagName', target).toLowerCase())\n);\n\nexport const normalizeTarget = (target, questionType) => {\n if (questionType === 'control_radio' || questionType === 'control_checkbox') {\n const selectedClass = questionType === 'control_radio' ? 'form-radio-item' : 'form-checkbox-item';\n const hasClass = target.className.indexOf(selectedClass) === -1; // If target has form-radio-item classname return original target\n const hasAttr = Array.from(target.attributes).find(i => i.name === 'contenteditable'); // if target has contenteditable attribute\n if (hasClass && hasAttr) {\n const normalized = closest(target, `.${selectedClass}`);\n\n return normalized || target;\n }\n }\n\n if (target && target.className && typeof target.className.indexOf === 'function' && target.className.indexOf('sub-label') !== -1) { // clicked to the sub-label\n const subLabelContainer = closest(target, '.form-sub-label-container');\n if (subLabelContainer) return subLabelContainer;\n }\n\n return target;\n};\n\nexport const isMappable = (isPDFImporter, importedPdfIsConnected, questionType, isRightPanelOpen, device) => (\n (isPDFImporter && importedPdfIsConnected === 'Yes' && supportedField(questionType) && !isRightPanelOpen && device !== 'isMobile')\n);\n\n// check if selectedFormField question and currently rendered question are same\n// and selectedFormField is mapped\nexport const isFieldMapped = (selectedFormField, qid) => (\n selectedFormField !== null\n && isArray(selectedFormField.mappedAnnotations)\n && (qid === selectedFormField.qid)\n && (selectedFormField.mappedAnnotations.length > 0)\n);\n\n// look at the questions' pdfDetails property for the fieldName if there is any property for it\n// We return an array because one form field can be mapped more than one annotations. ex. Long Text Entry\nexport const formFieldMappedAnnotations = (fieldName, fieldValue, question, fieldOrder, matrixIndexes = {}, fieldId) => {\n switch (question.type) {\n case 'control_email':\n case 'control_textbox': // for simple questions it's enough checking existence of pdfDetails\n return ((question && question.pdfDetails && question.pdfDetails[fieldName])\n ? [question.pdfDetails[fieldName]]\n : []);\n case 'control_inline':\n return ((question && question.pdfDetails && question.pdfDetails.pdfFields)\n ? question && question.pdfDetails && question.pdfDetails.pdfFields.filter(f => f.value === fieldName)\n .map(f => f.name)\n : []);\n case 'control_fullname':\n case 'control_address':\n case 'control_phone':\n case 'control_time':\n case 'control_datetime':\n case 'control_birthdate':\n return ((question && question.pdfDetails && question.pdfDetails.pdfFields\n && question.pdfDetails.pdfFields[fieldName] !== null)\n ? [question.pdfDetails.pdfFields[fieldName]]\n : []);\n case 'control_textarea':\n return (question && question.pdfDetails && question.pdfDetails.pdfFields)\n ? question.pdfDetails.pdfFields.map(f => f.name)\n : [];\n case 'control_radio':\n const pdfDetailsFieldName = getOr('', 'pdfDetails.fieldName', question);\n if (fieldName === 'other' && fieldValue === '') { // other input\n const name = getOr(null, 'pdfDetails.otherInput', question);\n return name === null ? [] : [name];\n }\n if (fieldValue === 'other' && fieldId.indexOf('other') > -1) { // other radio\n const otherValue = getOr(null, 'pdfDetails.otherRadio.value', question);\n const radioFieldName = getOr(null, 'pdfDetails.fieldName', question);\n return !otherValue ? [] : [`${radioFieldName}-${otherValue}`];\n }\n return (getOr([], 'pdfDetails.pdfFields', question))\n .filter(f => f.value && f.label === fieldValue) // form field option value\n .map(f => `${pdfDetailsFieldName}-${f.value}`); // build annotation id\n case 'control_checkbox':\n if (fieldName === 'other' && fieldValue === 'other') { // other checkbox\n const name = getOr(null, 'pdfDetails.otherCheckbox.name', question);\n return name === null ? [] : [name];\n }\n if (fieldName === 'other' && fieldValue === '') { // other input\n const name = getOr(null, 'pdfDetails.otherInput', question);\n return name === null ? [] : [name];\n }\n // order is important\n return (getOr([], 'pdfDetails.pdfFields', question)) // options\n .filter(f => f.name && f.value === fieldValue) // field could be null\n .map(f => f.name);\n case 'control_matrix':\n const field = getOr(null, `pdfDetails.pdfFields.${matrixIndexes.rowIndex}.${matrixIndexes.colIndex}`, question);\n return field && field.name ? [field.type === 'radio' ? `${field.name}-${field.value}` : field.name] : [];\n case 'control_widget':\n const widgetFieldName = getOr(null, 'pdfDetails.fieldName', question);\n const widgetPDFFields = getOr([], 'pdfDetails.pdfFields', question);\n if (widgetFieldName !== null && isWidgetSupported(question.selectedField)) {\n return [widgetFieldName];\n }\n if (question.selectedField === WIDGET_KEYS.narrative_fields) {\n const widgetFieldFound = widgetPDFFields.find(f => f.formName === fieldName);\n return widgetFieldFound ? [widgetFieldFound.pdfName] : [];\n }\n return [];\n case 'control_dropdown':\n case 'control_calculation':\n case 'control_signature':\n case 'control_spinner':\n case 'control_number':\n case 'control_autoincrement':\n case 'control_yesno':\n const nFieldName = getOr(null, 'pdfDetails.fieldName', question);\n return nFieldName\n ? [nFieldName]\n : [];\n default:\n return [];\n }\n};\n\nexport const getQuestionFieldNames = ({ type = '', pdfDetails = {} }) => {\n switch (type) {\n case 'control_calculation':\n case 'control_textbox':\n case 'control_email':\n case 'control_spinner':\n case 'control_number':\n case 'control_signature':\n case 'control_datetime':\n case 'control_dropdown':\n case 'control_radio':\n case 'control_autoincrement':\n case 'control_yesno':\n return [pdfDetails.fieldName];\n case 'control_fullname':\n case 'control_address':\n case 'control_phone':\n case 'control_birthdate':\n return values(pdfDetails.pdfFields);\n case 'control_textarea':\n return (pdfDetails.pdfFields || []).map(({ name }) => name).filter(n => !!n);\n case 'control_checkbox':\n return [\n ...(pdfDetails.pdfFields || []).map(({ name }) => name),\n `${pdfDetails.otherCheckbox ? pdfDetails.otherCheckbox.name : ''}`,\n `${pdfDetails.otherInput}`\n ].filter(n => !!n);\n case 'control_matrix':\n return flatten(pdfDetails.pdfFields).map(({ name }) => name).filter(n => !!n);\n default: return [];\n }\n};\n\nexport const getAnnotationWithQId = questions => (annotation = {}) => {\n if (annotation.qid) {\n return { qid: String(annotation.qid), ...annotation };\n }\n const foundQuestion = questions.find(q => getQuestionFieldNames(q).includes(annotation.name));\n const annotationQid = foundQuestion ? String(foundQuestion.qid) : null;\n return { ...annotation, qid: annotationQid };\n};\n\nconst filterNullPdfDetails = questions => questions.filter(q => !!q.pdfDetails);\n\nexport const getAnnotationsWithQId = questions => map(compose(getAnnotationWithQId, filterNullPdfDetails)(questions));\n\nconst normalizeDatetimeFieldName = fieldName => {\n if (fieldName === '' || fieldName === null) { // case 1 (default)\n return 'liteMode';\n }\n if (/hour|min|ampm|timeInput/gi.test(fieldName)) { // case 2\n return 'time';\n }\n const regex = /\\[(.*?)\\]/g; // case 3\n const xs = regex.exec(fieldName);\n return xs ? xs[1] : fieldName;\n};\n\n// Questions have different field structures. Here we normalize the name based on the question type\nexport const normalizeFieldName = questionType => fieldName => widgetID => {\n let result;\n\n switch (questionType) {\n case 'control_calculation':\n case 'control_textbox':\n case 'control_email':\n case 'control_textarea':\n case 'control_signature':\n case 'control_autoincrement':\n case 'control_yesno':\n result = 'fieldName';\n break;\n case 'control_widget':\n result = fieldName;\n if (isWidgetSupported(widgetID)) {\n result = 'fieldName';\n }\n break;\n case 'control_fullname':\n case 'control_address':\n case 'control_phone':\n case 'control_checkbox':\n case 'control_radio':\n case 'control_inline':\n case 'control_birthdate':\n const regex = /\\[(.*?)\\]/g;\n const arr = regex.exec(fieldName);\n result = arr ? arr[1] : fieldName;\n break;\n case 'control_time':\n result = /Range/g.test(fieldName) ? 'rangeTime' : 'mainTime';\n break;\n case 'control_datetime':\n result = normalizeDatetimeFieldName(fieldName);\n break;\n default:\n result = fieldName;\n break;\n }\n return result;\n};\n\nexport const fieldNameByAnnotation = (annotationId, questionType, pdfDetails) => {\n switch (questionType) {\n case 'control_inline':\n return pdfDetails.pdfFields.reduce((acc, item) => {\n return (item.name === annotationId) ? { fieldName: item.value, fieldValue: null } : acc;\n }, { fieldName: null, fieldValue: null });\n case 'control_calculation':\n case 'control_textbox':\n case 'control_email':\n case 'control_autoincrement':\n return { fieldName: 'fieldName' };\n case 'control_fullname':\n case 'control_address':\n case 'control_phone':\n case 'control_time':\n case 'control_datetime':\n case 'control_birthdate':\n // get pdfFields keys as array\n const keys = Object.keys(pdfDetails.pdfFields);\n // TODO: make this functional\n for (let i = 0; i < keys.length; i++) {\n if (pdfDetails.pdfFields[keys[i]] === annotationId) {\n return { fieldName: keys[i] };\n }\n }\n return { fieldName: null };\n case 'control_radio':\n if (pdfDetails.otherInput === annotationId) {\n return { fieldName: '[other]', fieldValue: '' };\n }\n const otherRadioValue = getOr('', 'otherRadio.value', pdfDetails);\n const otherRadio = `${pdfDetails.fieldName}-${otherRadioValue}`;\n if (otherRadio === annotationId) {\n return { fieldName: '', fieldValue: 'other' };\n }\n return { fieldName: null, fieldValue: null };\n default:\n return { fieldName: null };\n }\n};\n\nconst boundaryOfTwoRect = (r1, r2) => {\n return [\n Math.min(r1[0], r2[0]),\n Math.min(r1[1], r2[1]),\n Math.max(r1[2], r2[2]),\n Math.max(r1[3], r2[3]),\n ];\n};\n\nexport const calculateBoundary = xs => {\n // TODO: why do we need to check the length of xs?\n return xs.length > 0 ? xs.reduce((acc, item) => {\n return item ? boundaryOfTwoRect(acc, item) : acc;\n }) : [];\n};\n\nexport const pdfDetailsDefault = {\n // TODO: add defaults for textbox, email and datetime\n control_fullname: {\n geometry: {\n fieldRect: [],\n pageIndex: 0,\n },\n pdfFields: {\n prefix: null,\n first: null,\n middle: null,\n last: null,\n suffix: null,\n }\n },\n control_address: {\n geometry: {\n fieldRect: [],\n pageIndex: 0,\n },\n pdfFields: {\n addr_line1: null,\n addr_line2: null,\n city: null,\n state: null,\n postal: null,\n country: null,\n }\n },\n control_time: {\n geometry: {\n fieldRect: [],\n pageIndex: 0,\n },\n pdfFields: {\n mainTime: null,\n rangeTime: null,\n }\n },\n control_datetime: {\n geometry: {\n fieldRect: [],\n pageIndex: 0,\n },\n pdfFields: {\n liteMode: null,\n day: null,\n month: null,\n year: null,\n time: null,\n }\n },\n control_birthdate: {\n geometry: {\n fieldRect: [],\n pageIndex: 0,\n },\n pdfFields: {\n day: null,\n month: null,\n year: null\n }\n },\n control_phone: {\n geometry: {\n fieldRect: [],\n pageIndex: 0,\n },\n pdfFields: {\n country: null,\n area: null,\n phone: null,\n full: null,\n masked: null,\n }\n },\n control_radio: {\n otherInput: null,\n otherRadio: {\n label: 'other',\n value: null\n },\n geometry: {\n fieldRect: [],\n pageIndex: 0,\n },\n pdfFields: [],\n fieldName: '',\n },\n control_checkbox: {\n otherCheckbox: {\n name: null,\n value: null,\n exportValue: null,\n },\n otherInput: null,\n otherLabel: null,\n pdfFields: [],\n geometry: {\n fieldRect: [],\n pageIndex: 0,\n }\n },\n control_inline: {\n pdfFields: [],\n geometry: {\n fieldRect: [],\n pageIndex: 0,\n }\n },\n control_dropdown: {\n pdfFields: [],\n geometry: {\n fieldRect: [],\n pageIndex: 0,\n },\n fieldName: null,\n },\n control_matrix: {\n pdfFields: [],\n geometry: {\n fieldRect: [],\n pageIndex: 0,\n },\n fieldName: null,\n },\n control_signature: {\n geometry: {\n fieldRect: [],\n pageIndex: 0,\n },\n fieldName: null,\n },\n control_yesno: {\n geometry: {\n fieldRect: [],\n pageIndex: 0\n },\n fieldName: null\n },\n control_widget: { // adobe sign\n geometry: {\n fieldRect: [],\n pageIndex: 0,\n },\n pdfFields: [],\n fieldName: null,\n },\n control_spinner: {\n geometry: {\n fieldRect: [],\n pageIndex: 0,\n },\n fieldName: null,\n },\n control_number: {\n geometry: {\n fieldRect: [],\n pageIndex: 0,\n },\n fieldName: null,\n },\n control_calculation: {\n geometry: {\n fieldRect: [],\n pageIndex: 0,\n },\n pdfFields: [],\n fieldName: null,\n },\n control_autoincrement: {\n geometry: {\n fieldRect: [],\n pageIndex: 0,\n },\n pdfFields: [],\n fieldName: null,\n }\n};\n\n// unset other checkbox in the multiple choice question\nexport const unsetOtherCheckbox = (otherCheckbox = null, fieldName, mappedAnnotations = []) => {\n // no previously added otherCheckbox state, so nothing to unset\n if (otherCheckbox === null) return null;\n\n // fieldname is \"other\" and previously mapped other checkbox name is in the annotations to disconnect\n if (fieldName === 'other' && includes(mappedAnnotations)(otherCheckbox.name)) {\n return null;\n }\n\n // return previous state as is\n return otherCheckbox;\n};\n\nexport const setOtherCheckbox = (otherCheckbox = null, formFieldValue, fieldName, annotationsToMap = []) => {\n // Only other checkbox value and name are same\n if (formFieldValue && (formFieldValue === fieldName) && annotationsToMap.length > 0) {\n return {\n name: annotationsToMap[0].name,\n exportValue: annotationsToMap[0].exportValue,\n };\n }\n return otherCheckbox;\n};\n\nexport const unsetOtherInput = (otherInput = null, fieldName, mappedAnnotations = []) => {\n if (!otherInput || fieldName !== 'other') return otherInput;\n\n if (includes(mappedAnnotations)(otherInput)) return null;\n\n return otherInput;\n};\n\nconst unsetCheckboxField = (pdfFields, annotation, fieldName) => {\n if (fieldName === 'other') return pdfFields;\n\n if (pdfFields) {\n return pdfFields.map(a => {\n return a.name === annotation\n ? ({ name: null, value: null, exportValue: null })\n : a;\n });\n }\n\n return { name: null, value: null, exportValue: null };\n};\n\nconst unsetRadioField = (pdfFields, annotation, pdfFieldName, isOther) => {\n if (isOther) return pdfFields;\n\n if (pdfFields) {\n return pdfFields.map(a => {\n return (`${pdfFieldName}-${a.value}` === annotation)\n ? ({ ...a, value: null })\n : a;\n });\n }\n\n return { label: null, value: null };\n};\n\nconst updateCheckboxField = (index, pdfFields, annotation, fieldName, formFieldValue) => {\n if (fieldName === 'other') return pdfFields;\n return pdfFields.slice(0, index)\n .concat([{\n ...pdfFields[index],\n name: annotation.id,\n value: formFieldValue,\n exportValue: annotation.exportValue\n }])\n .concat(pdfFields.slice(index + 1));\n};\n\nconst updateRadioField = (index, pdfFields, annotation, fieldName, formFieldValue, formFieldId = '') => {\n if (fieldName === 'other' || formFieldId.indexOf('other') > -1) return pdfFields;\n return pdfFields.slice(0, index)\n .concat([{\n ...pdfFields[index],\n value: annotation.value,\n label: formFieldValue,\n }])\n .concat(pdfFields.slice(index + 1));\n};\n\nconst defaultMatrixIndexes = { rowIndex: null, colIndex: null };\n\nexport const matrixIndexesByFieldId = questionType => fieldId => {\n if (questionType !== 'control_matrix' || !fieldId) return defaultMatrixIndexes;\n\n const arr = fieldId.split('_');\n\n if (arr.length !== 4) return defaultMatrixIndexes;\n\n const rowIndex = Number(arr[2]);\n const colIndex = Number(arr[3]);\n\n return {\n rowIndex: Number.isNaN(rowIndex) ? null : rowIndex,\n colIndex: Number.isNaN(colIndex) ? null : colIndex,\n };\n};\n\nconst annotationTypeMapper = {\n control_textbox: annotation => ({ name: annotation.id, type: 'plaintext' }),\n control_checkbox: annotation => ({ name: annotation.id, type: 'checkbox', value: annotation.exportValue }),\n control_radio: annotation => ({ name: annotation.name, type: 'radio', value: annotation.value }),\n control_dropdown: annotation => ({ name: annotation.id, type: 'choice' }),\n};\n\nconst updatePDFFieldsForMatrix = ({ rowIndex, colIndex }, pdfFields, annotationToMap) => {\n const newArr = cloneDeep(pdfFields);\n\n return (annotationTypeMapper[getOr(null, 'type', annotationToMap)]) // eslint-disable-line\n ? (newArr[rowIndex][colIndex] = annotationTypeMapper[annotationToMap.type](annotationToMap)) && newArr\n : pdfFields;\n};\n\nconst calculateInline = (pdfDetails, annotationsToMap, questionAnnotations, fieldName) => {\n return {\n ...pdfDetails,\n geometry: {\n pageIndex: annotationsToMap[0].pageIndex,\n fieldRect: geometryFieldRect(annotationsToMap)(questionAnnotations),\n },\n pdfFields: [\n ...pdfDetails.pdfFields,\n {\n name: annotationsToMap[0].name, value: fieldName\n }\n ],\n };\n};\n\n// TODO: it's probabile that we have to merge this function with unsetPDFdetailsfield\n// annotationsToMap is an array, because long text entry question can be mapped with multiple pdf fields. For form field that doesn't support\n// multiple pdf field mapping, we use the first item from the annotationsToMap array.\nexport const calculatePdfDetails = (\n fieldName, formFieldValue, questionType, annotationsToMap, order, widgetID, fieldId\n) => (pdfDetails = pdfDetailsDefault[questionType], questionAnnotations = []) => {\n // in case we don't have any annotation to map, pass previous state\n if (annotationsToMap.length === 0) return pdfDetails;\n\n switch (questionType) {\n case 'control_calculation':\n case 'control_textbox':\n case 'control_email':\n case 'control_autoincrement':\n case 'control_yesno':\n return {\n geometry: {\n fieldRect: geometryFieldRect(annotationsToMap)(questionAnnotations),\n pageIndex: annotationsToMap[0].pageIndex,\n },\n [fieldName]: annotationsToMap[0].name,\n };\n case 'control_signature':\n return {\n geometry: {\n fieldRect: geometryFieldRect(annotationsToMap)(questionAnnotations),\n pageIndex: getOr(0, '0.pageIndex', annotationsToMap),\n },\n [fieldName]: annotationsToMap[0].name,\n };\n case 'control_widget':\n // TODO: refactor object creation for widget. It's almost dublicated\n if (isWidgetSupported(widgetID)) {\n return {\n ...pdfDetails,\n geometry: {\n fieldRect: geometryFieldRect(annotationsToMap)(questionAnnotations),\n pageIndex: getOr(0, '0.pageIndex', annotationsToMap),\n },\n [fieldName]: getOr(null, '0.name', annotationsToMap),\n };\n }\n if (widgetID === WIDGET_KEYS.narrative_fields) {\n return {\n ...pdfDetails,\n geometry: {\n fieldRect: geometryFieldRect(annotationsToMap)(questionAnnotations),\n pageIndex: getOr(0, '0.pageIndex', annotationsToMap),\n },\n fieldName: null, // we don't need fieldName here\n pdfFields: [\n ...pdfDetails.pdfFields,\n {\n pdfName: annotationsToMap[0].name, formName: fieldName // questionAnnotations\n }\n ]\n };\n }\n return pdfDetails;\n case 'control_dropdown':\n return {\n ...pdfDetails,\n geometry: {\n fieldRect: geometryFieldRect(annotationsToMap)(questionAnnotations),\n pageIndex: getOr(0, '0.pageIndex', annotationsToMap),\n },\n pdfFields: getOr([], '0.options', annotationsToMap),\n fieldName: getOr(null, '0.name', annotationsToMap),\n };\n case 'control_fullname':\n case 'control_address':\n case 'control_phone':\n case 'control_time':\n case 'control_datetime':\n case 'control_birthdate':\n return {\n ...pdfDetails,\n geometry: {\n // Save the last mapped pdf fields' pageIndex as the pageIndex of the whole question\n pageIndex: annotationsToMap[0].pageIndex,\n fieldRect: geometryFieldRect(annotationsToMap)(questionAnnotations),\n },\n pdfFields: {\n ...pdfDetails.pdfFields,\n [fieldName]: annotationsToMap[0].name,\n }\n };\n case 'control_radio':\n return {\n ...pdfDetails,\n fieldName:\n (fieldName === 'other' && formFieldValue === '')\n ? pdfDetails.fieldName : annotationsToMap[0].name,\n geometry: {\n pageIndex: annotationsToMap[0].pageIndex,\n fieldRect: geometryFieldRect(annotationsToMap)(questionAnnotations),\n },\n pdfFields: [\n ...updateRadioField(order - 1, pdfDetails.pdfFields, annotationsToMap[0], fieldName, formFieldValue, fieldId)\n ],\n otherInput:\n (fieldName === 'other' && formFieldValue === '')\n ? annotationsToMap[0].id\n : getOr(null, 'otherInput', pdfDetails),\n otherRadio: (formFieldValue === 'other' && (fieldId.indexOf('other') > -1))\n ? ({ label: 'other', value: getOr(null, '0.value', annotationsToMap) }) : getOr(null, 'otherRadio', pdfDetails),\n };\n case 'control_checkbox':\n return {\n ...pdfDetails,\n geometry: {\n pageIndex: annotationsToMap[0].pageIndex,\n fieldRect: geometryFieldRect(annotationsToMap)(questionAnnotations),\n },\n pdfFields: [\n ...updateCheckboxField(order - 1, pdfDetails.pdfFields, annotationsToMap[0], fieldName, formFieldValue)\n ],\n otherCheckbox: setOtherCheckbox(pdfDetails.otherCheckbox, formFieldValue, fieldName, annotationsToMap),\n otherInput: (fieldName === 'other' && formFieldValue === '')\n ? annotationsToMap[0].id\n : pdfDetails.otherInput\n };\n case 'control_textarea':\n // We are not interested with the previous state for textarea. Calculate a new one with only pinned annotations\n return {\n geometry: {\n // TODO: what happens if annotations are in different pages? For now, we take the first one\n pageIndex: annotationsToMap[0].pageIndex,\n fieldRect: geometryFieldRect(annotationsToMap)(questionAnnotations),\n },\n pdfFields: [\n ...annotationsToMap.map(a => ({\n name: a.name,\n fontFamily: getOr(null, 'textProps.fontFamily', a),\n fontSize: getOr(null, 'textProps.fontSize', a),\n w: calculateWidth(a.rect), // TODO: move this into a function\n h: calculateHeight(a.rect)\n }))\n ]\n };\n case 'control_matrix':\n return {\n ...pdfDetails,\n geometry: {\n pageIndex: getOr(0, '0.pageIndex', annotationsToMap),\n fieldRect: geometryFieldRect(annotationsToMap)(questionAnnotations),\n },\n pdfFields: [\n ...updatePDFFieldsForMatrix(\n matrixIndexesByFieldId('control_matrix')(fieldId),\n pdfDetails.pdfFields,\n annotationsToMap[0],\n )\n ]\n };\n case 'control_spinner':\n case 'control_number':\n return {\n ...pdfDetails,\n geometry: {\n fieldRect: geometryFieldRect(annotationsToMap)(questionAnnotations),\n pageIndex: getOr(0, '0.pageIndex', annotationsToMap),\n },\n pdfFields: [\n getOr(null, '0.name', annotationsToMap),\n ],\n fieldName: getOr(null, '0.name', annotationsToMap),\n };\n case 'control_inline':\n return calculateInline(pdfDetails, annotationsToMap, questionAnnotations, fieldName);\n default:\n return pdfDetails;\n }\n};\n\nconst isRadioOther = (fieldName, formFieldValue, otherRadio, annotationId) => {\n if (formFieldValue === 'other' && (otherRadio === annotationId)) return 'radio';\n if (fieldName === 'other' && formFieldValue === '') return 'input';\n return false;\n};\n\n// mappedAnnotations - annotations for only one form field, not for the whole question\nexport const unsetPDFDetailsField = (\n fieldName, questionType, mappedAnnotations, widgetID, formFieldValue\n) => (pdfDetails = pdfDetailsDefault[questionType], questionAnnotations = []) => {\n switch (questionType) {\n case 'control_calculation':\n case 'control_textbox':\n case 'control_email':\n case 'control_textarea':\n case 'control_autoincrement':\n case 'control_yesno':\n return null;\n case 'control_dropdown':\n return includes(mappedAnnotations)(getOr(null, 'fieldName', pdfDetails))\n ? null\n : pdfDetails;\n case 'control_fullname':\n case 'control_address':\n case 'control_phone':\n case 'control_time':\n case 'control_datetime':\n case 'control_birthdate':\n return {\n ...pdfDetails,\n geometry: {\n pageIndex: pdfDetails.geometry.pageIndex,\n fieldRect: calculateBoundary(questionAnnotations\n // filter out fields' mapped annotations from\n .filter(a => notIncludes(mappedAnnotations)(a.id))\n .map(a => a.rect)),\n },\n pdfFields: {\n ...pdfDetails.pdfFields,\n [fieldName]: null,\n },\n };\n case 'control_radio':\n // TODO: handle with no annotation\n const pdfFieldName = getOr('', 'fieldName', pdfDetails);\n const otherRadioValue = getOr('', 'otherRadio.value', pdfDetails);\n const otherRadio = `${pdfFieldName}-${otherRadioValue}`;\n const isOther = isRadioOther(fieldName, formFieldValue, otherRadio, mappedAnnotations[0]);\n\n return {\n ...pdfDetails,\n geometry: { // TODO: geometry calculation is duplicated, refactor it out\n ...pdfDetails.geometry,\n fieldRect: calculateBoundary(questionAnnotations\n .filter(a => notIncludes(mappedAnnotations)(a.id))\n .map(a => a.rect)),\n },\n pdfFields: [\n ...unsetRadioField(\n pdfDetails.pdfFields, mappedAnnotations[0], pdfFieldName, isOther\n )\n ],\n otherInput: isOther === 'input' ? null : getOr(null, 'otherInput', pdfDetails),\n otherRadio: isOther === 'radio' ? ({ label: 'other', value: null }) : pdfDetails.otherRadio,\n };\n case 'control_checkbox':\n return {\n ...pdfDetails,\n geometry: {\n ...pdfDetails.geometry,\n fieldRect: calculateBoundary(questionAnnotations\n .filter(a => notIncludes(mappedAnnotations)(a.id))\n .map(a => a.rect)),\n },\n pdfFields: [\n ...unsetCheckboxField(pdfDetails.pdfFields, mappedAnnotations[0], fieldName)\n ],\n otherCheckbox: unsetOtherCheckbox(pdfDetails.otherCheckbox, fieldName, mappedAnnotations),\n otherInput: unsetOtherInput(pdfDetails.otherInput, fieldName, mappedAnnotations)\n };\n case 'control_matrix':\n return {\n ...pdfDetails,\n geometry: {\n ...pdfDetails.geometry,\n fieldRect: calculateBoundary(questionAnnotations\n .filter(a => notIncludes(mappedAnnotations)(a.id))\n .map(a => a.rect))\n },\n pdfFields: unsetMatrixAnnotation(pdfDetails.pdfFields.map(objToArray))(mappedAnnotations[0]),\n };\n case 'control_signature':\n return {\n ...pdfDetails,\n geometry: {\n ...pdfDetails.geometry,\n fieldRect: [],\n pageIndex: null\n },\n fieldName: null,\n };\n case 'control_widget':\n if (isWidgetSupported(widgetID)) {\n return {\n ...pdfDetails,\n geometry: {\n ...pdfDetails.geometry,\n fieldRect: [],\n pageIndex: null\n },\n fieldName: null,\n };\n }\n if (widgetID === WIDGET_KEYS.narrative_fields) {\n return {\n ...pdfDetails,\n geometry: {\n ...pdfDetails.geometry,\n fieldRect: calculateBoundary(questionAnnotations\n .filter(a => notIncludes(mappedAnnotations)(a.id))\n .map(a => a.rect)),\n pageIndex: null\n },\n pdfFields: pdfDetails.pdfFields.filter(a => notIncludes(mappedAnnotations)(a.pdfName)),\n fieldName: null,\n };\n }\n return pdfDetails;\n case 'control_spinner':\n case 'control_number':\n return includes(mappedAnnotations)(getOr(null, 'fieldName', pdfDetails))\n ? null\n : pdfDetails;\n case 'control_inline':\n return {\n ...pdfDetails,\n geometry: {\n ...pdfDetails.geometry,\n fieldRect: calculateBoundary(questionAnnotations\n .filter(a => notIncludes(mappedAnnotations)(a.id))\n .map(a => a.rect)),\n },\n pdfFields: pdfDetails.pdfFields.filter(a => notIncludes(mappedAnnotations)(a.name))\n };\n default:\n return pdfDetails;\n }\n};\n\n// possible return values: default || questionSelection || fieldSelection\nexport const highlightType = (selectedQuestionId, annotation, selectedFormField) => {\n const {\n id: annotationId,\n qid: annotationQid,\n type: annotationType,\n mouseOver: annotationMouseOver,\n selected: annotationSelected\n } = annotation || {};\n\n const { mappedAnnotations, pinnedAnnotations, fieldType } = selectedFormField || {};\n const isPinned = isArray(pinnedAnnotations) && includes(pinnedAnnotations)(annotationId);\n const isMapped = isArray(mappedAnnotations) && includes(mappedAnnotations)(annotationId);\n const isNewlyCreated = getOr(false, 'newlyCreated', annotation);\n\n if (isNewlyCreated) {\n return 'new';\n }\n\n if (isMapped || isPinned || annotationSelected) {\n return 'fieldSelection';\n }\n\n if (selectedQuestionId && (selectedQuestionId === annotationQid)) {\n return 'questionSelection';\n }\n\n if (fieldType\n && annotationMouseOver === true\n && selectedFormField.connectField\n && !canPin(selectedFormField, annotationType)) {\n return 'disabledSelection';\n }\n\n return 'default';\n};\n\nexport const clickedToMappingButton = target => (\n Boolean(target && target.className && target.className.indexOf('PDFMB-button') > -1)\n);\n\n// unselectFieldByTarget :: Target -> Boolean\nexport const unselectFieldByTarget = target => ( // TODO: test this function with contentEditable options\n !clickedToMappingButton(target)\n && target.contentEditable !== 'true' // Clicked inline edit for label\n);\n\nexport const startControlPoint = (start, end) => ({\n x: parseInt(((end.x - start.x) / 2) + start.x, 10),\n y: start.y,\n});\n\nexport const endControlPoint = (start, end) => ({\n x: parseInt(((end.x - start.x) / 2) + start.x, 10),\n y: end.y,\n});\n\nexport const isRandomToolActive = () => {\n return /showmode=pdf/.test(global.location.href);\n};\n\n// We could render mapping path but not navigation bar, so we handle this separately\nexport const canRenderAnnotationNav = (id, pinned, selectedFormField, selected = false, isAnnotationDragging = false) => {\n if (typeof id === 'undefined' || id === null || isRandomToolActive() || isAnnotationDragging) return false;\n\n // TODO: test this\n if (selected === true && pinned === false) return true;\n\n if (!selectedFormField) return false;\n\n const { pinnedAnnotations } = selectedFormField;\n\n if (!pinnedAnnotations) return false;\n\n // check if annotation is present in the selectedFormFields' pinnedAnnotations\n if (pinnedAnnotations.indexOf(id) === -1) return false;\n\n return pinned;\n};\n\nexport const isOrderable = (input, questionType) => (\n includes(['radio', 'checkbox'])(getOr('', 'type', input).toLowerCase())\n && notIncludes(['control_matrix'])(questionType)\n);\n\nexport const calculateOrder = document => (input, question) => {\n if (!question || !question.qid) return null;\n if (!input || !input.tagName || !input.type) return null;\n\n // find all input fields under question\n const fields = Array.from(\n document.querySelectorAll(`#id_${question.qid} ${input.tagName.toLowerCase()}[type=\"${input.type}\"]`)\n );\n\n const index = fields.findIndex(f => f.id === input.id);\n\n return (index !== -1)\n ? index + 1\n : null;\n};\n\nconst findFirstInputElement = document => qid => {\n const questionEl = document.querySelector(`#id_${qid}`);\n return questionEl && questionEl.querySelector(\n `*:not([style*=\"display:none\"]):not([style*=\"display: none\"]) > * > input[id*=\"${qid}\"], textarea, select`\n );\n};\n\nconst firstSelection = selectedFormField => (!selectedFormField || !selectedFormField.qid);\nconst differentSelection = (selectedFormField, qid, target) => (\n target.contentEditable === 'true' && (selectedFormField && selectedFormField.qid !== qid)\n);\n\nexport const findField = document => (target, questionType, qid, widgetID, selectedFormField) => {\n let field;\n switch (questionType) {\n case 'control_calculation':\n case 'control_textbox':\n case 'control_email':\n case 'control_fullname':\n case 'control_phone':\n case 'control_number':\n case 'control_spinner':\n case 'control_autoincrement':\n field = target.querySelector(`input[id*=\"${qid}\"]`);\n break;\n case 'control_address':\n if (isIncludesElements(target, ['select']) && target.className.indexOf('form-address-country') !== -1) {\n field = target;\n break;\n }\n if (target && target.dataset && target.dataset.type === 'country') {\n field = target.querySelector('select');\n break;\n }\n field = target.querySelector(`input[id*=\"${qid}\"], select[id*=\"${qid}\"]`);\n break;\n case 'control_datetime':\n field = target.querySelector(`*:not([style*=\"display:none\"]):not([style*=\"display: none\"]) > * > input[id*=\"${qid}\"]:not([type=\"date\"]), select`);\n break;\n case 'control_radio':\n case 'control_checkbox':\n if ((isIncludesElements(target, ['span']) && !target.className) || (target.className && target.className.indexOf('-label') > -1)) {\n field = target.parentElement.querySelector(`input[id*=\"${qid}\"]`);\n break;\n }\n if (isIncludesElements(target, ['input']) && target.className.indexOf('-other') !== -1) {\n field = target;\n break;\n }\n if (isIncludesElements(target, ['button'])) {\n return null;\n }\n field = target.querySelector(`input[id*=\"${qid}\"]`);\n break;\n case 'control_time':\n case 'control_birthdate':\n field = target.querySelector('select') || target.querySelector('input:not([type=\"hidden\"]');\n break;\n case 'control_dropdown':\n if (isIncludesElements(target, ['select'])) {\n field = target;\n break;\n }\n if (isIncludesElements(target, ['input'])) {\n return null;\n }\n field = target.querySelector('select');\n break;\n case 'control_textarea':\n field = target.querySelector(`textarea[id*=\"${qid}\"]`);\n break;\n case 'control_matrix':\n if (isIncludesElements(target, ['input', 'textarea', 'select'])) {\n field = target;\n break;\n }\n if (isIncludesElements(target, ['td'])) {\n field = target.querySelector(`input[id*=\"${qid}\"], select`);\n break;\n }\n field = target.querySelector(`input[id*=\"${qid}\"], select`);\n break;\n case 'control_widget':\n if (isWidgetSupported(widgetID)) {\n return document.querySelector(`#id_${qid}`);\n }\n return null;\n case 'control_yesno':\n case 'control_signature':\n if (target && target.className && target.className.indexOf('PDFMB-button') > -1) {\n return null;\n }\n return document.querySelector(`#id_${qid}`);\n case 'control_inline': // TODO: refactor\n // text element click (but the element is not label text)\n if (target && (target.type === 'text') && typeof target.className.indexOf === 'function'\n && target.className.indexOf('qb-checkbox-label') === -1\n && target.className.indexOf('qb-radiobox-label') === -1\n ) {\n field = target;\n break;\n }\n // checkbox or radio element click\n if (target && (target.type === 'checkbox' || target.type === 'radio')) {\n field = target;\n break;\n }\n // checkbox/radio label element or its container click\n if (target && target.className && typeof target.className.indexOf === 'function' && (\n target.className.indexOf('qb-checkbox-label') >= 0 // checkbox label click\n || target.className.indexOf('qb-radiobox-label') >= 0 // radio label click\n || target.parentElement.className.indexOf('qb-checkbox') >= 0 // checkbox click\n || target.parentElement.className.indexOf('qb-radio') >= 0 // radio click\n )) {\n field = target.parentElement.querySelector('input[type=\"checkbox\"], input[type=\"radio\"]');\n break;\n }\n return null;\n default:\n return null;\n }\n\n // We can't find any field, so we try to find a field further. (label-click and first time question click etc.)\n return (!field && (firstSelection(selectedFormField) || differentSelection(selectedFormField, qid, target)))\n ? findFirstInputElement(document)(qid)\n : field;\n};\n\nexport const getDefaultProps = props => {\n const {\n isHIPAA, isMobile, email, questions\n } = props;\n const updatedPdfProps = {};\n\n let hidePreview = false;\n let hidePDFThumbnail = false;\n let hideThankYouButtons = false;\n let importedPdfFileName = questions ? generateFileName(questions) : '';\n\n const enterpriseConfigs = global.JOTFORM_ENV === 'ENTERPRISE' && typeof global.CUSTOMIZED_CONFIGS === 'object' && global.CUSTOMIZED_CONFIGS;\n\n if (enterpriseConfigs) {\n const customImportedPDFSettings = enterpriseConfigs.CUSTOM_IMPORTED_PDF_SETTINGS;\n if (typeof customImportedPDFSettings === 'object') {\n hidePDFThumbnail = customImportedPDFSettings.importedPdfEnableThumbnail === 'No';\n hideThankYouButtons = customImportedPDFSettings.importedPdfEnableThankYouButtons === 'No';\n hidePreview = customImportedPDFSettings.importedPdfEnablePreviewButton === 'No';\n if (customImportedPDFSettings.importedPdfFileName) {\n importedPdfFileName = customImportedPDFSettings.importedPdfFileName;\n }\n }\n\n // HIDE_PREVIEW_PDF_BUTTON: deprecated config but some servers still use it.\n if (enterpriseConfigs.HIDE_PREVIEW_PDF_BUTTON) {\n hidePreview = enterpriseConfigs.HIDE_PREVIEW_PDF_BUTTON === true;\n }\n }\n // Enterprise customizations end.\n\n const importedPdfDefaultProps = {\n importedPdfIsConnected: isMobile ? 'No' : 'Yes',\n importedPdfEnableThumbnail: isMobile || hidePDFThumbnail ? 'No' : 'Yes',\n importedPdfEnablePreviewButton: isMobile || hidePreview ? 'No' : 'Yes',\n importedPdfEnableThankYouButtons: isMobile || hideThankYouButtons ? 'No' : 'Yes',\n importedPdfNotificationAttachment: isHIPAA || isMobile || !email ? 'No' : 'Yes',\n importedPdfAutoresponderAttachment: isHIPAA || isMobile ? 'No' : 'Yes',\n importedPDFStartButtonText: 'Start Filling',\n importedPdfFileName: importedPdfFileName\n };\n\n Object.entries(importedPdfDefaultProps).forEach(([key, value]) => {\n if (!props[key]) {\n updatedPdfProps[key] = value;\n }\n });\n return updatedPdfProps;\n};\n\n// Takes oldIndex and newIndex and returns pdfFields updated with this change in the order\nexport const updatePDFFieldsOrder = ({ oldIndex, newIndex }, pdfFields) => {\n if (newIndex >= pdfFields.length) return pdfFields;\n if (oldIndex >= pdfFields.length) return pdfFields;\n\n const me = pdfFields[oldIndex];\n\n // get the array without oldIndex value inside it\n const withoutOld = pdfFields.slice(0, oldIndex).concat(pdfFields.slice(oldIndex + 1));\n\n // insert the value into the newIndex position\n return withoutOld.slice(0, newIndex).concat([me]).concat(withoutOld.slice(newIndex));\n};\n\nexport const getOperationName = (propPath, text) => {\n if (/^options\\|\\|\\d/.test(propPath)) return 'create';\n if (/^options\\|\\d/.test(propPath) && text === '') return 'delete';\n if (/^options\\|\\d/.test(propPath) && text !== '') return 'update';\n return null;\n};\n\nconst operationSignMap = {\n create: '||',\n delete: '|',\n update: '|',\n};\n\nexport const getFieldIndex = (propPath, operation) => {\n const [, indexStr] = propPath.split(operationSignMap[operation]);\n return Number(indexStr);\n};\n\nexport const createOptionField = questionType => {\n if (questionType === 'control_checkbox') {\n return { name: null, value: '', exportValue: null };\n }\n if (questionType === 'control_radio') {\n return { label: null, value: null };\n }\n return {};\n};\n\nconst createField = (index, pdfFields, text, questionType) => (\n pdfFields.slice(0, index + 1).concat([createOptionField(questionType)]).concat(pdfFields.slice(index + 1))\n);\n\nconst updateFieldText = (questionType, text) => {\n if (questionType === 'control_checkbox') return { value: text };\n if (questionType === 'control_radio') return { label: text };\n};\n\nconst deleteField = (index, pdfFields) => pdfFields.slice(0, index).concat(pdfFields.slice(index + 1));\n\nconst updateField = (index, pdfFields, text, questionType) => (\n pdfFields.slice(0, index)\n .concat([{\n ...pdfFields[index],\n ...updateFieldText(questionType, text),\n }])\n .concat(pdfFields.slice(index + 1))\n);\n\nconst optionOperations = {\n create: createField,\n delete: deleteField,\n update: updateField,\n};\n\nexport const updatePDFFieldsForOption = ({ propPath, text }, questionType, pdfFields = []) => {\n const operation = getOperationName(propPath, text);\n\n if (operation === null) return pdfFields;\n\n const index = getFieldIndex(propPath, operation);\n\n if (index >= pdfFields.length) return pdfFields;\n\n return optionOperations[operation](index, pdfFields, text, questionType);\n};\n\nexport const shouldMappableUpdate = ({ prev, next }) => {\n const questionId = getOr(undefined, 'question.qid', prev);\n if ((prev.selectedQuestions && prev.selectedQuestions.indexOf(questionId) > -1) || (next.selectedQuestions && next.selectedQuestions.indexOf(questionId) > -1)) return true;\n return questionId !== prev.selectedQuestionId && questionId !== next.selectedQuestionId ? false : true;\n};\n\nexport const getCustomFieldType = (field, fieldType) => {\n const type = isElement(field) ? getOr('', 'dataset.type', field) : getOr(field, 'type', field);\n const selectedField = getOr('', 'selectedField', field);\n\n if (type === 'control_widget' && [WIDGET_KEYS.terms_conditions, WIDGET_KEYS.short_scrollable_terms].indexOf(selectedField) > -1) {\n return 'checkbox';\n }\n\n if (type === 'control_yesno' || type === 'control_time' || type === 'control_datetime') {\n return 'text';\n }\n\n return fieldType || '';\n};\n\nexport const getFieldType = field => (\n getCustomFieldType(field) || (field && field.type ? field.type : getOr('', 'tagName', field).toLowerCase())\n);\n\n// find all sub labels and add 'sub-label' class to each one\nexport const addSubLabelClasses = document => {\n [].forEach.call(document.querySelectorAll('.form-sub-label-container [contenteditable=\"true\"]'),\n i => (i && i.classList && i.classList.add && i.classList.add('sub-label')));\n};\n\nconst pdfDetailsFromFields = pdfDetails => pdfFields => ({\n ...pdfDetails,\n pdfFields: [...pdfFields]\n});\n\nconst inputTypeMapper = {\n 'Radio Button': () => ({ name: null, type: 'radio', value: null }),\n 'Check Box': () => ({ name: null, type: 'checkbox', value: null }),\n 'Text Box': () => ({ name: null, type: 'plaintext' }),\n 'Drop Down': () => ({ name: null, type: 'choice' }),\n 'Currency Box': () => ({ name: null, type: 'plaintext' }),\n 'Numeric Text Box': () => ({ name: null, type: 'plaintext' }),\n 'Emoji Slider': () => ({ name: null, type: 'plaintext' }),\n};\n\nconst getMatrixColumnOr = (orValue, { rowIndex, colIndex }, matrix) => (\n (matrix[rowIndex] && matrix[rowIndex][colIndex])\n ? matrix[rowIndex][colIndex]\n : orValue\n);\n\nconst createColumn = inputType => dcolumns => colIndex => (\n inputType === 'Dynamic'\n ? inputTypeMapper[dcolumns[colIndex].type]()\n : inputTypeMapper[inputType]()\n);\n\nconst colGenerator = ({ inputType, dcolumns }) => pdfFields => rowIndex => ({ colIndex }) => (\n has([rowIndex, colIndex])(pdfFields)\n // if the column is present in pdfFields we don't need to create a new column\n ? getMatrixColumnOr(null, { rowIndex, colIndex }, pdfFields)\n : createColumn(inputType)(dcolumns)(colIndex)\n);\n\nconst colMapper = generator => (colName, i) => generator({ colIndex: i, colName });\n\nconst rowMapper = generator => mcolumns => (row, rowIndex) => compose(\n map(colMapper(generator(rowIndex))),\n split('|'),\n)(mcolumns);\n\nexport const toMatrix = generator => ({ mrows, mcolumns }) => compose(\n map(rowMapper(generator)(mcolumns)),\n split('|'),\n)(mrows);\n\nconst mcolumnsFromdcolumns = compose(\n join('|'),\n map(column => column.text),\n);\n\n// in dynamic input table, the column creation doesn't update mcolumns in the redux state,\n// so we map the dcolumns to mcolumns to normalize it\nexport const normalizeColumns = inputType => dcolumns => ({ mrows, mcolumns }) => ({\n mcolumns: inputType === 'Dynamic' ? mcolumnsFromdcolumns(dcolumns) : mcolumns,\n mrows\n});\n\n// updatePDFDetailsForMatrix :: Object[question] -> Object[question]\nexport const updatePDFDetailsForMatrix = ({\n pdfDetails = pdfDetailsDefault.control_matrix, mrows, mcolumns, inputType, dcolumns\n}) => compose(\n pdfDetailsFromFields(pdfDetails),\n toMatrix(colGenerator({ inputType, dcolumns })(pdfDetails.pdfFields)),\n normalizeColumns(inputType)(dcolumns),\n)({ mrows, mcolumns });\n// We handle both matrix question create and update operation here. Because handling separatly row and column\n// create/update operations is very complex.\n\nexport const canUpdateQuestion = {\n control_matrix: payload => (\n // we want to update only when the user manuall add a row and column to the input table.\n // So we check payload for this.\n // TODO: convert this function into point free style, and write tests!\n Object.keys(getOr({}, '0', payload)).find(key => (/mrows|dcolumns|mcolumns/.test(key)))\n )\n};\n\nexport const pdfDetailsChanged = ({ prev, next }) => (\n (isDefined(prev) && isUndefined(next)) || (isUndefined(prev) && isDefined(next))\n);\n\nexport const updateAnnotationRectWithDeltaCoordinates = ({\n deltaLowerX = 0,\n deltaLowerY = 0,\n deltaUpperX = 0,\n deltaUpperY = 0\n}) => annotation => {\n const [lowerX = 0, lowerY = 0, upperX = 0, upperY = 0] = getOr([], 'rect', annotation);\n return {\n ...annotation,\n rect: [\n lowerX + deltaLowerX,\n lowerY + deltaLowerY,\n upperX + deltaUpperX,\n upperY + deltaUpperY\n ],\n jfCustom: 1\n };\n};\n\nexport const canMoveAnnotation = (annotation, pageSettings, { xAxis, yAxis }) => {\n const annotationRect = annotation.rect;\n return annotationRect[0] + xAxis >= 0\n && annotationRect[2] + xAxis <= pageSettings.width\n && annotationRect[1] + yAxis >= 0\n && annotationRect[3] + yAxis <= pageSettings.height;\n};\n\nconst getViewPort = ({ window, document }) => ({\n width: window.innerWidth || document.documentElement.clientWidth,\n height: window.innerHeight || document.documentElement.clientHeight,\n});\n\nconst boundingClientRect = element => element.getBoundingClientRect();\nconst getAnnotationZones = ({ document }) => s => (\n map(boundingClientRect)(Array.from(document.querySelectorAll(s)))\n);\n\nexport const findPageIndex = ({ window, document }) => {\n const zones = getAnnotationZones({ document })('.add-annotation-zone');\n const viewport = getViewPort({ window, document });\n return findPageIndexFromViewport(viewport)(zones);\n};\n\nexport const sanitizeCategoryFields = (groups, questions) => {\n // Filter fields which have prop 'showOnPDFImporter: false'\n const shouldAddtoList = field => (field.showOnPDFImporter === false ? !questions.some(q => q.type === field.type) : true);\n\n return groups.map(group => ({ ...group, categoryFields: group.categoryFields.filter(f => shouldAddtoList(f)) })).filter(g => g.categoryFields.length > 0);\n};\n\n// Clone the question, append to the document, changing it's id.\n// We will use this snapshot to build pdf fields size and structure\nexport const createQuestionDOMClone = question => sizes => {\n const questionDOM = global.document.querySelector(`#id_${question.qid}`);\n const cloned = questionDOM.clone(true);\n\n cloned.setAttribute('data-cloned', true);\n cloned.id = `${cloned.id}-cloned`;\n\n const parent = global.document.querySelector('ul.form-section');\n parent.appendChild(cloned);\n\n Object.keys(sizes).forEach((fieldName) => { // eslint-disable-line\n cloned.querySelectorAll(`input[type=\"${fieldName}\"], textarea[type=\"${fieldName}\"]`).forEach(f => {\n if (f.type === 'radio' || f.type === 'checkbox') {\n const width = (sizes[fieldName].height > 19) ? sizes[fieldName].height : 19;\n if (width) f.style.width = `${width}px`; // eslint-disable-line\n } else {\n const width = getWidthByHeight({ offsetHeight: f.offsetHeight, offsetWidth: f.offsetWidth })(sizes[fieldName].height);\n if (width) f.style.width = `${width}px`; // eslint-disable-line\n }\n // we have to find height after width because we need field.offsetHeight to calculate the width\n const height = (sizes[fieldName].height > 19) ? sizes[fieldName].height : 19;\n if (height) f.style.height = `${height}px`; // eslint-disable-line\n });\n if (fieldName === 'text') { // we can't select dropdown with type selector, so we handle it manually here\n cloned.querySelectorAll('select').forEach(f => {\n const width = getWidthByHeight({ offsetHeight: f.offsetHeight, offsetWidth: f.offsetWidth })(sizes[fieldName].height);\n if (width) f.style.width = `${width}px`; // eslint-disable-line\n });\n }\n });\n\n cloned.querySelectorAll('input[type=\"email\"], input[type=\"tel\"], input[type=\"number\"]').forEach(f => {\n const width = getWidthByHeight({ offsetHeight: f.offsetHeight, offsetWidth: f.offsetWidth })(sizes.text.height);\n if (width) f.style.width = `${width}px`; // eslint-disable-line\n\n const { height } = sizes.text;\n if (height) f.style.height = `${height}px`; // eslint-disable-line\n });\n\n if (question.type === 'control_inline') {\n const toolbar = cloned.querySelector('.FITB-TBCont');\n const inline = cloned.querySelector('.ql-editor p');\n if (toolbar) toolbar.remove(); // toolbar\n\n if (inline) {\n inline.childNodes.forEach(n => {\n if (n.nodeType === 3) n.remove(); // texts\n });\n inline.childNodes.forEach(n => {\n if (n.nodeType === 1) n.style.marginRight = '6px'; // eslint-disable-line\n });\n }\n }\n\n return cloned;\n};\n\nexport const removeQuestionDOMClone = cloned => {\n const parent = global.document.querySelector('ul.form-section');\n parent.removeChild(cloned);\n};\n\nconst getCursorTypeFromFormField = selectedFormField => {\n if (selectedFormField.questionType === 'control_widget') {\n if ([WIDGET_KEYS.terms_conditions, WIDGET_KEYS.short_scrollable_terms].indexOf(selectedFormField.widgetId) > -1) {\n return 'checkbox';\n }\n }\n return selectedFormField.fieldType;\n};\n\nexport const PDFImportClassList = (importedPDF, selectedFormField) => {\n const showOnlyPDF = isRandomToolActive();\n\n const isConnectMode = selectedFormField && selectedFormField.connectField;\n const cursorType = isConnectMode ? getCursorTypeFromFormField(selectedFormField) : null;\n const classList = [\n 'isPDFImporter',\n importedPDF && 'isPDFReady',\n showOnlyPDF && 'randomMode',\n isConnectMode && `PDFConnectMode-${cursorType}`\n ].filter(a => a).join(' ');\n\n return classList;\n};\n\nexport const shouldActivatePageDetectionLimit = (state, pageIndex) => {\n const pageNumber = pageIndex || findPageIndex({ window: global.window, document: global.document }) + 1;\n const isGuest = getOr('', 'user.accountType', state) === 'GUEST';\n const variantCode = getOr('', 'pdfImport.ui.variantCode', state);\n return pageNumber > LIMIT_BY_CODE[variantCode] && isGuest;\n};\n\nexport const shouldSkipAnnotationCreation = isDuplicated => state => {\n const deviceType = getOr('', 'ui.deviceType', state);\n const device = getOr('', 'ui.device', state);\n const isMobile = device === 'isMobile' || deviceType !== 'mouseOnly';\n\n return (\n isDuplicated // Skip annotation add when newly created field is duplicated\n || isMobile // Skip annotation add when field is added on mobile\n || getImportedPdfIsConnected(state) !== 'Yes'\n || shouldActivatePageDetectionLimit(state) // Skip annotation when guest user exceed page detection limit\n );\n};\n\nexport const getFileAsTypedArray = file => new Promise((resolve, reject) => {\n const reader = new window.FileReader();\n\n reader.readAsArrayBuffer(file);\n\n reader.onload = e => {\n const typedArray = new Uint8Array(e.target.result);\n resolve(typedArray);\n };\n\n reader.onerror = () => {\n reject(`Failed to read file! ${reader.error}`);\n };\n});\n\nexport const isFileProtected = fileData => new Promise((resolve, reject) => {\n fetchPDFJSWorker(global.pdfjsLib, global.pdfjsLib.version);\n const loadingTask = global.pdfjsLib.getDocument({ data: fileData, enablePermissions: true });\n loadingTask.onPassword = (updatePassword, result) => {\n if (result === 1) {\n resolve({ isProtected: true });\n }\n };\n loadingTask.promise\n .then(doc => doc.getPermissions())\n .then(permissions => {\n resolve({ isProtected: false, modifyContent: !Array.isArray(permissions) });\n }).catch(e => {\n reject(e.message);\n });\n});\n\nexport const isPasswordCorrect = fileData => password => new Promise((resolve, reject) => {\n fetchPDFJSWorker(global.pdfjsLib, global.pdfjsLib.version);\n const loadingTask = global.pdfjsLib.getDocument({ data: fileData, password, enablePermissions: true });\n loadingTask.onPassword = (updatePassword, result) => {\n if (result === 2) {\n resolve(false);\n }\n };\n loadingTask.promise\n .then(() => {\n resolve(true);\n }).catch(e => {\n reject(e.message);\n });\n});\n\nexport const getDefaultQuestions = title => {\n return [{\n order: 1,\n pdfDetails: {},\n qid: 1,\n text: title,\n type: 'control_head',\n useAsFormTitle: true\n }, {\n buttonAlign: 'Auto',\n buttonStyle: 'None',\n clear: 'No',\n clearText: 'Clear Form',\n encryptIcon: 'No',\n name: 'submit',\n order: 2,\n preview: 'Yes',\n previewText: 'Preview PDF',\n print: 'No',\n printText: 'Print Form',\n qid: 2,\n text: 'Submit',\n type: 'control_button'\n }];\n};\n\nconst getAnnotationDataAttr = annotationId => `[data-annotation-id=\"${annotationId}\"]`;\n\nconst isInner = document => outerElemQuery => innerElemQuery => {\n const containerElem = document.querySelector(outerElemQuery);\n const innerElem = document.querySelector(innerElemQuery);\n\n // If the annotation is not rendered yet, we cannot check it's geometry. So we skip this test for this case.\n if (!innerElem || !innerElem.getBoundingClientRect) return true;\n\n const inner = innerElem.getBoundingClientRect();\n const outer = containerElem.getBoundingClientRect();\n\n return (\n inner.top >= outer.top\n && inner.left >= outer.left\n && inner.bottom <= (outer.bottom)\n && inner.right <= (outer.right)\n );\n};\n\nconst isInnerElem = document => aId => {\n const innerElemQuery = getAnnotationDataAttr(aId);\n return isSelectorValid(innerElemQuery) && isInner(document)('.PDFV-canvasContainer')(innerElemQuery);\n};\n\nexport const countHasNewlyCreated = document => newlyCreatedAnnotations => (\n newlyCreatedAnnotations.filter(isInnerElem(document)).length\n);\n\nexport const isDifferentAnnDragging = (hoveredAnnId, selectedAnn, isDragging) => (\n hoveredAnnId && selectedAnn && isDragging && selectedAnn.map(a => a.id).indexOf(hoveredAnnId) === -1\n);\n\nexport const pull = (items = []) => el => {\n const index = items.indexOf(el);\n return index !== -1 ? [...items.slice(0, index), ...items.slice(index + 1, items.length)] : items;\n};\n\nexport const getPropFromFirstSelected = ann => prop => (\n getOr(null, `0.${prop}`, ann)\n);\n\nexport const hasNoDiff = deltaRect => Object.values(deltaRect).every(x => x === 0);\n","const CONDITION_NAME_MAP = {\n field: 'Show/Hide Field',\n calculation: 'Update/Calculate Field',\n email: 'Change E-mail Recipient',\n mask: 'Enable/Require Field',\n require: 'Enable/Require Field',\n page: 'Skip To/Hide A Page',\n url: 'Change \"Thank You\" Page',\n message: 'Change \"Thank You\" Page'\n};\n\nexport const FIELD_NAME_MAP = {\n formCondition: ({ properties, prevValue, value }) => {\n const exactType = properties?.type || prevValue?.type || value?.type;\n return exactType && CONDITION_NAME_MAP[exactType] ? `${CONDITION_NAME_MAP[exactType]} Condition` : 'Condition';\n },\n formLanguage: 'Form Languages',\n form_injectCSS: 'Form Inject CSS',\n form_thanktext: 'Thankyou Text',\n form_thankurl: 'Thankyou Redirect URL',\n form_activeRedirect: 'Thankyou Action',\n form_sendpostdata: 'Form Send Post Data',\n form_useJotformSign: 'Jotform Sign Usage',\n form_useJotformSignAuditTrail: 'Jotform Sign Send Audit Trail',\n form_useJotformSignEmail: 'Jotform Sign Selected Email Field',\n form_status: 'Form Status',\n form_expireDate: 'Form Expire Date',\n form_messageOfLimitedForm: 'Form Message Of Limited Form',\n form_pagetitle: 'Form Title',\n form_title: 'Form Title',\n form_formType: 'Form Title',\n form_highlightLine: 'Form Highlight Effect',\n form_uniqueField: 'Form Unique Field',\n form_unique: 'Form Unique',\n control_button: 'Submit Button',\n control_2co: '2Checkout',\n control_address: 'Address',\n control_appointment: 'Appointment',\n control_authnet: 'Authorize.Net',\n control_autocomp: 'Auto complete',\n control_autoincrement: 'Auto increment',\n control_birthdate: 'Birthday',\n control_bluepay: 'BluePay Payments',\n control_bluesnap: 'BlueSnap Payments',\n control_firstdata: 'First Data Payments',\n control_paypalInvoicing: 'PayPal Invoicing Payments',\n control_gocardless: 'GoCardless Payments',\n control_mollie: 'Mollie Payments',\n control_payu: 'PayU Payments',\n control_payuMoney: 'PayU Money Payments',\n control_pagseguro: 'PagSeguro Payments',\n control_moneris: 'Moneris Payments',\n control_sofort: 'Sofort Payments',\n control_sensepass: 'Sensepass Payments',\n control_skrill: 'Skrill Payments',\n control_paysafe: 'Paysafe Payments',\n control_iyzico: 'Iyzico Payments',\n control_payjunction: 'PayJunction Payments',\n control_chargify: 'Chargify Payments',\n control_wepay: 'Chase Wepay Payments',\n control_braintree: 'Braintree Payments',\n control_cardconnect: 'CardConnect Payments',\n control_calculation: 'Calculation',\n control_captcha: 'Captcha',\n control_checkbox: 'Multiple Choice',\n control_clear: 'Clear',\n control_clickbank: 'Clickbank',\n control_collapse: 'Section Collapse',\n control_datetime: 'Date Picker',\n control_dwolla: 'Dwolla Payments',\n control_echeck: 'eCheck Payments',\n control_eway: 'Eway Payments',\n control_filepickerIO: 'File Picker',\n control_fileupload: 'File Upload',\n control_footer: 'Footer',\n control_fullname: 'Full Name',\n control_geolocation: 'Geo location',\n control_googleco: 'Google',\n control_grading: 'Grading',\n control_helper: 'Helper',\n control_hidden: 'Hidden',\n control_inline: 'Fill in the Blank',\n control_image: 'Image',\n control_imagechoice: 'Image Choice',\n control_location: 'Location',\n control_matrix: 'Input Table',\n control_onebip: 'Onebip Payments',\n control_pagebreak: 'Page Break',\n control_payment: 'Product List',\n control_paymentwall: 'Paymentwall Payments',\n control_paypal: 'PayPal Payments',\n control_paypalexpress: 'PayPal Express',\n control_paypalpro: 'PayPal Pro',\n control_paypalcomplete: 'Paypal Complete',\n control_paymentmethods: 'Payment Methods',\n control_cybersource: 'Cyber Source',\n control_paypalSPB: 'PayPal Smart Buttons',\n control_phone: 'Phone',\n control_radio: 'Single Choice',\n control_range: 'Range fields',\n control_scale: 'Scale Rating',\n control_screenshot: 'Screenshot',\n control_separator: 'Separator',\n control_signature: 'Signature',\n control_slider: 'Slider',\n control_spinner: 'Spinner',\n control_square: 'Square Payments',\n control_stripe: 'Stripe Payments',\n control_stripeCheckout: 'Stripe Checkout Payments',\n control_stripeACH: 'Stripe ACH Payments',\n control_stripeACHManual: 'Stripe ACH Manual Payments',\n control_payfast: 'Payfast Payments',\n control_text: 'Paragraph',\n control_textbox: 'Short Text',\n control_time: 'Time',\n control_widget: 'Widget',\n control_worldpay: 'Worldpay Payments',\n control_worldpayus: 'Worldpay US Payments',\n control_head: 'Heading',\n control_email: 'Email',\n control_dropdown: 'Dropdown',\n control_textarea: 'Long Text',\n control_rating: 'Star Rating',\n control_number: 'Number',\n control_divider: 'Divider',\n control_yesno: 'Yes/No Question',\n control_mixed: 'Multi-line Question',\n product: 'Product',\n control_emojislider: 'Emoji Slider',\n};\n\nexport const SPECIAL_NAME_MAP = {\n form_welcomePage: 'Welcome Page was changed',\n form_thankYouPage: 'Thankyou Page was changed',\n form_styleJSON: 'Form Styles was changed',\n form_emails: 'Form Emails was changed',\n};\n\n/**\n * These are special actions with special object.\n*/\nexport const SPECIAL_NAMES = [\n 'form_welcomePage',\n 'form_thankYouPage',\n 'form_styleJSON',\n];\n\n/**\n * These are shown iff they are the only\n * changes present.\n */\nexport const SINGULAR_NAMES = [\n 'form_emails'\n];\n\n/**\n * Revision types to be normalized when\n * their IDs are missing.\n */\nexport const NORMALIZE_IDS = [\n 'form_injectCSS',\n 'form_thanktext',\n 'form_thankurl',\n 'form_activeRedirect',\n 'form_sendpostdata',\n 'form_useJotformSign',\n 'form_useJotformSignAuditTrail',\n 'form_useJotformSignEmail',\n 'form_status',\n 'form_expireDate',\n 'form_highlightLine',\n 'form_pagetitle',\n 'form_title',\n 'form_formType',\n 'form_unique',\n 'form_uniqueField',\n 'form_messageOfLimitedForm'\n];\n\n/**\n * Always show these items even if\n * their siblings are more \"important\".\n */\nexport const ALWAYS_SHOW = [\n 'form_thanktext'\n];\n\nexport const PAYMENT_PROPS = {\n STOCK_PROPS: ['available_stock', 'isLowStockAlertEnabled', 'isStockControlEnabled', 'lowStockValue'],\n OPTION_PROPS: ['options', 'hasQuantity', 'hasSpecialPricing', 'hasExpandedOption'],\n CATEGORY_PROPS: ['cid', 'connectedCategories', 'connectedProducts', 'corder']\n};\n","import PropTypes from 'prop-types';\nimport React, { Component, createRef } from 'react';\nimport { ActionButtonsWizard } from '@jotforminc/jotform-common';\nimport { CardThankYou } from '@jotforminc/builder-components';\nimport { t } from '@jotforminc/translation';\nimport { closest, escapeHTML } from '@jotforminc/utils';\nimport { IconPlus, IconArrowPointerBoxFilled, IconExclamationCircleFilled } from '@jotforminc/svg-icons';\nimport DeleteActionButtonsDialog from '../DeleteActionButtonsDialog';\nimport {\n clickedOnScrollbar, ellipsisTruncate, isAnyThankyouSelectedPDFMismatches, isBrightColor, matchedThankyouSelectedPDFs\n} from '../../libs/Utils';\n\nimport InlineEditor from '../form/InlineEditor';\n\nclass ThankYouPage extends Component {\n constructor(props) {\n super(props);\n if (!this.props.settingsThankYou) {\n this.toggleVisibilityButtonClick = this.toggleVisibilityButtonClick.bind(this);\n this.listenOutsideClick = this.listenOutsideClick.bind(this);\n }\n this.renderThankYouPage = this.renderThankYouPage.bind(this);\n this.changeThankYouMode = this.changeThankYouMode.bind(this);\n this.onModeSelectionChange = this.onModeSelectionChange.bind(this);\n this.onRedirectInputBlur = this.onRedirectInputBlur.bind(this);\n this.onRedirectInputChange = this.onRedirectInputChange.bind(this);\n this.showActionButtonsWizard = this.showActionButtonsWizard.bind(this);\n this.handleAddFieldsButtonClick = this.handleAddFieldsButtonClick.bind(this);\n this.handleActionButtonPropertiesClick = this.handleActionButtonPropertiesClick.bind(this);\n this.setHighlightID = this.setHighlightID.bind(this);\n this.setDialogProps = this.setDialogProps.bind(this);\n const thankYouMode = this.props.formProperties.thankYouPage ? this.props.formProperties.thankYouPage[0].type : 'text';\n const redirectInputValue = this.props.formProperties.thankYouPage ? this.props.formProperties.thankYouPage[0].redirectLink : 'https://www.jotform.com';\n const xssCheckedRedirectInputValue = redirectInputValue;\n\n this.actionButtonsWizardRef = createRef();\n this.isActionButtonsWarningSeen = createRef();\n this.state = {\n mode: thankYouMode,\n redirectInputValue,\n xssCheckedRedirectInputValue,\n dialogProps: {\n itemID: '',\n itemTitle: '',\n step: ''\n },\n highlightID: '',\n isDeleteDialogVisible: false\n };\n }\n\n onRedirectInputBlur() {\n this.props.updateFormPropertyMethod({ thankurl: this.state.xssCheckedRedirectInputValue, thankYouPage: [{ redirectLink: this.state.xssCheckedRedirectInputValue }] });\n }\n\n onRedirectInputChange(e) {\n this.setState({\n redirectInputValue: e.target.value,\n xssCheckedRedirectInputValue: escapeHTML(e.target.value)\n });\n }\n\n handleAddFieldsButtonClick(e) {\n e.stopPropagation();\n this.props.toggleOwnWizard('fields', 'cardthankyoupagewizard');\n }\n\n onModeSelectionChange(e) {\n this.changeThankYouMode(e.target.value);\n }\n\n checkCurrentMode() {\n const currentModeOption = this.state.mode;\n if (this.value === currentModeOption) {\n return true;\n }\n return false;\n }\n\n changeThankYouMode(selectedMode) {\n const currentMode = this.state.mode;\n if (currentMode === selectedMode) { return; }\n this.setState({ mode: selectedMode });\n this.props.updateFormPropertyMethod({\n activeRedirect: selectedMode === 'text' ? 'thanktext' : 'thankurl',\n thankurl: this.state.xssCheckedRedirectInputValue,\n thankYouPage: [{ type: selectedMode }]\n });\n }\n\n toggleVisibilityButtonClick(e) {\n e.stopPropagation();\n this.props.toggleVisibilityMethod('showThankYouPage', !this.props.showThankYouPage);\n }\n\n listenOutsideClick(e) {\n global.document.activeElement.blur();\n e.stopPropagation();\n // prevent closing thank you page wizard when user clicks wizard itself\n if (!closest(e.target, '.jfThankYou')\n && !closest(e.target, '.thankyoupagewizard')\n && !closest(e.target, '.thankYouControl')\n && !closest(e.target, '.rightPanel')\n && !closest(e.target, '.thankyou-page-content') // #1438903\n && !closest(e.target, '.thankyou-page-card-action-buttons-container') // action buttons wizard\n && !closest(e.target, '.resourceDropdown-list') // action buttons wizard\n && !closest(e.target, '.matchDropdown-list') // action buttons wizard\n && !closest(e.target, '.ReactModal__Content') // action buttons wizard\n && !closest(e.target, '.forWizard')\n && !clickedOnScrollbar(e.clientX)\n && !(this.props.isRightPanelOpen && this.props.rightPanelMode === 'design')\n ) {\n this.toggleVisibilityButtonClick(e);\n global.removeEventListener('mousedown', this.listenOutsideClick);\n }\n }\n\n renderRedirectInput() {\n const descriptionText = 'Redirect submitters to an external link';\n const subDescriptionText = 'After someone submits their responses they will redirect to the URL below';\n return (\n
    \n

    {t(descriptionText)}

    \n

    {t(subDescriptionText)}

    \n \n
    \n );\n }\n\n renderModeChanger() {\n const thankYouOption = 'Show a Thank You Page after submission';\n const thankYouTruncated = window?.innerWidth < 992 ? t(thankYouOption) : ellipsisTruncate(t(thankYouOption), 49);\n const redirectOption = 'Redirect to an external link after submission';\n const redirectTruncated = window?.innerWidth < 992 ? t(redirectOption) : ellipsisTruncate(t(redirectOption), 49);\n const currentMode = this.state.mode;\n return (\n
    \n \n
    \n ) : null}\n \n {rendered}\n
    \n \n );\n }\n\n render() {\n const { welcomePage, formWidth, styleJSON } = this.props.formProperties;\n const isWelcomePageExists = welcomePage && welcomePage[0].isActive == true; //eslint-disable-line\n const { showThankYouPage } = this.props;\n const text = t('EDIT THANK YOU PAGE');\n const brightColor = styleJSON ? isBrightColor(styleJSON['pageBg-colorEnd'], 0.8) : true;\n let rendered;\n if (!showThankYouPage) {\n rendered = (\n \n \n {text}\n \n \n );\n } else {\n if (!this.props.settingsThankYou) {\n global.addEventListener('mousedown', this.listenOutsideClick);\n }\n rendered = this.renderThankYouPage();\n }\n return (\n \n {rendered}\n \n );\n }\n}\n\nThankYouPage.propTypes = {\n showThankYouPage: PropTypes.bool,\n settingsThankYou: PropTypes.bool,\n formProperties: PropTypes.shape(),\n toggleVisibilityMethod: PropTypes.func,\n updateFormPropertyMethod: PropTypes.func,\n allowNewThankYouPage: PropTypes.bool,\n onActionButtonDelete: PropTypes.func,\n sendAnalytics: PropTypes.func,\n hideActionButtons: PropTypes.bool\n};\n\nexport default ThankYouPage;\n","","/* eslint max-len: [\"error\", 680] */\nimport React from 'react';\nimport {\n IconHeadingSquareFilled,\n IconSquareUserFilled,\n IconEnvelopeClosedFilled,\n IconLocationPinFilled,\n IconPhoneFilled,\n IconCalendarFilled,\n IconCalendarCheckFilled,\n IconPenSignFilled,\n IconFillInTheBlank,\n IconCartShoppingFilled,\n IconInputTextShort,\n IconInputTextLong,\n IconText,\n IconDropdownFilled,\n IconSingleSelectionFilled,\n IconCheckSquareFilled,\n IconNumberSquareFilled,\n IconImageFilled,\n IconFolderCaretUpFilled,\n IconClockFilled,\n IconCaptchaFilled,\n IconCaretUp19,\n IconLabelSendFilled,\n IconTable,\n IconStarPlusFilled,\n IconChartBarFilled,\n IconMinus,\n IconDividerFilled,\n IconArrowsUpDownToLine,\n IconThumbsUpDown,\n IconFaceSmileFilled,\n IconImageCheckFilled,\n IconClipboardPlusFilled,\n LogoIyzicoLight,\n LogoSquareLogomarkLight,\n LogoPaypalBusinessLogomarkColor,\n LogoPaypalPersonalLogomarkColor,\n LogoPaypalInvoicingLogomarkColor,\n LogoPaypalCheckoutLogomarkColor,\n LogoPaypalProLogomarkColor,\n LogoStripeLogomarkLight,\n LogoStripeCheckoutLogomarkLight,\n LogoStripeAchmLogomarkLight,\n LogoStripeAchLogomarkLight,\n LogoBraintreeLogomarkLight,\n LogoMollieLogomarkLight,\n LogoCybersourceLogomarkLight,\n LogoEwayLogomarkLight,\n LogoPayuLogomarkLight,\n LogoPayuIndiaLogomarkColor,\n LogoBluesnapLogomarkLight,\n LogoMonerisLogomarkLight,\n LogoGocardlessLogomarkColor,\n LogoVenmoLogomarkLight,\n LogoCashappLogomarkColor,\n LogoPagseguroLogomarkColor,\n LogoFirstdataLogomarkLight,\n LogoCardconnectLogomarkLight,\n LogoPaysafeLogomarkLight,\n LogoSkrillLogomarkLight,\n LogoChargifyLogomarkLight,\n LogoPayjunctionLogomarkLight,\n LogoClickbankLogomarkLight,\n LogoPaymentwallLogomarkLight,\n LogoPayfastDark,\n LogoApplegooglepayColor,\n LogoBluepayLogomarkLight,\n LogoOnebipLogomarkLight,\n LogoKlarnaLogomarkDark,\n LogoSensepassLogomarkColor,\n LogoAuthorizenetLogomarkLight,\n LogoEcheckLogomarkLight,\n LogoWorldpayUsLogomarkLight,\n LogoWorldpayUkLogomarkLight,\n LogoPurchaseorderLogomarkDark,\n Logo2CheckoutLogomarkLight,\n LogoAfterpayLogomarkColor,\n LogoAfterpayLogomarkDark\n} from '@jotforminc/svg-icons';\nimport { getUrlParameter } from '@jotforminc/utils';\n// If you want to hide a element in cardFormElements, add cardElement: false,\n// Or if you want to hide element in v3 Forms, add legacyElement: false\n\nconst isSmartFlow = getUrlParameter('smartFlow');\n\nexport const FormFields = [\n {\n categoryName: 'Ready to Use Elements',\n isCategoryNameHidden: true,\n categoryFields: [\n {\n type: 'control_head',\n name: 'Heading',\n iconNew: \n },\n {\n type: 'control_fullname',\n name: 'Full Name',\n iconNew: \n },\n {\n type: 'control_email',\n name: 'Email',\n iconNew: ,\n additionalParams: {\n workflow: {\n order: 2,\n }\n }\n },\n {\n type: 'control_address',\n name: 'Address',\n iconNew: \n },\n {\n type: 'control_phone',\n name: 'Phone',\n\n iconNew: \n },\n {\n type: 'control_datetime',\n name: 'Date Picker',\n iconNew: \n },\n {\n type: 'control_appointment',\n name: 'Appointment',\n iconNew: \n },\n {\n type: 'control_signature',\n name: 'Signature',\n iconNew: \n },\n {\n type: 'control_inline',\n name: 'Fill in the Blank',\n iconNew: ,\n legacyElement: true,\n },\n {\n type: 'control_payment',\n name: 'Product List',\n isPassive: true,\n isPaymentInBasic: true,\n // eslint-disable-next-line max-len\n currencies: 'USD;EUR;AED;AFN;ALL;AMD;ANG;AOA;ARS;AUD;AWG;AZN;BAM;BBD;BDT;BGN;BHD;BIF;BMD;BND;BOB;BRL;BSD;BTN;BWP;BYR;BZD;CAD;CDF;CHF;CLP;CNY;COP;CRC;CUC;CUP;CVE;CZK;DJF;DKK;DOP;DZD;EGP;ERN;ETB;FJD;FKP;GBP;GEL;GHS;GIP;GMD;GNF;GTQ;GYD;HKD;HNL;HTG;HUF;IDR;ILS;INR;IQD;IRR;ISK;JMD;JOD;JPY;KES;KGS;KHR;KMF;KPW;KRW;KWD;KYD;KZT;LAK;LBP;LKR;LRD;LSL;LYD;MAD;MDL;MGA;MKD;MMK;MNT;MOP;MRO;MUR;MVR;MWK;MXN;MYR;MZN;NAD;NGN;NIO;NOK;NPR;NZD;OMR;PAB;PEN;PGK;PHP;PKR;PLN;PYG;QAR;RON;RSD;RUB;RWF;SAR;SBD;SCR;SDG;SEK;SGD;SHP;SLL;SOS;SRD;STD;SVC;SYP;SZL;THB;TJS;TMM;TMT;TND;TOP;TRY;TTD;TWD;TZS;UAH;UGX;UYU;UZS;VEF;VND;VUV;WST;XAF;XCD;XOF;XPF;YER;ZAR;ZMW;ZWD',\n productTypes: 'product;subscription;custom;donation',\n isAuthorizationExist: 'No',\n paymentType: 'product',\n iconNew: \n }\n ]\n },\n {\n categoryName: 'Basic Elements',\n categoryFields: [\n {\n type: 'control_textbox',\n name: 'Short Text',\n iconNew: ,\n additionalParams: {\n workflow: {\n order: 0,\n }\n }\n },\n {\n type: 'control_textarea',\n name: 'Long Text',\n iconNew: ,\n additionalParams: {\n workflow: {\n order: 1,\n }\n }\n },\n {\n type: 'control_text',\n name: 'Paragraph',\n isPassive: true,\n iconNew: ,\n additionalParams: {\n workflow: {\n order: 3,\n }\n }\n },\n {\n type: 'control_dropdown',\n name: 'Dropdown',\n iconNew: ,\n additionalParams: {\n workflow: {\n order: 4,\n }\n }\n },\n {\n type: 'control_dropdown',\n name: 'Smart Field',\n iconNew: ,\n isHidden: !isSmartFlow,\n isSmart: true,\n isBeta: true,\n },\n {\n type: 'control_yesno',\n name: 'Yes/No Question',\n iconNew: ,\n cardElement: true,\n legacyElement: false\n },\n {\n type: 'control_radio',\n name: 'Single Choice',\n iconNew: ,\n additionalParams: {\n workflow: {\n order: 5,\n }\n }\n },\n {\n type: 'control_checkbox',\n name: 'Multiple Choice',\n iconNew: ,\n additionalParams: {\n workflow: {\n order: 6,\n }\n }\n },\n {\n type: 'control_imagechoice',\n name: 'Image Choice',\n iconNew: ,\n // adminOnly: true,\n legacyElement: false,\n cardElement: true\n },\n {\n type: 'control_mixed',\n name: 'Multi-line Question',\n iconNew: ,\n legacyElement: false\n },\n // {\n // type: 'control_imagechoice',\n // name: 'Choice With Image',\n // icon: 'v4_checkbox'\n // },\n {\n type: 'control_number',\n name: 'Number',\n iconNew: \n },\n {\n type: 'control_image',\n name: 'Image',\n iconNew: ,\n isPassive: true,\n },\n {\n type: 'control_fileupload',\n name: 'File Upload',\n additionalParams: {\n workflow: {\n order: 7,\n }\n },\n iconNew: \n },\n {\n type: 'control_time',\n name: 'Time',\n iconNew: \n },\n {\n type: 'control_captcha',\n name: 'Captcha',\n iconNew: \n },\n {\n type: 'control_spinner',\n name: 'Spinner',\n iconNew: ,\n cardElement: false,\n },\n {\n type: 'control_button',\n name: 'Submit',\n iconNew: ,\n cardElement: false\n },\n ],\n type: 'basic'\n },\n {\n categoryName: 'Survey Elements',\n categoryFields: [\n {\n type: 'control_matrix',\n name: 'Input Table',\n iconNew: \n },\n {\n type: 'control_emojislider',\n name: 'Emoji Slider',\n iconNew: ,\n cardElement: true,\n legacyElement: false\n },\n {\n type: 'control_rating',\n name: 'Star Rating',\n iconNew: \n },\n {\n type: 'control_scale',\n name: 'Scale Rating',\n iconNew: ,\n cardElement: false\n }\n ]\n },\n {\n categoryName: 'Page Elements',\n cardElement: false,\n categoryFields: [\n {\n type: 'control_divider',\n name: 'Divider',\n iconNew: \n },\n {\n type: 'control_collapse',\n name: 'Section Collapse',\n iconNew: \n },\n {\n type: 'control_pagebreak',\n name: 'Page Break',\n iconNew: \n }\n ]\n }\n];\n\nexport const PaymentFields = [\n {\n type: 'control_square',\n name: 'Square',\n logoSvg: ,\n isPassive: false,\n currencies: 'USD;EUR;AUD;CAD;BRL;CZK;DKK;GBP;HKD;HUF;ILS;JPY;MYR;MXN;TWD;NZD;NOK;PHP;PLN;RUB;SGD;SEK;CHF;THB;TRY',\n productTypes: 'product;subscription;custom;donation',\n isAuthorizationExist: 'Yes',\n APMs: [['Credit Card']],\n },\n {\n type: 'control_paypalcomplete',\n name: 'PayPal Business',\n logoSvg: ,\n isPassive: false,\n currencies: 'USD;GBP;CAD;AUD;EUR;BRL;CZK;DKK;HKD;HUF;ILS;JPY;MYR;MXN;TWD;NZD;NOK;PHP;PLN;RUB;SGD;SEK;CHF;THB;INR',\n productTypes: 'product;subscription;custom;donation',\n isAuthorizationExist: 'Yes',\n APMs: [['Credit Card'], ['PayPal SPB']]\n },\n {\n type: 'control_paypal',\n name: 'PayPal Personal',\n logoSvg: ,\n isPassive: false,\n currencies: 'USD;EUR;AUD;CAD;BRL;CZK;DKK;GBP;HKD;HUF;ILS;JPY;MYR;MXN;TWD;NZD;NOK;PHP;PLN;RUB;SGD;SEK;CHF;THB;TRY',\n productTypes: 'product;subscription;custom;donation',\n isAuthorizationExist: 'Yes'\n },\n {\n type: 'control_paypalInvoicing',\n name: 'PayPal Invoicing',\n logoSvg: ,\n isPassive: false,\n currencies: 'USD;AUD;BRL;CAD;CZK;DKK;EUR;HKD;HUF;INR;ILS;JPY;MYR;MXN;TWD;NZD;NOK;PHP;PLN;GBP;RUB;SGD;SEK;CHF;THB',\n productTypes: 'product;subscription;custom;donation',\n isAuthorizationExist: 'No'\n },\n {\n type: 'control_paypalexpress', // This gateway has already removed but should stay here for users who already added Express\n name: 'PayPal Express',\n iconImg: 'https://cdn.jotfor.ms/assets/img/v4/payment_icons_fieldlist/paypalexp_2x.png',\n isPassive: false,\n currencies: 'USD;EUR;AUD;CAD;BRL;CZK;DKK;GBP;HKD;HUF;ILS;JPY;MYR;MXN;TWD;NZD;NOK;PHP;PLN;RUB;SGD;SEK;CHF;THB;TRY',\n productTypes: 'product;subscription;custom;donation',\n isAuthorizationExist: 'Yes',\n isHidden: true, // we added this to check we should or not list in left panel\n isDeprecated: true // to show DEPRECATED badge on left panel\n },\n {\n type: 'control_dwolla', // This gateway has already removed but should stay here for users who already added Dwolla\n name: 'Dwolla',\n iconImg: 'https://cdn.jotfor.ms/assets/img/v4/payment_icons_fieldlist/dwolla_2x.png',\n currencies: 'USD',\n isPassive: false,\n productTypes: 'product;subscription;custom;donation',\n isHidden: true, // we added this to check we should or not list in left panel\n isDeprecated: true // to show DEPRECATED badge on left panel\n },\n {\n type: 'control_authnet',\n name: 'Authorize.Net',\n logoSvg: ,\n isPassive: false,\n currencies: 'USD;EUR;CAD;GBP;AUD',\n productTypes: 'product;subscription;custom;donation',\n isAuthorizationExist: 'Yes',\n APMs: [['Credit Card'], ['EPN'], ['GoEmerchant'], ['MerchantOne'], ['PayJunction'], ['USAePay']]\n },\n {\n type: 'control_stripe',\n name: 'Stripe',\n logoSvg: ,\n isPassive: false,\n // eslint-disable-next-line max-len\n currencies: 'USD;EUR;AED;AFN;ALL;AMD;ANG;AOA;ARS;AUD;AWG;AZN;BAM;BBD;BDT;BGN;BHD;BIF;BMD;BND;BOB;BRL;BSD;BTN;BWP;BYR;BZD;CAD;CDF;CHF;CLP;CNY;COP;CRC;CUC;CUP;CVE;CZK;DJF;DKK;DOP;DZD;EGP;ERN;ETB;FJD;FKP;GBP;GEL;GHS;GIP;GMD;GNF;GTQ;GYD;HKD;HNL;HTG;HUF;IDR;ILS;INR;IQD;IRR;ISK;JMD;JOD;JPY;KES;KGS;KHR;KMF;KPW;KRW;KWD;KYD;KZT;LAK;LBP;LKR;LRD;LSL;LYD;MAD;MDL;MGA;MKD;MMK;MNT;MOP;MRO;MUR;MVR;MWK;MXN;MYR;MZN;NAD;NGN;NIO;NOK;NPR;NZD;OMR;PAB;PEN;PGK;PHP;PKR;PLN;PYG;QAR;RON;RSD;RUB;RWF;SAR;SBD;SCR;SDG;SEK;SGD;SHP;SLL;SOS;SRD;STD;SVC;SYP;SZL;THB;TJS;TMM;TMT;TND;TOP;TRY;TTD;TWD;TZS;UAH;UGX;UYU;UZS;VEF;VND;VUV;WST;XAF;XCD;XOF;XPF;YER;ZAR;ZMW;ZWD',\n productTypes: 'product;subscription;custom;donation',\n isAuthorizationExist: 'later',\n APMs: [['Credit Card'], ['Link']]\n },\n {\n type: 'control_stripeCheckout',\n name: 'Stripe Checkout',\n logoSvg: ,\n isPassive: false,\n // eslint-disable-next-line max-len\n currencies: 'USD;EUR;AED;AFN;ALL;AMD;ANG;AOA;ARS;AUD;AWG;AZN;BAM;BBD;BDT;BGN;BHD;BIF;BMD;BND;BOB;BRL;BSD;BTN;BWP;BYR;BZD;CAD;CDF;CHF;CLP;CNY;COP;CRC;CUC;CUP;CVE;CZK;DJF;DKK;DOP;DZD;EGP;ERN;ETB;FJD;FKP;GBP;GEL;GHS;GIP;GMD;GNF;GTQ;GYD;HKD;HNL;HTG;HUF;IDR;ILS;INR;IQD;IRR;ISK;JMD;JOD;JPY;KES;KGS;KHR;KMF;KPW;KRW;KWD;KYD;KZT;LAK;LBP;LKR;LRD;LSL;LYD;MAD;MDL;MGA;MKD;MMK;MNT;MOP;MRO;MUR;MVR;MWK;MXN;MYR;MZN;NAD;NGN;NIO;NOK;NPR;NZD;OMR;PAB;PEN;PGK;PHP;PKR;PLN;PYG;QAR;RON;RSD;RUB;RWF;SAR;SBD;SCR;SDG;SEK;SGD;SHP;SLL;SOS;SRD;STD;SVC;SYP;SZL;THB;TJS;TMM;TMT;TND;TOP;TRY;TTD;TWD;TZS;UAH;UGX;UYU;UZS;VEF;VND;VUV;WST;XAF;XCD;XOF;XPF;YER;ZAR;ZMW;ZWD',\n productTypes: 'product;subscription;custom;donation',\n isAuthorizationExist: 'later'\n },\n {\n type: 'control_braintree',\n name: 'Braintree',\n logoSvg: ,\n isPassive: false,\n // eslint-disable-next-line max-len\n currencies: 'USD;EUR;AED;AFN;ALL;AMD;ANG;AOA;ARS;AUD;AWG;AZN;BAM;BBD;BDT;BGN;BHD;BIF;BMD;BND;BOB;BRL;BSD;BTN;BWP;BYR;BZD;CAD;CDF;CHF;CLP;CNY;COP;CRC;CUC;CUP;CVE;CZK;DJF;DKK;DOP;DZD;EGP;ERN;ETB;FJD;FKP;GBP;GEL;GHS;GIP;GMD;GNF;GTQ;GYD;HKD;HNL;HTG;HUF;IDR;ILS;INR;IQD;IRR;ISK;JMD;JOD;JPY;KES;KGS;KHR;KMF;KPW;KRW;KWD;KYD;KZT;LAK;LBP;LKR;LRD;LSL;LYD;MAD;MDL;MGA;MKD;MMK;MNT;MOP;MRO;MUR;MVR;MWK;MXN;MYR;MZN;NAD;NGN;NIO;NOK;NPR;NZD;OMR;PAB;PEN;PGK;PHP;PKR;PLN;PYG;QAR;RON;RSD;RUB;RWF;SAR;SBD;SCR;SDG;SEK;SGD;SHP;SLL;SOS;SRD;STD;SVC;SYP;SZL;THB;TJS;TMM;TMT;TND;TOP;TRY;TTD;TWD;TZS;UAH;UGX;UYU;UZS;VEF;VND;VUV;WST;XAF;XCD;XOF;XPF;YER;ZAR;ZMW;ZWD',\n productTypes: 'product;subscription;custom;donation',\n isAuthorizationExist: 'Yes',\n APMs: [['Credit Card']]\n },\n {\n type: 'control_paypalpro', // This gateway has already removed but should stay here for users who already added PayPal Pro\n name: 'PayPal Pro',\n logoSvg: ,\n isPassive: false,\n currencies: 'USD;EUR;AUD;CAD;BRL;CZK;DKK;GBP;HKD;HUF;ILS;JPY;MYR;MXN;TWD;NZD;NOK;PHP;PLN;RUB;SGD;SEK;CHF;THB;TRY',\n productTypes: 'product;subscription;custom;donation',\n isAuthorizationExist: 'Yes',\n isHidden: true, // we added this to check we should or not list in left panel\n isDeprecated: true // to show DEPRECATED badge on left panel\n },\n {\n type: 'control_square',\n name: 'Afterpay',\n logoSvg: ,\n isPassive: false,\n currencies: 'USD;AUD;CAD;NZD',\n productTypes: 'product',\n isAuthorizationExist: 'Yes',\n nameAPM: 'Afterpay',\n isNewGateway: false // to show NEW badge on left panel\n },\n {\n type: 'control_square',\n name: 'Clearpay',\n logoSvg: ,\n isPassive: false,\n currencies: 'GBP',\n productTypes: 'product',\n isAuthorizationExist: 'Yes',\n nameAPM: 'Clearpay',\n isNewGateway: false // to show NEW badge on left panel\n },\n {\n type: 'control_payment',\n name: 'Apple Pay & Google Pay',\n logoSvg: ,\n isPassive: false,\n // eslint-disable-next-line max-len\n currencies: 'USD;EUR;AED;AFN;ALL;AMD;ANG;AOA;ARS;AUD;AWG;AZN;BAM;BBD;BDT;BGN;BHD;BIF;BMD;BND;BOB;BRL;BSD;BTN;BWP;BYR;BZD;CAD;CDF;CHF;CLP;CNY;COP;CRC;CUC;CUP;CVE;CZK;DJF;DKK;DOP;DZD;EGP;ERN;ETB;FJD;FKP;GBP;GEL;GHS;GIP;GMD;GNF;GTQ;GYD;HKD;HNL;HTG;HUF;IDR;ILS;INR;IQD;IRR;ISK;JMD;JOD;JPY;KES;KGS;KHR;KMF;KPW;KRW;KWD;KYD;KZT;LAK;LBP;LKR;LRD;LSL;LYD;MAD;MDL;MGA;MKD;MMK;MNT;MOP;MRO;MUR;MVR;MWK;MXN;MYR;MZN;NAD;NGN;NIO;NOK;NPR;NZD;OMR;PAB;PEN;PGK;PHP;PKR;PLN;PYG;QAR;RON;RSD;RUB;RWF;SAR;SBD;SCR;SDG;SEK;SGD;SHP;SLL;SOS;SRD;STD;SVC;SYP;SZL;THB;TJS;TMM;TMT;TND;TOP;TRY;TTD;TWD;TZS;UAH;UGX;UYU;UZS;VEF;VND;VUV;WST;XAF;XCD;XOF;XPF;YER;ZAR;ZMW;ZWD',\n productTypes: 'product;subscription;custom;donation',\n isAuthorizationExist: 'No',\n nameAPM: 'appleAndGooglePay'\n },\n {\n type: 'control_mollie',\n name: 'Mollie',\n logoSvg: ,\n isPassive: false,\n // eslint-disable-next-line max-len\n currencies: 'EUR;USD;AED;AUD;BGN;BRL;CAD;CHF;CZK;DKK;GBP;HKD;HUF;ILS;MXN;MYR;NOK;NZD;PHP;PLN;RON;RUB;SEK;SGD;THB;TWD;ZAR',\n productTypes: 'product;subscription;custom;donation',\n isAuthorizationExist: 'No',\n APMs: [['Credit Card'], ['iDEAL'], ['Bancontact'], ['KBC/CBC Payment'], ['Belfius']]\n },\n {\n type: 'control_cybersource',\n name: 'CyberSource',\n logoSvg: ,\n isPassive: false,\n currencies: 'USD;EUR;AUD;CAD;BRL;CZK;DKK;GBP;HKD;HUF;ILS;JPY;MYR;MXN;TWD;NZD;NOK;PHP;PLN;RUB;SGD;SEK;CHF;THB;TRY',\n productTypes: 'product;subscription;custom;donation',\n isAuthorizationExist: 'Yes'\n },\n {\n type: 'control_echeck',\n name: 'eCheck.Net',\n logoSvg: ,\n isPassive: false,\n currencies: 'USD',\n productTypes: 'custom',\n isAuthorizationExist: 'No',\n APMs: [['Bank Transfer']]\n },\n {\n type: 'control_bluepay',\n name: 'BluePay',\n logoSvg: ,\n isPassive: false,\n // eslint-disable-next-line max-len\n currencies: 'AUD;NZD;SGD;HKD;MYR;USD;GBP;EUR;AED;AFN;ALL;AMD;ANG;AOA;ARS;AWG;AZN;BAM;BBD;BDT;BGN;BHD;BIF;BMD;BND;BOB;BRL;BSD;BTN;BWP;BYR;BZD;CAD;CDF;CHF;CLP;CNY;COP;CRC;CUC;CUP;CVE;CZK;DJF;DKK;DOP;DZD;EGP;ERN;ETB;FJD;FKP;GEL;GHS;GIP;GMD;GNF;GTQ;GYD;HNL;HTG;HUF;IDR;ILS;INR;IQD;IRR;ISK;JMD;JOD;JPY;KES;KGS;KHR;KMF;KPW;KRW;KWD;KYD;KZT;LAK;LBP;LKR;LRD;LSL;LYD;MAD;MDL;MGA;MKD;MMK;MNT;MOP;MRO;MUR;MVR;MWK;MXN;MZN;NAD;NGN;NIO;NOK;NPR;OMR;PAB;PEN;PGK;PHP;PKR;PLN;PYG;QAR;RON;RSD;RUB;RWF;SAR;SBD;SCR;SDG;SEK;SHP;SLL;SOS;SRD;STD;SVC;SYP;SZL;THB;TJS;TMM;TMT;TND;TOP;TRY;TTD;TWD;TZS;UAH;UGX;UYU;UZS;VEF;VND;VUV;WST;XAF;XCD;XOF;XPF;YER;ZAR;ZMW;ZWD',\n productTypes: 'product;subscription;custom;donation',\n isAuthorizationExist: 'No',\n APMs: [['Credit Card']]\n },\n {\n type: 'control_eway',\n name: 'Eway',\n logoSvg: ,\n isPassive: false,\n // eslint-disable-next-line max-len\n currencies: 'AUD;NZD;SGD;HKD;MYR;USD;GBP;EUR;AED;AFN;ALL;AMD;ANG;AOA;ARS;AWG;AZN;BAM;BBD;BDT;BGN;BHD;BIF;BMD;BND;BOB;BRL;BSD;BTN;BWP;BYR;BZD;CAD;CDF;CHF;CLP;CNY;COP;CRC;CUC;CUP;CVE;CZK;DJF;DKK;DOP;DZD;EGP;ERN;ETB;FJD;FKP;GEL;GHS;GIP;GMD;GNF;GTQ;GYD;HNL;HTG;HUF;IDR;ILS;INR;IQD;IRR;ISK;JMD;JOD;JPY;KES;KGS;KHR;KMF;KPW;KRW;KWD;KYD;KZT;LAK;LBP;LKR;LRD;LSL;LYD;MAD;MDL;MGA;MKD;MMK;MNT;MOP;MRO;MUR;MVR;MWK;MXN;MZN;NAD;NGN;NIO;NOK;NPR;OMR;PAB;PEN;PGK;PHP;PKR;PLN;PYG;QAR;RON;RSD;RUB;RWF;SAR;SBD;SCR;SDG;SEK;SHP;SLL;SOS;SRD;STD;SVC;SYP;SZL;THB;TJS;TMM;TMT;TND;TOP;TRY;TTD;TWD;TZS;UAH;UGX;UYU;UZS;VEF;VND;VUV;WST;XAF;XCD;XOF;XPF;YER;ZAR;ZMW;ZWD',\n productTypes: 'product;custom;donation',\n isAuthorizationExist: 'Yes',\n APMs: [['Credit Card']]\n },\n {\n type: 'control_payu',\n name: 'PayU',\n logoSvg: ,\n isPassive: false,\n currencies: 'PLN;BGN;CHF;CZK;DKK;EUR;GBP;HUF;NOK;RON;RUB;SEK;UAH;USD',\n currenciesPayUMoney: 'INR',\n currenciesPayUTR: 'TRY;EUR;USD;GBP',\n productTypes: 'product;custom;donation',\n isAuthorizationExist: 'No',\n APMs: [['BLIK']]\n },\n {\n type: 'control_payuMoney',\n name: 'PayU India',\n logoSvg: ,\n isPassive: false,\n currencies: 'INR',\n productTypes: 'product;custom;donation',\n isAuthorizationExist: 'No',\n },\n {\n type: 'control_worldpay',\n name: 'Worldpay UK',\n logoSvg: ,\n isPassive: false,\n currencies: 'USD;GBP;EUR;ARS;AUD;BRL;CAD;CHF;CLP;CNY;COP;CZK;DKK;EUR;GBP;HKD;HUF;IDR;ISK;JPY;KES;KRW;MXN;MYR;NOK;NZD;PHP;PLN;SEK;SGD;THB;TRY;TWD;VND;ZAR',\n productTypes: 'product;subscription;custom;donation',\n isAuthorizationExist: 'No'\n },\n {\n type: 'control_bluesnap',\n name: 'BlueSnap',\n logoSvg: ,\n isPassive: false,\n // eslint-disable-next-line max-len\n currencies: 'USD;EUR;AUD;NZD;SGD;HKD;MYR;GBP;AED;AFN;ALL;AMD;ANG;AOA;ARS;AWG;AZN;BAM;BBD;BDT;BGN;BHD;BIF;BMD;BND;BOB;BRL;BSD;BTN;BWP;BYR;BZD;CAD;CDF;CHF;CLP;CNY;COP;CRC;CUC;CUP;CVE;CZK;DJF;DKK;DOP;DZD;EGP;ERN;ETB;FJD;FKP;GEL;GHS;GIP;GMD;GNF;GTQ;GYD;HNL;HTG;HUF;IDR;ILS;INR;IQD;IRR;ISK;JMD;JOD;JPY;KES;KGS;KHR;KMF;KPW;KRW;KWD;KYD;KZT;LAK;LBP;LKR;LRD;LSL;LYD;MAD;MDL;MGA;MKD;MMK;MNT;MOP;MRO;MUR;MVR;MWK;MXN;MZN;NAD;NGN;NIO;NOK;NPR;OMR;PAB;PEN;PGK;PHP;PKR;PLN;PYG;QAR;RON;RSD;RUB;RWF;SAR;SBD;SCR;SDG;SEK;SHP;SLL;SOS;SRD;STD;SVC;SYP;SZL;THB;TJS;TMM;TMT;TND;TOP;TRY;TTD;TWD;TZS;UAH;UGX;UYU;UZS;VEF;VND;VUV;WST;XAF;XCD;XOF;XPF;YER;ZAR;ZMW;ZWD',\n productTypes: 'product;subscription;custom;donation',\n isAuthorizationExist: 'No',\n APMs: [['Credit Card']]\n },\n {\n type: 'control_moneris',\n name: 'Moneris',\n logoSvg: ,\n isPassive: false,\n // eslint-disable-next-line max-len\n currencies: 'CAD',\n productTypes: 'product;custom;donation',\n isAuthorizationExist: 'No',\n APMs: [['Credit Card']]\n },\n {\n type: 'control_stripeACHManual',\n name: 'Stripe ACH Manual',\n logoSvg: ,\n isPassive: false,\n currencies: 'USD',\n productTypes: 'product;subscription;custom;donation',\n isAuthorizationExist: 'No',\n APMs: [['ACH'], ['Plaid']]\n },\n {\n type: 'control_stripeACH',\n name: 'Stripe ACH',\n logoSvg: ,\n isPassive: false,\n currencies: 'USD',\n productTypes: 'product;subscription;custom;donation',\n isAuthorizationExist: 'No',\n APMs: [['ACH'], ['Plaid']]\n },\n {\n type: 'control_gocardless',\n name: 'GoCardless',\n logoSvg: ,\n isPassive: false,\n currencies: 'GBP;EUR;SEK;AUD;DKK;NZD;CAD;USD',\n productTypes: 'subscription',\n isAuthorizationExist: 'No'\n },\n {\n type: 'control_payfast',\n name: 'Payfast',\n logoSvg: ,\n isPassive: false,\n // eslint-disable-next-line max-len\n currencies: 'ZAR',\n productTypes: 'product;subscription;custom;donation',\n isAuthorizationExist: 'No',\n APMs: [['SnapScan'], ['instantEFT'], ['MoreTyme'], ['Mobicred']]\n },\n {\n type: 'control_paypalcomplete',\n name: 'Venmo',\n logoSvg: ,\n isPassive: false,\n currencies: 'USD',\n productTypes: 'product;custom;donation',\n isAuthorizationExist: 'Yes',\n nameAPM: 'Venmo'\n },\n {\n type: 'control_square',\n name: 'Cash App Pay',\n logoSvg: ,\n isPassive: false,\n currencies: 'USD',\n productTypes: 'product;custom;donation',\n isAuthorizationExist: 'Yes',\n nameAPM: 'CashApp'\n },\n {\n type: 'control_sensepass',\n name: 'SensePass',\n logoSvg: ,\n isPassive: false,\n currencies: 'USD;CAD;ILS;EUR;RUB',\n productTypes: 'product;custom;donation',\n isAuthorizationExist: 'No',\n APMs: [['Credit Card'], ['Alipay'], ['BitPay'], ['WeChat Pay'], ['Trustly'], ['Coinbase']]\n },\n {\n type: 'control_sofort',\n name: 'Sofort',\n logoSvg: ,\n isPassive: false,\n currencies: 'EUR;CHF;GBP;PLN;SEK;CZK;HUF',\n productTypes: 'product;custom;donation',\n isAuthorizationExist: 'No',\n APMs: [['Bank Transfer'], ['Klarna']]\n },\n {\n type: 'control_pagseguro',\n name: 'PagSeguro',\n logoSvg: ,\n isPassive: false,\n currencies: 'BRL',\n productTypes: 'product;custom;donation',\n isAuthorizationExist: 'No',\n APMs: [['Credit Card']]\n },\n {\n type: 'control_payment',\n name: 'Purchase Order',\n logoSvg: ,\n isPassive: false,\n // eslint-disable-next-line max-len\n currencies: 'USD;EUR;AED;AFN;ALL;AMD;ANG;AOA;ARS;AUD;AWG;AZN;BAM;BBD;BDT;BGN;BHD;BIF;BMD;BND;BOB;BRL;BSD;BTN;BWP;BYR;BZD;CAD;CDF;CHF;CLP;CNY;COP;CRC;CUC;CUP;CVE;CZK;DJF;DKK;DOP;DZD;EGP;ERN;ETB;FJD;FKP;GBP;GEL;GHS;GIP;GMD;GNF;GTQ;GYD;HKD;HNL;HTG;HUF;IDR;ILS;INR;IQD;IRR;ISK;JMD;JOD;JPY;KES;KGS;KHR;KMF;KPW;KRW;KWD;KYD;KZT;LAK;LBP;LKR;LRD;LSL;LYD;MAD;MDL;MGA;MKD;MMK;MNT;MOP;MRO;MUR;MVR;MWK;MXN;MYR;MZN;NAD;NGN;NIO;NOK;NPR;NZD;OMR;PAB;PEN;PGK;PHP;PKR;PLN;PYG;QAR;RON;RSD;RUB;RWF;SAR;SBD;SCR;SDG;SEK;SGD;SHP;SLL;SOS;SRD;STD;SVC;SYP;SZL;THB;TJS;TMM;TMT;TND;TOP;TRY;TTD;TWD;TZS;UAH;UGX;UYU;UZS;VEF;VND;VUV;WST;XAF;XCD;XOF;XPF;YER;ZAR;ZMW;ZWD',\n productTypes: 'product;subscription;custom;donation',\n isAuthorizationExist: 'No'\n },\n {\n type: 'control_firstdata',\n name: 'First Data',\n logoSvg: ,\n isPassive: false,\n // eslint-disable-next-line max-len\n currencies: 'AUD;NZD;SGD;HKD;MYR;USD;GBP;EUR;AED;AFN;ALL;AMD;ANG;AOA;ARS;AWG;AZN;BAM;BBD;BDT;BGN;BHD;BIF;BMD;BND;BOB;BRL;BSD;BTN;BWP;BYR;BZD;CAD;CDF;CHF;CLP;CNY;COP;CRC;CUC;CUP;CVE;CZK;DJF;DKK;DOP;DZD;EGP;ERN;ETB;FJD;FKP;GEL;GHS;GIP;GMD;GNF;GTQ;GYD;HNL;HTG;HUF;IDR;ILS;INR;IQD;IRR;ISK;JMD;JOD;JPY;KES;KGS;KHR;KMF;KPW;KRW;KWD;KYD;KZT;LAK;LBP;LKR;LRD;LSL;LYD;MAD;MDL;MGA;MKD;MMK;MNT;MOP;MRO;MUR;MVR;MWK;MXN;MZN;NAD;NGN;NIO;NOK;NPR;OMR;PAB;PEN;PGK;PHP;PKR;PLN;PYG;QAR;RON;RSD;RUB;RWF;SAR;SBD;SCR;SDG;SEK;SHP;SLL;SOS;SRD;STD;SVC;SYP;SZL;THB;TJS;TMM;TMT;TND;TOP;TRY;TTD;TWD;TZS;UAH;UGX;UYU;UZS;VEF;VND;VUV;WST;XAF;XCD;XOF;XPF;YER;ZAR;ZMW;ZWD',\n productTypes: 'product;custom;donation',\n isAuthorizationExist: 'No',\n APMs: [['Credit Card'], ['Payeezy']],\n isHidden: true,\n isDeprecated: true // to show DEPRECATED badge on left panel\n },\n {\n type: 'control_cardconnect',\n name: 'CardConnect',\n logoSvg: ,\n isPassive: false,\n currencies: 'USD',\n productTypes: 'product;custom;donation',\n isAuthorizationExist: 'No',\n APMs: [['Credit Card']]\n },\n {\n type: 'control_worldpayus',\n name: 'Worldpay US',\n logoSvg: ,\n isPassive: false,\n currencies: 'USD',\n productTypes: 'product;custom;donation',\n isAuthorizationExist: 'No',\n isHidden: true,\n isDeprecated: true // to show DEPRECATED badge on left panel\n },\n {\n type: 'control_2co',\n name: '2Checkout',\n logoSvg: ,\n isPassive: false,\n currencies: 'USD;EUR;AUD;CAD;BRL;DKK;GBP;HKD;INR;ILS;JPY;MYR;MXN;NZD;NOK;PHP;SGD;SEK;CHF;TRY;AED;ZAR;ARS',\n productTypes: 'product;subscription;custom;donation',\n isAuthorizationExist: 'No'\n },\n {\n type: 'control_paysafe',\n name: 'Paysafe',\n logoSvg: ,\n isPassive: false,\n currencies: 'USD;CAD;EUR;GBP',\n productTypes: 'product;custom;donation',\n isAuthorizationExist: 'No',\n APMs: [['Credit Card']]\n },\n {\n type: 'control_iyzico',\n name: 'iyzico',\n logoSvg: ,\n isPassive: false,\n currencies: 'TRY;EUR;USD;GBP;NOK;RUB;CHF',\n productTypes: 'product;custom;donation',\n isAuthorizationExist: 'No',\n APMs: [['iDEAL'], ['Qiwi']]\n },\n {\n type: 'control_skrill',\n name: 'Skrill',\n logoSvg: ,\n isPassive: false,\n currencies: 'EUR;USD;GBP;HKD;SGD;JPY;CAD;AUD;CHF;DKK;SEK;NOK;ILS;MYR;NZD;TRY;AED;MAD;QAR;SAR;TWD;THB;CZK;HUF;BGN;PLN;ISK;INR;KRW;ZAR;RON;JOD;OMR;RSD;TND',\n productTypes: 'product;custom;donation',\n isAuthorizationExist: 'No'\n },\n {\n type: 'control_chargify',\n name: 'Chargify',\n logoSvg: ,\n isPassive: false,\n currencies: '',\n productTypes: 'subscription',\n isAuthorizationExist: 'No',\n APMs: [['Credit Card']]\n },\n {\n type: 'control_payjunction',\n name: 'PayJunction',\n logoSvg: ,\n isPassive: false,\n currencies: 'USD',\n productTypes: 'product;custom;donation',\n isAuthorizationExist: 'No',\n APMs: [['Credit Card']]\n },\n {\n type: 'control_paypalSPB',\n name: 'PayPal Checkout',\n logoSvg: ,\n isPassive: false,\n currencies: 'USD;AUD;BRL;CAD;CZK;DKK;EUR;HKD;HUF;INR;JPY;MXN;NZD;NOK;PHP;PLN;GBP;SGD;SEK;CHF;THB',\n productTypes: 'product;subscription;custom;donation',\n isAuthorizationExist: 'No'\n },\n {\n type: 'control_clickbank', // This gateway has already removed but should stay here for users who already added Clickbank\n name: 'ClickBank',\n logoSvg: ,\n isPassive: false,\n currencies: 'USD;EUR',\n productTypes: 'product',\n isAuthorizationExist: 'No',\n isHidden: true, // we added this to check we should or not list in left panel\n isDeprecated: true // to show DEPRECATED badge on left panel\n },\n {\n type: 'control_onebip', // This gateway has already removed but should stay here for users who already added OneBip\n name: 'OneBip',\n logoSvg: ,\n isPassive: false,\n currencies: 'USD;EUR',\n productTypes: 'product',\n isAuthorizationExist: 'No',\n isHidden: true, // we added this to check we should or not list in left panel\n isDeprecated: true // to show DEPRECATED badge on left panel\n },\n {\n type: 'control_paymentwall',\n name: 'Paymentwall',\n logoSvg: ,\n isPassive: false,\n // eslint-disable-next-line max-len\n currencies: 'AUD;NZD;SGD;HKD;MYR;USD;GBP;EUR;AED;AFN;ALL;AMD;ANG;AOA;ARS;AWG;AZN;BAM;BBD;BDT;BGN;BHD;BIF;BMD;BND;BOB;BRL;BSD;BTN;BWP;BYR;BZD;CAD;CDF;CHF;CLP;CNY;COP;CRC;CUC;CUP;CVE;CZK;DJF;DKK;DOP;DZD;EGP;ERN;ETB;FJD;FKP;GEL;GHS;GIP;GMD;GNF;GTQ;GYD;HNL;HTG;HUF;IDR;ILS;INR;IQD;IRR;ISK;JMD;JOD;JPY;KES;KGS;KHR;KMF;KPW;KRW;KWD;KYD;KZT;LAK;LBP;LKR;LRD;LSL;LYD;MAD;MDL;MGA;MKD;MMK;MNT;MOP;MRO;MUR;MVR;MWK;MXN;MZN;NAD;NGN;NIO;NOK;NPR;OMR;PAB;PEN;PGK;PHP;PKR;PLN;PYG;QAR;RON;RSD;RUB;RWF;SAR;SBD;SCR;SDG;SEK;SHP;SLL;SOS;SRD;STD;SVC;SYP;SZL;THB;TJS;TMM;TMT;TND;TOP;TRY;TTD;TWD;TZS;UAH;UGX;UYU;UZS;VEF;VND;VUV;WST;XAF;XCD;XOF;XPF;YER;ZAR;ZMW;ZWD',\n productTypes: 'product;custom;donation',\n isAuthorizationExist: 'No',\n APMs: [['Alipay'], ['Amazon Pay'], ['Pagseguro'], ['Bitcoin'], ['Union Pay'], ['Mobiano']]\n }\n];\n\nexport const PaymentCurrencies = {\n USD: 'United States Dollars',\n EUR: 'European Union Currency',\n AED: 'United Arab Emirates Dirham',\n AFN: 'Afghan Afghani',\n ALL: 'Albanian Lek',\n AMD: 'Armenian Dram',\n ANG: 'Netherlands Antillean Gulden',\n AOA: 'Angolan Kwanza',\n ARS: 'Argentine Peso',\n AUD: 'Australian Dollar',\n AWG: 'Aruban Florin',\n AZN: 'Azerbaijani Manat',\n BAM: 'Bosnia and Herzegovina Convertible Mark',\n BBD: 'Barbadian Dollar',\n BDT: 'Bangladeshi Taka',\n BGN: 'Bulgarian Lev',\n BHD: 'Bahraini Dinar',\n BIF: 'Burundian Franc',\n BMD: 'Bermudian Dollar',\n BND: 'Brunei Dollar',\n BOB: 'Bolivian Boliviano',\n BRL: 'Brazilian Real',\n BSD: 'Bahamian Dollar',\n BTN: 'Bhutanese Ngultrum',\n BWP: 'Botswana Pula',\n BYR: 'Belarusian Ruble',\n BZD: 'Belize Dollar',\n CAD: 'Canadian Dollar',\n CDF: 'Congolese Franc',\n CHF: 'Swiss Franc',\n CLP: 'Chilean Peso',\n CNY: 'Chinese Renminbi Yuan',\n COP: 'Colombian Peso',\n CRC: 'Costa Rican Colón',\n CUC: 'Cuban Convertible Peso',\n CUP: 'Cuban Peso',\n CVE: 'Cape Verdean Escudo',\n CZK: 'Czech Koruna',\n DJF: 'Djiboutian Franc',\n DKK: 'Danish Krone',\n DOP: 'Dominican Peso',\n DZD: 'Algerian Dinar',\n EGP: 'Egyptian Pound',\n ERN: 'Eritrean Nakfa',\n ETB: 'Ethiopian Birr',\n FJD: 'Fijian Dollar',\n FKP: 'Falkland Pound',\n GBP: 'British Pound',\n GEL: 'Georgian Lari',\n GHS: 'Ghanaian Cedi',\n GIP: 'Gibraltar Pound',\n GMD: 'Gambian Dalasi',\n GNF: 'Guinean Franc',\n GTQ: 'Guatemalan Quetzal',\n GYD: 'Guyanese Dollar',\n HKD: 'Hong Kong Dollar',\n HNL: 'Honduran Lempira',\n HTG: 'Haitian Gourde',\n HUF: 'Hungarian Forint',\n IDR: 'Indonesian Rupiah',\n ILS: 'Israeli New Sheqel',\n INR: 'Indian Rupee',\n IQD: 'Iraqi Dinar',\n IRR: 'Iranian Rial',\n ISK: 'Icelandic Króna',\n JMD: 'Jamaican Dollar',\n JOD: 'Jordanian Dinar',\n JPY: 'Japanese Yen',\n KES: 'Kenyan Shilling',\n KGS: 'Kyrgyzstani Som',\n KHR: 'Cambodian Riel',\n KMF: 'Comorian Franc',\n KPW: 'North Korean Won',\n KRW: 'South Korean Won',\n KWD: 'Kuwaiti Dinar',\n KYD: 'Cayman Islands Dollar',\n KZT: 'Kazakhstani Tenge',\n LAK: 'Lao Kip',\n LBP: 'Lebanese Lira',\n LKR: 'Sri Lankan Rupee',\n LRD: 'Liberian Dollar',\n LSL: 'Lesotho Loti',\n LYD: 'Libyan Dinar',\n MAD: 'Moroccan Dirham',\n MDL: 'Moldovan Leu',\n MGA: 'Malagasy Ariary',\n MKD: 'Macedonian Denar',\n MMK: 'Myanmar Kyat',\n MNT: 'Mongolian Tögrög',\n MOP: 'Macanese Pataca',\n MRO: 'Mauritanian Ouguiya',\n MUR: 'Mauritian Rupee',\n MVR: 'Maldivian Rufiyaa',\n MWK: 'Malawian Kwacha',\n MXN: 'Mexican Peso',\n MYR: 'Malaysian Ringgit',\n MZN: 'Mozambican Metical',\n NAD: 'Namibian Dollar',\n NGN: 'Nigerian Naira',\n NIO: 'Nicaraguan Córdoba',\n NOK: 'Norwegian Krone',\n NPR: 'Nepalese Rupee',\n NZD: 'New Zealand Dollar',\n OMR: 'Omani Rial',\n PAB: 'Panamanian Balboa',\n PEN: 'Peruvian Nuevo Sol',\n PGK: 'Papua New Guinean Kina',\n PHP: 'Philippine Peso',\n PKR: 'Pakistani Rupee',\n PLN: 'Polish Złoty',\n PYG: 'Paraguayan Guaraní',\n QAR: 'Qatari Riyal',\n RON: 'Romanian Leu',\n RSD: 'Serbian Dinar',\n RUB: 'Russian Ruble',\n RWF: 'Rwandan Franc',\n SAR: 'Saudi Riyal',\n SBD: 'Solomon Islands Dollar',\n SCR: 'Seychellois Rupee',\n SDG: 'Sudanese Pound',\n SEK: 'Swedish Krona',\n SGD: 'Singapore Dollar',\n SHP: 'Saint Helenian Pound',\n SLL: 'Sierra Leonean Leone',\n SOS: 'Somali Shilling',\n SRD: 'Surinamese Dollar',\n STD: 'São Tomé and Príncipe Dobra',\n SVC: 'Salvadoran Colón',\n SYP: 'Syrian Pound',\n SZL: 'Swazi Lilangeni',\n THB: 'Thai Baht',\n TJS: 'Tajikistani Somoni',\n TMM: 'Turkmenistani Manat',\n TMT: 'Turkmenistani Manat',\n TND: 'Tunisian Dinar',\n TOP: 'Tongan Paʻanga',\n TRY: 'Turkish Lira',\n TTD: 'Trinidad and Tobago Dollar',\n TWD: 'New Taiwan Dollar',\n TZS: 'Tanzanian Shilling',\n UAH: 'Ukrainian Hryvnia',\n UGX: 'Ugandan Shilling',\n UYU: 'Uruguayan Peso',\n UZS: 'Uzbekistani Som',\n VEF: 'Venezuelan Bolívar',\n VND: 'Vietnamese Đồng',\n VUV: 'Vanuatu Vatu',\n WST: 'Samoan Tala',\n XAF: 'Central African Cfa Franc',\n XCD: 'East Caribbean Dollar',\n XOF: 'West African Cfa Franc',\n XPF: 'Cfp Franc',\n YER: 'Yemeni Rial',\n ZAR: 'South African Rand',\n ZMW: 'Zambian Kwacha',\n ZWD: 'Zimbabwean Dolla',\n};\n\nexport const NonInputFields = [\n 'control_button',\n 'control_head',\n 'control_text',\n 'control_image',\n 'control_collapse',\n 'control_pagebreak',\n 'control_captcha',\n 'control_separator',\n 'control_clear',\n 'control_divider',\n];\n\n// should be same with NOT_HIDEABLE_ELEMENTS from builder/src/modules/question-properties-editor/utils.js\nexport const NonHideableFields = [\n 'control_collapse',\n 'control_pagebreak',\n 'control_button',\n 'control_captcha',\n 'control_autoincrement',\n ...(PaymentFields.map(p => p.type))\n];\n\nexport const NonDuplicatableFields = [\n 'control_captcha',\n 'control_paymentmethods',\n ...(PaymentFields.map(p => p.type))\n];\n\nexport const nativeWidgets = [\n {\n type: 'control_calculation',\n name: 'Form Calculation'\n },\n {\n type: 'control_slider',\n name: 'Slider',\n },\n {\n type: 'control_signature',\n name: 'Signature',\n },\n {\n type: 'control_separator',\n name: 'Separator',\n },\n {\n type: 'control_hidden',\n name: 'Hidden Box',\n },\n {\n type: 'control_autocomp',\n name: 'Autocomplete',\n },\n {\n type: 'control_autoincrement',\n name: 'Unique ID',\n },\n {\n type: 'control_range',\n name: 'Range',\n },\n {\n type: 'control_grading',\n name: 'Grading',\n },\n {\n type: 'control_birthdate',\n name: 'Birth Date',\n },\n];\n\nexport const accessibleWidgets = [\n '591bfab2b81b39d90500089b', // Accessibility Enhancer\n '52987bda949b78ac2b000009', // Infinite List\n '528ee7cf8d5a5fc76a000004', // Dynamic Textbox\n '53fb36d6db92d1f06500003b', // Birthdate\n '529c8286a75dae5e7f000005', // Take Photo\n '52948fb29322cd302b00000c', // Terms&Conditions\n '52934dbf3be147110a000030', // Date picker\n '529dde1d1c79f7a47000000d', // Phone Picker\n '529ca5f5caf2cd9e58000004', // Form Tabs\n '52a02b574b41f8114a000004', // Image Picker\n '52988df833e997313c000005', // Farbtastic Color Picker\n '52934da53be147110a00002d', // Time Picker\n '529058b0ca06414051000011', // Field Multiplier\n '5273bb4faa80af0979000005', // YouTube\n '52961c97e3e5266570000004', // Checklist\n '538da19e8f1162765c000011', // Preview Before Submit\n '52f88bddfa5c747d4c000004', // Form Calculation\n '56095842e855b0bf1b000033', // Get Form Page URL\n '52a8531850e4cbc101000004', // Progress Bar\n '52f8550f0019ace53000000b', // Short Scrollable Terms\n '528eea9eec60d3b530000005', // Datetime Single\n '538dddaa976bf61129000004', // Multiple Text Fields\n '529860b42db548b827000004', // Google Analytics\n '5295b800485bd19f5d000005', // Preview Image Upload\n '529641beb15ce2ac76000007', // PDF Embedder\n '52a1957635fd1d2172000009', // Check In Check Out\n '529c82a772a985697f000007', // Checkbox in Dropdown\n '5294d72eb1dd20af46000006', // Narrative Fields\n '52933bf13be147110a000005', // Geocomplete\n '5298b265886815755900001e', // Visual multi select\n];\n\nexport const inaccessibleFields = [\n 'control_signature',\n 'control_widget',\n 'control_birthdate',\n 'control_calculation',\n 'control_grading',\n 'control_slider',\n 'control_range',\n 'control_autocomp',\n 'control_autoincrement',\n 'control_hidden',\n];\n\nexport const inaccessibleElements = [\n 'control_appointment'\n];\n\nexport const NonShrinkableFields = [\n 'control_collapse',\n 'control_head',\n 'control_pagebreak'\n];\n\nexport const AllFields = [\n ...FormFields.flatMap(field => field.categoryFields),\n ...PaymentFields,\n ...nativeWidgets,\n {\n type: 'control_widget',\n name: 'Widget'\n }\n];\n","export const FORM_PROPERTIES_FETCHING = 'FORM_PROPERTIES_FETCHING';\nexport const FORM_PROPERTIES_FETCH_SUCCESS = 'FORM_PROPERTIES_FETCH_SUCCESS';\nexport const FORM_PROPERTIES_FETCH_ERROR = 'FORM_PROPERTIES_FETCH_ERROR';\n\nexport const FORM_PROPERTY_UPDATING = 'FORM_PROPERTY_UPDATING';\nexport const FORM_PROPERTY_UPDATE_SUCCESS = 'FORM_PROPERTY_UPDATE_SUCCESS';\nexport const FORM_PROPERTY_UPDATE_ERROR = 'FORM_PROPERTY_UPDATE_ERROR';\n\nexport const FORM_QUESTIONS_FETCHING = 'FORM_QUESTIONS_FETCHING';\nexport const FORM_QUESTIONS_FETCH_SUCCESS = 'FORM_QUESTIONS_FETCH_SUCCESS';\nexport const FORM_QUESTIONS_FETCH_ERROR = 'FORM_QUESTIONS_FETCH_ERROR';\nexport const FORM_DRAGGING_EXISTING_QUESTION = 'FORM_DRAGGING_EXISTING_QUESTION';\nexport const FORM_DRAGGING_MULTIPLE_EXISTING_QUESTION = 'FORM_DRAGGING_MULTIPLE_EXISTING_QUESTION';\n\nexport const FORM_QUESTION_CREATING = 'FORM_QUESTION_CREATING';\nexport const FORM_QUESTION_CREATE_SUCCESS = 'FORM_QUESTION_CREATE_SUCCESS';\nexport const FORM_QUESTION_CREATE_ERROR = 'FORM_QUESTION_CREATE_ERROR';\nexport const FORM_MULTIPLE_QUESTION_CREATING = 'FORM_MULTIPLE_QUESTION_CREATING';\nexport const FORM_MULTIPLE_QUESTION_CREATE_SUCCESS = 'FORM_MULTIPLE_QUESTION_CREATE_SUCCESS';\n\nexport const FORM_QUESTION_UPDATING = 'FORM_QUESTION_UPDATING';\nexport const FORM_QUESTION_UPDATE_SUCCESS = 'FORM_QUESTION_UPDATE_SUCCESS';\nexport const FORM_QUESTION_UPDATE_ERROR = 'FORM_QUESTION_UPDATE_ERROR';\n\nexport const FORM_MULTIPLE_QUESTION_UPDATING = 'FORM_MULTIPLE_QUESTION_UPDATING';\nexport const FORM_MULTIPLE_QUESTION_UPDATE_SUCCESS = 'FORM_MULTIPLE_QUESTION_UPDATE_SUCCESS';\nexport const FORM_MULTIPLE_QUESTION_UPDATE_ERROR = 'FORM_MULTIPLE_QUESTION_UPDATE_ERROR';\nexport const FORM_MULTIPLE_QUESTION_REPLACE = 'FORM_MULTIPLE_QUESTION_REPLACE';\n\nexport const FORM_QUESTION_DELETING = 'FORM_QUESTION_DELETING';\nexport const FORM_QUESTION_DELETE_SUCCESS = 'FORM_QUESTION_DELETE_SUCCESS';\nexport const FORM_QUESTION_DELETE_ERROR = 'FORM_QUESTION_DELETE_ERROR';\nexport const FORM_MULTIPLE_QUESTION_DELETING = 'FORM_MULTIPLE_QUESTION_DELETING';\nexport const FORM_MULTIPLE_QUESTION_DELETE_SUCCESS = 'FORM_MULTIPLE_QUESTION_DELETE_SUCCESS';\nexport const FORM_QUESTIONS_INIT = 'FORM_QUESTIONS_INIT';\nexport const QUESTIONS_REDUCER_INIT = 'QUESTIONS_REDUCER_INIT';\nexport const FORM_QUESTION_REORDER = 'FORM_QUESTION_REORDER';\n\nexport const NEW_FORM_CREATED = 'NEW_FORM_CREATED';\nexport const NEW_FORM_CREATE_ERROR = 'NEW_FORM_CREATE_ERROR';\n\nexport const FORM_FETCH_INFO = 'FORM_FETCH_INFO';\n\nexport const FORM_URL_UPDATE = 'FORM_URL_UPDATE';\n\n// ACCESSIBILITY\nexport const FORM_ACCESSIBILITY_CHECK_SUCCESS = 'FORM_ACCESSIBILITY_CHECK_SUCCESS';\n\n// AI\nexport const AI_CHAT_MESSAGES_FETCHING = 'AI_CHAT_MESSAGES_FETCHING';\nexport const AI_CHAT_MESSAGES_FETCH = 'AI_CHAT_MESSAGES_FETCH';\nexport const ADD_AI_CHAT_MESSAGE = 'ADD_AI_CHAT_MESSAGE';\nexport const UPDATE_AI_FORM = 'UPDATE_AI_FORM';\nexport const SHOW_AI_ERROR_MESSAGE = 'SHOW_AI_ERROR_MESSAGE';\nexport const AI_CHAT_TOGGLE = 'AI_CHAT_TOGGLE';\nexport const SHOW_AI_ASSISTANT = 'SHOW_AI_ASSISTANT';\nexport const AI_FS_ENABLE = 'AI_FS_ENABLE';\nexport const AI_CHAT_DEFAULT_OPEN = 'AI_CHAT_DEFAULT_OPEN';\nexport const ADD_ASSISTANT_CHAT_MESSAGE = 'ADD_ASSISTANT_CHAT_MESSAGE';\nexport const SET_MANUAL_CHANGES = 'SET_MANUAL_CHANGES';\nexport const SET_STATIC_ACTIONS = 'SET_STATIC_ACTIONS';\n\n// REVISION HISTORY\nexport const REVISION_FETCHING = 'REVISION_FETCHING';\nexport const REVISION_FETCH_SUCCESS = 'REVISION_FETCH_SUCCESS';\nexport const REVISION_FETCH_ERROR = 'REVISION_FETCH_ERROR';\nexport const REVISION_DATES_FETCH_SUCCESS = 'REVISION_DATES_FETCH_SUCCESS';\nexport const REVISION_DATES_FETCH_ERROR = 'REVISION_DATES_FETCH_ERROR';\nexport const REVISION_DATE_CHANGE_COUNT = 'REVISION_DATE_CHANGE_COUNT';\n\nexport const REVISION_LOADING = 'REVISION_LOADING';\nexport const REVISION_LOADING_ERROR = 'REVISION_LOADING_ERROR';\n\n// UI ACTIONS\nexport const UI_PRIMARY_PANEL_TOGGLE = 'UI_PRIMARY_PANEL_TOGGLE';\nexport const UI_LEFT_PANEL_TOGGLE = 'LEFT_PANEL_TOGGLE';\nexport const UI_RIGHT_PANEL_TOGGLE = 'UI_RIGHT_PANEL_TOGGLE';\nexport const UI_PREVIEW_MOD_TOGGLE = 'UI_PREVIEW_MOD_TOGGLE';\nexport const UI_UPDATE_SELECTED_QUESTION = 'UI_UPDATE_SELECTED_QUESTION';\nexport const UI_UPDATE_MULTISELECT_QUESTIONS = 'UI_UPDATE_MULTISELECT_QUESTIONS';\nexport const UI_DROPPED_NEW_QUESTION = 'UI_DROPPED_NEW_QUESTION';\nexport const UI_DROPPED_EXISTING_QUESTION = 'UI_DROPPED_EXISTING_QUESTION';\nexport const UI_WINDOW_WIDTH_CHANGED = 'UI_WINDOW_WIDTH_CHANGED';\nexport const UI_PREVIEW_MOD_READY = 'UI_PREVIEW_MOD_READY';\nexport const UI_SET_PREVIEW_MOD_DEVICE_TYPE = 'UI_SET_PREVIEW_MOD_DEVICE_TYPE';\nexport const UI_FIELD_PANEL_TAB_CHANGED = 'UI_FIELD_PANEL_TAB_CHANGED';\nexport const UI_UPDATE_QUESTION_PROPERTIES_TAB = 'UI_UPDATE_QUESTION_PROPERTIES_TAB';\nexport const UI_UPDATE_QUESTION_PROPERTIES_PANEL = 'UI_UPDATE_QUESTION_PROPERTIES_PANEl';\nexport const UI_FEEDBACK_SHOW = 'UI_FEEDBACK_SHOW';\nexport const UI_TOGGLE_RICH_TEXT_FOR_QUESTION = 'UI_TOGGLE_RICH_TEXT_FOR_QUESTION';\nexport const UI_CHANGE_RIGHT_PANEL_MODE = 'UI_CHANGE_RIGHT_PANEL_MODE';\nexport const UI_DISPLAY_ACTIVE_FORM_PAGE = 'UI_DISPLAY_ACTIVE_FORM_PAGE';\nexport const UI_SET_ACTIVE_FORM_PAGE = 'UI_SET_ACTIVE_FORM_PAGE';\nexport const UI_UNDO = 'UI_UNDO';\nexport const UI_REDO = 'UI_REDO';\nexport const UI_SET_COLLABORATION_TOKEN = 'UI_SET_COLLABORATION_TOKEN';\nexport const UI_OPEN_COLLABORATIONPOPUP = 'UI_OPEN_COLLABORATIONPOPUP';\nexport const UI_OPEN_HELPMENU = 'UI_OPEN_HELPMENU';\nexport const UI_OPEN_USERSETTINGSPOPUP = 'UI_OPEN_USERSETTINGSPOPUP';\nexport const UI_SET_APP_NAVIGATION = 'UI_SET_APP_NAVIGATION';\nexport const UI_DISPLAY_WIDGETINFO = 'UI_DISPLAY_WIDGETINFO';\nexport const UI_DISPLAY_SIGNUP_PROMPT = 'UI_DISPLAY_SIGNUP_PROMPT';\nexport const UI_UPGRADEPOPOVER_SHOW = 'UI_UPGRADEPOPOVER_SHOW';\nexport const UI_MIXED_QUESTION_SELECTED_FIELD = 'UI_MIXED_QUESTION_SELECTED_FIELD';\nexport const UI_TOGGLE_MIXED_FIELDS = 'UI_TOGGLE_MIXED_FIELDS';\nexport const UI_DRAGGING_MIXED_FIELDS = 'UI_DRAGGING_MIXED_FIELDS';\n\nexport const UI_CANCLOSE_SIGNUP_PROMPT = 'UI_CANCLOSE_SIGNUP_PROMPT';\n\nexport const UI_SET_FOCUSED_INLINEEDIT_INFO = 'UI_SET_FOCUSED_INLINEEDIT_INFO';\nexport const UI_INITIALIZE_INJECT_CSS = 'UI_INITIALIZE_INJECT_CSS';\nexport const UI_REVISION_INFO_PANEL = 'UI_REVISION_INFO_PANEL';\nexport const UI_CHANGE_BUILDER_TYPE = 'UI_CHANGE_BUILDER_TYPE';\nexport const UI_CHANGE_INVITATION_STATUS = 'UI_CHANGE_INVITATION_STATUS';\nexport const UI_SET_PAYMENT_MODE = 'UI_SET_PAYMENT_MODE';\nexport const UI_SET_SWITCH_ANOTHER_GATEWAY = 'UI_SET_SWITCH_ANOTHER_GATEWAY';\nexport const UI_SET_PAYMENT_MODAL_PROPERTIES = 'UI_SET_PAYMENT_MODAL_PROPERTIES';\nexport const UI_SET_PAYMENT_PRODUCT_LIST = 'UI_SET_PAYMENT_PRODUCT_LIST';\nexport const UI_SET_MULTISELECT_DIRECTION = 'UI_SET_MULTISELECT_DIRECTION';\nexport const UI_SET_CONTEXT_MENU = 'UI_SET_CONTEXT_MENU';\nexport const UI_DISPLAY_NEWFORMDIALOG = 'UI_DISPLAY_NEWFORMDIALOG';\nexport const UI_DISPLAY_FORM_COUNT_DIALOG = 'UI_DISPLAY_FORM_COUNT_DIALOG';\n// export const UI_SHOW_ALL_BASICS_FIELDS = 'UI_SHOW_ALL_BASICS_FIELDS';\nexport const UI_CHANGE_MULTISELECT_CHECKBOX_VISIBILITY = 'UI_CHANGE_MULTISELECT_CHECKBOX_VISIBILITY';\nexport const UI_SET_DUPLICATED_QUESTION_IDS = 'UI_SET_DUPLICATED_QUESTION_IDS';\nexport const UI_SET_NEW_QUESTION_IDS = 'UI_SET_NEW_QUESTION_IDS';\nexport const UI_SET_QUICK_SEARCH_PANEL = 'UI_SET_QUICK_SEARCH_PANEL';\nexport const UI_SET_BACKGROUND_IMAGE_LOAD_STATUS = 'UI_SET_BACKGROUND_IMAGE_LOAD_STATUS';\nexport const UI_SET_BACKGROUND_IMAGE = 'UI_SET_BACKGROUND_IMAGE';\nexport const UI_SET_PDF_IMPORTER = 'UI_SET_PDF_IMPORTER';\n\n// Welcome\nexport const UI_SET_WELCOME_PAGE_VISIBILITY = 'UI_SET_WELCOME_PAGE_VISIBILITY';\n\nexport const UI_TOGGLE_PROP = 'UI_TOGGLE_PROP';\n// control_inline\nexport const UI_SELECTED_FITB_FIELD_ID = 'UI_SELECTED_FITB_FIELD_ID';\n// New form type during layout change\nexport const UI_CHANGE_FORM_TYPE = 'UI_CHANGE_FORM_TYPE';\n\n// Integrations\nexport const UI_SET_INTEGRATION_ERROR = 'UI_SET_INTEGRATION_ERROR';\n\n// NOTIFICATION\nexport const NOTIFICATION_ADD = 'NOTIFICATION_ADD';\nexport const NOTIFICATION_REMOVE = 'NOTIFICATION_REMOVE';\nexport const NOTIFICATION_CONFIRM = 'NOTIFICATION_CONFIRM';\nexport const NOTIFICATION_ADD_MAIN_LEVEL = 'NOTIFICATION_ADD_MAIN_LEVEL';\n\nexport const LOCATION_UPDATE = 'LOCATION_UPDATE';\n\nexport const USER_PROPERTIES_FETCHING = 'USER_PROPERTIES_FETCHING';\nexport const USER_PROPERTIES_FETCH_SUCCESS = 'USER_PROPERTIES_FETCH_SUCCESS';\nexport const USER_PROPERTIES_FETCH_ERROR = 'USER_PROPERTIES_FETCH_ERROR';\nexport const USERS_REDUCER_INIT = 'USERS_REDUCER_INIT';\nexport const USER_LANGUAGE_FETCH_SUCCESS = 'USER_LANGUAGE_FETCH_SUCCESS';\nexport const USER_DEFAULT_THEME_UPDATE = 'USER_DEFAULT_THEME_UPDATE';\nexport const USER_PROPERTIES_UPDATE = 'USER_PROPERTIES_UPDATE';\n\nexport const EMAIL_SETTINGS_FETCH_SUCCESS = 'EMAIL_SETTINGS_FETCH_SUCCESS';\nexport const EMAIL_SETTINGS_FETCH_ERROR = 'EMAIL_SETTINGS_FETCH_ERROR';\n\nexport const FORM_STAGED_FULL_QUESTION_SAVE_SUCCESS = 'FORM_STAGED_FULL_QUESTION_SAVE_SUCCESS';\nexport const FORM_STAGED_FULL_QUESTION_SAVE = 'FORM_STAGED_FULL_QUESTION_SAVE';\nexport const FORM_STAGED_QUESTION_SAVE = 'FORM_STAGED_QUESTION_SAVE';\nexport const FORM_STAGED_QUESTION_UPDATE_SUCCESS = 'FORM_STAGED_QUESTION_UPDATE_SUCCESS';\nexport const FORM_STAGED_QUESTION_UPDATING = 'FORM_STAGED_QUESTION_UPDATING';\nexport const FORM_STAGED_QUESTION_DELETE = 'FORM_STAGED_QUESTION_DELETE';\n\nexport const CDN_CONFIG_FETCH_SUCCESS = 'CDN_CONFIG_FETCH_SUCCESS';\n\nexport const WIDGET_FETCH_SUCCESS = 'WIDGET_FETCH_SUCCESS';\nexport const WIDGET_FILTER = 'WIDGET_FILTER';\nexport const WIDGET_FAVSTATE_UPDATE = 'WIDGET_FAVSTATE_UPDATE';\n\nexport const SERVER_PAYMENTS_FETCH_SUCCESS = 'SERVER_PAYMENTS_FETCH_SUCCESS';\n\nexport const SERVER_BUILDER_CUSTOMIZATION_STATUS_FETCH_SUCCESS = 'SERVER_BUILDER_CUSTOMIZATION_STATUS_FETCH_SUCCESS';\n\nexport const UI_SET_DIRTY_WIZARD_FLAG = 'UI_SET_DIRTY_WIZARD_FLAG';\nexport const UI_TOGGLE_SCROLL_TO_TOP_BUTTON = 'UI_TOGGLE_SCROLL_TO_TOP_BUTTON';\n\n// JotForm Next Mobile action\nexport const UI_SET_JOTFORM_MOBILE_APP = 'UI_SET_JOTFORM_MOBILE_APP';\n\n// Offline mode - ui\nexport const OFFLINE_MODE_CHANGED = 'OFFLINE_MODE_CHANGED';\n\n// Themes tab\nexport const THEME_LOADING = 'THEME_LOADING';\nexport const THEME_LOADING_SUCCESS = 'THEME_LOADING_SUCCESS';\nexport const THEME_LOADING_FAIL = 'THEME_LOADING_FAIL';\nexport const THEME_FETCHED_COLLECTION = 'THEME_FETCHED_COLLECTION';\nexport const THEME_FETCHED_USERTHEMES = 'THEME_FETCHED_USERTHEMES';\nexport const THEME_SET_SELECTION = 'THEME_SET_SELECTION';\nexport const THEME_PREVIEW = 'THEME_PREVIEW';\nexport const THEME_THUMBNAIL_LOADING = 'THEME_THUMBNAIL_LOADING';\nexport const THEME_FETCH_INFO = 'THEME_FETCH_INFO';\nexport const THEME_FETCHED_CARDTHEMES = 'THEME_FETCHED_CARDTHEMES';\n\n// Collaboration - socket\nexport const FORM_QUESTION_UPDATED_WS = 'FORM_QUESTION_UPDATED_WS';\nexport const FORM_QUESTION_CREATED_WS = 'FORM_QUESTION_CREATED_WS';\nexport const FORM_QUESTION_DELETED_WS = 'FORM_QUESTION_DELETED_WS';\nexport const FORM_MULTIPLE_QUESTION_UPDATED_WS = 'FORM_MULTIPLE_QUESTION_UPDATED_WS';\nexport const FORM_PROPERTY_UPDATED_WS = 'FORM_PROPERTY_UPDATED_WS';\nexport const FORM_MULTIPLE_QUESTION_DELETED_WS = 'FORM_MULTIPLE_QUESTION_DELETED_WS';\nexport const FORM_MULTIPLE_QUESTION_CREATED_WS = 'FORM_MULTIPLE_QUESTION_CREATED_WS';\n\nexport const UI_REVISION_INDICATOR = 'UI_REVISION_INDICATOR';\nexport const UI_REVISION_PREVIEW = 'UI_REVISION_PREVIEW';\nexport const UI_REVISION_FOOTER_INFO = 'UI_REVISION_FOOTER_INFO';\n\nexport const UI_REVISION_ITEM_INDICATOR = 'UI_REVISION_ITEM_INDICATOR';\n\n// CLIPBOARD REDUCER\nexport const COPY_QUESTIONS_TO_CLIPBOARD = 'COPY_QUESTIONS_TO_CLIPBOARD';\nexport const EMPTY_CLIPBOARD = 'EMPTY_CLIPBOARD';\n\n// SEARCH REDUCER\nexport const SEARCH_SET_STATIC_DATA = 'SEARCH_SET_STATIC_DATA';\n\n// TRANSLATION MIMIC UPDATES\nexport const TRANSLATION_TEXT_UPDATING = 'TRANSLATION_TEXT_UPDATING';\nexport const TRANSLATION_TEXT_UPDATE_SUCCESS = 'TRANSLATION_TEXT_UPDATE_SUCCESS';\n\n// PDF IMPORTER\nexport const PDF_IMPORT_PAGE_ANNOTATIONS_FETCH_SUCCESS = 'PDF_IMPORT_PAGE_ANNOTATIONS_FETCH_SUCCESS';\nexport const PDF_IMPORT_REMOVE_PDF_SUCCESS = 'PDF_IMPORT_REMOVE_PDF_SUCCESS';\nexport const PDF_IMPORT_SET_SELECTED_FORM_FIELD = 'PDF_IMPORT_SET_SELECTED_FORM_FIELD';\nexport const PDF_IMPORT_UPDATE_SELECTED_FORM_FIELD = 'PDF_IMPORT_UPDATE_SELECTED_FORM_FIELD';\nexport const PDF_IMPORT_SET_PINNED_ANNOTATION = 'PDF_IMPORT_SET_PINNED_ANNOTATION';\nexport const PDF_IMPORT_UPDATE_ANNOTATION_QID = 'PDF_IMPORT_UPDATE_ANNOTATION_QID';\nexport const PDF_IMPORT_CREATE_ANNOTATION = 'PDF_IMPORT_CREATE_ANNOTATION';\nexport const PDF_IMPORT_DELETE_ANNOTATION = 'PDF_IMPORT_DELETE_ANNOTATION';\nexport const PDF_IMPORT_UPDATE_ANNOTATION = 'PDF_IMPORT_UPDATE_ANNOTATION';\nexport const PDF_IMPORT_SET_ANNOTATION_SELECTION = 'PDF_IMPORT_SET_ANNOTATION_SELECTION';\nexport const PDF_IMPORT_SET_ANNOTATION_MERGED_RECT = 'PDF_IMPORT_SET_ANNOTATION_MERGED_RECT';\nexport const PDF_IMPORT_UPDATE_ANNOTATION_RECT = 'PDF_IMPORT_UPDATE_ANNOTATION_RECT';\nexport const PDF_IMPORT_UPDATE_ANNOTATION_TYPE = 'PDF_IMPORT_UPDATE_ANNOTATION_TYPE';\nexport const PDF_IMPORT_SET_NEWLY_CREATED_ANNOTATION = 'PDF_IMPORT_SET_NEWLY_CREATED_ANNOTATION';\nexport const PDF_IMPORT_SET_PAGE_DISTANCE = 'PDF_IMPORT_SET_PAGE_DISTANCE';\nexport const PDF_IMPORT_RESET_PAGE_DISTANCE = 'PDF_IMPORT_RESET_PAGE_DISTANCE';\nexport const PDF_IMPORT_SET_HOVERED_ANNOTATION = 'PDF_IMPORT_SET_HOVERED_ANNOTATION';\nexport const PDF_IMPORT_UPDATE_ANNOTATION_PAGE = 'PDF_IMPORT_UPDATE_ANNOTATION_PAGE';\n\n// ui\nexport const PDF_IMPORT_UI_SET_SCALE = 'PDF_IMPORT_UI_SET_SCALE';\nexport const PDF_IMPORT_UI_SET_MAPPER_WIDTH = 'PDF_IMPORT_UI_SET_MAPPER_WIDTH';\nexport const PDF_IMPORT_UI_DRAG_ANNOTATION = 'PDF_IMPORT_UI_DRAG_ANNOTATION';\nexport const PDF_IMPORT_UI_RESIZE_ANNOTATION = 'PDF_IMPORT_UI_RESIZE_ANNOTATION';\nexport const PDF_IMPORT_UI_SET_SELECTION_SOURCE = 'PDF_IMPORT_UI_SET_SELECTION_SOURCE';\nexport const PDF_IMPORT_UI_SET_PDF_PAGE_SETTINGS = 'PDF_IMPORT_UI_SET_PDF_PAGE_SETTINGS';\nexport const PDF_IMPORT_UI_SET_ERROR_MESSAGE = 'PDF_IMPORT_UI_SET_ERROR_MESSAGE';\nexport const PDF_IMPORT_UI_SET_VARIANT_CODE = 'PDF_IMPORT_UI_SET_VARIANT_CODE';\n\n// THESE ACTION TYPES BELOW (AND ALL THE CODES RELATED TO IT) ARE UNUSED, AND WILL BE COMPLETELY REMOVED...\n// ...WHEN WE START USING REUSABLE CONNECTIONS\n// Payment Connection\nexport const PAYMENT_CONNECTION_FETCHING = 'PAYMENT_CONNECTION_FETCHING';\nexport const PAYMENT_CONNECTION_FETCH_SUCCESS = 'PAYMENT_CONNECTION_FETCH_SUCCESS';\nexport const PAYMENT_CONNECTION_UPDATE_SUCCESS = 'PAYMENT_CONNECTION_UPDATE_SUCCESS';\n\n// THESE ACTION TYPES BELOW (AND ALL THE CODES RELATED TO IT) ARE UNUSED, AND WILL BE COMPLETELY REMOVED...\n// ...WHEN WE START USING REUSABLE CONNECTIONS\n// Payment Connection Backup\nexport const PAYMENT_CONNECTION_SAVE_BACKUP = 'PAYMENT_CONNECTION_SAVE_BACKUP';\nexport const PAYMENT_CONNECTION_CLEAR_BACKUP = 'PAYMENT_CONNECTION_CLEAR_BACKUP';\n\nexport const UI_PAYMENT_CONNECTION_BUILDER_BTN_STATUS = 'UI_PAYMENT_CONNECTION_BUILDER_BTN_STATUS';\nexport const UI_PAYMENT_GATEWAY_CONFIGURATION_STATUS = 'UI_PAYMENT_GATEWAY_CONFIGURATION_STATUS';\n\n// PaymentList\nexport const PAYMENT_LIST_SETTINGS_UPDATE = 'PAYMENT_LIST_SETTINGS_UPDATE';\n\n// Payment Stock Management\nexport const PAYMENT_FETCH_ALL_STOCK = 'PAYMENT_FETCH_ALL_STOCK';\nexport const PAYMENT_CLONE_STOCK_DATA = 'PAYMENT_CLONE_STOCK_DATA';\nexport const PAYMENT_UPDATE_STOCK = 'PAYMENT_UPDATE_STOCK';\n\n// App Picker Layout Side Mode\nexport const UI_APP_PICKER_SIDE_MODE = 'UI_APP_PICKER_SIDE_MODE';\nexport const UI_APP_PICKER_PULSE = 'UI_APP_PICKER_PULSE';\nexport const UI_APP_PICKER_TOOLTIP = 'UI_APP_PICKER_TOOLTIP';\n\n// Form Owner\nexport const FORM_OWNER_PROPERTIES_FETCH_SUCCESS = 'FORM_OWNER_PROPERTIES_FETCH_SUCCESS';\nexport const FORM_OWNER_PROPERTIES_FETCH_FAILURE = 'FORM_OWNER_PROPERTIES_FETCH_FAILURE';\n\n// User Subscription Limit\nexport const UI_LIMIT_LEVEL = 'UI_LIMIT_LEVEL';\nexport const UI_FIELD_LIMIT_REACHED_WITH_SELECTED_QUESTIONS = 'UI_FIELD_LIMIT_REACHED_WITH_SELECTED_QUESTIONS';\nexport const UI_SHOW_LIMIT_MESAGE_POPOVER = 'UI_SHOW_LIMIT_MESAGE_POPOVER';\nexport const UI_SET_SHOW_DETAILS = 'UI_SET_SHOW_DETAILS';\n\n// Team Members\nexport const TEAM_MEMBERS_FETCH_SUCCESS = 'TEAM_MEMBERS_FETCH_SUCCESS';\n\n// Team Properties\nexport const TEAM_PROPERTIES_FETCH_SUCCESS = 'TEAM_PROPERTIES_FETCH_SUCCESS';\n\n// Salesforce\nexport const FETCH_SALESFORCE_OBJECTS_SUCCESS = 'FETCH_SALESFORCE_OBJECTS_SUCCESS';\nexport const FETCH_SALESFORCE_FIELDS_SUCCESS = 'FETCH_SALESFORCE_FIELDS_SUCCESS';\nexport const SALESFORCE_MODAL_SET_PROPS = 'SALESFORCE_MODAL_SET_PROPS';\nexport const SALESFORCE_MODAL_SET_ACTION_ID = 'SALESFORCE_MODAL_SET_ACTION_ID';\nexport const SALESFORCE_MODAL_SET_VISIBILITY = 'SALESFORCE_MODAL_SET_VISIBILITY';\nexport const SALESFORCE_MODAL_SET_BUTTONS = 'SALESFORCE_MODAL_SET_BUTTONS';\n\nexport const UI_TOGGLE_HIPAA_PIN_MODAL = 'UI_TOGGLE_HIPAA_PIN_MODAL';\n\nexport const UPDATE_SUCCEED = 'UPDATE_SUCCEED';\n\nexport const SET_ZOOM_WIDGET_OPTIONS = 'SET_ZOOM_WIDGET_OPTIONS';\nexport const SET_AGENT_ZOOM_RESPONSE = 'SET_AGENT_ZOOM_RESPONSE';\nexport const FETCH_ALLOWED_ZOOM_WIDGET = 'FETCH_ALLOWED_ZOOM_WIDGET';\n\nexport const UI_CALCULATION_ERRORS = 'UI_CALCULATION_ERRORS';\n\n// Payment Gateway Connection Flow\nexport const UI_GATEWAY_CONNECTION_FLOW_IS_OPEN = 'UI_GATEWAY_CONNECTION_FLOW_IS_OPEN';\nexport const UI_HAS_CONNECTION_TO_THE_GATEWAY_TYPE = 'UI_HAS_CONNECTION_TO_THE_GATEWAY_TYPE';\n\n// Common Share Infrastructure actions\nexport const SHARE_GENERATE_NEW_LINK_SUCCESS = 'SHARE_GENERATE_NEW_LINK_SUCCESS';\nexport const SHARE_GENERATE_NEW_LINK_FAILURE = 'SHARE_GENERATE_NEW_LINK_FAILURE';\nexport const SHARE_PROPERTY_CHANGE_SUCCESS = 'SHARE_PROPERTY_CHANGE_SUCCESS';\nexport const SHARE_PROPERTY_CHANGE_FAILURE = 'SHARE_PROPERTY_CHANGE_FAILURE';\nexport const SHARE_INIT_SUCCESS = 'SHARE_INIT_SUCCESS';\nexport const SHARE_INIT_FAILURE = 'SHARE_INIT_FAILURE';\nexport const SHARE_SEND_INVITATION_SUCCESS = 'SHARE_SEND_INVITATION_SUCCESS';\nexport const SHARE_SEND_INVITATION_FAILURE = 'SHARE_SEND_INVITATION_FAILURE';\nexport const SHARE_REVOKE_USERS_SUCCESS = 'SHARE_REVOKE_USERS_SUCCESS';\nexport const SHARE_REVOKE_USERS_FAILURE = 'SHARE_REVOKE_USERS_FAILURE';\nexport const SHARE_RESEND_INVITATION_SUCCESS = 'SHARE_RESEND_INVITATION_SUCCESS';\nexport const SHARE_RESEND_INVITATION_FAILURE = 'SHARE_RESEND_INVITATION_FAILURE';\nexport const SHARE_SET_CURRENT_USER_REVOKED = 'SHARE_SET_CURRENT_USER_REVOKED';\nexport const SHARE_SET_MOVE_SIGNAL = 'SHARE_SET_MOVE_SIGNAL';\n","/* eslint-disable camelcase */\nexport const IGNORED_FIELDS = [\n // 'control_head'\n 'control_button',\n 'control_divider',\n 'control_pagebreak',\n 'control_collapse',\n 'control_helper',\n 'control_googleco',\n 'control_filepickerIO',\n 'control_separator',\n 'control_clear'\n];\n\nexport const IGNORED_WIDGETS = [\n '528ea7c6a4de152e2a00000c', // Spacer\n '5391144b1072cca44100002e', // Mobile Responsive\n '54ec34ea0405960f50000005', // Form Separators\n '529ca5f5caf2cd9e58000005', // Form Tabs\n '54aa6b0c89d04cfa36000006', // Google ReCAPTCHA\n '58c2603779006b00000005e2', // Google Invisible ReCAPTCHA\n '529c802f72a985697f000005', // Scroll to Top\n '52a8531850e4cbc101000005', // Progress Bar\n '59928996ad70efd97d000319', // Breadcrumbs\n '591bfab2b81b39d90500089c', // Accessibility Enhancer\n '538da19e8f1162765c000012', // Preview Before Submit\n '5407daa93d1ca3c06c000016', // Shuffle\n '52f34485f5fa94837c0000ce', // Scrollable Texts\n '53bf97a4a15b76c304000019', // Global Countdown\n '5295b6b6cdfcb5695d000005', // Image Checkboxes\n '5295aae4944ac5405800000d', // Image Radio Buttons\n '52a1fdaf2213aced2b000007', // Filled Fields\n '52a846c576fc316f4700001b', // Unfilled Fields\n '59e05ccb036d364d0400013f', // Single Field Form\n '5593eb4edc0ffe5e7a000019', // Dynamic QR Code\n '53451665a01cdaaa49000006', // Email Validator\n '537f577e93a6564a47000014' // Autocompleted Address\n];\n\nexport const IGNORED_WIDGETS_SELECTED_FIELDS = [\n '5391144b1072cca44100002d',\n '528ea7c6a4de152e2a00000b',\n '54ec34ea0405960f50000004',\n '529ca5f5caf2cd9e58000004',\n '54aa6b0c89d04cfa36000005',\n '58c2603779006b00000005e1',\n '529c802f72a985697f000004',\n '52a8531850e4cbc101000004',\n '59928996ad70efd97d000318',\n '591bfab2b81b39d90500089b',\n '538da19e8f1162765c000011',\n '5407daa93d1ca3c06c000015',\n '52f34485f5fa94837c0000cd',\n '53bf97a4a15b76c304000018',\n '5295b6b6cdfcb5695d000004',\n '5295aae4944ac5405800000c',\n '52a1fdaf2213aced2b000006',\n '52a846c576fc316f4700001a',\n '59e05ccb036d364d0400013e',\n '5593eb4edc0ffe5e7a000018',\n '53451665a01cdaaa49000005',\n '537f577e93a6564a47000013'\n];\n\nexport const IGNORED_TYPE_NAMES = {\n control_button: 'BUTTON',\n control_divider: 'DIVIDER',\n control_pagebreak: 'PAGE BREAK',\n control_collapse: 'COLLAPSE',\n control_helper: 'HELPER',\n control_googleco: 'GOOGLE CO',\n control_filepickerIO: 'FILE PICKER IO',\n control_separator: 'SEPARATOR',\n control_clear: 'CLEAR',\n control_imagechoice: 'IMAGE CHOICE',\n control_mixed: 'MULTI-LINE',\n control_textarea2: 'TEXT AREA'\n};\n","/* eslint-disable */\nimport { t } from '@jotforminc/translation';\nimport { getUrlByCurrentLocale } from '@jotforminc/utils';\nconst learnMore = global.JOTFORM_ENV !== 'ENTERPRISE' ? `` + `Learn more.`.locale() + `` : ``;\nconst DefaultTips = {\n acceptedCc: {title:'Accept Card Images'.locale(), tip:'Sets the accepted cards (images only) to display on the form'.locale()},\n addAmount: {title:'Stepping'.locale(), tip:'Defines increase/decrease amount'.locale()},\n alignment: {title:'Alignment'.locale(), tip:'Align questions and answers'.locale() },\n allowMinus: {title:'Allow Negatives'.locale(), tip:'Allows user to select or enter negative values'.locale()},\n allowMultiple: {title:'Allow Multiple'.locale(), tip:'Allow user to upload more than one file'.locale()},\n alt: {title:'Alt'.locale(), tip:'Alternative text describing the image'.locale()},\n multipleSelections: {title:'Allow Multiple'.locale(), tip:'Allow user to select more than one option'.locale()},\n allowOther: {title:'Allow Other'.locale(), tip:'Let users type a text'.locale() },\n allowTime: {title:'Time'.locale(), tip:'Enable/Disable time section'.locale()},\n authOnly: {title:'Authorization Only'.locale(), tip:'Specifies if transaction is Authorization Only (No payment captured). Payment capture must be done manually via the payment gateway\\'s interface'.locale() },\n autoCalendar: {title:'Calendar Popup'.locale(), tip:'Automatically show Calendar when date field is clicked'.locale() },\n autoNext: {title:'Auto Next'.locale(), tip:'Automatically go to next page when last question filled. Supports radios and dropdowns'.locale() },\n allowUploadToS3:{title:'Store files to S3'.locale(), tip:'Enable or disable storing uploaded files to S3. Make sure you setup your S3 credentials from Filepicker Portal page.'.locale() },\n donationAmountField: {title:'Custom Amount Field', tip:'Form field to get the custom amount from'},\n background: {title:'Background'.locale(), tip:'Change form background color'.locale() },\n boxAlign: {title:'Box Align'.locale(), tip:'Define where boxes should be located'.locale()},\n braintreeDescriptionField: { title: \"Product Description Field\".locale(), tip: \"API name of custom field to which the purchased product's description will be passed\".locale()},\n browserInfo: {title:'Browser Info'.locale(), tip:'Send browser information with form'.locale()},\n buttonAlign: {title:'Button Align'.locale(), tip:'Align submit button to left, center or right'.locale() },\n calcValues: {title:'Calculation Values'.locale(), tip:'These Values will be used in calculations but not shown on your form'},\n calcMatrixValues: {title:'Calculation Values'.locale(), tip:'These Values will be used in calculations but not shown on your form. Separate cells with a comma, lines with a new line. eg:
    1,2,3,4,5
    10,20,30,40'},\n cartColor: {title:'Checkout Cart Color'.locale(), tip:'Border color of cart in checkout page. HEX values only, e.g. #FC7C01'.locale()},\n checkoutLogo: {title:'Checkout Logo'.locale(), tip:'The URL of the 150x50-pixel image displayed as your logo in the upper left corner of the checkout page. Securely-stored (SSL) image is recommended.'.locale()},\n clear: {title:'Reset Button'.locale(), tip:'Show a clear button or not.'.locale() },\n clearText: {title:'Reset Button Text'.locale(), tip:'Text of clear button.'.locale() },\n encryptIcon: {title:'Encrypt Icon'.locale(), tip:'Show an encrypt icon or not.'.locale() },\n clearFieldOnHide:{title:'Clear Hidden Field Values'.locale(),tip:'Choose whether or not to clear values for fields hidden by conditional logic'.locale() },\n cols: {title:'Columns'.locale(), tip:'Width of textarea'.locale() },\n cond: {title:'Conditions'.locale(), tip:'Setup Conditional Fields'.locale() },\n confirmation: {title:'Confirmation'.locale(), tip:'E-mail address confirmation'.locale() },\n confirmationHint: {title:'Confirmation Hint Example'.locale(), tip:'Show an example in gray'.locale() },\n country: {title:'Checkout Page Language'.locale(), tip:'Default checkout page language'.locale() },\n countryCode: {title:'Country Code'.locale(), tip:'Ask for country code'.locale() },\n createCustomer: {title:'Create Stripe Customer', tip:'Create a Stripe customer record for each transaction'.locale()},\n cropImage: {title:'Crop Image'.locale(), tip:'Allow a user to crop the image before uploading'.locale()},\n cropImageRatio: {title:'Crop Ratio'.locale(), tip:'Specify a crop ratio for the image'.locale()},\n compressImage: {title:'Compress Image'.locale(), tip:'Automatically compress JPEG images before uploading'.locale()},\n compressImageLvl:{title:'Quality Level'.locale(), tip:'Specify the image quality'.locale()},\n imageDim: {title: 'Image dimensions'.locale(), tip:'Specify the image dimensions in pixels. Images will be resized (upscaled or downscaled) to the specified dimensions before uploading.'.locale()},\n imageMin: {title: 'Min Dimensions'.locale(), tip:'Specify the minimum image dimensions in pixels. Images smaller than specified will be resized.'.locale()},\n imageMax: {title: 'Max Dimensions'.locale(), tip:'Specify the maximum image dimensions in pixels. Images bigger than specified will be resized.'.locale()},\n customDataField: {title:'Custom Data Field'.locale(), tip:'Form field data passed to payment gateway.
    Note: only regular textbox fields are allowed.'.locale()},\n decimalMark: {title: 'Decimal Separator'.locale(), tip: 'Character used to separate decimal values. Note: If comma is selected, point will be used as thousands separator and vice-versa.'.locale() },\n defaultFrom: {title:'Default From'.locale(), tip:'Set a predefined value'.locale()},\n defaultTime: {title:'Default Time'.locale(), tip:'Should we pre-populate date field with current time'.locale()},\n defaultDate: {title:'Default Date'.locale(), tip:'Should we pre-populate date field with current date'.locale()},\n defaultTo: {title:'Default To'.locale(), tip:'Set a predefined value'.locale()},\n defaultValue: {title:'Default Value'.locale(), tip:'Pre-populate a value'.locale() },\n defaultResult: {title:'Default Value'.locale(), tip:'Pre-populate a value'.locale() },\n description: {title:'Hover Text'.locale(), tip:'Show description about question'.locale() },\n disallowDecimals:{title:'Disallow Decimals'.locale(), tip:'Only Allow full numbers'.locale() },\n disallowFree: {title:'Disallow Free Addresses'.locale(),tip:'Do not allow free email addresses such as gmail and hotmail'.locale() },\n downloadImg: {title:'Download Images'.locale(), tip:'Show a download prompt for uploaded image files'.locale() },\n emails: {title:'Emails'.locale(), tip:'Send notification and confirmation emails on submissions'.locale() },\n emailpending: {title:'Pending Payment E-mail'.locale(), tip:'Send email alerts even if payment is not completed'.locale() },\n emptyText: {title:'Empty Option Text'.locale(), tip: 'Text to be used as the \\\"empty\\\" option. For example: \\\"Please Select\\\"'.locale()},\n authnetEmulator: {title:'Emulator'.locale(), tip:'Send transaction to a different gateway using emulation'.locale()},\n entryLimit: {title:'Maximum Entry Limit'.locale(), tip:'Set this value from toolbar.'.locale() },\n entryLimitMin: {title:'Minimum Entry Limit'.locale(), tip:'Set this value from toolbar.'.locale() },\n expireDate: {title:'Expiration Date'.locale(), tip:'Disable form on a date.'.locale() + '
    ('+ 'e.g.'.locale() + ' 2012-10-30 13:00)' },\n extensions: {title:'Extensions'.locale(), tip:'Allowed file types'.locale() },\n fileLimit: {title:'Maximum number of files'.locale(),tip:'Maximum number of files if multiple allowed. 0 for no limit'.locale()},\n formCover: {title:'Form Cover'.locale(), tip:'Form Cover'.locale() },\n language: {title:'Languages'.locale(), tip:'Make multiple language versions of your form.'.locale() },\n font: {title:'Font'.locale(), tip:'Change font style'.locale() },\n fontcolor: {title:'Font Color'.locale(), tip:'Change font color'.locale() },\n fontsize: {title:'Font'.locale(), tip:'Change font size'.locale() },\n formStrings: {title:'Form Warnings'.locale(), tip:'Change the warning messages on your form.'.locale() },\n formWidth: {title:'Form Width'.locale(), tip:'Resize form width'.locale() },\n format: {title:'Date Format'.locale(), tip:'Set a format for date: EU or US'.locale() },\n fpModal: {title:'Modal', tip:'Display a modal dialog box for selecting files instead of a new window'.locale()},\n fromText: {title:'Best Text'.locale(), tip:'Change the starting point text'.locale()},\n fuzzySearch: {title:'Fuzzy Search'.locale(), tip:'Enable fuzzy search algorithm, i.e. find matches at any position'},\n expressCategory: {title:'Goods Category'.locale(), tip:'Type of items you are selling'.locale()},\n headerType: {title:'Heading Type'.locale(), tip:'Size of heading'.locale() },\n highlightLine: {title:'Hightlight Effect'.locale(), tip:'Enable or disable yellow background highlight for form fields'.locale() },\n hint: {title:'Input Hint'.locale(), tip:'Show an example in gray'.locale() },\n compoundHint: {title:'Input Hint'.locale(), tip:'Show an example in gray'.locale() },\n injectCSS: {title:'Inject Custom CSS'.locale(), tip:'Add custom CSS codes to your form. CSS codes let you customize every aspect of your form design.'.locale() + `` + 'Learn more'.locale() + '.'},\n inputType: {title:'Input Type'.locale(), tip:'Define input method for matrix'.locale()},\n items: {title:'Items'.locale(), tip:'Words for auto completion'.locale() },\n inputMask: {title:'Input Mask'.locale(), tip:'Restricts users to entering data in the format you specify. Once enabled, only a certain number of characters can be entered and all of them must be digits.'.locale()},\n inputMaskValue: {title:'Input Mask Value'.locale(), tip:'Masking format.
    ex: (###) ###-####'.locale()},\n // isEncrypted: {title:'Encrypt Form Data'.locale(), tip:t('Encrypt your form responses to store sensitive data securely.') + ' ' + learnMore},\n autoDeleteSubmissions: {title:'Automatically Delete Form Submissions'.locale(), tip:'Delete form submissions after a certain period of time'.locale()},\n ipnrelay: {title:'IPN Relay URL'.locale(), tip:'URL to relay Paypal\\'s Instant Payment Notifications to'.locale()},\n labelAlign: {title:'Label Align'.locale(), tip:'Align question label'.locale() },\n labelWidth: {title:'Label Width'.locale(), tip:'Resize label width'.locale() },\n liteMode: {title:'Lite Mode'.locale(), tip:'Only show single textbox as input field'.locale() },\n validateLiteDate:{title:'Validate Lite Mode Date'.locale(), tip:'Prevent submission if invalid date is entered'.locale() },\n limitDate: {title:'Limit Date'.locale(), tip:'Limit Days of the week or specific dates etc'.locale() },\n optioncolor: {title:'Secondary Color'.locale(), tip:'Change the color of option labels to distinguish them better.'.locale() },\n openToService: {title:'Default Service'.locale(), tip:'Which service to show upon opening the picker. If not set, the user is shown their most recently used location.'.locale()},\n limitSubmission:{title:'Submission Limit'.locale(), tip:'Limit the total number of submissions (e.g., 1,000)'.locale() },\n lineSpacing: {title:'Question Spacing'.locale(), tip:'Distance between questions'.locale() },\n matrixwidth: {title:'Table Width'.locale(), tip:'Width size of the Matrix table. '.locale()},\n matrixcells: {title:'Cells Width'.locale(), tip:'Width size of table cells in Matrix.'.locale()},\n maxFileSize: {title:'Max File Size'.locale(), tip:'Maximum file size allowed. Defined as Kilo Bytes. Keep in mind that 1024 KB equals to 1MB'.locale()},\n minFileSize: {title:'Min File Size'.locale(), tip:'Minimum file size allowed. Defined as Kilo Bytes. Keep in mind that 1024 KB equals to 1MB'.locale()},\n maxMatches: {title:'Max Matches'.locale(), tip:'Maximum matches shown in autocomplete dropdown'.locale()},\n maxValue: {title:'Maximum Value'.locale(), tip:'Users will be unable to select a value higher than this number'.locale()},\n maxsize: {title:'Max Size'.locale(), tip:'Maximum allowed characters for this field'.locale() },\n merchantCode: {title:'Merchant Code(s)'.locale(), tip:'Merchant code(s) to be used for this transaction. Separate with a new line'.locale()},\n messageOfLimitedForm:{title:'Warning Message'.locale(), tip:'Set a message for disabled forms'.locale() },\n mcolumns: {title:'Columns'.locale(), tip:'Labels at the top of the matrix'.locale()},\n middle: {title:'Middle Name'.locale(), tip:'Ask for middle name'.locale() },\n minValue: {title:'Minimum Value'.locale(), tip:'Users will be unable to select a value lower than this number'.locale()},\n mimetypes: {title:'Mimetypes'.locale(), tip:'Specify the type of file that the user is allowed to upload.'.locale()},\n mrows: {title:'Rows'.locale(), tip:'Labels at the left side of the matrix'.locale()},\n onSubmissionError:{title:'On Submission Error'.locale(), tip:'What form will do upon hitting a submission error'.locale()},\n options: {title:'Options'.locale(), tip:'Users can choose from these options'.locale() },\n onlyFuture: {title:'Disable Past Dates'.locale(),tip:'If set yes users can not enter dates earlier than then.'.locale() },\n otherText: {title: 'Other Text'.locale(), tip: 'Text placeholder for other option (if allowed)'.locale() },\n pagestyle: {title:'Paypal Page Style'.locale(), tip:\"Custom page layout name\".locale() },\n pagetitle: {title:'Page Title'.locale(), tip:'Title for the form\\'s HTML document if shared as a standalone page. '.locale() },\n paymentMethod: {title:'Default Payment Method'.locale(), tip:'Sets the default payment method'.locale() },\n paypalButton: {title:'Switch to PayPal Checkout button'.locale(), tip:'Switches submit buttons to PayPal checkout buttons'.locale() },\n paypalLink: {title:'Show PayPal Link'.locale(), tip: 'Show a \\\"What is PayPal?\\\" link on the form'.locale()},\n prefix: {title:'Prefix'.locale(), tip:'Ask for prefix: Mr., Mrs., Dr.'.locale() },\n prefixChoices: {title:'Prefix Choices'.locale(), tip:'A predefined list of prefixes for users to select from a dropdown box'.locale() },\n print: {title:'Print Button'.locale(), tip:'Show a print button or not.'.locale() },\n printText: {title:'Print Button Text'.locale(), tip:'Text of print button.'.locale() },\n properties: {title:'Preferences'.locale(), tip:'Update Form Settings'.locale() },\n range: {title:'Range'.locale(), tip:'Show two time fields for time ranges'.locale() },\n readonly: {title:'Read Only'.locale(), tip:'Prevents a form field value from being modified by the end-user. This can be useful for pre-population'.locale() },\n required: {title:'Require'.locale(), tip:'Require completing question'.locale() },\n requireBillingAddr: {title: 'Require billing address'.locale(), tip: 'Require a billing address for the transaction. Note: AVS and CVV rules must be configured on your Braintree merchant account.'},\n rows: {title:'Rows'.locale(), tip:'Number of lines on textarea'.locale() },\n scaleAmount: {title:'Scale Amount'.locale(), tip:'Choose how may points used in scale'.locale()},\n selected: {title:'Selected'.locale(), tip:'Default selected answer'.locale()},\n minSelection: {title:'Minimum Selections'.locale(), tip:'Require a Minimum number of checkboxes a user must select in this question'.locale()},\n maxSelection: {title:'Maximum Selections'.locale(), tip:'Limit the number of checkboxes a user can select in this question'.locale()},\n selectedCountry:{title:'Country'.locale(), tip:'Set a country to select by default'.locale() },\n states: {title:'State / Province input'.locale(),tip:'Select what options there are in state'.locale() },\n sendpostdata: {title:'Send Post Data'.locale(), tip:'Automatically send HTTP POST data to the Thank You page'.locale()},\n share: {title:'Embed Form'.locale(), tip:'Add form to your website or send to others'.locale() },\n shipToAddress: {title:'Shipping Address'.locale(), tip:'Select a form field to use for the shipping address.
    Note: if shipping address is different from billing address, you must add a separate address field on your form if there isn\\'t one yet.'.locale()},\n shuffle: {title:'Shuffle Options'.locale(), tip:'Display field options in random order'.locale() },\n shuffleMatrix: {title:'Shuffle Rows'.locale(), tip:'Display the matrix rows in random order'.locale() },\n size: {title:'Size'.locale(), tip:'Set number of characters users can enter'.locale() },\n special: {title:'Special Options'.locale(), tip:'Collection of predefined values to be used on your form. Such as Countries.'.locale()},\n spreadCols: {title:'Spread To Columns'.locale(), tip:'Spread inputs into multiple columns. Useful if you have lots of options.'.locale()},\n status: {title:'Form Status'.locale(), tip:'Enable or Disable Form.'.locale()},\n startWeekOn: {title:'Start Week on'.locale(), tip:'Calendar shows first day of week as Monday or Sunday'.locale()},\n hideMailEmptyFields: {title:'Hide Empty Fields on Emails'.locale(), tip:'Hide empty fields on submission email.
    This only works using the default email notifier.'.locale()},\n mobileGoButton: {title:'GO button submits form'.locale(),tip:'GO button in mobile OSes submits form'},\n showProgressBar:{title:'Show Progress Bar'.locale(), tip:'Show progress bar & percentage complete.'.locale()},\n autoFill: {title:'Auto Fill Forms'.locale(), tip:'Allow users to save their submission and finish it later.'.locale()},\n webHooks: {title:'WebHooks'.locale(), tip:'Manage your Webhooks'.locale()},\n step: {title:'Minute Step'.locale(), tip:'Space between minutes in drop down.'.locale()},\n styles: {title:'Themes'.locale(), tip:'Apply a style to your form'.locale() },\n subHeader: {title:'Sub Header'.locale(), tip:'Text below heading'.locale() },\n subLabel: {title:'Sublabel'.locale(), tip:'Small description below the input field'.locale() },\n suffix: {title:'Suffix'.locale(), tip:'Ask for suffix: Ph.D, M.D., Jr, VII'.locale() },\n // s3BucketName: {title:'Amazon S3 Bucket Name'.locale(),tip:'The exact name of your Amazon S3 Bucket on where uploaded files will be stored. It must be filled up to make things work.'.locale()},\n s3UploadingPath:{title:'Upload Path'.locale(),tip:'The path to store the files. By default, all files are stored to {bucket}/JotForm/{formID}/ folder. Use the special string {formID} if you wish to include the Form ID to the full path.'.locale() },\n s3UploadAccess: {title:'File Access'.locale(),tip:'Indicates that the files should be stored in a way that allows public or private access when visited directly from a link(url).'.locale() },\n testMode: {title:'Test Mode'.locale(), tip:'Post to WorldPay Test Mode URL'.locale() },\n testmodeAuth: {title:'Sandbox Test Mode'.locale(), tip:\"Simulate test payments\".locale() },\n text: {title:'Text'.locale(), tip:'Label of your question'.locale() },\n thankurl: {title:'Thank You URL'.locale(), tip:'Redirect user to a page after submission'.locale() },\n timeDiff: {title:'Time Range Duration'.locale(), tip:'Show the difference in hours and minutes between the two times'.locale()},\n timeFormat: {title:'Time Format'.locale(), tip:'Choose 12 Hours or 24 Hours format'.locale()},\n showDayPeriods: {title:'Day Periods'.locale(), tip:'Hide the morning or afternoon period in AM/PM format'.locale()},\n title: {title:'Form Title'.locale(), tip:'A short descriptive name for this form'.locale() },\n toText: {title:'Worst Text'.locale(), tip:'Change the ending point text'.locale()},\n total: {title:'Total'.locale(), tip:'Values must be totaled to this value'.locale()},\n unique: {title:'Unique Submission'.locale(), tip:'Use cookies or IP address to prevent multiple form submissions'.locale()},\n uniqueField: {title:'Unique Field'.locale(), tip:'Don\\'t allow previously entered values for a specific field'.locale()},\n useDecimal: {title:'Use Decimals'.locale(), tip:'Specify whether to use decimal places or not'.locale()},\n usesNewPDF: {title:'PDF Documents'.locale(), tip:'Generate PDF Documents from form submissions.'.locale() },\n preventCloningForm: {title:'Prevent Cloning'.locale(), tip:'Prevent other users from cloning this form'.locale() },\n validation: {title:'Validation'.locale(), tip:'Validate entry format'.locale() },\n validateImg: {title:'Validate Image'.locale(), tip:'Check if the uploaded image files are really image files.'.locale()},\n visibleOptions: {title:'Visible Options'.locale(), tip:'Number of options visible at once'.locale() },\n visibility: {title:'Visibility'.locale(), tip:'Hide or show collapse field'.locale()},\n currentIndex: {title:'Current Index'.locale(), tip:'Shows the current index. You can change this value to make IDs start from any number, such as 1000.'.locale() },\n idPrefix: {title:'Prefix'.locale(), tip:'Add a prefix to your ID such as WD-'.locale() },\n idPadding: {title:'Number of Digits'.locale(), tip:'Pad your ID to left with zeros such as 0001.'.locale() },\n idLength: {title:'Number of Characters'.locale(), tip:'Length of random string.'.locale() },\n generationType: {title:'Unique ID Generation Method'.locale(), tip:'Add an auto-increment number section to your unique ID.'.locale() },\n isAutoCompleteAvailable: {title:'Allow Browser Autocomplete'.locale(), tip:'Allow browsers to store and autocomplete form fields.'.locale() },\n errorNavigation: { title: 'Allow navigation between form errors'.locale(), tip:'Allow navigation between form errors'.locale() },\n submissionErrorRedirectionURL: {title:'Redirect to URL on Submission Errors'.locale(), tip:'Enter an URL to redirect on submission errors instead of showing Jotform\\'s default error page.' .locale() },\n showHIPAABadge: { title: 'Show HIPAA Badge'.locale(), tip: 'Add a HIPAA badge to show that your forms enable HIPAA compliance'.locale()}\n};\n\nexport const extendedTips = {\n text: {\n text: 'Field Label',\n hint: '',\n },\n required: {\n text: 'Required',\n hint: 'Prevent submission if this field is empty',\n },\n labelAlign: {\n text: 'Label Alignment',\n hint: 'Select how the label text is aligned horizontally',\n },\n description: {\n hint: 'Show a description when a user hovers over this field',\n },\n subLabel: {\n hint: 'Add a short description below the field',\n },\n defaultValue: {\n hint: 'Pre-populate this field with a default value',\n },\n readonly: {\n hint: 'Prevent entry in this field',\n },\n size: {\n text: 'Width',\n hint: 'Formerly called size. Width of your textbox in characters.',\n },\n hint: {\n text: 'Placeholder',\n hint: 'Add an example inside the field',\n }\n};\n\nexport const extendedTipsForNewTheme = {\n size: {\n text: 'Width',\n hint: 'Width of this field in pixels.',\n }\n}\n\nexport default DefaultTips;\n","export const LIMIT_LEVELS = {\n NORMAL: 'NORMAL',\n WARNING: 'WARNING',\n DANGER: 'DANGER'\n};\n\nexport const LIMIT_POPOVER_TARGETS = {\n HEADER_MENU_MULTISELECT_PANEL_DUPLICATE_ITEM: {\n TARGET: 'header-menu-multiselect-panel-duplicate-item',\n SELECTOR: '#app_wizards .multiselectPanel-container .multiselectPanel .forDuplicate'\n },\n CONTEXT_MENU_DUPLICATE_ITEM: {\n TARGET: 'context-menu-duplicate-item',\n SELECTOR: '.contextMenu.isVisible .contextMenu-item.forDuplicate.contextMenu-item-disabled'\n }\n};\n","import React from 'react';\nimport { t, translation as Translations } from '@jotforminc/translation';\nimport { handleCustomNavigation } from '@jotforminc/utils';\n\nexport const ERROR_ON_CREATE_QUESTION_TEXT = () => `${t('Oops! Something went wrong and We couldn\\'t create your last question.')}
    ${t('Could you please refresh the page?')}`;\nexport const ERROR_ON_INITIALIZING_TEXT = () => `${t('Oops! Something went wrong and We couldn\\'t initialize a part of your form correctly.')}`;\nexport const ERROR_ON_UPDATE_QUESTION_TEXT = () => `${t('Oops! Something went wrong and We couldn\\'t update your last question.')}
    ${t('Could you please refresh the page?')}`;\nexport const ERROR_ON_REVISION_HISTORY_TEXT = () => t('Oops! Something went wrong and We couldn\\'t initialize your revision history.');\nexport const ERROR_ON_INITIALIZING_WIDGETS_TEXT = () => `${t('Oops! Something went wrong and We couldn\\'t initialize widget list.')}
    ${t('Could you please refresh the page?')}`;\nexport const ERROR_ON_FETCHING_USER_TEXT = () => `${t('Oops! Something went wrong and We couldn\\'t initialize your user info.')}
    ${t('Could you please refresh the page?')}`;\nexport const ERROR_ON_FETCHING_QUESTIONS_TEXT = () => `${t('Oops! Something went wrong and We couldn\\'t get your form questions.')}
    ${t('Could you please refresh the page?')}`;\nexport const ERROR_ON_SOCKET_CONNECTION_TEXT = () => `${t('We couldn\\'t connect you to our servers, Make sure you have internet connection.')}`;\nexport const ERROR_ON_UPDATE_FORM_TEXT = () => `${t('Oops! Something went wrong and We couldn\\'t save your changes.')}
    ${t('Could you please refresh the page?')}`;\nexport const SOCKET_RECONNECTED_TEXT = () => `${t('You are back to online!')}`;\nexport const OFFLINE_MODE_ACTIVATED_TEXT = () => t('Now you are working offline.');\nexport const OFFLINE_MODE_DISABLED_TEXT = () => `${t('You are back to online!')}`;\nexport const MULTIPLE_PAYMENT_ERROR_TEXT = () => `${t('You cannot add more than one payment gateway into a form!')}`;\nexport const MULTIPLE_WIDGET_ERROR_TEXT = () => `${t('You cannot add more than one this widget into a form!')}`;\nexport const UNDO_DUPLICATE_QUESTION_TEXT = () => `${t('Fields duplicated')}
    ${t('Use CTRL + Z to undo')}`;\nexport const INFO_MULTI_DEL_POSSIBLE = () => t('You can use cmd/ctrl + click to select multiple questions.');\nexport const FORM_FIELD_LIMIT_EXCEEDED_ERROR_TEXT = () => t('Form element limit exceeded.');\nexport const GUEST_SMART_PDF_FORMS_OCR_WARNING_TEXT = limit => t(`We've converted the first ${limit} pages of your PDF into a Smart PDF Form.`);\nexport const ERROR_RELOAD_BUTTON = [\n () => (\n { global.window.location.reload(); }}\n >\n {' '}\n {t('Reload Page')}\n {' '}\n \n )\n];\n// it should not be an arrow function, because 'questionsCount' parameter is binded to it.\nexport function UNDO_DELETE_QUESTION_TEXT({ questionsCount, currentLocation }) {\n return [\n questionsCount > 1 && questionsCount,\n `${questionsCount > 1 ? t('Fields deleted') : t('Field deleted')}
    `,\n currentLocation !== 'workflow' && `${t('Use CTRL + Z to undo')}`\n ].filter(Boolean).join(' ');\n}\nexport const DUPLICATE_ANNOTATION = () => t('Annotation duplicated.');\nexport const PRICING_BUTTON = urlParams => [\n () => (\n {\n const paramsStr = urlParams.reduce((acc, [key, val]) => `${acc}&${key}=${val}`, '');\n handleCustomNavigation(`https://www.jotform.com/pricing?${paramsStr}`);\n }}\n >\n {t('See Plans')}\n \n )\n];\n\nexport const MULTIPLE_QUESTION_DELETE_TEXTS = {\n title: `${Translations.translate('Are you sure you want to delete these fields')}?`,\n message: `${Translations.translate('If you delete these fields, you will lose the associated data. Are you sure you want to proceed?')}`,\n level: 'warning',\n hint: `${Translations.translate('Instead of deleting a field, you can hide it. That way, your data will not be deleted, and the field will not be shown on the form.')}`,\n type: 'delete',\n backdrop: true,\n deleteButtonText: 'Delete Fields',\n additionalClasses: 'new-delete-field'\n};\n\nexport const QUESTION_DELETE_TEXTS = {\n title: `${Translations.translate('Are you sure you want to delete this field')}?`,\n message: `${Translations.translate('If you delete this field, you will lose the associated submission data. Are you sure you want to proceed?')}`,\n level: 'warning',\n hint: `${Translations.translate('Instead of deleting a field, you can hide it. That way, your data will not be deleted, and the field will not be shown on the form.')}`,\n type: 'delete',\n backdrop: true,\n additionalClasses: 'new-delete-field'\n};\n","/* eslint-disable camelcase */\nconst PAYMENT_TYPES = [\n 'control_2co',\n 'control_authnet',\n 'control_bluepay',\n 'control_bluesnap',\n 'control_braintree',\n 'control_cardconnect',\n 'control_clickbank',\n 'control_dwolla',\n 'control_echeck',\n 'control_eway',\n 'control_firstdata',\n 'control_paypalInvoicing',\n 'control_googleco',\n 'control_onebip',\n 'control_payjunction',\n 'control_chargify',\n 'control_payment',\n 'control_paymentwall',\n 'control_paymill',\n 'control_paypal',\n 'control_paypalexpress',\n 'control_paypalpro',\n 'control_paypalcomplete',\n 'control_cybersource',\n 'control_square',\n 'control_stripe',\n 'control_stripeCheckout',\n 'control_stripeACH',\n 'control_stripeACHManual',\n 'control_wepay',\n 'control_worldpay',\n 'control_worldpayus',\n 'control_payu',\n 'control_payuMoney',\n 'control_pagseguro',\n 'control_moneris',\n 'control_sofort',\n 'control_sensepass',\n 'control_paysafe',\n 'control_iyzico',\n 'control_skrill',\n 'control_gocardless',\n 'control_mollie',\n 'control_paypalSPB',\n 'control_payfast'\n];\n\n// According to this commit: https://github.com/jotform/Jotform3/commit/03d6d5c7f07bb47f6ff154d9b29bdb163a131f21\n// We are rendering all file uploads as multiple if form has authnet or paypalpro.\n// And now we need to show file upload as multiple in builder.\nexport const ONLY_MULTIPLE_UPLOAD_PAYMENT_TYPES = [\n 'control_paypalpro',\n 'control_authnet'\n];\n\n// Write only new payment connection gateways.\nexport const WRITE_ONLY_PCF_GATEWAYS = [\n 'control_square',\n 'control_braintree',\n 'control_paypal',\n 'control_paypalpro',\n 'control_paypalInvoicing',\n 'control_worldpay',\n 'control_cardconnect',\n 'control_moneris',\n 'control_stripeACH',\n 'control_payjunction',\n 'control_echeck',\n 'control_pagseguro',\n 'control_firstdata',\n 'control_2co',\n 'control_worldpayus',\n 'control_bluesnap',\n 'control_cybersource',\n 'control_chargify',\n 'control_sofort',\n 'control_skrill',\n 'control_onebip',\n 'control_paysafe',\n 'control_iyzico',\n 'control_clickbank',\n 'control_paymentwall',\n 'control_gocardless',\n 'control_mollie',\n 'control_stripeACHManual',\n 'control_payu',\n 'control_payuMoney',\n 'control_authnet',\n 'control_stripeCheckout',\n 'control_paypalSPB',\n 'control_paypalcomplete',\n 'control_stripe',\n 'control_bluepay',\n 'control_eway',\n 'control_paypalexpress',\n 'control_payfast'\n];\n\n// READ + WRITE payment connection gateways\nexport const PCF_GATEWAYS = [];\n\n// Dont forget to check refreshToken.\nexport const ConnectionReferences = {\n control_square: [\n { prop: 'accessToken', isSecret: true, isRequired: true },\n { prop: 'merchantId', isSecret: false, isRequired: true },\n { prop: 'location', isSecret: false, isRequired: true },\n { prop: 'allowTest', isSecret: false, isRequired: true },\n { prop: 'tokenExpiry', isSecret: false, isRequired: true },\n { prop: 'refreshToken', isSecret: true, isRequired: false }\n ],\n control_braintree: [\n { prop: 'merchantId', isSecret: false, isRequired: true },\n { prop: 'merchantAccountId', isSecret: false, isRequired: false },\n { prop: 'publicKey', isSecret: false, isRequired: true },\n { prop: 'privateKey', isSecret: true, isRequired: true },\n { prop: 'sandbox', isSecret: false, isRequired: true }\n ],\n control_stripe: [\n { prop: 'publishableKey', isSecret: false, isRequired: true },\n { prop: 'apiKey', isSecret: true, isRequired: true },\n { prop: 'connect', isSecret: true, isRequired: true },\n { prop: 'allowTest', isSecret: false, isRequired: true },\n { prop: 'stripeUserId', isSecret: false, isRequired: true },\n ],\n control_paypal: [\n { prop: 'account', isSecret: false, isRequired: true },\n { prop: 'sandbox', isSecret: false, isRequired: true }\n ],\n control_paypalpro: [\n { prop: 'username', isSecret: false, isRequired: true },\n { prop: 'password', isSecret: true, isRequired: true },\n { prop: 'signature', isSecret: false, isRequired: true },\n { prop: 'sandbox', isSecret: false, isRequired: true }\n ],\n control_paypalInvoicing: [\n { prop: 'merchantId', isSecret: false, isRequired: true },\n { prop: 'merchantEmail', isSecret: false, isRequired: true },\n { prop: 'sandbox', isSecret: false, isRequired: true }\n ],\n control_worldpay: [\n { prop: 'installationID', isSecret: false, isRequired: true }\n ],\n control_cardconnect: [\n { prop: 'merchantId', isSecret: false, isRequired: true },\n { prop: 'apiUsername', isSecret: false, isRequired: true },\n { prop: 'apiPassword', isSecret: true, isRequired: true },\n { prop: 'sandbox', isSecret: false, isRequired: true }\n ],\n control_moneris: [\n { prop: 'monerisid', isSecret: false, isRequired: true },\n { prop: 'monerisapi', isSecret: true, isRequired: true },\n { prop: 'sandbox', isSecret: false, isRequired: true }\n ],\n control_stripeACH: [\n { prop: 'apiKey', isSecret: true, isRequired: true },\n { prop: 'plaidClient', isSecret: false, isRequired: true },\n { prop: 'plaidSecret', isSecret: true, isRequired: true },\n { prop: 'environment', isSecret: false, isRequired: true }\n ],\n control_stripeCheckout: [\n { prop: 'stripeUserId', isSecret: false, isRequired: true },\n { prop: 'allowTest', isSecret: false, isRequired: true }\n ],\n control_payjunction: [\n { prop: 'username', isSecret: false, isRequired: true },\n { prop: 'password', isSecret: true, isRequired: true },\n { prop: 'sandbox', isSecret: false, isRequired: true }\n ],\n control_echeck: [\n { prop: 'apiLoginId', isSecret: false, isRequired: true },\n { prop: 'transactionKey', isSecret: true, isRequired: true },\n { prop: 'sandbox', isSecret: false, isRequired: true }\n ],\n control_pagseguro: [\n { prop: 'pagseguroid', isSecret: false, isRequired: true },\n { prop: 'pagseguroapi', isSecret: true, isRequired: true },\n { prop: 'sandbox', isSecret: false, isRequired: true }\n ],\n control_firstdata: [\n { prop: 'gatewayId', isSecret: false, isRequired: true },\n { prop: 'password', isSecret: true, isRequired: true },\n { prop: 'sandbox', isSecret: false, isRequired: true }\n ],\n control_2co: [\n { prop: 'vendorNumber', isSecret: false, isRequired: true },\n { prop: 'sandbox', isSecret: false, isRequired: true },\n ],\n control_worldpayus: [\n { prop: 'secureNetId', isSecret: false, isRequired: true },\n { prop: 'secureKey', isSecret: true, isRequired: true },\n { prop: 'sandbox', isSecret: false, isRequired: true },\n ],\n control_bluesnap: [\n { prop: 'apiKey', isSecret: false, isRequired: true },\n { prop: 'password', isSecret: true, isRequired: true },\n { prop: 'softDescriptor', isSecret: false, isRequired: true },\n { prop: 'sandbox', isSecret: false, isRequired: true }\n ],\n control_cybersource: [\n { prop: 'merchantID', isSecret: false, isRequired: true },\n { prop: 'transactionKey', isSecret: true, isRequired: true },\n { prop: 'sandbox', isSecret: false, isRequired: true }\n ],\n control_chargify: [\n { prop: 'hostName', isSecret: false, isRequired: true },\n { prop: 'apiKey', isSecret: true, isRequired: true },\n { prop: 'sharedKey', isSecret: false, isRequired: true }\n ],\n control_sensepass: [\n { prop: 'apiKey', isSecret: true, isRequired: true }\n ],\n control_sofort: [\n { prop: 'configKey', isSecret: true, isRequired: true }\n ],\n control_skrill: [\n { prop: 'account', isSecret: false, isRequired: true }\n ],\n control_onebip: [\n { prop: 'username', isSecret: false, isRequired: true },\n { prop: 'itemNo', isSecret: false, isRequired: true },\n { prop: 'productName', isSecret: false, isRequired: true },\n { prop: 'productPrice', isSecret: false, isRequired: true }\n ],\n control_paysafe: [\n { prop: 'account', isSecret: false, isRequired: true },\n { prop: 'sandbox', isSecret: false, isRequired: true }\n ],\n control_iyzico: [\n { prop: 'iyzicoApiKey', isSecret: false, isRequired: true },\n { prop: 'iyzicoSecretKey', isSecret: true, isRequired: true },\n { prop: 'sandbox', isSecret: false, isRequired: true }\n ],\n control_clickbank: [\n { prop: 'login', isSecret: false, isRequired: true },\n { prop: 'itemNo', isSecret: false, isRequired: true },\n { prop: 'productName', isSecret: false, isRequired: true },\n { prop: 'productPrice', isSecret: false, isRequired: true }\n ],\n control_paymentwall: [\n { prop: 'publicKey', isSecret: false, isRequired: true },\n { prop: 'privateKey', isSecret: true, isRequired: true }\n ],\n control_gocardless: [\n { prop: 'accessToken', isSecret: true, isRequired: false },\n { prop: 'organisationId', isSecret: false, isRequired: false },\n { prop: 'allowTest', isSecret: false, isRequired: true }\n ],\n control_mollie: [\n { prop: 'profileId', isSecret: false, isRequired: true },\n { prop: 'refreshToken', isSecret: true, isRequired: true },\n { prop: 'sandbox', isSecret: false, isRequired: true }\n ],\n control_stripeACHManual: [\n { prop: 'apiKey', isSecret: true, isRequired: true },\n { prop: 'publishableKey', isSecret: false, isRequired: true },\n { prop: 'allowTest', isSecret: false, isRequired: true },\n { prop: 'stripeUserId', isSecret: false, isRequired: true }\n ],\n control_payfast: [\n { prop: 'merchantId', isSecret: true, isRequired: true },\n { prop: 'merchantKey', isSecret: false, isRequired: true },\n { prop: 'passphrase', isSecret: true, isRequired: true },\n { prop: 'sandbox', isSecret: false, isRequired: true }\n ],\n control_payu: {\n control_payuDefault: [\n { prop: 'alternativeGatewayTypes', isSecret: false, isRequired: true },\n { prop: 'merchantPosId', isSecret: false, isRequired: true },\n { prop: 'signatureKey', isSecret: true, isRequired: true },\n { prop: 'oAuthClientId', isSecret: false, isRequired: true },\n { prop: 'oAuthClientSecret', isSecret: true, isRequired: true },\n { prop: 'sandbox', isSecret: false, isRequired: true }\n ],\n control_payuMoney: [\n { prop: 'alternativeGatewayTypes', isSecret: false, isRequired: true },\n { prop: 'merchantKey', isSecret: true, isRequired: true },\n { prop: 'merchantSalt', isSecret: true, isRequired: true },\n { prop: 'sandbox', isSecret: false, isRequired: true }\n ],\n control_payuTurkey: [\n { prop: 'alternativeGatewayTypes', isSecret: false, isRequired: true },\n { prop: 'merchantId', isSecret: false, isRequired: true },\n { prop: 'secretKey', isSecret: true, isRequired: true },\n { prop: 'sandbox', isSecret: false, isRequired: true }\n ]\n },\n control_payuMoney: [\n { prop: 'merchantKey', isSecret: true, isRequired: true },\n { prop: 'merchantSalt', isSecret: true, isRequired: true },\n { prop: 'sandbox', isSecret: false, isRequired: true }\n ],\n control_authnet: [\n { prop: 'apiLoginId', isSecret: false, isRequired: true },\n { prop: 'transactionKey', isSecret: true, isRequired: true },\n { prop: 'testmodeAuth', isSecret: false, isRequired: true }\n ],\n control_paypalSPB: [\n { prop: 'clientID', isSecret: false, isRequired: false },\n { prop: 'clientSecret', isSecret: true, isRequired: false },\n { prop: 'merchantId', isSecret: false, isRequired: true },\n { prop: 'environment', isSecret: false, isRequired: true }\n ],\n control_paypalcomplete: [\n { prop: 'merchantId', isSecret: false, isRequired: true },\n { prop: 'sandbox', isSecret: false, isRequired: true }\n ],\n control_bluepay: [\n { prop: 'accountId', isSecret: false, isRequired: true },\n { prop: 'apiSecret', isSecret: true, isRequired: true },\n { prop: 'sandbox', isSecret: false, isRequired: true },\n ],\n control_eway: [\n { prop: 'apiKey', isSecret: false, isRequired: true },\n { prop: 'apiPassword', isSecret: true, isRequired: true },\n { prop: 'encryptionKey', isSecret: false, isRequired: true },\n { prop: 'sandbox', isSecret: false, isRequired: true },\n ],\n control_paypalexpress: [\n { prop: 'username', isSecret: false, isRequired: true },\n { prop: 'password', isSecret: true, isRequired: true },\n { prop: 'signature', isSecret: true, isRequired: true },\n { prop: 'sandbox', isSecret: false, isRequired: true }\n ]\n};\n\nexport default PAYMENT_TYPES;\n","/**\n * Bulk options for dropdowns, radios, and checkboxes\n */\n\n/* eslint-disable */\n\nimport {\n COUNTRIES, GENDERS, DAYS, MONTHS\n} from '@jotforminc/constants';\n\nlet lastHundredYears = [];\n(function () {\n const date = new Date();\n // get current year\n const cyear = (date.getYear() < 1000) ? date.getYear() + 1900 : date.getYear();\n const years = [];\n for (let year = cyear; year >= (cyear - 100); year--) {\n years.push(`${year}`);\n }\n\n lastHundredYears = years;\n}());\nconst specialOptions = {\n None: {\n controls: 'dropdown,radio,checkbox,matrix'\n },\n 'US States': {\n controls: 'dropdown',\n value: ['Alabama', 'Alaska', 'Arizona', 'Arkansas', 'California', 'Colorado', 'Connecticut', 'Delaware', 'District of Columbia', 'Florida', 'Georgia', 'Hawaii', 'Idaho', 'Illinois', 'Indiana', 'Iowa', 'Kansas', 'Kentucky', 'Louisiana', 'Maine', 'Maryland', 'Massachusetts', 'Michigan', 'Minnesota', 'Mississippi', 'Missouri', 'Montana', 'Nebraska', 'Nevada', 'New Hampshire', 'New Jersey', 'New Mexico', 'New York', 'North Carolina', 'North Dakota', 'Ohio', 'Oklahoma', 'Oregon', 'Pennsylvania', 'Rhode Island', 'South Carolina', 'South Dakota', 'Tennessee', 'Texas', 'Utah', 'Vermont', 'Virginia', 'Washington', 'West Virginia', 'Wisconsin', 'Wyoming']\n },\n 'US States Abbr': {\n controls: 'dropdown',\n value: ['AL', 'AK', 'AR', 'AZ', 'CA', 'CO', 'CT', 'DC', 'DE', 'FL', 'GA', 'HI', 'ID', 'IL', 'IN', 'IA', 'KS', 'KY', 'LA', 'ME', 'MD', 'MA', 'MI', 'MN', 'MS', 'MO', 'MT', 'NE', 'NV', 'NH', 'NJ', 'NM', 'NY', 'NC', 'ND', 'OH', 'OK', 'OR', 'PA', 'RI', 'SC', 'SD', 'TN', 'TX', 'UT', 'VT', 'VI', 'VA', 'WA', 'WV', 'WI', 'WY']\n },\n 'Canadian Provinces': {\n controls: 'dropdown',\n value: ['Alberta', 'British Columbia', 'Manitoba', 'New Brunswick', 'Newfoundland', 'Northwest Territories', 'Nova Scotia', 'Nunavut', 'Ontario', 'Prince Edward Island', 'Quebec', 'Saskatchewan', 'Yukon']\n },\n Countries: {\n controls: 'dropdown',\n value: COUNTRIES.map(country => country.locale()),\n nonLocale: COUNTRIES\n },\n 'Last 100 Years': {\n controls: 'dropdown',\n value: lastHundredYears\n },\n Gender: {\n controls: 'dropdown,radio,checkbox',\n value: GENDERS.map(gender => gender.locale()),\n nonLocale: GENDERS\n },\n Days: {\n controls: 'dropdown,radio,checkbox',\n value: DAYS.map(day => day.locale()),\n nonLocale: DAYS\n },\n Months: {\n controls: 'dropdown,radio,checkbox',\n value: MONTHS.map(month => month.locale()),\n nonLocale: MONTHS\n },\n 'Time Zones': {\n controls: 'dropdown',\n value: ['[[Africa]]', 'Abidjan (GMT)', 'Accra (GMT)', 'Addis Ababa (GMT+03:00)', 'Algiers (GMT+01:00)', 'Asmara (GMT+03:00)', 'Bamako (GMT)', 'Bangui (GMT+01:00)', 'Banjul (GMT)', 'Bissau (GMT)', 'Blantyre (GMT+02:00)', 'Brazzaville (GMT+01:00)', 'Bujumbura (GMT+02:00)', 'Cairo (GMT+03:00)', 'Casablanca (GMT)', 'Ceuta (GMT+02:00)', 'Conakry (GMT)', 'Dakar (GMT)', 'Dar es Salaam (GMT+03:00)', 'Djibouti (GMT+03:00)', 'Douala (GMT+01:00)', 'El Aaiun (GMT)', 'Freetown (GMT)', 'Gaborone (GMT+02:00)', 'Harare (GMT+02:00)', 'Johannesburg (GMT+02:00)', 'Kampala (GMT+03:00)', 'Khartoum (GMT+03:00)', 'Kigali (GMT+02:00)', 'Kinshasa (GMT+01:00)', 'Lagos (GMT+01:00)', 'Libreville (GMT+01:00)', 'Lome (GMT)', 'Luanda (GMT+01:00)', 'Lubumbashi (GMT+02:00)', 'Lusaka (GMT+02:00)', 'Malabo (GMT+01:00)', 'Maputo (GMT+02:00)', 'Maseru (GMT+02:00)', 'Mbabane (GMT+02:00)', 'Mogadishu (GMT+03:00)', 'Monrovia (GMT)', 'Nairobi (GMT+03:00)', 'Ndjamena (GMT+01:00)', 'Niamey (GMT+01:00)', 'Nouakchott (GMT)', 'Ouagadougou (GMT)', 'Porto-Novo (GMT+01:00)', 'Sao Tome (GMT)', 'Tripoli (GMT+02:00)', 'Tunis (GMT+02:00)', 'Windhoek (GMT+01:00)', '[[America]]', 'Adak (GMT-09:00)', 'Anchorage (GMT-08:00)', 'Anguilla (GMT-04:00)', 'Antigua (GMT-04:00)', 'Araguaina (GMT-03:00)', 'Buenos Aires, Argentina (GMT-03:00)', 'Catamarca, Argentina (GMT-03:00)', 'Cordoba, Argentina (GMT-03:00)', 'Jujuy, Argentina (GMT-03:00)', 'La Rioja, Argentina (GMT-03:00)', 'Mendoza, Argentina (GMT-03:00)', 'Rio Gallegos, Argentina (GMT-03:00)', 'Salta, Argentina (GMT-03:00)', 'San Juan, Argentina (GMT-03:00)', 'San Luis, Argentina (GMT-04:00)', 'Tucuman, Argentina (GMT-03:00)', 'Ushuaia, Argentina (GMT-03:00)', 'Aruba (GMT-04:00)', 'Asuncion (GMT-04:00)', 'Atikokan (GMT-05:00)', 'Bahia (GMT-03:00)', 'Barbados (GMT-04:00)', 'Belem (GMT-03:00)', 'Belize (GMT-06:00)', 'Blanc-Sablon (GMT-04:00)', 'Boa Vista (GMT-04:00)', 'Bogota (GMT-05:00)', 'Boise (GMT-06:00)', 'Cambridge Bay (GMT-06:00)', 'Campo Grande (GMT-04:00)', 'Cancun (GMT-05:00)', 'Caracas (GMT-04:30)', 'Cayenne (GMT-03:00)', 'Cayman (GMT-05:00)', 'Chicago (GMT-05:00)', 'Chihuahua (GMT-06:00)', 'Costa Rica (GMT-06:00)', 'Cuiaba (GMT-04:00)', 'Curacao (GMT-04:00)', 'Danmarkshavn (GMT)', 'Dawson (GMT-07:00)', 'Dawson Creek (GMT-07:00)', 'Denver (GMT-06:00)', 'Detroit (GMT-04:00)', 'Dominica (GMT-04:00)', 'Edmonton (GMT-06:00)', 'Eirunepe (GMT-04:00)', 'El Salvador (GMT-06:00)', 'Fortaleza (GMT-03:00)', 'Glace Bay (GMT-03:00)', 'Godthab (GMT-02:00)', 'Goose Bay (GMT-03:00)', 'Grand Turk (GMT-04:00)', 'Grenada (GMT-04:00)', 'Guadeloupe (GMT-04:00)', 'Guatemala (GMT-06:00)', 'Guayaquil (GMT-05:00)', 'Guyana (GMT-04:00)', 'Halifax (GMT-03:00)', 'Havana (GMT-04:00)', 'Hermosillo (GMT-07:00)', 'Indianapolis, Indiana (GMT-04:00)', 'Knox, Indiana (GMT-05:00)', 'Marengo, Indiana (GMT-04:00)', 'Petersburg, Indiana (GMT-04:00)', 'Tell City, Indiana (GMT-05:00)', 'Vevay, Indiana (GMT-04:00)', 'Vincennes, Indiana (GMT-04:00)', 'Winamac, Indiana (GMT-04:00)', 'Inuvik (GMT-06:00)', 'Iqaluit (GMT-04:00)', 'Jamaica (GMT-05:00)', 'Juneau (GMT-08:00)', 'Louisville, Kentucky (GMT-04:00)', 'Monticello, Kentucky (GMT-04:00)', 'La Paz (GMT-04:00)', 'Lima (GMT-05:00)', 'Los Angeles (GMT-07:00)', 'Maceio (GMT-03:00)', 'Managua (GMT-06:00)', 'Manaus (GMT-04:00)', 'Marigot (GMT-04:00)', 'Martinique (GMT-04:00)', 'Mazatlan (GMT-06:00)', 'Menominee (GMT-05:00)', 'Merida (GMT-05:00)', 'Mexico City (GMT-05:00)', 'Miquelon (GMT-02:00)', 'Moncton (GMT-03:00)', 'Monterrey (GMT-05:00)', 'Montevideo (GMT-03:00)', 'Montreal (GMT-04:00)', 'Montserrat (GMT-04:00)', 'Nassau (GMT-04:00)', 'New York (GMT-04:00)', 'Nipigon (GMT-04:00)', 'Nome (GMT-08:00)', 'Noronha (GMT-02:00)', 'Center, North Dakota (GMT-05:00)', 'New Salem, North Dakota (GMT-05:00)', 'Panama (GMT-05:00)', 'Pangnirtung (GMT-04:00)', 'Paramaribo (GMT-03:00)', 'Phoenix (GMT-07:00)', 'Port-au-Prince (GMT-05:00)', 'Port of Spain (GMT-04:00)', 'Porto Velho (GMT-04:00)', 'Puerto Rico (GMT-04:00)', 'Rainy River (GMT-05:00)', 'Rankin Inlet (GMT-05:00)', 'Recife (GMT-03:00)', 'Regina (GMT-06:00)', 'Resolute (GMT-05:00)', 'Rio Branco (GMT-04:00)', 'Santarem (GMT-03:00)', 'Santiago (GMT-04:00)', 'Santo Domingo (GMT-04:00)', 'Sao Paulo (GMT-03:00)', 'Scoresbysund (GMT)', 'Shiprock (GMT-06:00)', 'St Barthelemy (GMT-04:00)', 'St Johns (GMT-02:30)', 'St Kitts (GMT-04:00)', 'St Lucia (GMT-04:00)', 'St Thomas (GMT-04:00)', 'St Vincent (GMT-04:00)', 'Swift Current (GMT-06:00)', 'Tegucigalpa (GMT-06:00)', 'Thule (GMT-03:00)', 'Thunder Bay (GMT-04:00)', 'Tijuana (GMT-07:00)', 'Toronto (GMT-04:00)', 'Tortola (GMT-04:00)', 'Vancouver (GMT-07:00)', 'Whitehorse (GMT-07:00)', 'Winnipeg (GMT-05:00)', 'Yakutat (GMT-08:00)', 'Yellowknife (GMT-06:00)', '[[Antarctica]]', 'Casey (GMT+11:00)', 'Davis (GMT+05:00)', 'DumontDUrville (GMT+10:00)', 'Mawson (GMT+05:00)', 'McMurdo (GMT+12:00)', 'Palmer (GMT-04:00)', 'Rothera (GMT-03:00)', 'South Pole (GMT+12:00)', 'Syowa (GMT+03:00)', 'Vostok (GMT+06:00)', '[[Arctic]]', 'Longyearbyen (GMT+02:00)', '[[Asia]]', 'Aden (GMT+03:00)', 'Almaty (GMT+06:00)', 'Amman (GMT+03:00)', 'Anadyr (GMT+13:00)', 'Aqtau (GMT+05:00)', 'Aqtobe (GMT+05:00)', 'Ashgabat (GMT+05:00)', 'Baghdad (GMT+03:00)', 'Bahrain (GMT+03:00)', 'Baku (GMT+05:00)', 'Bangkok (GMT+07:00)', 'Beirut (GMT+03:00)', 'Bishkek (GMT+06:00)', 'Brunei (GMT+08:00)', 'Choibalsan (GMT+08:00)', 'Chongqing (GMT+08:00)', 'Colombo (GMT+05:30)', 'Damascus (GMT+03:00)', 'Dhaka (GMT+07:00)', 'Dili (GMT+09:00)', 'Dubai (GMT+04:00)', 'Dushanbe (GMT+05:00)', 'Gaza (GMT+03:00)', 'Harbin (GMT+08:00)', 'Ho Chi Minh (GMT+07:00)', 'Hong Kong (GMT+08:00)', 'Hovd (GMT+07:00)', 'Irkutsk (GMT+09:00)', 'Jakarta (GMT+07:00)', 'Jayapura (GMT+09:00)', 'Jerusalem (GMT+03:00)', 'Kabul (GMT+04:30)', 'Kamchatka (GMT+13:00)', 'Karachi (GMT+06:00)', 'Kashgar (GMT+08:00)', 'Kathmandu (GMT+05:45)', 'Kolkata (GMT+05:30)', 'Krasnoyarsk (GMT+08:00)', 'Kuala Lumpur (GMT+08:00)', 'Kuching (GMT+08:00)', 'Kuwait (GMT+03:00)', 'Macau (GMT+08:00)', 'Magadan (GMT+12:00)', 'Makassar (GMT+08:00)', 'Manila (GMT+08:00)', 'Muscat (GMT+04:00)', 'Nicosia (GMT+03:00)', 'Novokuznetsk (GMT+07:00)', 'Novosibirsk (GMT+07:00)', 'Omsk (GMT+07:00)', 'Oral (GMT+05:00)', 'Phnom Penh (GMT+07:00)', 'Pontianak (GMT+07:00)', 'Pyongyang (GMT+09:00)', 'Qatar (GMT+03:00)', 'Qyzylorda (GMT+06:00)', 'Rangoon (GMT+06:30)', 'Riyadh (GMT+03:00)', 'Sakhalin (GMT+11:00)', 'Samarkand (GMT+05:00)', 'Seoul (GMT+09:00)', 'Shanghai (GMT+08:00)', 'Singapore (GMT+08:00)', 'Taipei (GMT+08:00)', 'Tashkent (GMT+05:00)', 'Tbilisi (GMT+04:00)', 'Tehran (GMT+04:30)', 'Thimphu (GMT+06:00)', 'Tokyo (GMT+09:00)', 'Ulaanbaatar (GMT+08:00)', 'Urumqi (GMT+08:00)', 'Vientiane (GMT+07:00)', 'Vladivostok (GMT+11:00)', 'Yakutsk (GMT+10:00)', 'Yekaterinburg (GMT+06:00)', 'Yerevan (GMT+05:00)', '[[Atlantic]]', 'Azores (GMT)', 'Bermuda (GMT-03:00)', 'Canary (GMT+01:00)', 'Cape Verde (GMT-01:00)', 'Faroe (GMT+01:00)', 'Madeira (GMT+01:00)', 'Reykjavik (GMT)', 'South Georgia (GMT-02:00)', 'St Helena (GMT)', 'Stanley (GMT-04:00)', '[[Australia]]', 'Adelaide (GMT+09:30)', 'Brisbane (GMT+10:00)', 'Broken Hill (GMT+09:30)', 'Currie (GMT+10:00)', 'Darwin (GMT+09:30)', 'Eucla (GMT+08:45)', 'Hobart (GMT+10:00)', 'Lindeman (GMT+10:00)', 'Lord Howe (GMT+10:30)', 'Melbourne (GMT+10:00)', 'Perth (GMT+08:00)', 'Sydney (GMT+10:00)', '[[Europe]]', 'Amsterdam (GMT+02:00)', 'Andorra (GMT+02:00)', 'Athens (GMT+03:00)', 'Belgrade (GMT+02:00)', 'Berlin (GMT+02:00)', 'Bratislava (GMT+02:00)', 'Brussels (GMT+02:00)', 'Bucharest (GMT+03:00)', 'Budapest (GMT+02:00)', 'Chisinau (GMT+03:00)', 'Copenhagen (GMT+02:00)', 'Dublin (GMT+01:00)', 'Gibraltar (GMT+02:00)', 'Guernsey (GMT+01:00)', 'Helsinki (GMT+03:00)', 'Isle of Man (GMT+01:00)', 'Istanbul (GMT+03:00)', 'Jersey (GMT+01:00)', 'Kaliningrad (GMT+03:00)', 'Kiev (GMT+03:00)', 'Lisbon (GMT+01:00)', 'Ljubljana (GMT+02:00)', 'London (GMT+01:00)', 'Luxembourg (GMT+02:00)', 'Madrid (GMT+02:00)', 'Malta (GMT+02:00)', 'Mariehamn (GMT+03:00)', 'Minsk (GMT+03:00)', 'Monaco (GMT+02:00)', 'Moscow (GMT+04:00)', 'Oslo (GMT+02:00)', 'Paris (GMT+02:00)', 'Podgorica (GMT+02:00)', 'Prague (GMT+02:00)', 'Riga (GMT+03:00)', 'Rome (GMT+02:00)', 'Samara (GMT+05:00)', 'San Marino (GMT+02:00)', 'Sarajevo (GMT+02:00)', 'Simferopol (GMT+03:00)', 'Skopje (GMT+02:00)', 'Sofia (GMT+03:00)', 'Stockholm (GMT+02:00)', 'Tallinn (GMT+03:00)', 'Tirane (GMT+02:00)', 'Uzhgorod (GMT+03:00)', 'Vaduz (GMT+02:00)', 'Vatican (GMT+02:00)', 'Vienna (GMT+02:00)', 'Vilnius (GMT+03:00)', 'Volgograd (GMT+04:00)', 'Warsaw (GMT+02:00)', 'Zagreb (GMT+02:00)', 'Zaporozhye (GMT+03:00)', 'Zurich (GMT+02:00)', '[[Indian]]', 'Antananarivo (GMT+03:00)', 'Chagos (GMT+06:00)', 'Christmas (GMT+07:00)', 'Cocos (GMT+06:30)', 'Comoro (GMT+03:00)', 'Kerguelen (GMT+05:00)', 'Mahe (GMT+04:00)', 'Maldives (GMT+05:00)', 'Mauritius (GMT+04:00)', 'Mayotte (GMT+03:00)', 'Reunion (GMT+04:00)', '[[Pacific]]', 'Apia (GMT-11:00)', 'Auckland (GMT+12:00)', 'Chatham (GMT+12:45)', 'Easter (GMT-06:00)', 'Efate (GMT+11:00)', 'Enderbury (GMT+13:00)', 'Fakaofo (GMT-10:00)', 'Fiji (GMT+12:00)', 'Funafuti (GMT+12:00)', 'Galapagos (GMT-06:00)', 'Gambier (GMT-09:00)', 'Guadalcanal (GMT+11:00)', 'Guam (GMT+10:00)', 'Honolulu (GMT-10:00)', 'Johnston (GMT-10:00)', 'Kiritimati (GMT+14:00)', 'Kosrae (GMT+11:00)', 'Kwajalein (GMT+12:00)', 'Majuro (GMT+12:00)', 'Marquesas (GMT-09:30)', 'Midway (GMT-11:00)', 'Nauru (GMT+12:00)', 'Niue (GMT-11:00)', 'Norfolk (GMT+11:30)', 'Noumea (GMT+11:00)', 'Pago Pago (GMT-11:00)', 'Palau (GMT+09:00)', 'Pitcairn (GMT-08:00)', 'Ponape (GMT+11:00)', 'Port Moresby (GMT+10:00)', 'Rarotonga (GMT-10:00)', 'Saipan (GMT+10:00)', 'Tahiti (GMT-10:00)', 'Tarawa (GMT+12:00)', 'Tongatapu (GMT+13:00)', 'Truk (GMT+10:00)', 'Wake (GMT+12:00)', 'Wallis (GMT+12:00)']\n },\n LocationCountries: {\n controls: 'location',\n value: ['Canada', 'United States', 'Afghanistan', 'Albania', 'Algeria', 'American Samoa', 'Andorra', 'Angola', 'Anguilla', 'Antarctica', 'Antigua and Barbuda', 'Argentina', 'Armenia', 'Aruba', 'Australia', 'Austria', 'Azerbaijan', 'Bahamas', 'Bahrain', 'Bangladesh', 'Barbados', 'Belarus', 'Belgium', 'Belize', 'Benin', 'Bermuda', 'Bhutan', 'Bolivia', 'Bosnia\\/Herzegowina', 'Botswana', 'Bouvet Island', 'Brazil', 'British Ind. Ocean', 'Brunei Darussalam', 'Bulgaria', 'Burkina Faso', 'Burundi', 'Cambodia', 'Cameroon', 'Cape Verde', 'Cayman Islands', 'Central African Rep.', 'Chad', 'Chile', 'China', 'Christmas Island', 'Cocoa (Keeling) Is.', 'Colombia', 'Comoros', 'Congo', 'Cook Islands', 'Costa Rica', 'Cote Divoire', 'Croatia', 'Cuba', 'Curacao', 'Cyprus', 'Czech Republic', 'Denmark', 'Djibouti', 'Dominica', 'Dominican Republic', 'East Timor', 'Ecuador', 'Egypt', 'El Salvador', 'Equatorial Guinea', 'Eritrea', 'Estonia', 'Ethiopia', 'Falkland Islands', 'Faroe Islands', 'Fiji', 'Finland', 'France', 'Gabon', 'Gambia', 'Georgia', 'Germany', 'Ghana', 'Gibraltar', 'Greece', 'Greenland', 'Grenada', 'Guadeloupe', 'Guam', 'Guatemala', 'Guinea', 'Guinea-Bissau', 'Guyana', 'Haiti', 'Honduras', 'Hong Kong', 'Hungary', 'Iceland', 'India', 'Indonesia', 'Iran', 'Iraq', 'Ireland', 'Israel', 'Italy', 'Jamaica', 'Japan', 'Jordan', 'Kazakhstan', 'Kenya', 'Kiribati', 'Korea', 'Kuwait', 'Kyrgyzstan', 'Lao', 'Latvia', 'Lebanon', 'Lesotho', 'Liberia', 'Liechtenstein', 'Lithuania', 'Luxembourg', 'Macau', 'Macedonia', 'Madagascar', 'Malawi', 'Malaysia', 'Maldives', 'Mali', 'Malta', 'Marshall Islands', 'Martinique', 'Mauritania', 'Mauritius', 'Mayotte', 'Mexico', 'Micronesia', 'Moldova', 'Monaco', 'Mongolia', 'Montserrat', 'Morocco', 'Mozambique', 'Myanmar', 'Namibia', 'Nauru', 'Nepal', 'Netherlands', 'New Caledonia', 'New Zealand', 'Nicaragua', 'Niger', 'Nigeria', 'Niue', 'Norfolk Island', 'Norway', 'Oman', 'Pakistan', 'Palau', 'Panama', 'Papua New Guinea', 'Paraguay', 'Peru', 'Philippines', 'Pitcairn', 'Poland', 'Portugal', 'Puerto Rico', 'Qatar', 'Reunion', 'Romania', 'Russia', 'Rwanda', 'Saint Lucia', 'Samoa', 'San Marino', 'Saudi Arabia', 'Senegal', 'Seychelles', 'Sierra Leone', 'Singapore', 'Slovakia', 'Solomon Islands', 'Somalia', 'South Africa', 'South Sudan', 'Spain', 'Sri Lanka', 'St. Helena', 'Sudan', 'Suriname', 'eSwatini', 'Sweden', 'Switzerland', 'Syria', 'Taiwan', 'Tajikistan', 'Tanzania', 'Thailand', 'Togo', 'Tokelau', 'Tonga', 'Trinidad and Tobago', 'Tunisia', 'Turkey', 'Turkmenistan', 'Tuvalu', 'Uganda', 'Ukraine', 'United Arab Emirates', 'United Kingdom', 'Uruguay', 'Uzbekistan', 'Vanuatu', 'Vatican', 'Venezuela', 'Viet Nam', 'Virgin Islands', 'Western Sahara', 'Yeman', 'Yugoslavia', 'Zaire', 'Zambia']\n },\n /**\n * Gets the special options for specific element\n * @example special_options.getByType('dropdown') => ['Months', 'Days', 'US States' .... ]\n * @param {Object} type\n */\n getByType: function (type) {\n const options = [];\n for (const key in special_options) {\n if (special_options[key].controls && special_options[key].controls.indexOf(type) >= 0) {\n options.push(key);\n }\n }\n return options;\n }\n};\n\nexport default specialOptions;\n/* eslint-enable */\n","const useTeamIDFromURL = () => {\n if (window.teamID) { // Don't mess with the existing teamID\n return;\n }\n\n const urlWithoutHash = global.location.href.replaceAll('#importPDF', ''); // Invalid hashes corrupts URL badly :/\n try {\n const url = new URL(urlWithoutHash);\n const teamID = url.searchParams.get('teamID');\n if (teamID) {\n window.teamID = teamID;\n window.isTeamMember = true;\n }\n } catch (e) {\n console.log('Malformed URL exception, giving up teamID extraction');\n }\n};\n\n// Handle incoming teamID from the URL (like when creating SmartPDF within PDF Editor)\nuseTeamIDFromURL();\nexport const { teamID: TEAM_ID, isTeamMember } = window;\n","import PropTypes from 'prop-types';\nimport React from 'react';\n\nclass Spinner extends React.Component {\n render() {\n const {\n colorScheme = 'darkLoading',\n width = '54px',\n height = '14px'\n } = this.props;\n\n return (\n \n \n \n \n \n );\n }\n}\n\nSpinner.propTypes = {\n colorScheme: PropTypes.string, // null or darkLoading\n width: PropTypes.string,\n height: PropTypes.string\n};\n\nexport default Spinner;\n","import PropTypes from 'prop-types';\nimport React from 'react';\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport isEmpty from 'lodash/isEmpty';\nimport { t } from '@jotforminc/translation';\nimport { isEnterprise } from '@jotforminc/enterprise-utils';\n\nimport { Button } from '@jotforminc/magnet';\nimport { IconExclamationCircleFilled } from '@jotforminc/svg-icons';\nimport { r } from '../libs/api';\nimport * as actionCreator from '../actions';\nimport Spinner from '../components/Spinner';\nimport { extractButtonStyleFromTemplate, logJotFormEvents } from '../libs/Utils';\n\nclass Themes extends React.Component {\n constructor(props, context) {\n super(props, context);\n this._renderAccessibilityWarning = this._renderAccessibilityWarning.bind(this);\n this._renderDropdown = this._renderDropdown.bind(this);\n this._onSelectionChaged = this._onSelectionChaged.bind(this);\n this._renderTheme = this._renderTheme.bind(this);\n this._renderSection = this._renderSection.bind(this);\n this._useDefaultTheme = this._useDefaultTheme.bind(this);\n this._renderThemeStoreLink = this._renderThemeStoreLink.bind(this);\n this.onUserDefaultThemeChanged = this.onUserDefaultThemeChanged.bind(this);\n this.handleNewDefaultThemeSwitch = this.handleNewDefaultThemeSwitch.bind(this);\n this.handleDefaultThemeGroupLogs = this.handleDefaultThemeGroupLogs.bind(this);\n this.getInjectCSS = this.getInjectCSS.bind(this);\n this.themeCategories = {\n featuredThemes: 'Featured Themes',\n freeThemes: 'Free Themes',\n usedThemes: 'Used Themes',\n likedThemes: 'Liked Themes',\n purchasesThemes: 'Purchased Themes'\n };\n const isCardForm = this.props.ui.builderType === 'card';\n if (isCardForm) {\n this.themeCategories = {\n freeThemes: 'Free Themes',\n usedThemes: 'Used Themes',\n };\n }\n\n // Enterprise customizations\n this.customizedConfigs = isEnterprise() && typeof global.CUSTOMIZED_CONFIGS === 'object' && global.CUSTOMIZED_CONFIGS;\n this.filterThemes = this.customizedConfigs && this.customizedConfigs.FILTER_THEMES;\n }\n\n componentDidMount() {\n this.props.actions.fetchAllThemes();\n }\n\n onUserDefaultThemeChanged(e) {\n const theme = e.target.getAttribute('data-theme');\n const isDefault = e.target.getAttribute('data-isdefault');\n const isJotFormDefault = isDefault === 'true' || isDefault === true; // for cross browsers\n const themeName = isJotFormDefault ? t('Default Theme') : e.target.getAttribute('data-tname');\n // If theme is already default, lets remove it and make JotForm's default theme as user default\n const newThemeId = isJotFormDefault ? this.getDefaultThemeId() : theme;\n this.props.actions.updateDefaultTheme(newThemeId, themeName, isJotFormDefault);\n }\n\n getDefaultThemeId() {\n if (global.buildermode === 'card') {\n return Themes.defaultCardThemeId;\n }\n\n return Themes.defaultLegacyV2ThemeId;\n }\n\n getInjectCSS() {\n const { injectCSS } = this.props.formProperties;\n if (!!injectCSS && injectCSS.indexOf('/*__INSPECT_SEPERATOR__*/') > -1) {\n return injectCSS.split('/*__INSPECT_SEPERATOR__*/')[1];\n }\n return injectCSS;\n }\n\n _renderAccessibilityWarning() {\n return this.props.formProperties.accessibility === '1'\n && (\n
    \n
    \n \n {t('Custom themes may affect the accessibility of your form.')}\n
    \n
    \n );\n }\n\n _renderDropdown() {\n return (\n
    \n
    \n \n {Object.keys(this.themeCategories).map((p, index) => )}\n \n \n
    \n
    \n );\n }\n\n _onSelectionChaged(e) {\n this.props.actions.setThemeSelection(e.target.value);\n }\n\n handleDefaultThemeGroupLogs(name) {\n const { default_theme_group } = this.props.user;\n const isThemeGroup = default_theme_group && ['1911', '1921'].indexOf(default_theme_group) > -1; // eslint-disable-line camelcase\n\n if (!isThemeGroup) return;\n\n logJotFormEvents('default-theme-group', {\n actor: this.props.user.username,\n action: default_theme_group, // eslint-disable-line camelcase\n target: name || 'Remove Theme'\n }, this.props.user.account_type.name);\n }\n\n overrideButtonStylesForThemeSwitch({ pagebreakButtonStyle, submitButtonStyle }) {\n const questionPropertyKeys = {\n control_pagebreak: pagebreakButtonStyle,\n control_button: submitButtonStyle,\n };\n\n this.props.questions.filter(question => {\n return ['control_button', 'control_pagebreak'].includes(question.type);\n }).forEach(q => {\n this.props.onQuestionUpdate(q, {\n buttonStyle: questionPropertyKeys[q.type]\n }, true);\n });\n }\n\n handleNewDefaultThemeSwitch(theme) {\n const { actions, user, formProperties } = this.props;\n\n const currentThemeID = formProperties.themeID;\n\n const isNewDefaultTheme = theme.defaultTheme === 'v2' || this.getDefaultThemeId() === theme.id;\n const defaultTheme = isNewDefaultTheme ? 'v2' : 'v1';\n\n const isReloadRequired = [currentThemeID, theme.id].indexOf(this.getDefaultThemeId()) > -1 || defaultTheme !== formProperties.defaultTheme;\n\n const { '@buttonCustomTemplate': button_template, '@pbButtonCustomTemplate': pagebreak_template } = theme.styleJSON;\n\n const submitButtonStyle = extractButtonStyleFromTemplate(button_template) || 'None';\n const pagebreakButtonStyle = extractButtonStyleFromTemplate(pagebreak_template) || 'None';\n const buttonStyles = { submitButtonStyle, pagebreakButtonStyle };\n const colorSchemeTagId = `color-scheme-style${isNewDefaultTheme ? '' : '-odt'}`;\n const colorSchemeCss = document.getElementById(colorSchemeTagId);\n if (colorSchemeCss) {\n colorSchemeCss.remove();\n }\n\n if (!isReloadRequired) {\n this.overrideButtonStylesForThemeSwitch(buttonStyles);\n this.handleDefaultThemeGroupLogs(theme.name);\n actions.updateTheme(theme.id);\n return;\n }\n\n actions.overrideQuestionPropertiesForThemeSwitch(defaultTheme, buttonStyles);\n actions.overrideFormPropertiesForThemeSwitch(defaultTheme);\n actions.overrideWidgetPropertiesForThemeSwitch(defaultTheme);\n\n actions.updateFormProperty({ themeID: theme.id, defaultTheme, statelessColorScheme: '' }, false, true, true).then(res => {\n if (res.type === 'UPDATE_SUCCEED') {\n logJotFormEvents('new-default-theme', {\n actor: user.username,\n action: defaultTheme === 'v2' ? 'UpcomingThemeUsed' : 'UpcomingThemeStopUsed',\n target: formProperties.id\n }, user.account_type.name);\n r.post(`//${global.location.hostname}/API/form/${formProperties.id}/commitRevision`);\n }\n this.handleDefaultThemeGroupLogs(theme.name);\n });\n }\n\n _renderTheme(theme) {\n const { formProperties: { importedPDF }, user: { accountType } } = this.props;\n\n if (isEmpty(theme)\n // pdf converter theme is removed on non-converted forms\n || (theme.id === '5ca4930530899c64ff77cfa1' && !importedPDF && accountType !== 'ADMIN')) {\n return null;\n }\n\n if (Array.isArray(this.filterThemes) && this.filterThemes.indexOf(theme.id) !== -1) {\n return null;\n }\n\n let current =
    ;\n let clx = 'themesListItem';\n let themeImgLink = theme.screenshots && theme.screenshots[0] ? theme.screenshots[0] : false;\n if (themeImgLink) {\n themeImgLink = themeImgLink.replace('1280.png', '320.png');\n }\n const themeImg = (themeImgLink) ? (\"\") : null;\n const isDefaultTheme = this.props.user.defaultTheme === theme.id;\n const isCurrent = theme.id === this.props.formProperties.themeID;\n const showSetAsDefaultButton = (isCurrent);\n\n const setAsDefaultButton = (\n \n {isDefaultTheme ? t('Remove Default') : t('Set As Default')}\n \n );\n\n if (isCurrent) {\n clx = 'themesListItem isCurrent';\n current =
    ;\n }\n clx = `${clx} ${isDefaultTheme ? 'isDefault' : ''}`;\n return (\n
  • \n
    \n
    \n
    \n
    \n
    \n
    \n {isCurrent && {t('Current Theme')}}\n {isCurrent\n && (\n { this.handleNewDefaultThemeSwitch({ id: this.getDefaultThemeId(), styleJSON: {} }); }}\n >\n {t('Remove Theme')}\n \n )}\n {!isCurrent\n && (\n { this.handleNewDefaultThemeSwitch(theme); }}\n >\n {t('Use Theme')}\n \n )}\n {showSetAsDefaultButton && setAsDefaultButton}\n
    \n
    \n
    \n
    \n \"\"\n {themeImg}\n
    \n
    {t(theme.name.trim())}
    \n
    \n {current}\n
  • \n );\n }\n\n _renderSection(type, themes) {\n if (this.props.themes.selection !== type) return null;\n let message = 'There doesn\\'t seem to be any themes here. Please check your internet connectivity.';\n switch (type) {\n case 'purchasesThemes':\n message = 'You haven\\'t purchased any themes yet.';\n break;\n case 'likedThemes':\n message = 'You haven\\'t liked any themes yet.';\n break;\n case 'usedThemes':\n message = 'You haven\\'t used any themes yet.';\n break;\n default:\n break;\n }\n\n if (!(themes && themes.length)) {\n return (\n
    \n {t(message)}\n
    \n );\n }\n\n let orderedThemes = [...themes];\n const defaulThemeIndex = orderedThemes.findIndex(p => p.id === this.getDefaultThemeId());\n\n if (defaulThemeIndex > -1) {\n const defaultTheme = orderedThemes.splice(defaulThemeIndex, 1);\n orderedThemes = [...defaultTheme, ...orderedThemes];\n }\n\n return
      {orderedThemes.map(this._renderTheme)}
    ;\n }\n\n _useDefaultTheme() {\n this.props.actions.updateTheme(this.getDefaultThemeId());\n }\n\n _renderThemeStoreLink() {\n return null;\n }\n\n render() {\n if (this.props.themes.loading) {\n return
    ;\n }\n\n return (\n
    \n {this._renderAccessibilityWarning()}\n {this._renderDropdown()}\n {this._renderSection('usedThemes', this.props.themes.userThemes ? this.props.themes.userThemes.used : null)}\n {this._renderSection('likedThemes', this.props.themes.userThemes ? this.props.themes.userThemes.liked : null)}\n {this._renderSection('purchasesThemes', this.props.themes.userThemes ? this.props.themes.userThemes.purchases : null)}\n {this._renderSection('featuredThemes', this.props.themes.featuredThemes ? this.props.themes.featuredThemes.themes : null)}\n {this._renderSection('freeThemes', this.props.themes.freeThemes)}\n {this._renderThemeStoreLink()}\n
    \n );\n }\n}\n\nfunction mapDispatchToProps(dispatch) {\n return {\n actions: bindActionCreators(actionCreator, dispatch)\n };\n}\n\nfunction mapStateToProps(state) {\n return {\n themes: state.themes,\n formProperties: state.formProperties,\n ui: state.ui,\n questions: state.questions,\n user: state.user,\n };\n}\n\nThemes.propTypes = {\n actions: PropTypes.shape({\n setThemeSelection: PropTypes.func,\n fetchAllThemes: PropTypes.func,\n updateTheme: PropTypes.func,\n updateMultipleFormQuestions: PropTypes.func,\n updateFormProperty: PropTypes.func,\n overrideQuestionPropertiesForThemeSwitch: PropTypes.func,\n overrideWidgetPropertiesForThemeSwitch: PropTypes.func,\n overrideFormPropertiesForThemeSwitch: PropTypes.func,\n // likeTheme: PropTypes.func\n }),\n user: PropTypes.shape(),\n themes: PropTypes.shape({\n selection: PropTypes.string,\n userThemes: PropTypes.shape(),\n featuredThemes: PropTypes.shape({\n id: PropTypes.string,\n themes: PropTypes.arrayOf(PropTypes.shape()),\n name: PropTypes.string,\n }),\n freeThemes: PropTypes.arrayOf(PropTypes.shape()),\n // paidThemes: PropTypes.shape(),\n loading: PropTypes.bool\n }),\n formProperties: PropTypes.shape(),\n};\n\nThemes.defaultLegacyThemeId = '566a91c2977cdfcd478b4567';\nThemes.defaultLegacyV2ThemeId = '5e6b428acc8c4e222d1beb91';\nThemes.defaultCardThemeId = '59647bf8cf3bfe639c0b7cb1';\nThemes.defaultThemeId = global.buildermode === 'card' ? Themes.defaultCardThemeId : Themes.defaultLegacyThemeId;\n\nexport const { defaultThemeId } = Themes;\nexport const importedPDFDefaultThemeId = '5ca4930530899c64ff77cfa1';\n\nexport default connect(mapStateToProps, mapDispatchToProps)(Themes);\n","import PropTypes from 'prop-types';\nimport React from 'react';\n\nconst PreviewIframe = props => {\n /*\n for sandbox reference: https://developer.mozilla.org/en/docs/Web/HTML/Element/iframe#attr-sandbox\n `allow-top-navigation` removed\n */\n return (\n \n );\n};\n\nPreviewIframe.propTypes = {\n src: PropTypes.string.isRequired\n};\n\nexport default PreviewIframe;\n","import React from 'react';\nimport { PanelHeader } from '@jotforminc/jotform-common';\nimport { IconCheckCircleFilled } from '@jotforminc/svg-icons';\nimport { bool } from 'prop-types';\nimport { translate } from '../../../mixins/Translation';\nimport HeaderClassIcon from '../components/HeaderClassIcon';\n\nconst ThankYouPanelHeader = ({ v4 }) => {\n return (\n }\n />\n );\n};\n\nThankYouPanelHeader.propTypes = {\n v4: bool.isRequired\n};\n\nexport default ThankYouPanelHeader;\n","/* eslint-disable max-len */\nexport const thankYouNdtInjectCSSString = ''\n+ '.ty-buttons {'\n+ ' position: relative;'\n+ ' display: flex;'\n+ ' align-items: center;'\n+ ' height: 48px;'\n+ ' border-width: 1px;'\n+ ' border-style: solid;'\n+ ' border-radius: 4px;'\n+ ' padding: 0 16px;'\n+ ' font-size: 16px;'\n+ ' pointer-events: none;'\n+ ' font-family: \\'inter\\', sans-serif;'\n\n+ '}'\n+ '.ty-buttons.thankYouFillAgain {'\n+ ' margin-right: 8px;'\n+ '}'\n+ '.fillAnotherFormItem .ty-buttons, .downloadPDFItem .ty-buttons{'\n+ ' font-size: 14px;'\n+ ' height: 34px;'\n+ '}'\n+ '.thankYouButtonWrapper {'\n+ ' display: flex;'\n+ ' justify-content: center;'\n+ ' align-items: center;'\n+ ' padding: 16px 0;'\n+ '}'\n+ '.thankYouButtonWrapper.active + .active {'\n+ ' margin-top: 16px'\n+ '}'\n\n+ '.ty-buttons::before {'\n+ ' content: \"\";'\n+ ' display: flex;'\n+ ' background-repeat: no-repeat;'\n+ ' margin-right: 8px;'\n+ ' }'\n+ '.ty-buttons.thankYouEditSubmission::before {'\n+ ' background-image: url(\"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNC4zNDIgMS4yMDZsMi40MDIgMi40MDJjLjM1NC0uMzQuNzMxLS42ODIgMS4wOC0xLjA1YS41NDguNTQ4IDAgMDAtLjAwMi0uNzMzYy0uNTQ2LS41NTEtMS4wOTQtMS4xLTEuNjQ3LTEuNjQyLS4yNDItLjIzNy0uNTU4LS4yNDYtLjgwMS0uMDE0LS4zNTUuMzQtLjY5NC42OTUtMS4wMzIgMS4wMzd6bS0uNjU3LjcwOGMtLjAyLjAxNy0uMDUuMDQzLS4wNzguMDcxLTIuNTc4IDIuNTYtNS4xNTcgNS4xMTktNy43MzIgNy42ODFhLjMxLjMxIDAgMDAtLjA4Mi4xOTdjLS4wMDYuNzI2LS4wMDQgMS40NTItLjAwMyAyLjE3OCAwIC4wNDMuMDA1LjA4Ni4wMDguMTMuMDM3LjAwMy4wNi4wMDguMDgxLjAwOC43NTMgMCAxLjUwNi4wMDIgMi4yNTktLjAwMy4wNTcgMCAuMTI2LS4wNDIuMTY5LS4wODYgMi41NTgtMi41NzIgNS4xMTQtNS4xNDcgNy42Ny03LjcyMi4wMzItLjAzMS4wNi0uMDY0LjA3OC0uMDg0bC0yLjM3LTIuMzd6IiBmaWxsPSIjMkMzMzQ1Ii8+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNS4wNDMgMThIMi44NzhhMi4zNyAyLjM3IDAgMDEtMi4zNjYtMi4zNjdWMy4wODFBMi4zNyAyLjM3IDAgMDEyLjg3OC43MTVoNy4xODhhLjgxMS44MTEgMCAxMTAgMS42MjNIMi44NzhhLjc0NC43NDQgMCAwMC0uNzQzLjc0M3YxMi41NTJjMCAuNDEuMzMzLjc0NC43NDMuNzQ0aDEyLjE2NWMuNDEgMCAuNzQzLS4zMzQuNzQzLS43NDRWMTAuMDVhLjgxMS44MTEgMCAwMTEuNjIzIDB2NS41ODRBMi4zNyAyLjM3IDAgMDExNS4wNDMgMTh6IiBmaWxsPSIjMkMzMzQ1Ii8+PC9zdmc+\");'\n+ ' width: 18px;'\n+ ' height: 18px;'\n+ ' background-size: 17px;'\n+ ' }'\n+ '.ty-buttons.thankYouFillAgain::before {'\n+ ' background-image: url(\"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTgiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xMy4xMDcgOC42N2MuMTYuOTYxLjMyNCAxLjkwMS4wOCAyLjg2LS4yNC45MzktLjU5OCAxLjgwMy0xLjIyNSAyLjU0Ni0uNjIzLjczOS0xLjM1MyAxLjMxMi0yLjI0IDEuNjcyLTIuNTg4IDEuMDUzLTUuMjM1LjA5OC02LjcyLTEuODUzLTEuNTY0LTIuMDU1LTEuNjQzLTQuOTM0LS4xODYtNy4wNDFDNC4yNCA0Ljc5NyA2LjYyMiA0LjExNyA4LjE1MiA0LjQyOWwuMDQxIDIuOTA3IDMuNTM5LTMuNjI2TDguMTEzIDBsLS4wMTIgMi41MzVDNC4wMSAyLjIzMS45NTcgNS4yNDIuMjE1IDguMzgyYy0uNzc2IDMuMjguNTkyIDYuNzEzIDMuNDIgOC40ODggMi43NzIgMS43MzggNi4zNzkgMS40NDcgOC44MDctLjcxIDIuNTMzLTIuMjQ5IDMuMTE3LTUuNDI1IDIuMjg1LTguMTM2bC0xLjYyLjY0NnoiIGZpbGw9IiMyQzMzNDUiLz48L3N2Zz4=\");'\n+ ' width: 16px;'\n+ ' height: 18px;'\n+ ' background-size: 15px;'\n+ ' }'\n+ '.ty-buttons.thankYouViewSubmission::before {'\n+ ' background-image: url(\"data:image/svg+xml,%3Csvg width=\\'21\\' height=\\'13\\' fill=\\'none\\' xmlns=\\'http://www.w3.org/2000/svg\\'%3E%3Cpath fill-rule=\\'evenodd\\' clip-rule=\\'evenodd\\' d=\\'M0 6.053C1.585 4.035 5.794 0 9.945 0c4.15 0 8.647 4.035 10.376 6.053-2.161 2.018-7.263 6.053-10.376 6.053-3.114 0-7.927-4.035-9.945-6.053zm9.945 3.46a3.459 3.459 0 100-6.919 3.459 3.459 0 000 6.918z\\' fill=\\'%232C3345\\'/%3E%3Ccircle cx=\\'10\\' cy=\\'6\\' r=\\'2\\' fill=\\'%232C3345\\'/%3E%3C/svg%3E\");'\n+ ' width: 21px;'\n+ ' height: 13px;'\n+ '}'\n+ '.ty-buttons.thankYouDownloadPDF::before {'\n+ ' background-image: url(\"data:image/svg+xml,%3Csvg width=\\'14\\' height=\\'16\\' fill=\\'none\\' xmlns=\\'http://www.w3.org/2000/svg\\'%3E%3Cpath d=\\'M7 12c.3 0 .5-.1.7-.3L13.4 6 12 4.6l-4 4V0H6v8.6l-4-4L.6 6l5.7 5.7c.2.2.4.3.7.3zM0 14h14v2H0v-2z\\' fill=\\'%232C3345\\'/%3E%3C/svg%3E\");'\n+ ' width: 14px;'\n+ ' height: 16px;'\n+ '}'\n+ '.thankYouDownloadPDF, .thankYouFillAnotherFormWrapper, .thankYouVisitURLFormWrapper {'\n+ ' display: flex;'\n+ ' width: 100%;'\n+ ' position: relative;'\n+ '}'\n+ '.thankYouDownloadPDFWrapper, .thankYouFillAnotherFormWrapper, .thankYouVisitURLFormWrapper {'\n+ ' padding-top: 16px;'\n+ '}'\n+ ' .thankYouPDFList, .thankYouFillAnotherFormList, .thankYouVisitURLFormList {'\n+ ' display: flex;'\n+ ' width: 100%;'\n+ ' padding: 0;'\n+ ' flex-wrap: wrap;'\n+ ' margin: 0;'\n+ ' }'\n+ ' .settingButonWrapper {'\n+ ' position: absolute;'\n+ ' right: 0;'\n+ ' min-height: 100%;'\n+ ' display: flex;'\n+ ' align-items: center;'\n+ ' flex-direction: column;'\n+ ' top: 50%;'\n+ ' transform: translateY(-50%);'\n+ ' }'\n+ ' .ty-buttons.thankYouFillAnotherForm::before {'\n+ ' background-image: url(\"data:image/svg+xml,%3csvg width=\\'16\\' height=\\'16\\' viewBox=\\'0 0 16 16\\' fill=\\'none\\' xmlns=\\'http://www.w3.org/2000/svg\\'%3e%3cpath fill-rule=\\'evenodd\\' clip-rule=\\'evenodd\\' d=\\'M11.398 6.56564e-06H5.32197C5.22876 -0.000381164 5.13534 0.016403 5.04675 0.0506276C4.98053 0.0762105 4.91702 0.111538 4.85832 0.156723C4.84116 0.169924 4.82457 0.183845 4.80861 0.198441L0.256908 4.32535C0.24228 4.33837 0.228153 4.35195 0.214561 4.36606C0.0817596 4.50389 0 4.69191 0 4.89917V13.0134C0 14.2817 1.02061 15.3099 2.2796 15.3099H4.55919C4.97885 15.3099 5.31906 14.9672 5.31906 14.5444C5.31906 14.1216 4.97885 13.7789 4.55919 13.7789H2.2796C1.85993 13.7789 1.51973 13.4362 1.51973 13.0134V5.66466H5.31906C5.73872 5.66466 6.07892 5.32194 6.07892 4.89917V1.531H11.398C11.8176 1.531 12.1578 1.87372 12.1578 2.29649V5.35847C12.1578 5.78124 12.498 6.12396 12.9177 6.12396C13.3374 6.12396 13.6776 5.78124 13.6776 5.35847V2.29649C13.6776 1.02818 12.657 6.56564e-06 11.398 6.56564e-06ZM4.55919 4.13368H2.74007L4.55919 2.48432V4.13368ZM3.03946 8.42044C3.03946 7.99767 3.37966 7.65495 3.79933 7.65495H7.59865C8.01831 7.65495 8.35852 7.99767 8.35852 8.42044C8.35852 8.84322 8.01831 9.18594 7.59865 9.18594H3.79933C3.37966 9.18594 3.03946 8.84322 3.03946 8.42044ZM3.79933 10.7169C3.37966 10.7169 3.03946 11.0597 3.03946 11.4824C3.03946 11.9052 3.37966 12.2479 3.79933 12.2479H5.31906C5.73872 12.2479 6.07892 11.9052 6.07892 11.4824C6.07892 11.0597 5.73872 10.7169 5.31906 10.7169H3.79933Z\\' fill=\\'%230A1551\\'/%3e%3cpath d=\\'M15.4807 6.83326C14.7883 6.13575 13.6658 6.13575 12.9734 6.83326L7.23882 12.6103C6.97702 12.874 6.79153 13.2037 6.70202 13.5644L6.41255 14.7309C6.22705 15.4784 6.89917 16.1555 7.64118 15.9686L8.7913 15.6789C9.15429 15.5875 9.48548 15.3988 9.7492 15.1331L15.4807 9.35917C16.1731 8.66166 16.1731 7.53077 15.4807 6.83326Z\\' fill=\\'%230A1551\\'/%3e%3c/svg%3e\");'\n+ ' width: 14px;'\n+ ' height: 16px;'\n+ '}'\n+ ' .settingButonWrapper .settingButon {'\n+ ' height: 36px;'\n+ ' width: 36px;'\n+ ' left: 8px;'\n+ ' position: relative;'\n+ ' display: none;'\n+ ' border-radius: 100%;'\n+ ' cursor: pointer;'\n+ ' background-size: 21px;'\n+ ' background-repeat: no-repeat;'\n+ ' background-position: center center;'\n+ ' transform: translateX(100%);'\n+ ' }'\n+ ' .settingButonWrapper .settingButon + .settingButon {'\n+ ' margin-top: 4px;'\n+ ' }'\n+ ' .settingButonWrapper .settingButon.setting {'\n+ ' background-image: url(\"data:image/svg+xml,%3Csvg width=\\'20\\' height=\\'20\\' fill=\\'none\\' xmlns=\\'http://www.w3.org/2000/svg\\'%3E%3Cpath d=\\'M15.489 11.046c.126-.691.126-1.4 0-2.091l1.714-1.298c.14-.106.18-.3.092-.452l-1.392-2.41a.348.348 0 0 0-.436-.147l-1.985.838a5.954 5.954 0 0 0-1.81-1.05l-.266-2.131A.348.348 0 0 0 11.062 2H8.28a.346.346 0 0 0-.345.305l-.267 2.132c-.66.24-1.272.595-1.809 1.049l-1.984-.837a.346.346 0 0 0-.436.146l-1.393 2.41a.347.347 0 0 0 .092.452l1.712 1.298a5.929 5.929 0 0 0 0 2.092l-1.712 1.297c-.14.106-.18.3-.092.452l1.392 2.41a.346.346 0 0 0 .436.146l1.985-.837c.537.454 1.149.81 1.809 1.05l.267 2.131c.022.174.17.303.344.304h2.78c.177 0 .325-.13.346-.305l.267-2.132a5.951 5.951 0 0 0 1.809-1.049l1.985.837a.346.346 0 0 0 .436-.146l1.392-2.41a.346.346 0 0 0-.092-.452l-1.715-1.297ZM9.67 12.435a2.435 2.435 0 1 1 0-4.87 2.435 2.435 0 0 1 0 4.87Z\\' fill=\\'%23fff\\'/%3E%3C/svg%3E\");'\n+ ' background-color: #3F9AF7;'\n+ ' }'\n+ ' .settingButonWrapper .settingButon.delete {'\n+ ' background-image: url(\"data:image/svg+xml,%3csvg width=\\'12\\' height=\\'17\\' viewBox=\\'0 0 12 17\\' fill=\\'none\\' xmlns=\\'http://www.w3.org/2000/svg\\'%3e%3cg clip-path=\\'url(%23clip0_482_14611)\\'%3e%3cpath d=\\'M8.52426 13.9365V6.80648H7.23426C7.02426 6.80648 7.02426 6.80648 7.02426 7.03648V13.9365H8.52426ZM4.00426 13.9465H5.29426C5.50426 13.9465 5.50426 13.9465 5.50426 13.7165V6.91648C5.48426 6.87648 5.43426 6.81648 5.40426 6.81648H4.01426V13.9465H4.00426ZM1.71426 4.43648H10.8143V14.6865C10.8143 15.6365 10.1543 16.3265 9.25426 16.3265H3.27426C2.37426 16.3265 1.71426 15.6265 1.71426 14.6865V4.43648ZM0.614258 3.85648V2.05648H0.814258L3.57426 2.04648C3.66426 2.04648 3.77426 1.98648 3.84426 1.91648C4.04426 1.70648 4.22426 1.46648 4.42426 1.25648C4.48426 1.18648 4.57426 1.14648 4.65426 1.14648H7.51426C7.58426 1.14648 7.67426 1.18648 7.73426 1.24648C7.93426 1.46648 8.11426 1.70648 8.32426 1.91648C8.38426 1.98648 8.49426 2.04648 8.59426 2.04648H11.5443V3.85648H0.614258Z\\' fill=\\'white\\'/%3e%3c/g%3e%3cdefs%3e%3cclipPath id=\\'clip0_482_14611\\'%3e%3crect width=\\'12\\' height=\\'16\\' fill=\\'white\\' transform=\\'translate(0 0.646484)\\'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e\");'\n+ ' background-color: #C4442D;'\n+ ' background-size: 13px;'\n+ ' }'\n+ ' .settingButon.setting:hover {'\n+ ' background-color: #0099fe;'\n+ ' }'\n+ ' .settingButon.delete:hover {'\n+ ' background-color: #C4442D;'\n+ ' }'\n+ ' .pdf-image-wrapper {'\n+ ' margin-right: 16px;'\n+ ' }'\n+ ' .newActionButtons {'\n+ ' position: relative;'\n+ ' border-radius: 4px;'\n+ ' cursor: pointer;'\n+ ' }'\n+ ' .tyWrapper + .tyWrapper {'\n+ ' margin-left: 8px;'\n+ ' }'\n+ ' .newActionButtons:hover {'\n+ ' box-shadow: 0 0 0 2px #D8DAE8;'\n+ ' }'\n+ ' .pdf-image-wrapper, .form-image-wrapper, .visitURL-image-wrapper {'\n+ ' margin-right: 16px;'\n+ ' }'\n+ ' .form-SVG {'\n+ ' background-image: url(\"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjciIGhlaWdodD0iMzMiIHZpZXdCb3g9IjAgMCAyNyAzMyIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik00LjcwNDUgMC44NjQyNThDMi41NDU1NyAwLjg2NDI1OCAwLjc5NTQxIDIuNjE0NDIgMC43OTU0MSA0Ljc3MzM1VjI4LjIyNzlDMC43OTU0MSAzMC4zODY4IDIuNTQ1NTcgMzIuMTM3IDQuNzA0NSAzMi4xMzdIMjIuMjk1NEMyNC40NTQzIDMyLjEzNyAyNi4yMDQ1IDMwLjM4NjggMjYuMjA0NSAyOC4yMjc5VjQuNzczMzVDMjYuMjA0NSAyLjYxNDQyIDI0LjQ1NDMgMC44NjQyNTggMjIuMjk1NCAwLjg2NDI1OEg0LjcwNDVaTTcuNDM3MSA5LjE1NDc0QzYuNTY0NTIgOS4xNTQ3NCA1Ljg1NzE2IDkuODYyMSA1Ljg1NzE2IDEwLjczNDdDNS44NTcxNiAxMS42MDczIDYuNTY0NTIgMTIuMzE0NiA3LjQzNzEgMTIuMzE0NkgxOS4wMjMzQzE5Ljg5NTkgMTIuMzE0NiAyMC42MDMyIDExLjYwNzMgMjAuNjAzMiAxMC43MzQ3QzIwLjYwMzIgOS44NjIxIDE5Ljg5NTkgOS4xNTQ3NCAxOS4wMjMzIDkuMTU0NzRINy40MzcxWk03LjQzNzEgMTQuNDE5QzYuNTY0NTIgMTQuNDE5IDUuODU3MTYgMTUuMTI2NCA1Ljg1NzE2IDE1Ljk5OUM1Ljg1NzE2IDE2Ljg3MTUgNi41NjQ1MiAxNy41Nzg5IDcuNDM3MSAxNy41Nzg5SDE5LjAyMzNDMTkuODk1OSAxNy41Nzg5IDIwLjYwMzIgMTYuODcxNSAyMC42MDMyIDE1Ljk5OUMyMC42MDMyIDE1LjEyNjQgMTkuODk1OSAxNC40MTkgMTkuMDIzMyAxNC40MTlINy40MzcxWk01Ljg1NzE2IDIxLjI2NzFDNS44NTcxNiAyMC4zOTQ1IDYuNTY0NTIgMTkuNjg3MSA3LjQzNzEgMTkuNjg3MUgxOS4wMjMzQzE5Ljg5NTkgMTkuNjg3MSAyMC42MDMyIDIwLjM5NDUgMjAuNjAzMiAyMS4yNjcxQzIwLjYwMzIgMjIuMTM5NyAxOS44OTU5IDIyLjg0NyAxOS4wMjMzIDIyLjg0N0g3LjQzNzFDNi41NjQ1MiAyMi44NDcgNS44NTcxNiAyMi4xMzk3IDUuODU3MTYgMjEuMjY3MVoiIGZpbGw9IiNGRjYxMDAiLz4KPC9zdmc+Cg==\");'\n+ ' width: 26px;'\n+ ' height: 32px;'\n+ ' background-repeat: no-repeat;'\n+ ' display: flex;'\n+ ' }'\n+ ' .pdf-SVG {'\n+ ' background-image: url(\"data:image/svg+xml,%3Csvg width=\\'47\\' height=\\'49\\' fill=\\'none\\' xmlns=\\'http://www.w3.org/2000/svg\\'%3E%3Cpath d=\\'M7.97 0h23.418c.862 0 1.561.717 1.561 1.602v11.216c0 .885.7 1.603 1.562 1.603h10.928c.862 0 1.561.717 1.561 1.602v30.443c0 .885-.699 1.602-1.561 1.602H7.97c-.862 0-1.56-.717-1.56-1.602V1.602C6.41.717 7.107 0 7.97 0zm30.767 2.735l5.598 5.746c.61.625.61 1.64 0 2.266-.293.3-.69.469-1.104.469h-5.598c-.862 0-1.561-.717-1.561-1.602V3.868c0-.885.699-1.602 1.56-1.602.415 0 .812.169 1.105.47z\\' fill=\\'%23E6EBF2\\'/%3E%3Cpath d=\\'M1.57 23.5h37.676c.867 0 1.57.705 1.57 1.574v14.168c0 .869-.703 1.574-1.57 1.574H1.57c-.867 0-1.57-.705-1.57-1.574V25.074c0-.87.703-1.574 1.57-1.574z\\' fill=\\'%23D04241\\'/%3E%3Cpath d=\\'M8.545 36.318h1.858v-2.77h1.562c2.021 0 3.197-1.173 3.197-2.88 0-1.698-1.155-2.895-3.15-2.895H8.545v8.545zm1.858-4.219v-2.85h1.253c1.073 0 1.592.568 1.592 1.42 0 .846-.52 1.43-1.583 1.43h-1.262zM19.483 36.318c2.678 0 4.3-1.61 4.3-4.281 0-2.662-1.622-4.264-4.274-4.264h-3.14v8.545h3.114zm-1.257-1.548v-5.45h1.185c1.647 0 2.518.818 2.518 2.717 0 1.907-.87 2.733-2.523 2.733h-1.18zM25.16 36.318h1.857v-3.53h3.574v-1.49h-3.574v-2.036h3.96v-1.49H25.16v8.546z\\' fill=\\'%23fff\\'/%3E%3C/svg%3E\");'\n+ ' width: 47px;'\n+ ' height: 49px;'\n+ ' background-repeat: no-repeat;'\n+ ' display: flex;'\n+ ' }'\n+ ' .downloadPDFItem, .fillAnotherFormItem {'\n+ ' display: flex;'\n+ ' align-items: center;'\n+ ' list-style: none;'\n+ ' width: 100%;'\n+ ' }'\n+ ' .downloadPDFItem.active {'\n+ ' margin-bottom: 16px;'\n+ ' }'\n+ ' .downloadPDFItem .thankyou-btn-wrapper, .fillAnotherFormItem .thankyou-btn-wrapper, .thankyou-btn-wrapper {'\n+ ' margin-left: auto;'\n+ ' flex: 0 0 auto;'\n+ ' }'\n+ ' .pdf-name-wrapper, .form-name-wrapper {'\n+ ' overflow: hidden;'\n+ ' width: 100%;'\n+ ' display: flex;'\n+ ' text-overflow: ellipsis;'\n+ ' }'\n+ ' .pdf-name, .form-name {'\n+ ' font-size: 15px;'\n+ ' white-space: nowrap;'\n+ ' max-width: 100%;'\n+ ' display: block;'\n+ ' text-overflow: ellipsis;'\n+ ' overflow: hidden;'\n+ ' }'\n+ ' .pdf-name, .form-name {'\n+ ' color: #0A1551;'\n+ ' }'\n+ ' .downloadPDFItem.active {'\n+ ' margin-bottom: 0;'\n+ ' }'\n + ' .downloadPDFItem, .fillAnotherFormItem {'\n+ ' border-radius: 4px;'\n+ ' height: 72px;'\n+ ' padding: 0 20px;'\n+ ' cursor: pointer;'\n+ ' background-color: #fff;'\n+ ' box-shadow: 0 0 2px 0px #2c33454a;'\n+ ' }'\n+ ' .ty-buttons.thankYouFillAgain {'\n+ ' margin-right: 0;'\n+ ' }'\n+ ' .pdf-SVG {'\n+ ' background-image: url(\"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjYiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAyNiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTQuMjY3NCAzMS4yNzNIMjEuNzMxMkMyMy43NjE3IDMxLjI3MyAyNS40MDc3IDI5LjU0MDMgMjUuNDA3NyAyNy40MDI5VjguMDMyOTJMMTguMjc5OSAwLjcyNzUzOUg0LjI2NzRDMi4yMzY4OCAwLjcyNzUzOSAwLjU5MDgyIDIuNDYwMjUgMC41OTA4MiA0LjU5NzY1VjI3LjQwMjlDMC41OTA4MiAyOS41NDAzIDIuMjM2ODggMzEuMjczIDQuMjY3NCAzMS4yNzNaIiBmaWxsPSIjM0U2MkM4Ii8+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNNi40Nzg1MyAxNy42NjEzVjE5LjgxODFINS4zNjM3N1YxNC4wOTA4SDcuNTA0NDNDNy43ODQ0NyAxNC4wOTA4IDguMDQwMjcgMTQuMTM1MiA4LjI3MTg0IDE0LjIyNDFDOC41MDM0MSAxNC4zMTMgOC43MDI2NiAxNC40MzY4IDguODY5NjEgMTQuNTk1N0M5LjAzNjU1IDE0Ljc1NDYgOS4xNjQ0NSAxNC45NDMgOS4yNTMzMSAxNS4xNjExQzkuMzQyMTcgMTUuMzc5MyA5LjM4NjYgMTUuNjE3NiA5LjM4NjYgMTUuODc2QzkuMzg2NiAxNi4xMzQ1IDkuMzQyMTcgMTYuMzc0MiA5LjI1MzMxIDE2LjU5NUM5LjE2NDQ1IDE2LjgxNTggOS4wMzY1NSAxNy4wMDQzIDguODY5NjEgMTcuMTYwNEM4LjcwMjY2IDE3LjMxNjYgOC41MDM0MSAxNy40MzkxIDguMjcxODQgMTcuNTI4QzguMDQwMjcgMTcuNjE2OCA3Ljc4NDQ3IDE3LjY2MTMgNy41MDQ0MyAxNy42NjEzSDYuNDc4NTNaTTYuNDg2NiAxNi43SDcuMzY3MDlDNy42NDcxMyAxNi43IDcuODY2NTggMTYuNjI1OSA4LjAyNTQ0IDE2LjQ3NzhDOC4xODQzMSAxNi4zMjk3IDguMjYzNzQgMTYuMTMxOCA4LjI2Mzc0IDE1Ljg4NDFDOC4yNjM3NCAxNS42MjU2IDguMTg0MzEgMTUuNDIzNiA4LjAyNTQ0IDE1LjI3ODJDNy44NjY1OCAxNS4xMzI4IDcuNjQ3MTMgMTUuMDYwMSA3LjM2NzA5IDE1LjA2MDFINi40ODY2VjE2LjdaIiBmaWxsPSJ3aGl0ZSIvPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiI'\n+ ' GNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTEzLjQwOTUgMTkuNjI0MkMxMy4wNjQ4IDE5Ljc1MzUgMTIuNjg3OSAxOS44MTgxIDEyLjI3ODYgMTkuODE4MUgxMC4yMzQ5VjE0LjA5MDhIMTIuMjg2N0MxMi42OTU5IDE0LjA5MDggMTMuMDcyOSAxNC4xNTU0IDEzLjQxNzYgMTQuMjg0N0MxMy43NjIyIDE0LjQxMzkgMTQuMDU5OCAxNC42MDExIDE0LjMxMDIgMTQuODQ2MUMxNC41NjA2IDE1LjA5MTEgMTQuNzU3MiAxNS4zOTE0IDE0Ljg5OTkgMTUuNzQ2OEMxNS4wNDI2IDE2LjEwMjIgMTUuMTEzOSAxNi41MDYxIDE1LjExMzkgMTYuOTU4NUMxNS4xMTM5IDE3LjQxMDkgMTUuMDQyNiAxNy44MTQ4IDE0Ljg5OTkgMTguMTcwMkMxNC43NTcyIDE4LjUyNTYgMTQuNTU5MyAxOC44MjQ1IDE0LjMwNjIgMTkuMDY2OEMxNC4wNTMgMTkuMzA5MiAxMy43NTQyIDE5LjQ5NSAxMy40MDk1IDE5LjYyNDJaTTExLjM0OTYgMTguNzg0MkgxMi4yMzgyQzEyLjQ2OTggMTguNzg0MiAxMi42OTA2IDE4Ljc0NzggMTIuOTAwNiAxOC42NzUxQzEzLjExMDYgMTguNjAyNCAxMy4yOTM3IDE4LjQ5MDcgMTMuNDQ5OSAxOC4zMzk5QzEzLjYwNjEgMTguMTg5MSAxMy43Mjk5IDE3Ljk5OTMgMTMuODIxNSAxNy43NzA0QzEzLjkxMyAxNy41NDE1IDEzLjk1ODggMTcuMjcwOSAxMy45NTg4IDE2Ljk1ODZDMTMuOTU4OCAxNi42NDYyIDEzLjkxMyAxNi4zNzU2IDEzLjgyMTUgMTYuMTQ2N0MxMy43Mjk5IDE1LjkxNzkgMTMuNjA3NCAxNS43MjggMTMuNDUzOSAxNS41NzczQzEzLjMwMDUgMTUuNDI2NSAxMy4xMTg3IDE1LjMxMzQgMTIuOTA4NyAxNS4yMzhDMTIuNjk4NyAxNS4xNjI2IDEyLjQ3NzkgMTUuMTI0OSAxMi4yNDYzIDE1LjEyNDlIMTEuMzQ5NlYxOC43ODQyWiIgZmlsbD0id2hpdGUiLz4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNy4yMDYzIDE5LjgxODFWMTcuNTg4NkgxOS40Mjc4VjE2LjU2MjdIMTcuMTk4M1YxNS4xNDlIMTkuNzAyNFYxNC4wOTA4SDE2LjA4MzVWMTkuODE4MUgxNy4yMDYzWiIgZmlsbD0id2hpdGUiLz4KPHBhdGggZD0iTTE4LjMzOTggMC43Mjc1MzlMMjUuNDA4NyA3Ljk0NjgxSDIxLjM5OTRDMTkuNzA5NyA3Ljk0NjgxIDE4LjMzOTggNi41NzY5OCAxOC4zMzk4IDQuODg3MjJWMC43Mjc1MzlaIiBmaWxsPSIjQjFDM0U5Ii8+Cjwvc3ZnPgo=\");'\n+ ' width: 26px;'\n+ ' height: 32px;'\n+ ' background-repeat: no-repeat;'\n+ ' display: flex;'\n+ ' }'\n+ ' .wrapper ~ .nonEditableInvisable:last-child {'\n+ ' padding-bottom: 20px;'\n+ ' }'\n+ ' .selectedActionButton .settingButon {'\n+ ' display: block;'\n+ ' }'\n+ ' .ty-buttons.thankYouDownloadPDF, .ty-buttons.thankYouFillAnotherForm {'\n+ ' color: #0A1551;'\n+ ' background-color: #F3F3FE;'\n+ ' border: none;'\n+ ' margin-right: 0;'\n+ ' }'\n+ ' .downloadPDFItem.active + .active, .fillAnotherFormItem.active + .active {'\n+ ' margin-top: 16px;'\n+ ' margin-bottom: 0;'\n+ ' }'\n+ ' .newActionButtons:hover {'\n+ ' box-shadow: 0 0 0 2px #D8DAE8;'\n+ ' }'\n+ ' .downloadPDFItem.active {'\n+ ' margin-bottom: 0;'\n+ ' }'\n+ ' @media screen and (max-width: 480px) {'\n+ ' .downloadPDFItem, .fillAnotherFormItem, .visitURLItem {'\n+ ' flex-wrap: wrap;'\n+ ' justify-content: center;'\n+ ' }'\n+ ' .downloadPDFItem, .fillAnotherFormItem, .visitURLItem {'\n+ ' padding: 20px;'\n+ ' height: auto;'\n+ ' }'\n+ ' .pdf-image-wrapper, .form-image-wrapper {'\n+ ' margin-right: 0;'\n+ ' }'\n+ ' .pdf-name-wrapper, .form-name-wrapper {'\n+ ' display: block;'\n+ ' }'\n\n+ ' .downloadPDFItem > div, .fillAnotherFormItem > div, .visitURLItem > div {'\n+ ' margin-bottom: 10px;'\n+ ' }'\n+ ' .downloadPDFItem .thankyou-btn-wrapper, .fillAnotherFormItem .thankyou-btn-wrapper, .visitURLItem .thankyou-btn-wrapper {'\n+ ' margin: auto;'\n+ ' }'\n+ ' }'\n\n+ ' .visitURLItem {'\n+ ' background: #fff;'\n+ ' display: flex;'\n+ ' flex-grow: 1;'\n+ ' padding: 0 20px;'\n+ ' }'\n+ ' .visitURL-image-wrapper {'\n+ ' flex-shrink: 0;'\n+ ' min-width: 44px;'\n+ ' }'\n+ ' .visitURL-image-wrapper > img {'\n+ ' object-fit: contain;'\n+ ' width: 44px;'\n+ ' height: 44px;'\n+ ' max-height: 44px;'\n+ ' }'\n\n+ ' .thankYouVisitURLFormWrapper {'\n+ ' border-top: none!important;'\n+ ' margin-top: 20px;'\n+ ' padding: 0;'\n+ ' }'\n\n+ ' .thankYouVisitURLFormList {'\n+ ' height: 72px;'\n+ ' border: 1px solid #2c33454a;'\n+ ' border-radius: 4px;'\n+ ' }'\n\n+ ' .thankYouVisitURL {'\n+ ' display: flex;'\n+ ' align-items: center;'\n+ ' flex-grow: 1;'\n+ ' flex-direction: row;'\n+ ' text-decoration: none;'\n+ ' }'\n\n+ ' .visitURL-context {'\n+ ' color: #0A1551;'\n+ ' display: flex;'\n+ ' flex-direction: column;'\n+ ' align-items: flex-start;'\n+ ' }'\n\n+ ' .visitURL-name {'\n+ ' margin: 0px;'\n+ ' padding: 0px;'\n+ ' max-width: 100%;'\n+ ' font-size: 16px;'\n+ ' line-height: 20px;'\n+ ' min-width: 30px;'\n+ ' display: block;'\n+ ' font-weight: 500;'\n+ ' white-space: unset;'\n+ ' overflow: unset;'\n+ ' text-align: left;'\n+ ' text-overflow: unset;'\n+ ' word-break: break-word;'\n+ ' text-decoration: none;'\n+ ' }'\n\n+ ' .visitURL-description {'\n+ ' color: #0a1551b3;'\n+ ' outline: none;'\n+ ' margin-top: 6px;'\n+ ' font-size: 14px;'\n+ ' line-height: 18px;'\n+ ' font-weight: 400;'\n+ ' word-break: break-word;'\n+ ' min-width: 30px;'\n+ ' white-space: unset;'\n+ ' text-decoration: none;'\n+ ' }';\n","import PropTypes from 'prop-types';\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport debounce from 'lodash/debounce';\nimport isUndefined from 'lodash/isUndefined';\nimport { IconGearFilled, IconExclamationCircle } from '@jotforminc/svg-icons';\nimport Toggle from '@jotforminc/toggle';\nimport { getDimensionsAndPosition } from '@jotforminc/utils';\n\nimport {\n Button,\n Radio,\n Dialog,\n DialogBody,\n DialogIcon,\n DialogTitle,\n DialogActions,\n DialogCloseButton\n} from '@jotforminc/magnet';\nimport Utils from '../../utils';\nimport LegacyUtils from '../../libs/LegacyUtils';\nimport StoreObserver from '../../libs/StoreObserver';\nimport ViewActions from '../../actions/ViewActions';\nimport { translate } from '../../mixins/Translation';\n\nimport SaveButton from '../../components/SaveButton';\nimport TextInput from '../../components/TextInput';\nimport RichTextEditor from '../../components/RichTextEditor';\nimport Panel from '../../components/Panel';\nimport Line from '../../components/Line';\nimport Column from '../../components/Column';\nimport PreviewIframe from './PreviewIframe';\nimport ThankYouPanelHeader from '../common-panel-header/Headers/ThankYouPanel';\nimport { getLayouts, getGalleryImages } from '../thankyou-wizard/constants';\nimport { thankYouNdtInjectCSSString } from './constants/thankYouInjectCss';\n\nconst defaultThankyouHTML = `${''\n+ '
    '\n+ '

    \"\"

    `\n+ '
    '\n+ `

    ${translate('Thank You!')}

    `\n+ `

    ${translate('Your submission has been received.')}

    `\n+ '
    ';\n\nconst relatedProperties = ['activeRedirect', 'thankurl', 'thanktext'];\nconst isJotFormSecure = /^\\bhttps\\b\\:\\/\\//.test(global.location.href);\n\nclass Thankyou extends React.Component {\n constructor(props) {\n super(props);\n // bindings\n this.saveEditorContent = this.saveEditorContent.bind(this);\n this.handleEditorInit = this.handleEditorInit.bind(this);\n this.handleEditorChange = debounce(this.handleEditorChange, 500).bind(this);\n this.handleEditorBlur = this.handleEditorBlur.bind(this);\n this.getFinalText = this.getFinalText.bind(this);\n this.handleRedirectSave = this.handleRedirectSave.bind(this);\n this.handleKeepEditing = this.handleKeepEditing.bind(this);\n this.handleDiscardChanges = this.handleDiscardChanges.bind(this);\n this.handleURLChange = debounce(this.handleURLChange, 500).bind(this);\n this.checkDefaultSchemeV1 = this.checkDefaultSchemeV1.bind(this);\n this.handleModeChange = this.handleModeChange.bind(this);\n this.handleResize = this.handleResize.bind(this);\n this.checkContentIsEmpty = this.checkContentIsEmpty.bind(this);\n this.renderThankYouSettingsToggle = this.renderThankYouSettingsToggle.bind(this);\n this.animateTyRedirectURLChange = this.animateTyRedirectURLChange.bind(this);\n this.tyRedirectURLChangeOnBlur = this.tyRedirectURLChangeOnBlur.bind(this);\n this.initialURL = props.formProperties.thankurl;\n this.initialHTML = props.formProperties.thanktext || this.defaultThankyouHTML;\n this.initialActiveRedirect = this.props.formProperties.activeRedirect;\n\n if (this.props.formProperties.activeRedirect === 'default') {\n this.initialActiveRedirect = 'thanktext';\n }\n\n /* we need to track changes for success statistics */\n this.changes = {\n thanktext: false,\n thankurl: false\n };\n\n this.urlTimeout = () => { return null; };\n this.pasteEvent = false;\n this.requestHandler = null;\n\n this.state = {\n // open rich text editor or url input\n mode: this.props.formProperties.activeRedirect === 'thankurl' ? 'url' : 'editor',\n showThankURLPreview: false\n // timers: true\n };\n }\n\n componentDidMount() {\n if (!isUndefined(global.document)) {\n global.addEventListener('resize', this.handleResize);\n }\n this.handleResize();\n\n this.checkContentIsEmpty();\n }\n\n UNSAFE_componentWillReceiveProps(nextProps) {\n const { activeRedirect: nextActiveRedirect } = nextProps.formProperties;\n if (nextActiveRedirect === 'thankurl') {\n const currProps = { ...this.props.formProperties };\n const newURL = Utils.parseURL(nextProps.formProperties.thankurl);\n const prevURL = Utils.parseURL(currProps.thankurl);\n\n if (newURL.hostname !== prevURL.hostname) {\n this.setState({\n showThankURLPreview: false\n });\n }\n }\n }\n\n componentDidUpdate() {\n const { mode } = this.state;\n /* set focus on URL input */\n if (mode === 'url') {\n const urlInput = ReactDOM.findDOMNode(this.refs['url-input']);\n if (urlInput) {\n urlInput.focus();\n }\n }\n }\n\n componentWillUnmount() {\n if (!isUndefined(global.document)) {\n global.removeEventListener('resize', this.handleResize);\n }\n\n this.checkContentIsEmpty();\n }\n\n renderIFrame() {\n const { thankurl } = this.props.formProperties;\n const { sendpostdata } = this.props.formProperties;\n const { mode } = this.state;\n let iframe = null;\n if (this.state.showThankURLPreview) {\n iframe = (\n \n );\n }\n\n return (\n
    \n {\n this.props.v4 && (\n \n \n
    \n \n {translate('EXTERNAL LINK')}\n
    \n \n {translate('Please type in the externel link URL below to redirect page after form submission.')}\n
    \n \n \n \n )\n }\n\n \n \n \n \n \n \n
    \n
    \n
    \n {translate('Redirect with HTTP POST')}\n
    \n
    \n {translate('Use HTTP POST to include submission data on the page the user is redirected to. This page must support HTTP POST.')}\n
    \n
    \n { this.props.onPropertyChange({ sendpostdata: (sendpostdata === 'No' ? 'Yes' : 'No') }); }}\n squareMode\n onText=\"ON\"\n offText=\"OFF\"\n tabIndex={0}\n role=\"button\"\n ariaLabel={translate('Send Post Data Toggle')}\n />\n
    \n
    \n
    \n \n \n { iframe }\n \n \n
    \n { mode === 'url'\n && (\n
    \n {translate('Your redirect link has been saved successfully!')}\n
    \n )}\n \n );\n }\n\n renderPreview() {\n if (this.state.mode === 'url') {\n return (\n \n
    \n will be displayed here.') }}\n />\n \n
    \n \n );\n }\n let content = this.props.formProperties.thanktext;\n if (content === undefined) {\n content = defaultThankyouHTML;\n } else if (content.length === 0) {\n content = defaultThankyouHTML;\n }\n return (\n \n \n \n );\n }\n\n renderEditor() {\n const { formProperties: { thanktext, isHIPAA, type } } = this.props;\n let content = thanktext;\n if (content === undefined) {\n content = defaultThankyouHTML;\n } else if (content.length === 0) {\n content = defaultThankyouHTML;\n }\n const isWorkflowForm = type && type === 'WORKFLOW';\n const filterFields = isHIPAA === '1' ? ['pdf-link'] : null;\n const customConfigs = window.JOTFORM_ENV === 'ENTERPRISE' && typeof window.CUSTOMIZED_CONFIGS === 'object' && window.CUSTOMIZED_CONFIGS;\n const hideOnThankYouPage = customConfigs?.HIDE_FIELDS_ON_FORM_BUILDER?.thankYouPage;\n const hideActionButtons = Array.isArray(hideOnThankYouPage) && hideOnThankYouPage.indexOf('actionButtons') !== -1;\n let toolbar = 'customfontfamily | customfontsize | bold italic | alignment | forecolor | link customimage jotformuploadx3 | code | table | fullscreen | questionlist';\n toolbar = toolbar.replace('| questionlist', `| ${hideActionButtons ? '' : 'actionButtons'} | addfields`);\n toolbar = isWorkflowForm ? toolbar.replace('| fullscreen', '') : toolbar;\n return (\n
    \n {\n this.props.v4 && (\n \n \n
    \n \n {translate('THANK YOU PAGE CONTENT')}\n
    \n \n {translate('Please use the editor below to edit the “Thank You Page” body content.')}\n
    \n \n \n \n )\n }\n\n \n \n );\n }\n\n renderConfirmation() {\n return (\n \n \n \n \n {translate('You are about to lose your changes.')}\n \n \n \n \n {translate('Keep Editing')}\n \n \n {translate('Discard Changes')}\n \n \n \n \n );\n }\n\n renderThankYouSettingsToggle() {\n return (\n {\n this.props.actions.openThankYouPageWizard('layout');\n this.props.actions.toggleUiProp('isSettingsRightPanelOpen', true);\n }}\n className=\"thankyou-settings-toggle\"\n >\n \n \n );\n }\n\n renderHeaderAndInternalActions() {\n return (\n <>\n \n \n \n \n \n \n \n \n \n \n \n \n );\n }\n\n render() {\n if (this.state.areStoresDirty) {\n return this.renderConfirmation();\n }\n const { mode } = this.state;\n const isWorkflowForm = this.props?.formProperties?.type === 'WORKFLOW' || false;\n\n let children;\n\n if (mode === 'editor') {\n // make builder dirty\n // if save button is disabled it will be enabled\n LegacyUtils.setBuilderOnChange();\n children = this.renderEditor();\n } else if (mode === 'url') {\n LegacyUtils.setBuilderOnChange();\n children = this.renderIFrame();\n }\n\n let button = null;\n\n if (this.state.mode === 'editor') {\n button = (\n \n );\n }\n if (this.state.mode === 'url') {\n button = (\n \n );\n }\n\n return (\n
    \n
    \n {!isWorkflowForm && this.renderThankYouSettingsToggle()}\n {!this.props.hideHeaderAndInternalActions && this.renderHeaderAndInternalActions()}\n { children }\n\n
    \n
    { button }
    \n
    \n );\n }\n\n handleModeChange(e) {\n const { thankurl } = this.props.formProperties;\n this.setState({ mode: e.target.value });\n const activeRedirect = e.target.value === 'url' && thankurl ? 'thankurl' : 'thanktext';\n this.props.onPropertyChange({ activeRedirect });\n }\n\n handleResize() {\n const cardDimensions = getDimensionsAndPosition(ReactDOM.findDOMNode(this).parentNode);\n const windowHeight = (window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight);\n const cardMaxHeight = windowHeight - cardDimensions.top - 80;\n this.setState({ cardMaxHeight: cardMaxHeight });\n }\n\n handleURLChange(e, dontSendRevision = true) {\n /*\n * When user pastes a string into the input we will set throttle timeout to\n * different than default.\n * After the paste event also change event is going to triggered. Because of\n * this we don't need to read `e.clipboardData`.\n */\n const protocol = isJotFormSecure ? 'https://' : 'http://';\n let newURLString = e.target.value;\n let activeRedirect = 'thankurl';\n\n if (!newURLString) {\n activeRedirect = 'thanktext';\n }\n\n if (newURLString && newURLString.indexOf('http') !== 0 && newURLString.match(/^\\{[0-9A-Za-z]+\\}/g) === null) {\n newURLString = `${protocol}${newURLString}`;\n activeRedirect = 'thankurl';\n }\n\n newURLString = newURLString\n .replace(/^\\s+/g, '')\n .replace(//g, '>')\n .replace(/\"/g, '"')\n .replace(/'/g, ''');\n this.changes.thankurl = this.initialURL !== newURLString;\n this.props.onPropertyChange({ thankurl: newURLString, activeRedirect }, true, true, dontSendRevision);\n // this.setState({ timers: true });\n\n setTimeout(() => {\n LegacyUtils.save;\n this.animateTyRedirectURLChange();\n }, 10);\n }\n\n tyRedirectURLChangeOnBlur(e) {\n const tyRedirectLink = document.querySelector('.ty-redirect-link');\n if (tyRedirectLink && tyRedirectLink.className.indexOf('block') > -1) {\n tyRedirectLink.className = tyRedirectLink.className.replace('block', 'none');\n }\n this.handleURLChange(e, false);\n }\n\n animateTyRedirectURLChange() {\n const tyRedirectLink = document.querySelector('.ty-redirect-link');\n // this.setState({ timers: false });\n if (tyRedirectLink && tyRedirectLink.className.indexOf('block') === -1) {\n (tyRedirectLink.className.indexOf('none') > -1) ? (tyRedirectLink.className = tyRedirectLink.className.replace('none', 'block')) : tyRedirectLink.classList.add('block');\n }\n }\n\n checkDefaultSchemeV1() {\n // since we had no selector for defaultScheme, we have to distinguish from colors, it will be refactored later\n let styleJSON;\n if (typeof this.props.formProperties.styleJSON === 'string' && this.props.formProperties.styleJSON !== '') {\n styleJSON = JSON.parse(this.props.formProperties.styleJSON);\n } else {\n styleJSON = this.props.formProperties.styleJSON || {};\n }\n const clrBg = styleJSON['welcome-titleColor'] ? true : (styleJSON['@clrBg'] && ['#F3F3FE', '#FFF', '#F5F5F5'].some(arrVal => styleJSON['@clrBg'].toUpperCase().indexOf(arrVal) > -1));\n const clrFrame = styleJSON['@clrFrame'] && styleJSON['@clrFrame'].toUpperCase().indexOf('#FFF') > -1;\n const clrText = styleJSON['@clrText'] && ['#2C3345', '#000', '#555'].some(arrVal => styleJSON['@clrText'].toUpperCase().indexOf(arrVal) > -1);\n return (clrBg && clrText && clrFrame);\n }\n\n // put form styles into editor\n handleEditorInit(e, editor) {\n if (this.props.onInit) this.props.onInit();\n // assign editor to this for later use (used while saving)\n this.editor = editor;\n if (this.props.formProperties.styleJSON === undefined) {\n return;\n }\n\n const isNewDefaultSchemeV1 = this.checkDefaultSchemeV1();\n let styleJSON;\n if (typeof this.props.formProperties.styleJSON === 'string' && this.props.formProperties.styleJSON !== '') {\n styleJSON = JSON.parse(this.props.formProperties.styleJSON);\n } else {\n styleJSON = this.props.formProperties.styleJSON || {};\n }\n\n // embed google font if exists in style\n if (styleJSON['@fontLink'] !== undefined) {\n const gfl = editor.getWin().document.createElement('link');\n gfl.type = 'text/css';\n gfl.rel = 'stylesheet';\n gfl.href = styleJSON['@fontLink'];\n editor.getWin().document.getElementsByTagName('head')[0].appendChild(gfl);\n }\n\n const bgURL = styleJSON['@bgURL'];\n const clrBg = styleJSON['@clrBg'];\n const clrFrame = styleJSON['@clrFrame'];\n const clrText = styleJSON['@clrText'];\n const fontSize = styleJSON['@fontSize'] || this.props.formProperties.fontsize;\n const fontFamily = styleJSON['@fontFamily'] || this.props.formProperties.font;\n const formWidth = styleJSON['@formWidth'] || this.props.formProperties.formWidth;\n const isWorkflowFormBuilder = document.querySelectorAll('.wfFormBuilder').length > 0;\n\n let injectCSSString = `${''\n + '* {'\n + ' box-sizing:border-box;'\n + '}'\n + 'html, body { margin:0px; padding:0px;}'\n + 'html {'}${\n bgURL ? ` background-image: url('${bgURL}');` : ''\n } background-color: ${clrBg || '#F3F3FE'};`\n + ` font-size: ${fontSize}px;`\n + ' text-align: center;'\n + ' min-height: 100%;'\n + ' background-size: cover'\n + '}'\n + '.thankyou-wrapper {'\n + ' width: 100%;'\n + '}'\n + 'body {'\n + ' -webkit-font-smoothing: antialiased;'\n + ' text-rendering: optimizeLegibility;'\n + ` background-color: ${clrFrame};`\n + ` font-family: '${fontFamily}', sans-serif;`\n + ` color: ${clrText};`\n + ` max-width: ${formWidth}px;`\n + ' width: calc(100% - 70px);'\n + ` height: ${isWorkflowFormBuilder ? '100%' : 'calc(100% - 70px)'};`\n + ' margin: 35px auto;'\n + ' padding-bottom: 30px;'\n + ' box-shadow: 0 4px 4px -1px rgba(0,0,0,0.1);'\n + '}'\n + '.col-2, .wrapper, .thankYouDownloadPDF {'\n + ` background-color: ${clrFrame};`\n + '}'\n + '.thankYouDownloadPDF {'\n + ' background-color: transparent;'\n + '}'\n + 'p > img, div > img {'\n + 'margin: 24px 0 18px 0;'\n + 'max-width: 100%;'\n + '}'\n + 'h1 {'\n + 'margin: 0 0 16px;'\n + '}'\n + '.thankyou-sub-text {'\n + 'margin-bottom: 0;'\n + `color: ${clrText};`\n + 'opacity: 0.6;'\n + '}'\n + '@media screen and (max-width: 600px) {'\n + ' body {'\n + ' width: 100%;'\n + ' margin: 0 auto;'\n + '}'\n + '}'\n + '@media screen and (max-width: 480px) {'\n + ' body {'\n + ' height: 100vh'\n + '}'\n + '}'\n + '.thankYouDownloadPDFWrapper {'\n + ` border-top: 1px solid ${clrBg}`\n + '}'\n + '.thankYouDownloadPDFWrapper {'\n + ' border-top: none'\n + '}'\n + '.ty-buttons.thankYouEditSubmission, .ty-buttons.thankYouDownloadPDF {'\n + ` color: ${clrText};`\n + ` border-color: ${isNewDefaultSchemeV1 ? '#E5E7F2' : clrText};`\n + '}'\n + '> .nonEditableInvisable:first-child {'\n + ` border-top: 1px solid ${clrBg}`\n + '}'\n + ' .thankYouDownloadPDF {'\n + ' background-color: transparent;'\n + ' border-color: transparent !important;'\n + '}'\n + '.newActionButtons.selectedActionButton, .newActionButtons.selectedActionButton:hover {'\n + ` box-shadow: 0 0 0 4px ${clrText}30;`\n + ' z-index: 2;'\n + '}'\n + '.nonEditableInvisable + .nonEditableInvisable {'\n + ' border-top: 0px;'\n + '}'\n + ' .ty-buttons.thankYouEditSubmission::before {'\n + ` background-image: url(\"data:image/svg+xml,%3csvg width='18' height='18' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M14.342 1.206l2.402 2.402c.354-.34.731-.682 1.08-1.05a.548.548 0 00-.002-.733c-.546-.551-1.094-1.1-1.647-1.642-.242-.237-.558-.246-.801-.014-.355.34-.694.695-1.032 1.037zm-.657.708c-.02.017-.05.043-.078.071-2.578 2.56-5.157 5.119-7.732 7.681a.31.31 0 00-.082.197c-.006.726-.004 1.452-.003 2.178 0 .043.005.086.008.13.037.003.06.008.081.008.753 0 1.506.002 2.259-.003.057 0 .126-.042.169-.086 2.558-2.572 5.114-5.147 7.67-7.722.032-.031.06-.064.078-.084l-2.37-2.37z' fill='%23${clrText.substring(1)}'/%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M15.043 18H2.878a2.37 2.37 0 01-2.366-2.367V3.081A2.37 2.37 0 012.878.715h7.188a.811.811 0 110 1.623H2.878a.744.744 0 00-.743.743v12.552c0 .41.333.744.743.744h12.165c.41 0 .743-.334.743-.744V10.05a.811.811 0 011.623 0v5.584A2.37 2.37 0 0115.043 18z' fill='%23${clrText.substring(1)}'/%3e%3c/svg%3e\");`\n + ' }'\n + '.ty-buttons.thankYouFillAgain::before {'\n + ` background-image: url(\"data:image/svg+xml,%3csvg width='16' height='18' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M13.107 8.67c.16.961.324 1.901.08 2.86-.24.939-.598 1.803-1.225 2.546-.623.739-1.353 1.312-2.24 1.672-2.588 1.053-5.235.098-6.72-1.853-1.564-2.055-1.643-4.934-.186-7.041C4.24 4.797 6.622 4.117 8.152 4.429l.041 2.907 3.539-3.626L8.113 0l-.012 2.535C4.01 2.231.957 5.242.215 8.382c-.776 3.28.592 6.713 3.42 8.488 2.772 1.738 6.379 1.447 8.807-.71 2.533-2.249 3.117-5.425 2.285-8.136l-1.62.646z' fill='%23${clrText.substring(1)}'/%3e%3c/svg%3e\");`\n + ' }'\n + '.ty-buttons.thankYouViewSubmission::before {'\n + ` background-image: url(\"data:image/svg+xml,%3Csvg width=\\'21\\' height=\\'13\\' fill=\\'none\\' xmlns=\\'http://www.w3.org/2000/svg\\'%3E%3Cpath fill-rule=\\'evenodd\\' clip-rule=\\'evenodd\\' d=\\'M0 6.053C1.585 4.035 5.794 0 9.945 0c4.15 0 8.647 4.035 10.376 6.053-2.161 2.018-7.263 6.053-10.376 6.053-3.114 0-7.927-4.035-9.945-6.053zm9.945 3.46a3.459 3.459 0 100-6.919 3.459 3.459 0 000 6.918z\\' fill=\\'%23${clrText.substring(1)}\\'/%3E%3Ccircle cx=\\'10\\' cy=\\'6\\' r=\\'2\\' fill=\\'%23${clrText.substring(1)}\\'/%3E%3C/svg%3E\");`\n + '}'\n + '.ty-buttons.thankYouFillAgain {'\n + ` color: ${isNewDefaultSchemeV1 ? '#2C3345' : clrText};`\n + ` background-color: ${isNewDefaultSchemeV1 ? '#E5E7F2' : 'none'};`\n + ` border-color: ${isNewDefaultSchemeV1 ? '#E5E7F2' : clrText};`\n + '}';\n\n // create style tag inside tinyMCE frame\n const injectCSSStyle = editor.getWin().document.createElement('style');\n const { formProperties: { thankYouPageLayout = 'none', thankYouImageSrc } } = this.props;\n const layouts = getLayouts(thankYouImageSrc);\n injectCSSString = injectCSSString.concat(thankYouNdtInjectCSSString);\n injectCSSString = (thankYouPageLayout) && injectCSSString.concat(layouts[thankYouPageLayout].styles);\n injectCSSStyle.type = 'text/css';\n if (injectCSSStyle.stylesheet) {\n injectCSSStyle.stylesheet.cssText = injectCSSString;\n } else {\n injectCSSStyle.appendChild(document.createTextNode(injectCSSString));\n }\n editor.getWin().document.getElementsByTagName('head')[0].appendChild(injectCSSStyle);\n\n editor.on('FullscreenStateChanged', () => {\n const isFullscreen = editor.plugins.fullscreen.isFullscreen();\n const feedbackButton = document.querySelector ? document.querySelector('.feedback-overlay') : undefined;\n if (feedbackButton && feedbackButton.style) {\n if (isFullscreen) {\n feedbackButton.style.display = 'none';\n } else {\n feedbackButton.style.display = 'block';\n }\n }\n });\n }\n\n removemceNonEditableFromTables(text) {\n const htmlObject = document.createElement('div');\n htmlObject.innerHTML = text;\n const mceNonEditableClasses = htmlObject.getElementsByClassName('mceNonEditable');\n\n [...mceNonEditableClasses].forEach(element => {\n if (element.tagName === 'TABLE') {\n element.classList.remove('mceNonEditable');\n }\n });\n\n return htmlObject.innerHTML;\n }\n\n getFinalText() {\n const thanktext = this.editor.getContent();\n this.changes.thanktext = this.initialHTML !== thanktext;\n return thanktext.length < 1 ? defaultThankyouHTML : thanktext;\n }\n\n handleEditorChange() {\n const finalText = this.getFinalText();\n this.props.onPropertyChange({\n thanktext: this.removemceNonEditableFromTables(finalText)\n }, true, true, true);\n }\n\n handleEditorBlur() {\n const finalText = this.getFinalText();\n this.props.onPropertyChange({\n thanktext: this.removemceNonEditableFromTables(finalText)\n }, true, true, false);\n }\n\n handleRedirectSave() {\n this.initialURL = this.props.formProperties.thankurl;\n this.initialActiveRedirect = this.props.formProperties.activeRedirect;\n this.props.onPropertySave(relatedProperties);\n setTimeout(LegacyUtils.save, 10);\n }\n\n saveEditorContent() {\n // if user never uses the editor thanktext is sent empty because it is set on editor change\n // that is why i am setting thanktext again\n this.initialActiveRedirect = this.props.formProperties.activeRedirect;\n this.props.onPropertyChange({ thanktext: this.editor.getContent() });\n this.props.onPropertyChange({ activeRedirect: 'thanktext' });\n this.props.onPropertySave(relatedProperties);\n setTimeout(LegacyUtils.save, 10);\n }\n\n handleKeepEditing() {\n this.setState({ areStoresDirty: false });\n }\n\n handleDiscardChanges() {\n StoreObserver.flush(this.props.stores);\n ViewActions.closeModule();\n }\n\n shouldClose() {\n return new Promise((resolve, reject) => {\n if (StoreObserver.didUpdate(this.props.stores)) {\n this.setState({\n areStoresDirty: true\n });\n return reject();\n }\n resolve();\n });\n }\n\n checkContentIsEmpty() {\n const content = this.props.formProperties.thanktext;\n if (content.length === 0) {\n this.props.onPropertyChange({ thanktext: defaultThankyouHTML });\n }\n }\n}\n\nThankyou.propTypes = {\n onPropertyChange: PropTypes.func,\n onPropertySave: PropTypes.func,\n formProperties: PropTypes.object,\n user: PropTypes.object,\n questions: PropTypes.array,\n stores: PropTypes.array,\n v4: PropTypes.bool,\n isRightPanelOpen: PropTypes.bool,\n isPDFImporter: PropTypes.bool,\n actions: PropTypes.shape(),\n hideHeaderAndInternalActions: PropTypes.bool\n};\n\nexport default Thankyou;\n","import PropTypes from 'prop-types';\nimport React, { Component, createRef, Fragment } from 'react';\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport { Thankyou as Wizard, ThankYouPageWizard } from '@jotforminc/builder-components';\nimport { ActionButtonsWizard } from '@jotforminc/jotform-common';\nimport { t } from '@jotforminc/translation';\nimport { closest } from '@jotforminc/utils';\nimport * as actions from '../../../actions';\nimport Icon from '../../../components/Icon';\nimport ThankYouPage from '../../../components/thankYouPage';\nimport DeleteActionButtonsDialog from '../../../components/DeleteActionButtonsDialog';\nimport { isAnyThankyouSelectedPDFMismatches, logJotFormEvents } from '../../../libs/Utils';\n\nclass Thankyou extends Component {\n constructor(props) {\n super(props);\n this.checkFormTypeThenRenderWizard = this.checkFormTypeThenRenderWizard.bind(this);\n this.settingsImageWizard = this.settingsImageWizard.bind(this);\n this.handleWizardClose = this.handleWizardClose.bind(this);\n this.openThankYouActionButtonsWizard = this.openThankYouActionButtonsWizard.bind(this);\n this.updateActionButtons = this.updateActionButtons.bind(this);\n this.onInitEditor = this.onInitEditor.bind(this);\n this.openSettings = this.openSettings.bind(this);\n this.openActionButtonsDeleteModal = this.openActionButtonsDeleteModal.bind(this);\n this.clickOutSide = this.clickOutSide.bind(this);\n this.setHighlightID = this.setHighlightID.bind(this);\n this.setDialogProps = this.setDialogProps.bind(this);\n this.sendAnalytics = this.sendAnalytics.bind(this);\n this.state = {\n imageWizard: false,\n isEditorMounted: false,\n dialogProps: {\n itemID: '',\n itemTitle: '',\n step: ''\n },\n highlightID: '',\n isDeleteDialogVisible: false\n };\n\n this.stepWizardRef = createRef();\n this.pdfSettingButton = createRef();\n this.isActionButtonsWarningSeen = createRef();\n this.buttonList = [\n {\n step: 'fillAnotherForm',\n type: 'multi',\n className: 'thankYouFillAnotherFormList',\n },\n {\n step: 'fillAgain',\n type: 'single',\n className: 'thankYouFillAgainWrapper',\n title: 'Fill Again'\n },\n {\n step: 'downloadPDF',\n type: 'multi',\n className: 'thankYouPDFList'\n },\n {\n step: 'editSubmission',\n type: 'single',\n className: 'thankYouEditSubmissionWrapper',\n title: 'Edit Submission'\n },\n {\n step: 'visitURL',\n type: 'multi',\n className: 'thankYouVisitURLFormList',\n title: 'Visit URL'\n },\n {\n step: 'viewCompletedTask',\n type: 'single',\n className: 'thankYouViewCompletedTaskWrapper',\n title: 'View Completed Task'\n }\n ];\n }\n\n componentDidUpdate() {\n this.renderSettingButtons();\n }\n\n handleWizardClose() {\n this.setState({ imageWizard: false });\n }\n\n handleBackClick(e, route) {\n e.preventDefault();\n this.props.history.push(route);\n }\n\n settingsImageWizard() {\n this.setState({ imageWizard: true });\n }\n\n openThankYouActionButtonsWizard() {\n const { formProperties } = this.props;\n if (isAnyThankyouSelectedPDFMismatches(formProperties)) {\n this.sendAnalytics('actionButtonsWithWarningClicked');\n }\n\n this.stepWizardRef.current.show();\n }\n\n onInitEditor() {\n const { formProperties } = this.props;\n setTimeout(() => {\n this.setState({ isEditorMounted: true });\n\n if (isAnyThankyouSelectedPDFMismatches(formProperties) && !this.isActionButtonsWarningSeen.current) {\n this.isActionButtonsWarningSeen.current = true;\n this.sendAnalytics('actionButtonsWithWarningSeen');\n }\n }, 500);\n }\n\n addChildElementsTo(domEl, step, attributes, isActionButtonControlsDisabled = false) {\n domEl.classList.add('newActionButtons');\n domEl.addEventListener('click', e => {\n const { doc } = window.tinyMCE.activeEditor.dom;\n const oldSelected = doc.querySelector('.selectedActionButton');\n if (oldSelected) oldSelected.classList.remove('selectedActionButton');\n this.selected = e.currentTarget;\n e.currentTarget.classList.toggle('selectedActionButton');\n window.addEventListener('mousedown', ev => this.clickOutSide(ev), { once: true });\n doc.addEventListener('mousedown', ev => this.clickOutSide(ev), { once: true });\n });\n const settingButton = domEl.querySelector('.settingButonWrapper');\n if (settingButton || isActionButtonControlsDisabled) {\n // Don't show if not allowed to or already shown.\n return;\n }\n // Create and inject settings and delete buttons.\n const newSettingButtonWrapper = document.createElement('div');\n newSettingButtonWrapper.classList.add('settingButonWrapper');\n domEl.appendChild(newSettingButtonWrapper);\n const newSettingButton = document.createElement('div');\n const newDeleteButton = document.createElement('div');\n newSettingButton.classList.add('settingButon', 'setting');\n newDeleteButton.classList.add('settingButon', 'delete');\n newSettingButtonWrapper.appendChild(newSettingButton);\n newSettingButtonWrapper.appendChild(newDeleteButton);\n newSettingButton.addEventListener('click', e => this.openSettings(e, step, attributes));\n newDeleteButton.addEventListener('click', e => this.openActionButtonsDeleteModal(e, step, attributes));\n }\n\n renderSettingButtons() {\n if (!this.state.isEditorMounted) return;\n const tinyMc = window.tinyMCE;\n if (!tinyMc && !tinyMc.activeEditor) return;\n const { doc } = tinyMc.activeEditor.dom;\n\n this.buttonList.forEach(item => {\n const fillAnothers = doc.querySelector(`.${item.className}`);\n if (!fillAnothers) return;\n if (item.type === 'multi') {\n fillAnothers.querySelectorAll('li').forEach(listItem => {\n this.addChildElementsTo(listItem, item.step, { itemID: listItem.getAttribute('key'), itemTitle: listItem.getAttribute('title') }, this.props.user?.isCSICollaborator);\n });\n return;\n }\n this.addChildElementsTo(fillAnothers, item.step, { itemID: this.props.formProperties.id, itemTitle: item.title }, this.props.user?.isCSICollaborator);\n });\n }\n\n openSettings(e, indexKey, { itemID }) {\n e.stopPropagation();\n this.setHighlightID(itemID);\n this.stepWizardRef.current?.show();\n this.stepWizardRef.current?.setCurrentStep(indexKey);\n }\n\n setDialogProps(itemID, itemTitle, itemStep) {\n this.setState({ dialogProps: { itemID, itemTitle, itemStep }, isDeleteDialogVisible: itemID ? true : false });\n }\n\n setHighlightID(highlightID) {\n this.setState({ highlightID });\n }\n\n openActionButtonsDeleteModal(e, itemStep, { itemID, itemTitle }) {\n e.stopPropagation();\n this.setState({ dialogProps: { itemID, itemTitle, itemStep }, isDeleteDialogVisible: true });\n }\n\n clickOutSide(e) {\n window.removeEventListener('mousedown', ev => this.clickOutSide(ev), { once: true });\n window.tinyMCE.activeEditor.dom.doc.removeEventListener('mousedown', ev => this.clickOutSide(ev), { once: true });\n if (!closest(e.target, '.newActionButtons')) {\n this.selected?.classList?.remove('selectedActionButton');\n }\n }\n\n updateActionButtons(props) {\n this.props.actions.updateFormProperty(props);\n }\n\n checkFormTypeThenRenderWizard() {\n if (this.props.formProperties.formType === 'cardForm') {\n return (\n \n {this.state.imageWizard ? (\n \n ) : null}\n \n );\n }\n return (\n {}}\n v4={Boolean(true)}\n onInit={this.onInitEditor}\n hideHeaderAndInternalActions={this.props.isWorkflowBuilder}\n actions={{\n ...this.props.actions,\n openThankYouActionButtonsWizard: this.openThankYouActionButtonsWizard\n }}\n />\n );\n }\n\n sendAnalytics(action) {\n const { formProperties, user } = this.props;\n logJotFormEvents('form-builder', {\n actor: user.username,\n action,\n target: `regular-${formProperties.id}`\n }, user.account_type.name);\n }\n\n render() {\n const { dialogProps, isDeleteDialogVisible, highlightID } = this.state;\n const { formProperties, user: { accountType, isCSICollaborator: hideActionButtons = false }, isWorkflowBuilder = false } = this.props;\n return (\n
    \n
    \n
    \n
    this.handleBackClick(e, `/${global.__BASE_ROUTE_PATH}/${formProperties.id}/settings`)}>\n \n
    \n
    \n
    { t('Thank You Page') }
    \n
    { t('Defines the action after form submission.') }
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n {this.checkFormTypeThenRenderWizard()}\n {!hideActionButtons && (\n \n \n this.setState({ isDeleteDialogVisible: false })}\n />\n \n )}\n
    \n
    \n
    \n
    \n );\n }\n}\n\nfunction mapDispatchToProps(dispatch) {\n return {\n actions: bindActionCreators(actions, dispatch)\n };\n}\n\nfunction mapStateToProps(state) {\n return {\n formProperties: state.formProperties,\n questions: state.questions,\n user: state.user\n };\n}\n\nThankyou.propTypes = {\n formProperties: PropTypes.shape(),\n questions: PropTypes.arrayOf(PropTypes.shape()),\n actions: PropTypes.shape(),\n isWorkflowBuilder: PropTypes.bool\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(Thankyou);\n","/* eslint-disable react/static-property-placement */\n/* eslint-disable react/sort-comp */\n/* eslint-disable space-in-parens */\n/* eslint-disable react/no-find-dom-node */\n/* eslint-disable react/prop-types */\nimport { createElement, Component } from 'react';\nimport { findDOMNode } from 'react-dom';\nimport hoistNonReactStatics from 'hoist-non-react-statics';\nimport * as DOMHelpers from './dom-helpers';\nimport { testPassiveEventSupport } from './detect-passive-events';\nimport uid from './uid';\n\nlet passiveEventSupport;\n\nconst handlersMap = {};\nconst enabledInstances = {};\n\nconst touchEvents = ['touchstart', 'touchmove'];\nconst IGNORE_CLASS_NAME = 'ignore-react-onclickoutside';\n\n/**\n * Options for addEventHandler and removeEventHandler\n */\nfunction getEventHandlerOptions(instance, eventName) {\n let handlerOptions = null;\n const isTouchEvent = touchEvents.indexOf(eventName) !== -1;\n\n if (isTouchEvent && passiveEventSupport) {\n handlerOptions = { passive: !instance.props.preventDefault };\n }\n return handlerOptions;\n}\n\n/**\n * This function generates the HOC function that you'll use\n * in order to impart onOutsideClick listening to an\n * arbitrary component. It gets called at the end of the\n * bootstrapping code to yield an instance of the\n * onClickOutsideHOC function defined inside setupHOC().\n */\nexport default function onClickOutsideHOC(WrappedComponent, config) {\n const componentName = WrappedComponent.displayName || WrappedComponent.name || 'Component';\n class onClickOutside extends Component {\n static displayName = `OnClickOutside(${componentName})`;\n\n static defaultProps = {\n eventTypes: ['mousedown', 'touchstart'],\n excludeScrollbar: (config && config.excludeScrollbar) || false,\n outsideClickIgnoreClass: IGNORE_CLASS_NAME,\n preventDefault: false,\n stopPropagation: false\n };\n\n static getClass = () => (WrappedComponent.getClass ? WrappedComponent.getClass() : WrappedComponent);\n\n constructor(props) {\n super(props);\n this._uid = uid();\n }\n\n /**\n * Access the WrappedComponent's instance.\n */\n getInstance() {\n if (!WrappedComponent.prototype.isReactComponent) {\n return this;\n }\n const ref = this.instanceRef;\n return ref.getInstance ? ref.getInstance() : ref;\n }\n\n __outsideClickHandler = event => {\n if (typeof this.__clickOutsideHandlerProp === 'function') {\n this.__clickOutsideHandlerProp(event);\n return;\n }\n\n const instance = this.getInstance();\n\n if (typeof instance.props.handleClickOutside === 'function') {\n instance.props.handleClickOutside(event);\n return;\n }\n\n if (typeof instance.handleClickOutside === 'function') {\n instance.handleClickOutside(event);\n return;\n }\n\n throw new Error(`WrappedComponent: ${componentName} lacks a handleClickOutside(event) function for processing outside click events.` );\n };\n\n /**\n * Add click listeners to the current document,\n * linked to this component's state.\n */\n componentDidMount() {\n // If we are in an environment without a DOM such\n // as shallow rendering or snapshots then we exit\n // early to prevent any unhandled errors being thrown.\n if (typeof document === 'undefined' || !document.createElement) {\n return;\n }\n\n const instance = this.getInstance();\n\n if (config && typeof config.handleClickOutside === 'function') {\n this.__clickOutsideHandlerProp = config.handleClickOutside(instance);\n if (typeof this.__clickOutsideHandlerProp !== 'function') {\n throw new Error(`WrappedComponent: ${componentName} lacks a function for processing outside click events specified by the handleClickOutside config option.` );\n }\n }\n\n this.componentNode = findDOMNode(this.getInstance());\n this.enableOnClickOutside();\n }\n\n componentDidUpdate() {\n this.componentNode = findDOMNode(this.getInstance());\n }\n\n /**\n * Remove all document's event listeners for this component\n */\n componentWillUnmount() {\n this.disableOnClickOutside();\n }\n\n /**\n * Can be called to explicitly enable event listening\n * for clicks and touches outside of this element.\n */\n enableOnClickOutside = () => {\n if (typeof document === 'undefined' || enabledInstances[this._uid]) {\n return;\n }\n\n if (typeof passiveEventSupport === 'undefined') {\n passiveEventSupport = testPassiveEventSupport();\n }\n\n enabledInstances[this._uid] = true;\n\n const { eventTypes } = this.props;\n let events = eventTypes;\n const {\n disableOnClickOutside,\n preventDefault,\n stopPropagation,\n excludeScrollbar,\n outsideClickIgnoreClass\n } = this.props;\n\n if (!events.forEach) {\n events = [events];\n }\n\n handlersMap[this._uid] = event => {\n if (disableOnClickOutside) return;\n if (this.componentNode === null) return;\n\n if (preventDefault) {\n event.preventDefault();\n }\n\n if (stopPropagation) {\n event.stopPropagation();\n }\n\n // eslint-disable-next-line react/prop-types\n if (excludeScrollbar && DOMHelpers.clickedScrollbar(event)) return;\n\n const current = event.target;\n\n // eslint-disable-next-line react/prop-types\n if (DOMHelpers.findHighest(current, this.componentNode, outsideClickIgnoreClass) !== document) {\n return;\n }\n\n this.__outsideClickHandler(event);\n };\n\n events.forEach(eventName => {\n document.addEventListener(eventName, handlersMap[this._uid], getEventHandlerOptions(this, eventName));\n });\n };\n\n /**\n * Can be called to explicitly disable event listening\n * for clicks and touches outside of this element.\n */\n disableOnClickOutside = () => {\n delete enabledInstances[this._uid];\n const fn = handlersMap[this._uid];\n\n if (fn && typeof document !== 'undefined') {\n const { eventTypes } = this.props;\n let events = eventTypes;\n if (!events.forEach) {\n events = [events];\n }\n events.forEach(eventName => document\n .removeEventListener(eventName, fn, getEventHandlerOptions(this, eventName)));\n delete handlersMap[this._uid];\n }\n };\n\n // eslint-disable-next-line no-return-assign\n getRef = ref => (this.instanceRef = ref);\n\n /**\n * Pass-through render\n */\n render() {\n // eslint-disable-next-line no-unused-vars\n const { excludeScrollbar, ...props } = this.props;\n\n if (WrappedComponent.prototype.isReactComponent) {\n props.ref = this.getRef;\n } else {\n props.wrappedRef = this.getRef;\n }\n\n props.disableOnClickOutside = this.disableOnClickOutside;\n props.enableOnClickOutside = this.enableOnClickOutside;\n\n return createElement(WrappedComponent, props);\n }\n }\n\n hoistNonReactStatics(onClickOutside, WrappedComponent);\n\n return onClickOutside;\n}\n","import debounce from 'lodash/debounce';\nimport * as types from '../constants/actionTypes';\nimport { createCookie, readCookie } from '../libs/Utils';\n\nlet incremental = 9;\nlet signupPromptCountDown = incremental;\n\nconst thankYouChangeIncremantal = 5;\nlet thankYouChangeCountDown = thankYouChangeIncremantal;\n\nconst events = [\n types.FORM_QUESTION_UPDATE_SUCCESS,\n types.FORM_QUESTION_CREATE_SUCCESS,\n types.FORM_QUESTION_DELETE_SUCCESS,\n types.FORM_PROPERTY_UPDATE_SUCCESS,\n types.FORM_MULTIPLE_QUESTION_UPDATE_SUCCESS,\n types.FORM_MULTIPLE_QUESTION_CREATE_SUCCESS,\n types.FORM_MULTIPLE_QUESTION_DELETE_SUCCESS,\n // PDF IMPORTER\n types.PDF_IMPORT_SET_ANNOTATION_SELECTION,\n types.PDF_IMPORT_UPDATE_ANNOTATION_RECT,\n];\n\nlet debouncedFunction;\n\nlet lastQuestion = {\n id: null,\n props: []\n};\n\nconst isSameQuestionUpdateWithSameProp = question => {\n const props = Object.keys(question).filter(p => p !== 'qid');\n if (lastQuestion.qid === question.qid && (props.every(p => lastQuestion.props.indexOf(p) > -1))) {\n return true;\n }\n lastQuestion = {\n qid: question.qid,\n props\n };\n return false;\n};\n\nexport default store => next => action => {\n const { user } = store.getState();\n\n if (global.location.href.match(/noSignupPrompt/)) {\n createCookie('noSignupPrompt', true, 1);\n }\n if (global.window.location.href.indexOf('pfcEnableAddingNewField=1') > -1) {\n createCookie('pfcEnableAddingNewField', true, 1);\n }\n if (global.window.location.href.indexOf('tdf=1') > -1) {\n createCookie('SMART_PDF_TDF', true, 1);\n }\n if (events.indexOf(action.type) > -1 && !readCookie('noSignupPrompt')) {\n if (action.type === types.FORM_QUESTION_UPDATE_SUCCESS) {\n if (isSameQuestionUpdateWithSameProp({ qid: action.qid, ...action.question[0] })) {\n return next(action);\n }\n }\n if (user && user.account_type && user.account_type.name === 'GUEST') {\n if (!debouncedFunction) {\n debouncedFunction = debounce(act => {\n if (signupPromptCountDown === 0) {\n incremental++;\n signupPromptCountDown = incremental;\n setTimeout(\n () => {\n if (typeof global.sendMessageToJFMobile === 'function') {\n global.sendMessageToJFMobile({ type: 'show_signup_modal' });\n } else {\n store.dispatch({ type: types.UI_DISPLAY_SIGNUP_PROMPT, show: true });\n }\n },\n 1000,\n );\n } else if (act.type === types.FORM_PROPERTY_UPDATE_SUCCESS && act.prop && act.prop.thanktext) {\n if (thankYouChangeCountDown === 0) {\n signupPromptCountDown--;\n thankYouChangeCountDown = thankYouChangeIncremantal;\n } else {\n thankYouChangeCountDown--;\n }\n } else {\n signupPromptCountDown--;\n }\n }, 500);\n }\n debouncedFunction(action);\n }\n }\n\n next(action);\n};\n","import * as types from '../constants/actionTypes';\nimport { INFO_MULTI_DEL_POSSIBLE } from '../constants/notificationMessages';\n\nconst showAfterSameAction = 2; // index : 0 (so, 3 times)\nlet notificationShowCount = 2; // 0 to disable.\nlet currentCount = 0;\nlet lastAction;\n\nconst allEvents = [\n types.FORM_QUESTION_UPDATE_SUCCESS,\n types.FORM_QUESTION_CREATE_SUCCESS,\n types.FORM_QUESTION_DELETE_SUCCESS,\n types.FORM_PROPERTY_UPDATE_SUCCESS,\n types.FORM_MULTIPLE_QUESTION_UPDATE_SUCCESS,\n types.FORM_MULTIPLE_QUESTION_CREATE_SUCCESS,\n types.FORM_MULTIPLE_QUESTION_DELETE_SUCCESS,\n];\n// Just notify on single delete events for now\nconst notifierEvents = [\n types.FORM_QUESTION_DELETE_SUCCESS,\n types.FORM_QUESTION_CREATE_SUCCESS,\n types.FORM_MULTIPLE_QUESTION_CREATE_SUCCESS\n];\n\nconst requirements = {\n FORM_QUESTION_CREATE_SUCCESS: { isDuplicated: true },\n FORM_MULTIPLE_QUESTION_CREATE_SUCCESS: { isSingleQuestionDuplicated: true }, // this means user is duplicating question from context menu\n};\n\nfunction resetCounter(type) {\n lastAction = type;\n currentCount = 0;\n}\n\n// Checks requirements of function\nfunction checkRequirements(action) {\n let results = [];\n const requirement = requirements[action.type];\n if (requirement !== undefined) {\n const keys = Object.keys(requirement);\n results = keys.map(k => {\n return action[k] === requirement[k];\n });\n }\n return results;\n}\nexport default store => next => action => {\n if (notificationShowCount > 0 && notifierEvents.indexOf(action.type) > -1) {\n const requirementResults = checkRequirements(action);\n if (requirementResults.indexOf(false) > -1) { // If any requirement fails lets reset counter\n resetCounter(action.type);\n } else if (!lastAction || lastAction === action.type) {\n lastAction = action.type;\n currentCount++;\n // Show a notification after three times, that he can do it by managing multiple questions\n if (currentCount >= showAfterSameAction) {\n notificationShowCount--;\n resetCounter(action.type);\n const notification = {\n uid: 'same_action_ui_helper',\n level: 'info',\n autoDismiss: 5,\n message: INFO_MULTI_DEL_POSSIBLE\n };\n setTimeout(() => {\n // Nothing\n }, 0);\n if (store.getState().ui.device === 'isDesktop') {\n store.dispatch({ type: types.NOTIFICATION_ADD, notification });\n }\n }\n } else if (lastAction !== action.type) {\n resetCounter(action.type);\n }\n } else if (notificationShowCount > 0 && allEvents.indexOf(action.type) > -1) {\n resetCounter(action.type);\n }\n next(action);\n};\n","\n \n\n","\n \n\n","\n \n\n","var _path;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nconst SvgGuestPodo = props => /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 92 92\"\n}, props), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M0 0 C0.99 0 1.98 0 3 0 C3.495 2.475 3.495 2.475 4 5 C4.99 5.0825 5.98 5.165 7 5.25 C12.65100788 6.0425194 17.31501032 8.87667354 22 12 C25.00267905 11.58334329 25.00267905 11.58334329 28.1875 10.625 C29.27417969 10.32851563 30.36085938 10.03203125 31.48046875 9.7265625 C32.31191406 9.48679687 33.14335938 9.24703125 34 9 C33.47790027 17.10154749 33.47790027 17.10154749 31.4375 20.9375 C29.94239654 24.12272042 29.90370885 25.3465764 30.0625 28.75 C30.2645193 36.21349098 27.84698945 42.40477563 22.75 47.875 C13.81795647 56.03703978 3.73524608 56.65689876 -7.83886719 56.17919922 C-15.46341405 55.54697855 -21.96236847 51.64053956 -27 46 C-30.78899474 40.6746141 -32.15680015 36.26114871 -31.8125 29.8125 C-31.73821885 24.74787623 -32.83104781 21.47601204 -35.109375 17.015625 C-36.31336497 14.29080559 -36.3007587 11.93239736 -36 9 C-35.11248047 9.2165625 -35.11248047 9.2165625 -34.20703125 9.4375 C-28.15505767 11.02691365 -28.15505767 11.02691365 -22 11 C-20.63875 10.071875 -20.63875 10.071875 -19.25 9.125 C-15.69291874 6.7992161 -13.08928625 6.25024303 -8.953125 5.6875 C-6.80006289 5.16022438 -6.80006289 5.16022438 -5.734375 2.9375 C-5.49203125 2.298125 -5.2496875 1.65875 -5 1 C-4.34 1 -3.68 1 -3 1 C-3 1.66 -3 2.32 -3 3 C-2.34 3 -1.68 3 -1 3 C-0.67 2.01 -0.34 1.02 0 0 Z \",\n fill: \"#FFFFFF\",\n transform: \"translate(47,17)\"\n})));\nexport default SvgGuestPodo;","var _path, _path2, _path3;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nconst SvgPromptLoader = props => /*#__PURE__*/React.createElement(\"svg\", _extends({\n viewBox: \"20 0 54 24\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n}, props), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n className: \"loading-item item-1\",\n d: \"M27.868 8.06059C28.3311 7.84766 28.8092 8.32574 28.5963 8.78883L28.2829 9.47041C27.8365 10.441 27.8365 11.5582 28.2829 12.5288L28.5963 13.2104C28.8092 13.6735 28.3311 14.1516 27.868 13.9387L27.1864 13.6253C26.2158 13.1789 25.0986 13.1789 24.128 13.6253L23.4464 13.9387C22.9833 14.1516 22.5053 13.6735 22.7182 13.2104L23.0316 12.5288C23.4779 11.5582 23.4779 10.441 23.0316 9.47041L22.7182 8.78883C22.5053 8.32574 22.9833 7.84766 23.4464 8.06059L24.128 8.374C25.0986 8.82031 26.2158 8.82031 27.1864 8.374L27.868 8.06059Z\",\n fill: \"#0099FF\"\n})), _path2 || (_path2 = /*#__PURE__*/React.createElement(\"path\", {\n className: \"loading-item item-2\",\n d: \"M43.1815 8.06059C43.6446 7.84766 44.1227 8.32574 43.9097 8.78883L43.5963 9.47041C43.15 10.441 43.15 11.5582 43.5963 12.5288L43.9097 13.2104C44.1227 13.6735 43.6446 14.1516 43.1815 13.9387L42.4999 13.6253C41.5293 13.1789 40.4121 13.1789 39.4415 13.6253L38.7599 13.9387C38.2968 14.1516 37.8187 13.6735 38.0317 13.2104L38.3451 12.5288C38.7914 11.5582 38.7914 10.441 38.3451 9.47041L38.0317 8.78883C37.8187 8.32574 38.2968 7.84766 38.7599 8.06059L39.4415 8.374C40.4121 8.82031 41.5293 8.82031 42.4999 8.374L43.1815 8.06059Z\",\n fill: \"#FF6100\"\n})), _path3 || (_path3 = /*#__PURE__*/React.createElement(\"path\", {\n className: \"loading-item item-3\",\n d: \"M58.495 8.06059C58.9581 7.84766 59.4362 8.32574 59.2232 8.78883L58.9098 9.47041C58.4635 10.441 58.4635 11.5582 58.9098 12.5288L59.2232 13.2104C59.4362 13.6735 58.9581 14.1516 58.495 13.9387L57.8134 13.6253C56.8428 13.1789 55.7256 13.1789 54.755 13.6253L54.0734 13.9387C53.6103 14.1516 53.1322 13.6735 53.3451 13.2104L53.6585 12.5288C54.1049 11.5582 54.1049 10.441 53.6586 9.47041L53.3451 8.78883C53.1322 8.32574 53.6103 7.84766 54.0734 8.06059L54.755 8.374C55.7256 8.82031 56.8428 8.82031 57.8134 8.374L58.495 8.06059Z\",\n fill: \"#FFB629\"\n})));\nexport default SvgPromptLoader;","var _path;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nconst SvgRoboto = props => /*#__PURE__*/React.createElement(\"svg\", _extends({\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 36 10\"\n}, props), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M14.5244 0.332031H13.4346V9.33203H14.4307L14.4865 8.59923C14.4971 8.61318 14.5078 8.62698 14.5186 8.64062C14.7256 8.90234 14.9795 9.10352 15.2803 9.24414C15.585 9.38086 15.9385 9.44922 16.3408 9.44922C16.7354 9.44922 17.085 9.36914 17.3896 9.20898C17.6943 9.04883 17.9521 8.82422 18.1631 8.53516C18.374 8.24609 18.5342 7.90625 18.6436 7.51562C18.7529 7.12109 18.8076 6.69336 18.8076 6.23242V6.10938C18.8076 5.625 18.7529 5.18555 18.6436 4.79102C18.5342 4.39258 18.374 4.05078 18.1631 3.76562C17.9561 3.48047 17.6982 3.26172 17.3896 3.10938C17.0811 2.95312 16.7275 2.875 16.3291 2.875C15.9307 2.875 15.5811 2.94531 15.2803 3.08594C14.9823 3.22137 14.7304 3.42005 14.5244 3.68197V0.332031ZM14.5244 7.52754V4.77397C14.6085 4.60159 14.712 4.44712 14.835 4.31055C14.9756 4.15039 15.1455 4.02344 15.3447 3.92969C15.5479 3.83594 15.7861 3.78906 16.0596 3.78906C16.3682 3.78906 16.6279 3.85156 16.8389 3.97656C17.0498 4.09766 17.2197 4.26562 17.3486 4.48047C17.4775 4.69141 17.5713 4.9375 17.6299 5.21875C17.6885 5.49609 17.7178 5.79297 17.7178 6.10938V6.23242C17.7178 6.54883 17.6865 6.8457 17.624 7.12305C17.5615 7.40039 17.4639 7.64453 17.3311 7.85547C17.2021 8.06641 17.0322 8.23242 16.8213 8.35352C16.6143 8.4707 16.3643 8.5293 16.0713 8.5293C15.7158 8.5293 15.417 8.44922 15.1748 8.28906C14.9365 8.12891 14.7451 7.92383 14.6006 7.67383C14.5738 7.62542 14.5484 7.57666 14.5244 7.52754ZM29.0527 3.82422V2.99219H27.8691V1.45117H26.7852V2.99219H25.625V3.82422H26.7852V7.75586C26.7852 8.17773 26.8496 8.51367 26.9785 8.76367C27.1113 9.00977 27.2891 9.18555 27.5117 9.29102C27.7344 9.39648 27.9785 9.44922 28.2441 9.44922C28.4395 9.44922 28.6055 9.43555 28.7422 9.4082C28.8828 9.38477 28.9961 9.35938 29.082 9.33203L29.0762 8.44727C29.0254 8.45898 28.9492 8.47461 28.8477 8.49414C28.75 8.50977 28.6562 8.51758 28.5664 8.51758C28.4453 8.51758 28.332 8.5 28.2266 8.46484C28.1211 8.42969 28.0352 8.35742 27.9688 8.24805C27.9023 8.13867 27.8691 7.97656 27.8691 7.76172V3.82422H29.0527ZM29.6084 6.09766V6.23242C29.6084 6.68945 29.6748 7.11328 29.8076 7.50391C29.9404 7.89453 30.1318 8.23633 30.3818 8.5293C30.6357 8.81836 30.9404 9.04492 31.2959 9.20898C31.6514 9.36914 32.0518 9.44922 32.4971 9.44922C32.9424 9.44922 33.3408 9.36914 33.6924 9.20898C34.0479 9.04492 34.3506 8.81836 34.6006 8.5293C34.8545 8.23633 35.0479 7.89453 35.1807 7.50391C35.3135 7.11328 35.3799 6.68945 35.3799 6.23242V6.09766C35.3799 5.64062 35.3135 5.2168 35.1807 4.82617C35.0479 4.43164 34.8545 4.08984 34.6006 3.80078C34.3506 3.50781 34.0459 3.28125 33.6865 3.12109C33.3311 2.95703 32.9307 2.875 32.4854 2.875C32.0439 2.875 31.6455 2.95703 31.29 3.12109C30.9346 3.28125 30.6318 3.50781 30.3818 3.80078C30.1318 4.08984 29.9404 4.43164 29.8076 4.82617C29.6748 5.2168 29.6084 5.64062 29.6084 6.09766ZM30.6924 6.23242V6.09766C30.6924 5.78516 30.7295 5.49023 30.8037 5.21289C30.8779 4.93164 30.9893 4.68359 31.1377 4.46875C31.29 4.25 31.4775 4.07812 31.7002 3.95312C31.9268 3.82812 32.1885 3.76562 32.4854 3.76562C32.7861 3.76562 33.0479 3.82812 33.2705 3.95312C33.4971 4.07812 33.6846 4.25 33.833 4.46875C33.9854 4.68359 34.0986 4.93164 34.1729 5.21289C34.251 5.49023 34.29 5.78516 34.29 6.09766V6.23242C34.29 6.54883 34.251 6.84766 34.1729 7.12891C34.0986 7.40625 33.9873 7.65234 33.8389 7.86719C33.6904 8.08203 33.5029 8.25195 33.2764 8.37695C33.0537 8.49805 32.7939 8.55859 32.4971 8.55859C32.1963 8.55859 31.9326 8.49805 31.7061 8.37695C31.4795 8.25195 31.29 8.08203 31.1377 7.86719C30.9893 7.65234 30.8779 7.40625 30.8037 7.12891C30.7295 6.84766 30.6924 6.54883 30.6924 6.23242ZM19.5801 6.23242V6.09766C19.5801 5.64062 19.6465 5.2168 19.7793 4.82617C19.9121 4.43164 20.1035 4.08984 20.3535 3.80078C20.6035 3.50781 20.9062 3.28125 21.2617 3.12109C21.6172 2.95703 22.0156 2.875 22.457 2.875C22.9023 2.875 23.3027 2.95703 23.6582 3.12109C24.0176 3.28125 24.3223 3.50781 24.5723 3.80078C24.8262 4.08984 25.0195 4.43164 25.1523 4.82617C25.2852 5.2168 25.3516 5.64062 25.3516 6.09766V6.23242C25.3516 6.68945 25.2852 7.11328 25.1523 7.50391C25.0195 7.89453 24.8262 8.23633 24.5723 8.5293C24.3223 8.81836 24.0195 9.04492 23.6641 9.20898C23.3125 9.36914 22.9141 9.44922 22.4688 9.44922C22.0234 9.44922 21.623 9.36914 21.2676 9.20898C20.9121 9.04492 20.6074 8.81836 20.3535 8.5293C20.1035 8.23633 19.9121 7.89453 19.7793 7.50391C19.6465 7.11328 19.5801 6.68945 19.5801 6.23242ZM20.6641 6.09766V6.23242C20.6641 6.54883 20.7012 6.84766 20.7754 7.12891C20.8496 7.40625 20.9609 7.65234 21.1094 7.86719C21.2617 8.08203 21.4512 8.25195 21.6777 8.37695C21.9043 8.49805 22.168 8.55859 22.4688 8.55859C22.7656 8.55859 23.0254 8.49805 23.248 8.37695C23.4746 8.25195 23.6621 8.08203 23.8105 7.86719C23.959 7.65234 24.0703 7.40625 24.1445 7.12891C24.2227 6.84766 24.2617 6.54883 24.2617 6.23242V6.09766C24.2617 5.78516 24.2227 5.49023 24.1445 5.21289C24.0703 4.93164 23.957 4.68359 23.8047 4.46875C23.6562 4.25 23.4688 4.07812 23.2422 3.95312C23.0195 3.82812 22.7578 3.76562 22.457 3.76562C22.1602 3.76562 21.8984 3.82812 21.6719 3.95312C21.4492 4.07812 21.2617 4.25 21.1094 4.46875C20.9609 4.68359 20.8496 4.93164 20.7754 5.21289C20.7012 5.49023 20.6641 5.78516 20.6641 6.09766ZM6.62207 6.23242V6.09766C6.62207 5.64062 6.68848 5.2168 6.82129 4.82617C6.9541 4.43164 7.14551 4.08984 7.39551 3.80078C7.64551 3.50781 7.94824 3.28125 8.30371 3.12109C8.65918 2.95703 9.05762 2.875 9.49902 2.875C9.94434 2.875 10.3447 2.95703 10.7002 3.12109C11.0596 3.28125 11.3643 3.50781 11.6143 3.80078C11.8682 4.08984 12.0615 4.43164 12.1943 4.82617C12.3271 5.2168 12.3936 5.64062 12.3936 6.09766V6.23242C12.3936 6.68945 12.3271 7.11328 12.1943 7.50391C12.0615 7.89453 11.8682 8.23633 11.6143 8.5293C11.3643 8.81836 11.0615 9.04492 10.7061 9.20898C10.3545 9.36914 9.95605 9.44922 9.51074 9.44922C9.06543 9.44922 8.66504 9.36914 8.30957 9.20898C7.9541 9.04492 7.64941 8.81836 7.39551 8.5293C7.14551 8.23633 6.9541 7.89453 6.82129 7.50391C6.68848 7.11328 6.62207 6.68945 6.62207 6.23242ZM7.70605 6.09766V6.23242C7.70605 6.54883 7.74316 6.84766 7.81738 7.12891C7.8916 7.40625 8.00293 7.65234 8.15137 7.86719C8.30371 8.08203 8.49316 8.25195 8.71973 8.37695C8.94629 8.49805 9.20996 8.55859 9.51074 8.55859C9.80762 8.55859 10.0674 8.49805 10.29 8.37695C10.5166 8.25195 10.7041 8.08203 10.8525 7.86719C11.001 7.65234 11.1123 7.40625 11.1865 7.12891C11.2646 6.84766 11.3037 6.54883 11.3037 6.23242V6.09766C11.3037 5.78516 11.2646 5.49023 11.1865 5.21289C11.1123 4.93164 10.999 4.68359 10.8467 4.46875C10.6982 4.25 10.5107 4.07812 10.2842 3.95312C10.0615 3.82812 9.7998 3.76562 9.49902 3.76562C9.20215 3.76562 8.94043 3.82812 8.71387 3.95312C8.49121 4.07812 8.30371 4.25 8.15137 4.46875C8.00293 4.68359 7.8916 4.93164 7.81738 5.21289C7.74316 5.49023 7.70605 5.78516 7.70605 6.09766ZM2.81445 0.800781H-0.00976562V9.33203H1.12109V5.875H3.12234L4.97656 9.33203H6.18359V9.26172L4.17961 5.63892C4.44286 5.53847 4.67726 5.41013 4.88281 5.25391C5.17969 5.02734 5.40625 4.75391 5.5625 4.43359C5.72266 4.10938 5.80273 3.75195 5.80273 3.36133C5.80273 2.80664 5.68555 2.33984 5.45117 1.96094C5.2207 1.57812 4.88281 1.28906 4.4375 1.09375C3.99609 0.898438 3.45508 0.800781 2.81445 0.800781ZM1.12109 4.95508V1.72656H2.81445C3.24805 1.72656 3.60156 1.79492 3.875 1.93164C4.15234 2.06445 4.35547 2.25391 4.48438 2.5C4.61328 2.74609 4.67773 3.0332 4.67773 3.36133C4.67773 3.6543 4.60938 3.92188 4.47266 4.16406C4.33594 4.40625 4.13281 4.59961 3.86328 4.74414C3.59375 4.88477 3.25586 4.95508 2.84961 4.95508H1.12109Z\",\n fill: \"#343C6A\"\n})));\nexport default SvgRoboto;","var _path;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nconst SvgOpensans = props => /*#__PURE__*/React.createElement(\"svg\", _extends({\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 58 13\"\n}, props), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M7.62695 8.54688C8.32227 7.76172 8.66992 6.68359 8.66992 5.3125C8.66992 3.9375 8.32422 2.85938 7.63281 2.07812C6.94141 1.29688 5.98047 0.90625 4.75 0.90625C3.48438 0.90625 2.50781 1.29102 1.82031 2.06055C1.13281 2.82617 0.789062 3.90625 0.789062 5.30078C0.789062 6.70703 1.13086 7.79688 1.81445 8.57031C2.50195 9.33984 3.47656 9.72461 4.73828 9.72461C5.97266 9.72461 6.93555 9.33203 7.62695 8.54688ZM2.58203 7.95508C2.08984 7.35352 1.84375 6.47266 1.84375 5.3125C1.84375 4.16797 2.08984 3.29688 2.58203 2.69922C3.07812 2.09766 3.80078 1.79688 4.75 1.79688C5.69531 1.79688 6.4082 2.0957 6.88867 2.69336C7.37305 3.28711 7.61523 4.16016 7.61523 5.3125C7.61523 6.47656 7.37305 7.35742 6.88867 7.95508C6.4043 8.55273 5.6875 8.85156 4.73828 8.85156C3.79688 8.85156 3.07812 8.55273 2.58203 7.95508ZM37.626 9.0918C38.1729 8.66992 38.4463 8.08203 38.4463 7.32812C38.4463 6.74219 38.2764 6.26562 37.9365 5.89844C37.6006 5.53125 36.9834 5.1875 36.085 4.86719C35.5498 4.67578 35.1514 4.50195 34.8896 4.3457C34.6318 4.18555 34.4482 4.01172 34.3389 3.82422C34.2295 3.63281 34.1748 3.38867 34.1748 3.0918C34.1748 2.68945 34.3232 2.375 34.6201 2.14844C34.917 1.92188 35.3291 1.80859 35.8564 1.80859C36.5244 1.80859 37.2119 1.95703 37.9189 2.25391L38.2295 1.38672C37.5146 1.07422 36.7314 0.917969 35.8799 0.917969C35.0635 0.917969 34.4072 1.11328 33.9111 1.50391C33.415 1.89453 33.167 2.41992 33.167 3.08008C33.167 3.70898 33.3369 4.21875 33.6768 4.60938C34.0205 5 34.5908 5.33789 35.3877 5.62305C35.958 5.82617 36.3818 6.00781 36.6592 6.16797C36.9404 6.32812 37.1396 6.50391 37.2568 6.69531C37.3779 6.88281 37.4385 7.125 37.4385 7.42188C37.4385 7.87109 37.2705 8.22266 36.9346 8.47656C36.5986 8.72656 36.0986 8.85156 35.4346 8.85156C35.0283 8.85156 34.6182 8.80859 34.2041 8.72266C33.79 8.63672 33.4072 8.51953 33.0557 8.37109V9.33203C33.6025 9.59375 34.3838 9.72461 35.3994 9.72461C36.3369 9.72461 37.0791 9.51367 37.626 9.0918ZM50.502 5.45312V9.60742H51.4746V5.41797C51.4746 4.59766 51.2793 4.00195 50.8887 3.63086C50.498 3.25586 49.916 3.06836 49.1426 3.06836C48.7012 3.06836 48.3008 3.15625 47.9414 3.33203C47.582 3.50391 47.3027 3.74805 47.1035 4.06445H47.0566L46.8984 3.18555H46.1074V9.60742H47.0801V6.23828C47.0801 5.40234 47.2363 4.80273 47.5488 4.43945C47.8613 4.07617 48.3535 3.89453 49.0254 3.89453C49.5332 3.89453 49.9062 4.02344 50.1445 4.28125C50.3828 4.53906 50.502 4.92969 50.502 5.45312ZM56.6406 9.23828C57.0859 8.91406 57.3086 8.45312 57.3086 7.85547C57.3086 7.42969 57.1738 7.07617 56.9043 6.79492C56.6387 6.51367 56.125 6.23438 55.3633 5.95703C54.8086 5.75 54.4336 5.5918 54.2383 5.48242C54.043 5.37305 53.9004 5.25781 53.8105 5.13672C53.7246 5.01562 53.6816 4.86914 53.6816 4.69727C53.6816 4.44336 53.7988 4.24414 54.0332 4.09961C54.2676 3.95508 54.6152 3.88281 55.0762 3.88281C55.5996 3.88281 56.1836 4.01562 56.8281 4.28125L57.1738 3.49023C56.5137 3.20898 55.8379 3.06836 55.1465 3.06836C54.4043 3.06836 53.8203 3.2207 53.3945 3.52539C52.9688 3.82617 52.7559 4.23828 52.7559 4.76172C52.7559 5.05469 52.8164 5.30664 52.9375 5.51758C53.0625 5.72852 53.25 5.91797 53.5 6.08594C53.7539 6.25 54.1797 6.44336 54.7773 6.66602C55.4062 6.9082 55.8281 7.11914 56.043 7.29883C56.2617 7.47461 56.3711 7.6875 56.3711 7.9375C56.3711 8.26953 56.2344 8.51758 55.9609 8.68164C55.6875 8.8418 55.2969 8.92188 54.7891 8.92188C54.4609 8.92188 54.1191 8.87695 53.7637 8.78711C53.4121 8.69727 53.082 8.57422 52.7734 8.41797V9.32031C53.25 9.58984 53.9141 9.72461 54.7656 9.72461C55.5703 9.72461 56.1953 9.5625 56.6406 9.23828ZM43.6885 9.60742L43.4951 8.69336H43.4482C43.1279 9.0957 42.8076 9.36914 42.4873 9.51367C42.1709 9.6543 41.7744 9.72461 41.2979 9.72461C40.6611 9.72461 40.1611 9.56055 39.7979 9.23242C39.4385 8.9043 39.2588 8.4375 39.2588 7.83203C39.2588 6.53516 40.2959 5.85547 42.3701 5.79297L43.46 5.75781V5.35938C43.46 4.85547 43.3506 4.48438 43.1318 4.24609C42.917 4.00391 42.5713 3.88281 42.0947 3.88281C41.5596 3.88281 40.9541 4.04688 40.2783 4.375L39.9795 3.63086C40.2959 3.45898 40.6416 3.32422 41.0166 3.22656C41.3955 3.12891 41.7744 3.08008 42.1533 3.08008C42.9189 3.08008 43.4854 3.25 43.8525 3.58984C44.2236 3.92969 44.4092 4.47461 44.4092 5.22461V9.60742H43.6885ZM41.4912 8.92188C42.0967 8.92188 42.5713 8.75586 42.915 8.42383C43.2627 8.0918 43.4365 7.62695 43.4365 7.0293V6.44922L42.4639 6.49023C41.6904 6.51758 41.1318 6.63867 40.7881 6.85352C40.4482 7.06445 40.2783 7.39453 40.2783 7.84375C40.2783 8.19531 40.3838 8.46289 40.5947 8.64648C40.8096 8.83008 41.1084 8.92188 41.4912 8.92188ZM27.9961 9.60742V5.45312C27.9961 4.92969 27.877 4.53906 27.6387 4.28125C27.4004 4.02344 27.0273 3.89453 26.5195 3.89453C25.8477 3.89453 25.3555 4.07617 25.043 4.43945C24.7305 4.80273 24.5742 5.40234 24.5742 6.23828V9.60742H23.6016V3.18555H24.3926L24.5508 4.06445H24.5977C24.7969 3.74805 25.0762 3.50391 25.4355 3.33203C25.7949 3.15625 26.1953 3.06836 26.6367 3.06836C27.4102 3.06836 27.9922 3.25586 28.3828 3.63086C28.7734 4.00195 28.9688 4.59766 28.9688 5.41797V9.60742H27.9961ZM17.6377 8.85742C18.1885 9.43555 18.9385 9.72461 19.8877 9.72461C20.3213 9.72461 20.6904 9.69141 20.9951 9.625C21.3037 9.5625 21.6299 9.45703 21.9736 9.30859V8.44141C21.2979 8.73047 20.6143 8.875 19.9229 8.875C19.2666 8.875 18.7568 8.67969 18.3936 8.28906C18.0342 7.89844 17.8447 7.32617 17.8252 6.57227H22.249V5.95703C22.249 5.08984 22.0146 4.39258 21.5459 3.86523C21.0771 3.33398 20.4404 3.06836 19.6357 3.06836C18.7764 3.06836 18.0908 3.37305 17.5791 3.98242C17.0713 4.5918 16.8174 5.41406 16.8174 6.44922C16.8174 7.47656 17.0908 8.2793 17.6377 8.85742ZM18.3877 4.38672C18.6963 4.05078 19.1084 3.88281 19.624 3.88281C20.1318 3.88281 20.5225 4.04688 20.7959 4.375C21.0693 4.69922 21.2061 5.16797 21.2061 5.78125H17.8486C17.9033 5.1875 18.083 4.72266 18.3877 4.38672ZM13.1162 9.72461C12.6982 9.72461 12.3154 9.64844 11.9678 9.49609C11.624 9.33984 11.335 9.10156 11.1006 8.78125H11.0303C11.0771 9.15625 11.1006 9.51172 11.1006 9.84766V12.4902H10.1279V3.18555H10.9189L11.0537 4.06445H11.1006C11.3506 3.71289 11.6416 3.45898 11.9736 3.30273C12.3057 3.14648 12.6865 3.06836 13.1162 3.06836C13.9678 3.06836 14.624 3.35938 15.085 3.94141C15.5498 4.52344 15.7822 5.33984 15.7822 6.39062C15.7822 7.44531 15.5459 8.26562 15.0732 8.85156C14.6045 9.43359 13.9521 9.72461 13.1162 9.72461ZM12.9756 3.89453C12.3193 3.89453 11.8447 4.07617 11.5518 4.43945C11.2588 4.80273 11.1084 5.38086 11.1006 6.17383V6.39062C11.1006 7.29297 11.251 7.93945 11.5518 8.33008C11.8525 8.7168 12.335 8.91016 12.999 8.91016C13.5537 8.91016 13.9873 8.68555 14.2998 8.23633C14.6162 7.78711 14.7744 7.16797 14.7744 6.37891C14.7744 5.57812 14.6162 4.96484 14.2998 4.53906C13.9873 4.10938 13.5459 3.89453 12.9756 3.89453Z\",\n fill: \"#343C6A\"\n})));\nexport default SvgOpensans;","var _path;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nconst SvgHelvetica = props => /*#__PURE__*/React.createElement(\"svg\", _extends({\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 46 9\"\n}, props), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M1.17773 0H0V8.60742H1.17773V4.58203H5.6543V8.60742H6.83203V0H5.6543V3.55664H1.17773V0ZM15.6416 0H14.5869V8.60742H15.6416V0ZM33.0732 2.36133H32.001V8.60742H33.0732V2.36133ZM33.0732 0H32.001V1.19531H33.0732V0ZM36.7812 2.15039C37.4883 2.15039 38.0625 2.32227 38.5039 2.66602C38.9492 3.00977 39.2168 3.60156 39.3066 4.44141H38.2812C38.2188 4.05469 38.0762 3.73438 37.8535 3.48047C37.6309 3.22266 37.2734 3.09375 36.7812 3.09375C36.1094 3.09375 35.6289 3.42188 35.3398 4.07812C35.1523 4.50391 35.0586 5.0293 35.0586 5.6543C35.0586 6.2832 35.1914 6.8125 35.457 7.24219C35.7227 7.67188 36.1406 7.88672 36.7109 7.88672C37.1484 7.88672 37.4941 7.75391 37.748 7.48828C38.0059 7.21875 38.1836 6.85156 38.2812 6.38672H39.3066C39.1895 7.21875 38.8965 7.82812 38.4277 8.21484C37.959 8.59766 37.3594 8.78906 36.6289 8.78906C35.8086 8.78906 35.1543 8.49023 34.666 7.89258C34.1777 7.29102 33.9336 6.54102 33.9336 5.64258C33.9336 4.54102 34.2012 3.68359 34.7363 3.07031C35.2715 2.45703 35.9531 2.15039 36.7812 2.15039ZM40.8574 6.9375C40.8574 7.24219 40.9688 7.48242 41.1914 7.6582C41.4141 7.83398 41.6777 7.92188 41.9824 7.92188C42.3535 7.92188 42.7129 7.83594 43.0605 7.66406C43.6465 7.37891 43.9395 6.91211 43.9395 6.26367V5.41406C43.8105 5.49609 43.6445 5.56445 43.4414 5.61914C43.2383 5.67383 43.0391 5.71289 42.8438 5.73633L42.2051 5.81836C41.8223 5.86914 41.5352 5.94922 41.3438 6.05859C41.0195 6.24219 40.8574 6.53516 40.8574 6.9375ZM43.4121 4.80469C43.6543 4.77344 43.8164 4.67188 43.8984 4.5C43.9453 4.40625 43.9688 4.27148 43.9688 4.0957C43.9688 3.73633 43.8398 3.47656 43.582 3.31641C43.3281 3.15234 42.9629 3.07031 42.4863 3.07031C41.9355 3.07031 41.5449 3.21875 41.3145 3.51562C41.1855 3.67969 41.1016 3.92383 41.0625 4.24805H40.0781C40.0977 3.47461 40.3477 2.9375 40.8281 2.63672C41.3125 2.33203 41.873 2.17969 42.5098 2.17969C43.248 2.17969 43.8477 2.32031 44.3086 2.60156C44.7656 2.88281 44.9941 3.32031 44.9941 3.91406V7.5293C44.9941 7.63867 45.0156 7.72656 45.0586 7.79297C45.1055 7.85938 45.2012 7.89258 45.3457 7.89258C45.3926 7.89258 45.4453 7.89062 45.5039 7.88672C45.5625 7.87891 45.625 7.86914 45.6914 7.85742V8.63672C45.5273 8.68359 45.4023 8.71289 45.3164 8.72461C45.2305 8.73633 45.1133 8.74219 44.9648 8.74219C44.6016 8.74219 44.3379 8.61328 44.1738 8.35547C44.0879 8.21875 44.0273 8.02539 43.9922 7.77539C43.7773 8.05664 43.4688 8.30078 43.0664 8.50781C42.6641 8.71484 42.2207 8.81836 41.7363 8.81836C41.1543 8.81836 40.6777 8.64258 40.3066 8.29102C39.9395 7.93555 39.7559 7.49219 39.7559 6.96094C39.7559 6.37891 39.9375 5.92773 40.3008 5.60742C40.6641 5.28711 41.1406 5.08984 41.7305 5.01562L43.4121 4.80469ZM29.1846 0.580078H30.251V2.33203H31.2529V3.19336H30.251V7.28906C30.251 7.50781 30.3252 7.6543 30.4736 7.72852C30.5557 7.77148 30.6924 7.79297 30.8838 7.79297H31.0479C31.1064 7.78906 31.1748 7.7832 31.2529 7.77539V8.60742C31.1318 8.64258 31.0049 8.66797 30.8721 8.68359C30.7432 8.69922 30.6025 8.70703 30.4502 8.70703C29.958 8.70703 29.624 8.58203 29.4482 8.33203C29.2725 8.07812 29.1846 7.75 29.1846 7.34766V3.19336H28.335V2.33203H29.1846V0.580078ZM26.5137 2.50781C26.0957 2.29688 25.6641 2.19141 25.2188 2.19141C24.3359 2.19141 23.6211 2.50586 23.0742 3.13477C22.5273 3.76367 22.2539 4.58203 22.2539 5.58984C22.2539 6.61328 22.5254 7.41016 23.0684 7.98047C23.6113 8.54688 24.2734 8.83008 25.0547 8.83008C25.375 8.83008 25.6621 8.79883 25.916 8.73633C26.3887 8.62695 26.7852 8.41602 27.1055 8.10352C27.2969 7.92383 27.4688 7.69336 27.6211 7.41211C27.7773 7.12695 27.8691 6.86914 27.8965 6.63867H26.8594C26.7812 6.91602 26.6484 7.16016 26.4609 7.37109C26.1328 7.73438 25.6934 7.91602 25.1426 7.91602C24.5527 7.91602 24.1172 7.72461 23.8359 7.3418C23.5547 6.95508 23.4043 6.44336 23.3848 5.80664H27.9844C27.9844 5.17383 27.9531 4.71289 27.8906 4.42383C27.8203 4.00195 27.6797 3.63281 27.4688 3.31641C27.25 2.98438 26.9316 2.71484 26.5137 2.50781ZM26.6016 3.87305C26.7578 4.14648 26.8574 4.51172 26.9004 4.96875H23.4141C23.4336 4.42969 23.6074 3.98633 23.9355 3.63867C24.2637 3.28711 24.6699 3.11133 25.1543 3.11133C25.8301 3.11133 26.3125 3.36523 26.6016 3.87305ZM17.4336 2.33203L19.1094 7.44141L20.8613 2.33203H22.0156L19.6484 8.60742H18.5234L16.209 2.33203H17.4336ZM10.8037 2.19141C11.249 2.19141 11.6807 2.29688 12.0986 2.50781C12.5166 2.71484 12.835 2.98438 13.0537 3.31641C13.2646 3.63281 13.4053 4.00195 13.4756 4.42383C13.5381 4.71289 13.5693 5.17383 13.5693 5.80664H8.96973C8.98926 6.44336 9.13965 6.95508 9.4209 7.3418C9.70215 7.72461 10.1377 7.91602 10.7275 7.91602C11.2783 7.91602 11.7178 7.73438 12.0459 7.37109C12.2334 7.16016 12.3662 6.91602 12.4443 6.63867H13.4814C13.4541 6.86914 13.3623 7.12695 13.2061 7.41211C13.0537 7.69336 12.8818 7.92383 12.6904 8.10352C12.3701 8.41602 11.9736 8.62695 11.501 8.73633C11.2471 8.79883 10.96 8.83008 10.6396 8.83008C9.8584 8.83008 9.19629 8.54688 8.65332 7.98047C8.11035 7.41016 7.83887 6.61328 7.83887 5.58984C7.83887 4.58203 8.1123 3.76367 8.65918 3.13477C9.20605 2.50586 9.9209 2.19141 10.8037 2.19141ZM12.4854 4.96875C12.4424 4.51172 12.3428 4.14648 12.1865 3.87305C11.8975 3.36523 11.415 3.11133 10.7393 3.11133C10.2549 3.11133 9.84863 3.28711 9.52051 3.63867C9.19238 3.98633 9.01855 4.42969 8.99902 4.96875H12.4854Z\",\n fill: \"#343C6A\"\n})));\nexport default SvgHelvetica;","var _path;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nconst SvgInter = props => /*#__PURE__*/React.createElement(\"svg\", _extends({\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 24 10\"\n}, props), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M1.05682 9.0593V0.332031H0V9.0593H1.05682ZM12.2817 3.36674V2.51447H10.884V0.946289H9.87828V2.51447H8.88965V3.36674H9.87828V7.45765C9.87828 7.83833 9.96635 8.15368 10.1425 8.40368C10.3215 8.65368 10.5459 8.83976 10.8158 8.96191C11.0885 9.08407 11.3669 9.14515 11.651 9.14515C11.8385 9.14515 11.9933 9.13095 12.1155 9.10254C12.2377 9.07697 12.3328 9.0514 12.401 9.02584L12.1965 8.12243L12.026 8.15652C11.955 8.16788 11.8641 8.17356 11.7533 8.17356C11.6056 8.17356 11.4649 8.15084 11.3314 8.10538C11.2007 8.05709 11.0928 7.96333 11.0075 7.82413C10.9252 7.68208 10.884 7.46902 10.884 7.18493V3.36674H12.2817ZM20.085 9.05984V2.51438H21.0566V3.50302H21.1247C21.2441 3.17916 21.46 2.91637 21.7725 2.71467C22.085 2.51296 22.4372 2.41211 22.8293 2.41211C22.9031 2.41211 22.9955 2.41353 23.1063 2.41637C23.2171 2.41921 23.3009 2.42347 23.3577 2.42916V3.45188C23.3236 3.44336 23.2455 3.43058 23.1233 3.41353C23.004 3.39364 22.8776 3.3837 22.7441 3.3837C22.4259 3.3837 22.1418 3.45046 21.8918 3.58399C21.6446 3.71467 21.4486 3.89648 21.3037 4.12944C21.1617 4.35955 21.0906 4.62234 21.0906 4.91779V9.05984H20.085ZM16.1566 9.19576C15.5259 9.19576 14.9819 9.05655 14.5245 8.77814C14.07 8.49689 13.7191 8.10485 13.4719 7.60201C13.2276 7.09632 13.1055 6.50826 13.1055 5.8378C13.1055 5.16735 13.2276 4.57644 13.4719 4.06507C13.7191 3.55087 14.0629 3.1503 14.5032 2.86337C14.9464 2.5736 15.4634 2.42871 16.0543 2.42871C16.3952 2.42871 16.7319 2.48553 17.0643 2.59916C17.3967 2.7128 17.6992 2.89746 17.9719 3.15314C18.2447 3.40598 18.462 3.74121 18.6239 4.15882C18.7859 4.57644 18.8668 5.09064 18.8668 5.70144V6.12757H14.1134C14.1278 6.56305 14.2123 6.93663 14.3668 7.24831C14.5401 7.58922 14.7802 7.84917 15.087 8.02814C15.3938 8.20428 15.7504 8.29235 16.1566 8.29235C16.4208 8.29235 16.6594 8.25542 16.8725 8.18155C17.0884 8.10485 17.2745 7.99121 17.4308 7.84064C17.587 7.68723 17.7077 7.49689 17.793 7.26962L18.7646 7.54235C18.6623 7.87189 18.4904 8.16167 18.2489 8.41167C18.0075 8.65882 17.7092 8.85201 17.354 8.99121C16.9989 9.12757 16.5998 9.19576 16.1566 9.19576ZM14.1159 5.25826H17.8441C17.8441 4.88894 17.7702 4.55939 17.6225 4.26962C17.4776 3.97985 17.2702 3.75115 17.0004 3.58354C16.7333 3.41593 16.418 3.33212 16.0543 3.33212C15.6538 3.33212 15.3072 3.43155 15.0146 3.63042C14.7248 3.82644 14.5018 4.08212 14.3455 4.39746C14.2116 4.6677 14.1351 4.95463 14.1159 5.25826ZM3.73322 5.12189V9.05939H2.72754V2.51394H3.69913V3.53667H3.78436C3.93777 3.20428 4.17072 2.93723 4.48322 2.73553C4.79572 2.53098 5.19913 2.42871 5.69345 2.42871C6.13663 2.42871 6.52441 2.51962 6.8568 2.70144C7.18919 2.88042 7.44771 3.15314 7.63237 3.51962C7.81703 3.88326 7.90936 4.34348 7.90936 4.9003V9.05939H6.90368V4.96848C6.90368 4.45428 6.77015 4.05371 6.50311 3.76678C6.23606 3.47701 5.86958 3.33212 5.40368 3.33212C5.08265 3.33212 4.79572 3.40172 4.54288 3.54093C4.29288 3.68013 4.09544 3.88326 3.95055 4.1503C3.80566 4.41735 3.73322 4.74121 3.73322 5.12189Z\",\n fill: \"#343C6A\"\n})));\nexport default SvgInter;","var _path;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nconst SvgTahoma = props => /*#__PURE__*/React.createElement(\"svg\", _extends({\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 40 10\"\n}, props), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M16.1924 9.33203H17.2939V5.08398C17.2939 4.2793 17.1123 3.66602 16.749 3.24414C16.3857 2.81836 15.8818 2.60547 15.2373 2.60547C14.8818 2.60547 14.5439 2.68359 14.2236 2.83984C13.9033 2.99609 13.5791 3.2207 13.251 3.51367V0.214844H12.1494V9.33203H13.251V4.44531C13.5283 4.21094 13.8115 4.02148 14.1006 3.87695C14.3936 3.72852 14.6768 3.6543 14.9502 3.6543C15.2275 3.6543 15.4463 3.69531 15.6064 3.77734C15.7666 3.85547 15.8916 3.97656 15.9814 4.14062C16.0635 4.29688 16.1182 4.50586 16.1455 4.76758C16.1768 5.02539 16.1924 5.30469 16.1924 5.60547V9.33203ZM23.9141 6.0625C23.9141 7.16406 23.6484 8.01562 23.1172 8.61719C22.5859 9.21484 21.8789 9.51367 20.9961 9.51367C20.0859 9.51367 19.3691 9.20508 18.8457 8.58789C18.3262 7.9668 18.0664 7.125 18.0664 6.0625C18.0664 4.96875 18.334 4.11914 18.8691 3.51367C19.4082 2.9082 20.1172 2.60547 20.9961 2.60547C21.8789 2.60547 22.5859 2.9082 23.1172 3.51367C23.6484 4.11523 23.9141 4.96484 23.9141 6.0625ZM22.7773 6.0625C22.7773 5.21484 22.623 4.58594 22.3145 4.17578C22.0059 3.76172 21.5664 3.55469 20.9961 3.55469C20.4219 3.55469 19.9785 3.76172 19.666 4.17578C19.3574 4.58594 19.2031 5.21484 19.2031 6.0625C19.2031 6.88281 19.3574 7.50586 19.666 7.93164C19.9785 8.35352 20.4219 8.56445 20.9961 8.56445C21.5625 8.56445 22 8.35742 22.3086 7.94336C22.6211 7.52539 22.7773 6.89844 22.7773 6.0625ZM32.1621 5.54688V9.33203H33.2637V5.02539C33.2637 4.57617 33.2148 4.20312 33.1172 3.90625C33.0234 3.60938 32.8887 3.36133 32.7129 3.16211C32.541 2.9668 32.3398 2.82617 32.1094 2.74023C31.8789 2.65039 31.623 2.60547 31.3418 2.60547C30.9707 2.60547 30.627 2.70117 30.3105 2.89258C29.9941 3.08398 29.6699 3.36523 29.3379 3.73633C29.1816 3.33398 28.9531 3.04492 28.6523 2.86914C28.3555 2.69336 28.0137 2.60547 27.627 2.60547C27.2871 2.60547 26.9746 2.68555 26.6895 2.8457C26.4082 3.00195 26.123 3.22461 25.834 3.51367V2.78711H24.7324V9.33203H25.834V4.44531C26.0801 4.21484 26.334 4.02539 26.5957 3.87695C26.8574 3.72852 27.1074 3.6543 27.3457 3.6543C27.5918 3.6543 27.7871 3.69141 27.9316 3.76562C28.0762 3.83984 28.1875 3.95508 28.2656 4.11133C28.3398 4.25586 28.3887 4.45703 28.4121 4.71484C28.4355 4.96875 28.4473 5.24609 28.4473 5.54688V9.33203H29.5488V5.02539C29.5488 4.90039 29.5449 4.79297 29.5371 4.70312C29.5332 4.60938 29.5293 4.5293 29.5254 4.46289C29.8027 4.20117 30.0703 4.00195 30.3281 3.86523C30.5898 3.72461 30.834 3.6543 31.0605 3.6543C31.3066 3.6543 31.502 3.69141 31.6465 3.76562C31.791 3.83984 31.9023 3.95508 31.9805 4.11133C32.0547 4.25586 32.1035 4.45703 32.127 4.71484C32.1504 4.96875 32.1621 5.24609 32.1621 5.54688ZM38.1553 5.9043V7.7207C37.9092 7.93945 37.6455 8.125 37.3643 8.27734C37.083 8.42578 36.7686 8.5 36.4209 8.5C36.0146 8.5 35.7061 8.4043 35.4951 8.21289C35.2842 8.02148 35.1787 7.73828 35.1787 7.36328C35.1787 7.03125 35.2744 6.77344 35.4658 6.58984C35.6572 6.40234 35.8994 6.26367 36.1924 6.17383C36.4385 6.09961 36.7607 6.04297 37.1592 6.00391C37.5615 5.96094 37.8936 5.92773 38.1553 5.9043ZM37.792 8.91602C37.9443 8.79492 38.0654 8.70117 38.1553 8.63477V9.33203H39.251V4.85547C39.251 4.44531 39.1924 4.09766 39.0752 3.8125C38.958 3.52734 38.7803 3.29492 38.542 3.11523C38.2959 2.93164 38.0186 2.80469 37.71 2.73438C37.4014 2.66406 37.0225 2.62891 36.5732 2.62891C36.2021 2.62891 35.8271 2.66406 35.4482 2.73438C35.0693 2.80469 34.7783 2.86914 34.5752 2.92773V4.04688H34.6396C34.9834 3.90234 35.3271 3.79297 35.6709 3.71875C36.0146 3.64062 36.3135 3.60156 36.5674 3.60156C36.7822 3.60156 36.9912 3.61719 37.1943 3.64844C37.3975 3.67578 37.5693 3.73438 37.71 3.82422C37.8506 3.91016 37.96 4.0332 38.0381 4.19336C38.1162 4.34961 38.1553 4.55664 38.1553 4.81445V5.02539C37.5771 5.05664 37.0381 5.10547 36.5381 5.17188C36.0381 5.23438 35.6045 5.34961 35.2373 5.51758C34.8232 5.70508 34.5205 5.95898 34.3291 6.2793C34.1377 6.5957 34.042 6.98047 34.042 7.43359C34.042 7.72656 34.0947 8.00586 34.2002 8.27148C34.3057 8.5332 34.4463 8.75391 34.6221 8.93359C34.8057 9.11719 35.0186 9.25977 35.2607 9.36133C35.5029 9.46289 35.7588 9.51367 36.0283 9.51367C36.3564 9.51367 36.6104 9.48633 36.79 9.43164C36.9736 9.37695 37.1631 9.29883 37.3584 9.19727C37.499 9.12695 37.6436 9.0332 37.792 8.91602ZM9.81348 7.7207V5.9043C9.55176 5.92773 9.21973 5.96094 8.81738 6.00391C8.41895 6.04297 8.09668 6.09961 7.85059 6.17383C7.55762 6.26367 7.31543 6.40234 7.12402 6.58984C6.93262 6.77344 6.83691 7.03125 6.83691 7.36328C6.83691 7.73828 6.94238 8.02148 7.15332 8.21289C7.36426 8.4043 7.67285 8.5 8.0791 8.5C8.42676 8.5 8.74121 8.42578 9.02246 8.27734C9.30371 8.125 9.56738 7.93945 9.81348 7.7207ZM9.81348 8.63477C9.72363 8.70117 9.60254 8.79492 9.4502 8.91602C9.30176 9.0332 9.15723 9.12695 9.0166 9.19727C8.82129 9.29883 8.63184 9.37695 8.44824 9.43164C8.26855 9.48633 8.01465 9.51367 7.68652 9.51367C7.41699 9.51367 7.16113 9.46289 6.91895 9.36133C6.67676 9.25977 6.46387 9.11719 6.28027 8.93359C6.10449 8.75391 5.96387 8.5332 5.8584 8.27148C5.75293 8.00586 5.7002 7.72656 5.7002 7.43359C5.7002 6.98047 5.7959 6.5957 5.9873 6.2793C6.17871 5.95898 6.48145 5.70508 6.89551 5.51758C7.2627 5.34961 7.69629 5.23438 8.19629 5.17188C8.69629 5.10547 9.23535 5.05664 9.81348 5.02539V4.81445C9.81348 4.55664 9.77441 4.34961 9.69629 4.19336C9.61816 4.0332 9.50879 3.91016 9.36816 3.82422C9.22754 3.73438 9.05566 3.67578 8.85254 3.64844C8.64941 3.61719 8.44043 3.60156 8.22559 3.60156C7.97168 3.60156 7.67285 3.64062 7.3291 3.71875C6.98535 3.79297 6.6416 3.90234 6.29785 4.04688H6.2334V2.92773C6.43652 2.86914 6.72754 2.80469 7.10645 2.73438C7.48535 2.66406 7.86035 2.62891 8.23145 2.62891C8.68066 2.62891 9.05957 2.66406 9.36816 2.73438C9.67676 2.80469 9.9541 2.93164 10.2002 3.11523C10.4385 3.29492 10.6162 3.52734 10.7334 3.8125C10.8506 4.09766 10.9092 4.44531 10.9092 4.85547V9.33203H9.81348V8.63477ZM2.92383 1.63867V9.33203H4.08398V1.63867H7.01367V0.607422H-0.00585938V1.63867H2.92383Z\",\n fill: \"#343C6A\"\n})));\nexport default SvgTahoma;","var _path;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nconst SvgCouriernew = props => /*#__PURE__*/React.createElement(\"svg\", _extends({\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 76 9\"\n}, props), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M31.2363 2.00391V0.732422H29.8066V2.00391H31.2363ZM31.4004 7.13086V3.01172H29.2324C28.9434 3.01172 28.7363 3.06836 28.6113 3.18164C28.4902 3.29102 28.4297 3.43359 28.4297 3.60938C28.4297 3.78906 28.4922 3.93555 28.6172 4.04883C28.7422 4.1582 28.9473 4.21289 29.2324 4.21289H30.1992V7.13086H28.7578C28.4688 7.13086 28.2617 7.1875 28.1367 7.30078C28.0156 7.41016 27.9551 7.55273 27.9551 7.72852C27.9551 7.9082 28.0156 8.05469 28.1367 8.16797C28.2617 8.27734 28.4688 8.33203 28.7578 8.33203H32.8418C33.1309 8.33203 33.3359 8.27734 33.457 8.16797C33.582 8.05469 33.6445 7.91016 33.6445 7.73438C33.6445 7.55469 33.582 7.41016 33.457 7.30078C33.3359 7.1875 33.1309 7.13086 32.8418 7.13086H31.4004ZM56.8828 3.49805V7.13086H57.3164C57.6055 7.13086 57.8105 7.1875 57.9316 7.30078C58.0566 7.41016 58.1191 7.55469 58.1191 7.73438C58.1191 7.91016 58.0566 8.05469 57.9316 8.16797C57.8105 8.27734 57.6055 8.33203 57.3164 8.33203H55.7402C55.4512 8.33203 55.2441 8.27734 55.1191 8.16797C54.998 8.05469 54.9375 7.9082 54.9375 7.72852C54.9375 7.55664 54.998 7.41406 55.1191 7.30078C55.2402 7.1875 55.4277 7.13086 55.6816 7.13086V2.43164H55.4941C55.2051 2.43164 54.998 2.37695 54.873 2.26758C54.752 2.1543 54.6914 2.00781 54.6914 1.82812C54.6914 1.64844 54.752 1.50391 54.873 1.39453C54.998 1.28125 55.2051 1.22461 55.4941 1.22461L56.8828 1.23047L59.9531 6.04688V2.43164H59.5195C59.2305 2.43164 59.0234 2.37695 58.8984 2.26758C58.7773 2.1543 58.7168 2.00781 58.7168 1.82812C58.7168 1.64844 58.7773 1.50391 58.8984 1.39453C59.0234 1.28125 59.2305 1.22461 59.5195 1.22461L61.0957 1.23047C61.3848 1.23047 61.5898 1.28516 61.7109 1.39453C61.8359 1.50391 61.8984 1.64844 61.8984 1.82812C61.8984 2.00391 61.8379 2.14844 61.7168 2.26172C61.5957 2.375 61.4102 2.43164 61.1602 2.43164V8.33203H59.9707L56.8828 3.49805ZM63.3682 6.28125H68.2959V5.77148C68.2959 5.38086 68.2334 5.03711 68.1084 4.74023C67.9248 4.31445 67.6924 3.95703 67.4111 3.66797C67.2119 3.46875 66.9072 3.2832 66.4971 3.11133C66.0908 2.93945 65.6436 2.85352 65.1553 2.85352C64.3428 2.85352 63.624 3.11914 62.999 3.65039C62.3779 4.17773 62.0674 4.86328 62.0674 5.70703C62.0674 6.5 62.3545 7.16797 62.9287 7.71094C63.5068 8.25391 64.2764 8.52539 65.2373 8.52539C65.7959 8.52539 66.3779 8.46094 66.9834 8.33203C67.5889 8.19922 67.9697 8.06055 68.126 7.91602C68.2432 7.80664 68.3018 7.67383 68.3018 7.51758C68.3018 7.3457 68.2471 7.20312 68.1377 7.08984C68.0283 6.97656 67.8936 6.91992 67.7334 6.91992C67.6162 6.91992 67.4053 6.95898 67.1006 7.03711C66.3623 7.22852 65.7705 7.32422 65.3252 7.32422C64.7822 7.32422 64.3506 7.22852 64.0303 7.03711C63.7139 6.8457 63.4932 6.59375 63.3682 6.28125ZM66.2451 4.3125C66.542 4.48047 66.7822 4.73633 66.9658 5.08008H63.4033C63.5908 4.73633 63.833 4.48047 64.1299 4.3125C64.4268 4.14062 64.7783 4.05469 65.1846 4.05469C65.5947 4.05469 65.9482 4.14062 66.2451 4.3125ZM71.3525 8.33203L72.1846 6.11719L73.0635 8.33203H74.1768L75.1611 4.21289C75.3721 4.19727 75.5303 4.13477 75.6357 4.02539C75.7451 3.91211 75.7998 3.77539 75.7998 3.61523C75.7998 3.43555 75.7373 3.29102 75.6123 3.18164C75.4912 3.06836 75.2861 3.01172 74.9971 3.01172H73.8662C73.5771 3.01172 73.3701 3.06836 73.2451 3.18164C73.124 3.29102 73.0635 3.43359 73.0635 3.60938C73.0635 3.83203 73.1572 4.00391 73.3447 4.125C73.4385 4.18359 73.6338 4.21289 73.9307 4.21289L73.4619 6.11719L72.7119 4.16602H71.6455L70.9014 6.11719L70.4443 4.21289C70.7529 4.21289 70.96 4.16602 71.0654 4.07227C71.2061 3.94727 71.2764 3.79492 71.2764 3.61523C71.2764 3.43555 71.2139 3.29102 71.0889 3.18164C70.9678 3.06836 70.7627 3.01172 70.4736 3.01172H69.3545C69.0654 3.01172 68.8584 3.06836 68.7334 3.18164C68.6123 3.29102 68.5518 3.43359 68.5518 3.60938C68.5518 3.77734 68.6064 3.91797 68.7158 4.03125C68.8291 4.14062 68.9951 4.20117 69.2139 4.21289L70.2217 8.33203H71.3525ZM44.3467 3.76172V3.01172H42.7119C42.4229 3.01172 42.2158 3.06836 42.0908 3.18164C41.9697 3.29102 41.9092 3.43359 41.9092 3.60938C41.9092 3.78906 41.9697 3.93555 42.0908 4.04883C42.2158 4.1582 42.4229 4.21289 42.7119 4.21289H43.1455V7.13086H42.4307C42.1416 7.13086 41.9346 7.1875 41.8096 7.30078C41.6885 7.41016 41.6279 7.55273 41.6279 7.72852C41.6279 7.9082 41.6885 8.05469 41.8096 8.16797C41.9346 8.27734 42.1416 8.33203 42.4307 8.33203H46.0576C46.3467 8.33203 46.5518 8.27734 46.6729 8.16797C46.7979 8.05469 46.8604 7.91016 46.8604 7.73438C46.8604 7.55469 46.7979 7.41016 46.6729 7.30078C46.5518 7.1875 46.3467 7.13086 46.0576 7.13086H44.3467V5.32031C44.8467 4.89844 45.2627 4.58203 45.5947 4.37109C45.9307 4.16016 46.1826 4.05469 46.3506 4.05469C46.4795 4.05469 46.626 4.12891 46.79 4.27734C46.9541 4.42578 47.1104 4.5 47.2588 4.5C47.4268 4.5 47.5693 4.44141 47.6865 4.32422C47.8076 4.20312 47.8682 4.05664 47.8682 3.88477C47.8682 3.68164 47.7432 3.48242 47.4932 3.28711C47.126 2.99805 46.7471 2.85352 46.3564 2.85352C46.1025 2.85352 45.8291 2.91406 45.5361 3.03516C45.2471 3.15625 44.8506 3.39844 44.3467 3.76172ZM40.7158 6.28125H35.7881C35.9131 6.59375 36.1338 6.8457 36.4502 7.03711C36.7705 7.22852 37.2021 7.32422 37.7451 7.32422C38.1904 7.32422 38.7822 7.22852 39.5205 7.03711C39.8252 6.95898 40.0361 6.91992 40.1533 6.91992C40.3135 6.91992 40.4482 6.97656 40.5576 7.08984C40.667 7.20312 40.7217 7.3457 40.7217 7.51758C40.7217 7.67383 40.6631 7.80664 40.5459 7.91602C40.3896 8.06055 40.0088 8.19922 39.4033 8.33203C38.7979 8.46094 38.2158 8.52539 37.6572 8.52539C36.6963 8.52539 35.9268 8.25391 35.3486 7.71094C34.7744 7.16797 34.4873 6.5 34.4873 5.70703C34.4873 4.86328 34.7979 4.17773 35.4189 3.65039C36.0439 3.11914 36.7627 2.85352 37.5752 2.85352C38.0635 2.85352 38.5107 2.93945 38.917 3.11133C39.3271 3.2832 39.6318 3.46875 39.8311 3.66797C40.1123 3.95703 40.3447 4.31445 40.5283 4.74023C40.6533 5.03711 40.7158 5.38086 40.7158 5.77148V6.28125ZM39.3857 5.08008C39.2021 4.73633 38.9619 4.48047 38.665 4.3125C38.3682 4.14062 38.0146 4.05469 37.6045 4.05469C37.1982 4.05469 36.8467 4.14062 36.5498 4.3125C36.2529 4.48047 36.0107 4.73633 35.8232 5.08008H39.3857ZM23.6621 3.01172V3.76172C24.166 3.39844 24.5625 3.15625 24.8516 3.03516C25.1445 2.91406 25.418 2.85352 25.6719 2.85352C26.0625 2.85352 26.4414 2.99805 26.8086 3.28711C27.0586 3.48242 27.1836 3.68164 27.1836 3.88477C27.1836 4.05664 27.123 4.20312 27.002 4.32422C26.8848 4.44141 26.7422 4.5 26.5742 4.5C26.4258 4.5 26.2695 4.42578 26.1055 4.27734C25.9414 4.12891 25.7949 4.05469 25.666 4.05469C25.498 4.05469 25.2461 4.16016 24.9102 4.37109C24.5781 4.58203 24.1621 4.89844 23.6621 5.32031V7.13086H25.373C25.6621 7.13086 25.8672 7.1875 25.9883 7.30078C26.1133 7.41016 26.1758 7.55469 26.1758 7.73438C26.1758 7.91016 26.1133 8.05469 25.9883 8.16797C25.8672 8.27734 25.6621 8.33203 25.373 8.33203H21.7461C21.457 8.33203 21.25 8.27734 21.125 8.16797C21.0039 8.05469 20.9434 7.9082 20.9434 7.72852C20.9434 7.55273 21.0039 7.41016 21.125 7.30078C21.25 7.1875 21.457 7.13086 21.7461 7.13086H22.4609V4.21289H22.0273C21.7383 4.21289 21.5312 4.1582 21.4062 4.04883C21.2852 3.93555 21.2246 3.78906 21.2246 3.60938C21.2246 3.43359 21.2852 3.29102 21.4062 3.18164C21.5312 3.06836 21.7383 3.01172 22.0273 3.01172H23.6621ZM19.5674 7.13086V3.01172H17.9326C17.6436 3.01172 17.4365 3.06836 17.3115 3.18164C17.1904 3.29102 17.1299 3.43359 17.1299 3.60938C17.1299 3.78906 17.1904 3.93555 17.3115 4.04883C17.4365 4.1582 17.6436 4.21289 17.9326 4.21289H18.3662V6.66211C17.9561 6.91211 17.6104 7.08594 17.3291 7.18359C17.0518 7.27734 16.792 7.32422 16.5498 7.32422C16.2959 7.32422 16.1064 7.26562 15.9814 7.14844C15.8604 7.02734 15.7998 6.83984 15.7998 6.58594V3.01172H14.3936C14.1045 3.01172 13.8975 3.06836 13.7725 3.18164C13.6514 3.29102 13.5908 3.43359 13.5908 3.60938C13.5908 3.78906 13.6514 3.93555 13.7725 4.04883C13.8975 4.1582 14.1045 4.21289 14.3936 4.21289H14.5986V6.79688C14.5986 7.11328 14.6592 7.37695 14.7803 7.58789C14.9482 7.88086 15.1768 8.11133 15.4658 8.2793C15.7549 8.44336 16.0967 8.52539 16.4912 8.52539C16.7725 8.52539 17.0693 8.48633 17.3818 8.4082C17.6943 8.33008 18.0225 8.21289 18.3662 8.05664V8.33203H19.5088C19.7979 8.33203 20.0029 8.27734 20.124 8.16797C20.249 8.05469 20.3115 7.91016 20.3115 7.73438C20.3115 7.55859 20.251 7.41406 20.1299 7.30078C20.0088 7.1875 19.8213 7.13086 19.5674 7.13086ZM13.2412 5.77148C13.2412 6.23242 13.1123 6.67969 12.8545 7.11328C12.6006 7.54297 12.2197 7.88672 11.7119 8.14453C11.208 8.39844 10.6807 8.52539 10.1299 8.52539C9.58301 8.52539 9.05957 8.40039 8.55957 8.15039C8.05957 7.89648 7.67871 7.55273 7.41699 7.11914C7.15527 6.68555 7.02441 6.23242 7.02441 5.75977C7.02441 5.2793 7.15723 4.80859 7.42285 4.34766C7.68848 3.88281 8.06934 3.51758 8.56543 3.25195C9.06543 2.98633 9.58691 2.85352 10.1299 2.85352C10.6768 2.85352 11.2021 2.99023 11.7061 3.26367C12.2139 3.5332 12.5967 3.89844 12.8545 4.35938C13.1123 4.81641 13.2412 5.28711 13.2412 5.77148ZM12.04 5.77734C12.04 5.39062 11.9014 5.03516 11.624 4.71094C11.2451 4.27344 10.7471 4.05469 10.1299 4.05469C9.58691 4.05469 9.13379 4.22852 8.77051 4.57617C8.40723 4.92383 8.22559 5.32617 8.22559 5.7832C8.22559 6.1582 8.40918 6.50977 8.77637 6.83789C9.14355 7.16211 9.59473 7.32422 10.1299 7.32422C10.6689 7.32422 11.1221 7.16211 11.4893 6.83789C11.8564 6.50977 12.04 6.15625 12.04 5.77734ZM5.34961 1.30664C5.26367 1.35742 5.18359 1.43359 5.10938 1.53516C4.84766 1.37109 4.56445 1.25 4.25977 1.17188C3.95898 1.08984 3.63477 1.04883 3.28711 1.04883C2.70898 1.04883 2.16211 1.19531 1.64648 1.48828C1.13086 1.78125 0.726562 2.19922 0.433594 2.74219C0.144531 3.28125 0 3.86328 0 4.48828V5.30273C0 5.90039 0.162109 6.45312 0.486328 6.96094C0.810547 7.46484 1.20312 7.83398 1.66406 8.06836C2.23438 8.36133 2.875 8.50781 3.58594 8.50781C4.19531 8.50781 4.75195 8.40234 5.25586 8.19141C5.63086 8.03516 5.9375 7.82031 6.17578 7.54688C6.33984 7.35938 6.42188 7.18359 6.42188 7.01953C6.42188 6.85547 6.36133 6.71289 6.24023 6.5918C6.11914 6.4707 5.97852 6.41016 5.81836 6.41016C5.72852 6.41016 5.64844 6.42969 5.57812 6.46875C5.50781 6.50391 5.41016 6.58398 5.28516 6.70898C5.08203 6.91602 4.89062 7.05469 4.71094 7.125C4.40234 7.24609 4.02539 7.30664 3.58008 7.30664C2.83398 7.30664 2.25 7.11328 1.82812 6.72656C1.41016 6.33984 1.20117 5.85742 1.20117 5.2793V4.5C1.20117 4.01562 1.31641 3.59766 1.54688 3.24609C1.77734 2.89453 2.04297 2.64062 2.34375 2.48438C2.64453 2.32812 2.97461 2.25 3.33398 2.25C3.62305 2.25 3.91016 2.30273 4.19531 2.4082C4.48438 2.51367 4.70898 2.6543 4.86914 2.83008C4.95117 2.91992 5.00586 3.04688 5.0332 3.21094C5.08008 3.45703 5.15234 3.625 5.25 3.71484C5.34766 3.80469 5.47656 3.84961 5.63672 3.84961C5.8125 3.84961 5.95508 3.78906 6.06445 3.66797C6.17773 3.54297 6.23438 3.33594 6.23438 3.04688V2.02734C6.23438 1.73828 6.17773 1.5332 6.06445 1.41211C5.95508 1.29102 5.8125 1.23047 5.63672 1.23047C5.53516 1.23047 5.43945 1.25586 5.34961 1.30664Z\",\n fill: \"#343C6A\"\n})));\nexport default SvgCouriernew;","var _path;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nconst SvgTrebuchetms = props => /*#__PURE__*/React.createElement(\"svg\", _extends({\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 70 10\"\n}, props), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M18.9922 8.88086L18.5996 9.44922H18.043V0.484375H19.1562V3.51953C19.2617 3.375 19.459 3.24219 19.748 3.12109C20.041 3 20.3281 2.93945 20.6094 2.93945C21.4688 2.93945 22.1641 3.23633 22.6953 3.83008C23.2305 4.42383 23.498 5.17383 23.498 6.08008C23.498 7.12695 23.2305 7.95117 22.6953 8.55273C22.1602 9.15039 21.4355 9.44922 20.5215 9.44922C20.2246 9.44922 19.9316 9.39453 19.6426 9.28516C19.3574 9.17188 19.1406 9.03711 18.9922 8.88086ZM19.1562 4.36914V7.99023C19.1562 8.05273 19.2949 8.15625 19.5723 8.30078C19.8496 8.44141 20.0605 8.51172 20.2051 8.51172C20.9629 8.51172 21.5059 8.33008 21.834 7.9668C22.1621 7.60352 22.3262 6.99414 22.3262 6.13867C22.3262 5.42773 22.1348 4.87305 21.752 4.47461C21.3691 4.07617 20.8535 3.87695 20.2051 3.87695C20.0684 3.87695 19.877 3.93555 19.6309 4.05273C19.3887 4.16992 19.2305 4.27539 19.1562 4.36914ZM40.1689 5.38867V9.33203H41.2822V5.38867C41.2822 4.63086 41.0928 4.0332 40.7139 3.5957C40.3389 3.1582 39.8193 2.93945 39.1553 2.93945C38.8037 2.93945 38.4619 3.01758 38.1299 3.17383C37.8018 3.32617 37.5635 3.51758 37.415 3.74805V0.484375H36.3018V9.33203H37.415V4.66797C37.5596 4.45703 37.7666 4.27344 38.0361 4.11719C38.3096 3.95703 38.5811 3.87695 38.8506 3.87695C39.2686 3.87695 39.5928 4.01172 39.8232 4.28125C40.0537 4.55078 40.1689 4.91992 40.1689 5.38867ZM64.4551 8.93945L64.8828 7.86133C65.1016 8.02148 65.373 8.15625 65.6973 8.26562C66.0254 8.37109 66.3184 8.42383 66.5762 8.42383C67.0332 8.42383 67.4004 8.29883 67.6777 8.04883C67.9551 7.79883 68.0938 7.48047 68.0938 7.09375C68.0938 6.80469 68.0156 6.53711 67.8594 6.29102C67.707 6.04102 67.3203 5.76953 66.6992 5.47656L66.0078 5.1543C65.4219 4.88086 65.0117 4.55664 64.7773 4.18164C64.5469 3.80664 64.4316 3.35547 64.4316 2.82812C64.4316 2.1875 64.6582 1.65625 65.1113 1.23438C65.5645 0.8125 66.1465 0.601562 66.8574 0.601562C67.8066 0.601562 68.4668 0.755859 68.8379 1.06445L68.4922 2.08398C68.3359 1.9707 68.0977 1.86133 67.7773 1.75586C67.457 1.65039 67.1602 1.59766 66.8867 1.59766C66.4883 1.59766 66.1738 1.71094 65.9434 1.9375C65.7168 2.16406 65.6035 2.45508 65.6035 2.81055C65.6035 3.0293 65.6445 3.22852 65.7266 3.4082C65.8086 3.58789 65.9219 3.73828 66.0664 3.85938C66.2148 3.98047 66.5156 4.15039 66.9688 4.36914L67.6719 4.70312C68.2578 4.98047 68.668 5.3125 68.9023 5.69922C69.1406 6.08203 69.2598 6.57031 69.2598 7.16406C69.2598 7.80859 69 8.35547 68.4805 8.80469C67.9648 9.25391 67.2734 9.47852 66.4062 9.47852C65.6445 9.47852 64.9941 9.29883 64.4551 8.93945ZM63.0967 9.33203L62.0771 3.81836L60.2021 9.44922H59.9092L57.9814 3.81836L56.9854 9.33203H55.8721L57.4775 0.748047H58.0107L60.0557 7.01172L61.9424 0.748047H62.4697L64.21 9.33203H63.0967ZM48.4629 3.93555H49.1895V7.49805C49.1895 8.06055 49.3594 8.52734 49.6992 8.89844C50.043 9.26562 50.4629 9.44922 50.959 9.44922C51.5098 9.44922 52.0156 9.39062 52.4766 9.27344L52.3125 8.29492C52.0078 8.43945 51.7129 8.51172 51.4277 8.51172C51.0332 8.51172 50.7461 8.40039 50.5664 8.17773C50.3906 7.95508 50.3027 7.58008 50.3027 7.05273V3.93555H52.0254V3.05664H50.3027V1.31641L49.1895 1.74414V3.05664H48.4629V3.93555ZM47.8379 6.30273H43.3145C43.3145 7.03711 43.5156 7.60156 43.918 7.99609C44.2734 8.33984 44.7305 8.51172 45.2891 8.51172C45.9258 8.51172 46.457 8.32617 46.8828 7.95508L47.3516 8.75781C47.1797 8.92969 46.916 9.07812 46.5605 9.20312C46.1152 9.36719 45.6191 9.44922 45.0723 9.44922C44.2832 9.44922 43.6133 9.18164 43.0625 8.64648C42.4492 8.05664 42.1426 7.26367 42.1426 6.26758C42.1426 5.23242 42.457 4.40234 43.0859 3.77734C43.6484 3.21875 44.3145 2.93945 45.084 2.93945C45.9785 2.93945 46.6797 3.19141 47.1875 3.69531C47.6797 4.17969 47.9258 4.82227 47.9258 5.62305C47.9258 5.86914 47.8965 6.0957 47.8379 6.30273ZM45.1367 3.87695C44.6406 3.87695 44.2246 4.03711 43.8887 4.35742C43.5684 4.66211 43.3867 5.04102 43.3438 5.49414H46.8184C46.8184 5.04492 46.6777 4.66992 46.3965 4.36914C46.0879 4.04102 45.668 3.87695 45.1367 3.87695ZM35.4072 3.56641L34.8564 4.35156C34.7432 4.23828 34.542 4.13086 34.2529 4.0293C33.9678 3.92773 33.6865 3.87695 33.4092 3.87695C32.8037 3.87695 32.3232 4.08984 31.9678 4.51562C31.6123 4.9375 31.4346 5.51758 31.4346 6.25586C31.4346 6.99023 31.6162 7.55078 31.9795 7.9375C32.3428 8.32031 32.8467 8.51172 33.4912 8.51172C33.9912 8.51172 34.4951 8.31836 35.0029 7.93164L35.4424 8.86914C34.8447 9.25586 34.1045 9.44922 33.2217 9.44922C32.3662 9.44922 31.6592 9.16211 31.1006 8.58789C30.542 8.01367 30.2627 7.23633 30.2627 6.25586C30.2627 5.25586 30.5518 4.45312 31.1299 3.84766C31.7119 3.24219 32.5068 2.93945 33.5146 2.93945C33.8389 2.93945 34.1904 3.00781 34.5693 3.14453C34.9482 3.28125 35.2275 3.42188 35.4072 3.56641ZM25.4766 7.05859V3.05664H24.3633V7.17578C24.3633 7.90234 24.5449 8.46289 24.9082 8.85742C25.2754 9.25195 25.8027 9.44922 26.4902 9.44922C26.8496 9.44922 27.2168 9.34766 27.5918 9.14453C27.9707 8.9375 28.2227 8.71094 28.3477 8.46484V9.33203H29.4609V3.05664H28.3477V7.46289C28.25 7.74023 28.0488 7.98438 27.7441 8.19531C27.4395 8.40625 27.1035 8.51172 26.7363 8.51172C25.8965 8.51172 25.4766 8.02734 25.4766 7.05859ZM12.5654 6.30273H17.0889C17.1475 6.0957 17.1768 5.86914 17.1768 5.62305C17.1768 4.82227 16.9307 4.17969 16.4385 3.69531C15.9307 3.19141 15.2295 2.93945 14.335 2.93945C13.5654 2.93945 12.8994 3.21875 12.3369 3.77734C11.708 4.40234 11.3936 5.23242 11.3936 6.26758C11.3936 7.26367 11.7002 8.05664 12.3135 8.64648C12.8643 9.18164 13.5342 9.44922 14.3232 9.44922C14.8701 9.44922 15.3662 9.36719 15.8115 9.20312C16.167 9.07812 16.4307 8.92969 16.6025 8.75781L16.1338 7.95508C15.708 8.32617 15.1768 8.51172 14.54 8.51172C13.9814 8.51172 13.5244 8.33984 13.1689 7.99609C12.7666 7.60156 12.5654 7.03711 12.5654 6.30273ZM13.1396 4.35742C13.4756 4.03711 13.8916 3.87695 14.3877 3.87695C14.9189 3.87695 15.3389 4.04102 15.6475 4.36914C15.9287 4.66992 16.0693 5.04492 16.0693 5.49414H12.5947C12.6377 5.04102 12.8193 4.66211 13.1396 4.35742ZM10.8623 4.12891C10.6201 3.96094 10.376 3.87695 10.1299 3.87695C9.73535 3.87695 9.38965 4.05859 9.09277 4.42188C8.7998 4.78516 8.65332 5.22266 8.65332 5.73438V9.33203H7.54004V3.05664H8.65332V4.05859C9.05957 3.3125 9.66309 2.93945 10.4639 2.93945C10.6631 2.93945 10.9502 2.97461 11.3252 3.04492L10.8623 4.12891ZM4.00781 9.33203V1.80273H6.86133V0.748047H0.105469V1.80273H2.83594V9.33203H4.00781Z\",\n fill: \"#343C6A\"\n})));\nexport default SvgTrebuchetms;","var _path;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nconst SvgLucidagrande = props => /*#__PURE__*/React.createElement(\"svg\", _extends({\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 78 10\"\n}, props), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M26.3438 8.13672V9.33203H27.5039V0.0800781H26.3438V3.69531C25.8477 3.11719 25.2227 2.82812 24.4688 2.82812C23.6562 2.82812 23 3.15039 22.5 3.79492C22.0039 4.43945 21.7559 5.29102 21.7559 6.34961C21.7559 7.31836 21.9746 8.08203 22.4121 8.64062C22.8535 9.19922 23.457 9.47852 24.2227 9.47852C25.168 9.47852 25.875 9.03125 26.3438 8.13672ZM24.6445 3.69531C25.1797 3.69531 25.7461 3.95898 26.3438 4.48633V7.41602C25.7305 8.11523 25.1035 8.46484 24.4629 8.46484C23.4785 8.46484 22.9863 7.7207 22.9863 6.23242C22.9863 4.54102 23.5391 3.69531 24.6445 3.69531ZM69.8164 8.13672V9.33203H70.9766V0.0800781H69.8164V3.69531C69.3203 3.11719 68.6953 2.82812 67.9414 2.82812C67.1289 2.82812 66.4727 3.15039 65.9727 3.79492C65.4766 4.43945 65.2285 5.29102 65.2285 6.34961C65.2285 7.31836 65.4473 8.08203 65.8848 8.64062C66.3262 9.19922 66.9297 9.47852 67.6953 9.47852C68.6406 9.47852 69.3477 9.03125 69.8164 8.13672ZM68.1172 3.69531C68.6523 3.69531 69.2188 3.95898 69.8164 4.48633V7.41602C69.2031 8.11523 68.5762 8.46484 67.9355 8.46484C66.9512 8.46484 66.459 7.7207 66.459 6.23242C66.459 4.54102 67.0117 3.69531 68.1172 3.69531ZM75.6562 9.47852C76.207 9.47852 76.8691 9.36133 77.6426 9.12695V8.21289C76.9434 8.4707 76.3535 8.59961 75.873 8.59961C74.5605 8.59961 73.8203 7.84375 73.6523 6.33203H77.666L77.6719 5.97461C77.6719 4.9668 77.4609 4.18945 77.0391 3.64258C76.6211 3.0957 76.0273 2.82227 75.2578 2.82227C74.4453 2.82227 73.7773 3.13086 73.2539 3.74805C72.7344 4.36523 72.4746 5.15625 72.4746 6.12109C72.4746 7.11328 72.7695 7.92188 73.3594 8.54688C73.9531 9.16797 74.7188 9.47852 75.6562 9.47852ZM76.5117 5.46484H73.7051C73.8066 4.28125 74.3008 3.68945 75.1875 3.68945C76.0703 3.68945 76.5117 4.28125 76.5117 5.46484ZM58.5908 9.33203V2.96875H59.7451V4.16406C60.3545 3.27344 61.1006 2.82812 61.9834 2.82812C62.5342 2.82812 62.9736 3.00391 63.3018 3.35547C63.6299 3.70312 63.7939 4.17188 63.7939 4.76172V9.33203H62.6396V5.13672C62.6396 4.66406 62.5693 4.32812 62.4287 4.12891C62.292 3.92578 62.0635 3.82422 61.7432 3.82422C61.0361 3.82422 60.3701 4.28711 59.7451 5.21289V9.33203H58.5908ZM53.5537 9.47852C54.1943 9.47852 54.8604 9.16016 55.5518 8.52344C55.7002 9.16016 56.0439 9.47852 56.583 9.47852C56.8994 9.47852 57.1885 9.41602 57.4502 9.29102L57.3682 8.65234C57.2705 8.66797 57.1963 8.67578 57.1455 8.67578C56.7393 8.67578 56.5361 8.3457 56.5361 7.68555V4.80273C56.5361 4.12695 56.3662 3.62891 56.0264 3.30859C55.6904 2.98828 55.167 2.82812 54.4561 2.82812C53.7764 2.82812 53.0479 2.98633 52.2705 3.30273V4.25781C52.9775 3.88281 53.6357 3.69531 54.2451 3.69531C55.0029 3.69531 55.3818 4.06445 55.3818 4.80273V5.57031H55.1064C54.0166 5.57031 53.1787 5.75781 52.5928 6.13281C52.0107 6.50391 51.7197 7.03711 51.7197 7.73242C51.7197 8.23633 51.8936 8.6543 52.2412 8.98633C52.5889 9.31445 53.0264 9.47852 53.5537 9.47852ZM55.3818 6.25V7.89648C54.8623 8.32227 54.3623 8.53516 53.8818 8.53516C53.6006 8.53516 53.3623 8.43945 53.167 8.24805C52.9717 8.05664 52.874 7.82227 52.874 7.54492C52.874 7.1543 53.0693 6.83984 53.46 6.60156C53.8506 6.35938 54.3623 6.23828 54.9951 6.23828L55.3818 6.25ZM47.6719 9.33203V2.96875H48.8262V4.16406C49.2832 3.27344 49.9473 2.82812 50.8184 2.82812C50.9355 2.82812 51.0586 2.83789 51.1875 2.85742V3.93555C50.9883 3.86914 50.8125 3.83594 50.6602 3.83594C49.9297 3.83594 49.3184 4.26953 48.8262 5.13672V9.33203H47.6719ZM43.0449 9.54883C43.8262 9.54883 44.7422 9.39844 45.793 9.09766V5.58789H44.5684V8.41211C44.0918 8.55664 43.6484 8.62891 43.2383 8.62891C42.2383 8.62891 41.4609 8.3125 40.9062 7.67969C40.3516 7.04297 40.0742 6.15234 40.0742 5.00781C40.0742 3.85156 40.332 2.95508 40.8477 2.31836C41.3672 1.68164 42.0957 1.36328 43.0332 1.36328C43.6699 1.36328 44.5859 1.56641 45.7812 1.97266V0.835938C44.8281 0.574219 43.9102 0.443359 43.0273 0.443359C41.6797 0.443359 40.6328 0.84375 39.8867 1.64453C39.1406 2.44141 38.7676 3.55859 38.7676 4.99609C38.7676 6.46094 39.1348 7.58594 39.8691 8.37109C40.6074 9.15625 41.666 9.54883 43.0449 9.54883ZM32.7881 8.52344C32.0967 9.16016 31.4307 9.47852 30.79 9.47852C30.2627 9.47852 29.8252 9.31445 29.4775 8.98633C29.1299 8.6543 28.9561 8.23633 28.9561 7.73242C28.9561 7.03711 29.2471 6.50391 29.8291 6.13281C30.415 5.75781 31.2529 5.57031 32.3428 5.57031H32.6182V4.80273C32.6182 4.06445 32.2393 3.69531 31.4814 3.69531C30.8721 3.69531 30.2139 3.88281 29.5068 4.25781V3.30273C30.2842 2.98633 31.0127 2.82812 31.6924 2.82812C32.4033 2.82812 32.9268 2.98828 33.2627 3.30859C33.6025 3.62891 33.7725 4.12695 33.7725 4.80273V7.68555C33.7725 8.3457 33.9756 8.67578 34.3818 8.67578C34.4326 8.67578 34.5068 8.66797 34.6045 8.65234L34.6865 9.29102C34.4248 9.41602 34.1357 9.47852 33.8193 9.47852C33.2803 9.47852 32.9365 9.16016 32.7881 8.52344ZM32.6182 7.89648V6.25L32.2314 6.23828C31.5986 6.23828 31.0869 6.35938 30.6963 6.60156C30.3057 6.83984 30.1104 7.1543 30.1104 7.54492C30.1104 7.82227 30.208 8.05664 30.4033 8.24805C30.5986 8.43945 30.8369 8.53516 31.1182 8.53516C31.5986 8.53516 32.0986 8.32227 32.6182 7.89648ZM19.1035 9.33203V2.96875H20.2578V9.33203H19.1035ZM19.1035 1.81445V0.660156H20.2578V1.81445H19.1035ZM13.6084 8.52344C14.1748 9.16016 14.8877 9.47852 15.7471 9.47852C16.29 9.47852 16.9346 9.36523 17.6807 9.13867V8.14258C17.1221 8.41211 16.5791 8.54688 16.0518 8.54688C15.458 8.54688 14.9775 8.32617 14.6104 7.88477C14.2432 7.44336 14.0596 6.86523 14.0596 6.15039C14.0596 5.41211 14.2373 4.82227 14.5928 4.38086C14.9521 3.93555 15.4268 3.71289 16.0166 3.71289C16.4268 3.71289 16.958 3.80859 17.6104 4V3.0332C16.9971 2.89648 16.4424 2.82812 15.9463 2.82812C14.9424 2.82812 14.1592 3.11719 13.5967 3.69531C13.0381 4.27344 12.7588 5.08008 12.7588 6.11523C12.7588 7.08398 13.042 7.88672 13.6084 8.52344ZM10.1006 9.33203V8.13672C9.4873 9.03125 8.74316 9.47852 7.86816 9.47852C7.31348 9.47852 6.87207 9.30469 6.54395 8.95703C6.21582 8.60547 6.05176 8.13281 6.05176 7.53906V2.96875H7.20605V7.16406C7.20605 7.64062 7.27441 7.98047 7.41113 8.18359C7.55176 8.38281 7.78418 8.48242 8.1084 8.48242C8.81152 8.48242 9.47559 8.01953 10.1006 7.09375V2.96875H11.2549V9.33203H10.1006ZM0 0.660156V9.33203H5.13281V8.41211H1.23047V0.660156H0Z\",\n fill: \"#343C6A\"\n})));\nexport default SvgLucidagrande;","var _path;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nconst SvgTimesnewroman = props => /*#__PURE__*/React.createElement(\"svg\", _extends({\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 89 9\"\n}, props), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M8.40137 0C8.56543 0 8.7041 0.0585938 8.81738 0.175781C8.93457 0.289062 8.99316 0.427734 8.99316 0.591797C8.99316 0.755859 8.93457 0.896484 8.81738 1.01367C8.7041 1.13086 8.56543 1.18945 8.40137 1.18945C8.2373 1.18945 8.09668 1.13086 7.97949 1.01367C7.8623 0.896484 7.80371 0.755859 7.80371 0.591797C7.80371 0.427734 7.86035 0.289062 7.97363 0.175781C8.09082 0.0585938 8.2334 0 8.40137 0ZM8.8877 2.80664V7.11914C8.8877 7.45508 8.91113 7.67969 8.95801 7.79297C9.00879 7.90234 9.08105 7.98438 9.1748 8.03906C9.27246 8.09375 9.44824 8.12109 9.70215 8.12109V8.33203H7.09473V8.12109C7.35645 8.12109 7.53223 8.0957 7.62207 8.04492C7.71191 7.99414 7.78223 7.91016 7.83301 7.79297C7.88769 7.67578 7.91504 7.45117 7.91504 7.11914V5.05078C7.91504 4.46875 7.89746 4.0918 7.8623 3.91992C7.83496 3.79492 7.79199 3.70898 7.7334 3.66211C7.6748 3.61133 7.59473 3.58594 7.49316 3.58594C7.38379 3.58594 7.25098 3.61523 7.09473 3.67383L7.0127 3.46289L8.62988 2.80664H8.8877ZM30.6299 0.386719H32.7861L37.6436 6.3457V1.76367C37.6436 1.27539 37.5889 0.970703 37.4795 0.849609C37.335 0.685547 37.1064 0.603516 36.7939 0.603516H36.5186V0.386719H39.2842V0.603516H39.0029C38.667 0.603516 38.4287 0.705078 38.2881 0.908203C38.2021 1.0332 38.1592 1.31836 38.1592 1.76367V8.46094H37.9482L32.71 2.0625V6.95508C32.71 7.44336 32.7627 7.74805 32.8682 7.86914C33.0166 8.0332 33.2451 8.11523 33.5537 8.11523H33.835V8.33203H31.0693V8.11523H31.3447C31.6846 8.11523 31.9248 8.01367 32.0654 7.81055C32.1514 7.68555 32.1943 7.40039 32.1943 6.95508V1.42969C31.9639 1.16016 31.7881 0.982422 31.667 0.896484C31.5498 0.810547 31.376 0.730469 31.1455 0.65625C31.0322 0.621094 30.8604 0.603516 30.6299 0.603516V0.386719ZM61.2041 8.33203H63.3252V8.11523C62.8916 8.06836 62.54 7.95898 62.2705 7.78711C62.001 7.61523 61.6787 7.26758 61.3037 6.74414L59.6631 4.46484C60.3311 4.31641 60.8232 4.0625 61.1396 3.70312C61.46 3.34375 61.6201 2.91992 61.6201 2.43164C61.6201 1.97461 61.4795 1.58203 61.1982 1.25391C60.9209 0.921875 60.5811 0.695312 60.1787 0.574219C59.7803 0.449219 59.1592 0.386719 58.3154 0.386719H55.4209V0.603516H55.7197C56.0205 0.603516 56.2471 0.689453 56.3994 0.861328C56.5088 0.982422 56.5635 1.29297 56.5635 1.79297V6.92578C56.5635 7.37891 56.5225 7.66602 56.4404 7.78711C56.2959 8.00586 56.0557 8.11523 55.7197 8.11523H55.4209V8.33203H58.8252V8.11523H58.5146C58.2178 8.11523 57.9951 8.0293 57.8467 7.85742C57.7373 7.73633 57.6826 7.42578 57.6826 6.92578V4.61719C57.7451 4.62109 57.8057 4.625 57.8643 4.62891H58.0283C58.1533 4.62891 58.3154 4.625 58.5146 4.61719L61.2041 8.33203ZM57.876 4.25391C57.8213 4.25 57.7568 4.24805 57.6826 4.24805V0.943359C58.0693 0.869141 58.376 0.832031 58.6025 0.832031C59.1143 0.832031 59.5244 0.988281 59.833 1.30078C60.1455 1.60938 60.3018 2.01172 60.3018 2.50781C60.3018 3.01562 60.1084 3.43359 59.7217 3.76172C59.3389 4.08984 58.7686 4.25391 58.0107 4.25391H57.876ZM65.9082 2.80664C66.7207 2.80664 67.373 3.11523 67.8652 3.73242C68.2832 4.25977 68.4922 4.86523 68.4922 5.54883C68.4922 6.0293 68.377 6.51562 68.1465 7.00781C67.916 7.5 67.5977 7.87109 67.1914 8.12109C66.7891 8.37109 66.3398 8.49609 65.8438 8.49609C65.0352 8.49609 64.3926 8.17383 63.916 7.5293C63.5137 6.98633 63.3125 6.37695 63.3125 5.70117C63.3125 5.20898 63.4336 4.7207 63.6758 4.23633C63.9219 3.74805 64.2441 3.38867 64.6426 3.1582C65.041 2.92383 65.4629 2.80664 65.9082 2.80664ZM65.7266 3.1875C65.5195 3.1875 65.3105 3.25 65.0996 3.375C64.8926 3.49609 64.7246 3.71094 64.5957 4.01953C64.4668 4.32812 64.4023 4.72461 64.4023 5.20898C64.4023 5.99023 64.5566 6.66406 64.8652 7.23047C65.1777 7.79688 65.5879 8.08008 66.0957 8.08008C66.4746 8.08008 66.7871 7.92383 67.0332 7.61133C67.2793 7.29883 67.4023 6.76172 67.4023 6C67.4023 5.04688 67.1973 4.29688 66.7871 3.75C66.5098 3.375 66.1562 3.1875 65.7266 3.1875ZM71.2559 3.27539C71.1855 3.33398 70.9551 3.55859 70.5645 3.94922V2.80664H70.3125L68.6953 3.46289L68.7832 3.67383C68.9355 3.61523 69.0664 3.58594 69.1758 3.58594C69.2773 3.58594 69.3574 3.61133 69.416 3.66211C69.4746 3.70898 69.5176 3.79688 69.5449 3.92578C69.5801 4.09766 69.5977 4.47852 69.5977 5.06836V7.11914C69.5977 7.45117 69.5723 7.67578 69.5215 7.79297C69.4707 7.90625 69.3965 7.99023 69.2988 8.04492C69.2012 8.0957 69.0293 8.12109 68.7832 8.12109V8.33203H71.4375V8.12109C71.1445 8.12109 70.9492 8.0957 70.8516 8.04492C70.7578 7.99023 70.6855 7.91016 70.6348 7.80469C70.5879 7.69922 70.5645 7.4707 70.5645 7.11914V4.24219C70.7402 4.02734 70.9902 3.83398 71.3145 3.66211C71.5215 3.54883 71.7305 3.49219 71.9414 3.49219C72.25 3.49219 72.4902 3.61719 72.6621 3.86719C72.791 4.05859 72.8555 4.37305 72.8555 4.81055V7.11914C72.8555 7.43945 72.8457 7.63281 72.8262 7.69922C72.7832 7.83984 72.7051 7.94531 72.5918 8.01562C72.4824 8.08594 72.2793 8.12109 71.9824 8.12109V8.33203H74.6953V8.12109C74.4219 8.12109 74.2285 8.0918 74.1152 8.0332C74.002 7.9707 73.9238 7.89453 73.8809 7.80469C73.8418 7.71484 73.8223 7.48633 73.8223 7.11914V4.55859L73.8105 4.30664L73.8223 4.24219C74.1191 3.96094 74.3711 3.76953 74.5781 3.66797C74.7891 3.5625 74.998 3.50977 75.2051 3.50977C75.541 3.50977 75.7852 3.63477 75.9375 3.88477C76.043 4.06445 76.0957 4.37305 76.0957 4.81055V7.11914C76.0957 7.43164 76.0879 7.62109 76.0723 7.6875C76.0332 7.82422 75.9688 7.92383 75.8789 7.98633C75.75 8.07617 75.5703 8.12109 75.3398 8.12109H75.2285V8.33203H77.877V8.12109C77.6387 8.12109 77.4668 8.0918 77.3613 8.0332C77.2559 7.9707 77.1836 7.89648 77.1445 7.81055C77.0938 7.68555 77.0684 7.45508 77.0684 7.11914V4.81055C77.0684 4.32617 77.0254 3.9707 76.9395 3.74414C76.8105 3.41211 76.6348 3.17383 76.4121 3.0293C76.1934 2.88086 75.9414 2.80664 75.6562 2.80664C75.3633 2.80664 75.0781 2.88086 74.8008 3.0293C74.5234 3.17383 74.1836 3.48047 73.7812 3.94922C73.6992 3.57812 73.5371 3.29492 73.2949 3.09961C73.0527 2.9043 72.7637 2.80664 72.4277 2.80664C72.2285 2.80664 72.0273 2.84766 71.8242 2.92969C71.6211 3.01172 71.4316 3.12695 71.2559 3.27539ZM81.04 7.55859C80.4893 7.98438 80.1436 8.23047 80.0029 8.29688C79.792 8.39453 79.5674 8.44336 79.3291 8.44336C78.958 8.44336 78.6514 8.31641 78.4092 8.0625C78.1709 7.80859 78.0518 7.47461 78.0518 7.06055C78.0518 6.79883 78.1104 6.57227 78.2275 6.38086C78.3877 6.11523 78.665 5.86523 79.0596 5.63086C79.458 5.39648 80.1182 5.11133 81.04 4.77539V4.56445C81.04 4.0293 80.9541 3.66211 80.7822 3.46289C80.6143 3.26367 80.3682 3.16406 80.0439 3.16406C79.7979 3.16406 79.6025 3.23047 79.458 3.36328C79.3096 3.49609 79.2354 3.64844 79.2354 3.82031L79.2471 4.16016C79.2471 4.33984 79.2002 4.47852 79.1064 4.57617C79.0166 4.67383 78.8975 4.72266 78.749 4.72266C78.6045 4.72266 78.4854 4.67188 78.3916 4.57031C78.3018 4.46875 78.2568 4.33008 78.2568 4.1543C78.2568 3.81836 78.4287 3.50977 78.7725 3.22852C79.1162 2.94727 79.5986 2.80664 80.2197 2.80664C80.6963 2.80664 81.0869 2.88672 81.3916 3.04688C81.6221 3.16797 81.792 3.35742 81.9014 3.61523C81.9717 3.7832 82.0068 4.12695 82.0068 4.64648V6.46875C82.0068 6.98047 82.0166 7.29492 82.0361 7.41211C82.0557 7.52539 82.0869 7.60156 82.1299 7.64062C82.1768 7.67969 82.2295 7.69922 82.2881 7.69922C82.3506 7.69922 82.4053 7.68555 82.4521 7.6582C82.5342 7.60742 82.6924 7.46484 82.9268 7.23047V7.55859C82.4893 8.14453 82.0713 8.4375 81.6729 8.4375C81.4814 8.4375 81.3291 8.37109 81.2158 8.23828C81.1025 8.10547 81.0439 7.87891 81.04 7.55859ZM81.04 7.17773V5.13281C80.4502 5.36719 80.0693 5.5332 79.8975 5.63086C79.5889 5.80273 79.3682 5.98242 79.2354 6.16992C79.1025 6.35742 79.0361 6.5625 79.0361 6.78516C79.0361 7.06641 79.1201 7.30078 79.2881 7.48828C79.4561 7.67188 79.6494 7.76367 79.8682 7.76367C80.165 7.76367 80.5557 7.56836 81.04 7.17773ZM84.583 3.94336C85.2119 3.18555 85.8115 2.80664 86.3818 2.80664C86.6748 2.80664 86.9268 2.88086 87.1377 3.0293C87.3486 3.17383 87.5166 3.41406 87.6416 3.75C87.7275 3.98438 87.7705 4.34375 87.7705 4.82812V7.11914C87.7705 7.45898 87.7979 7.68945 87.8525 7.81055C87.8955 7.9082 87.9639 7.98438 88.0576 8.03906C88.1553 8.09375 88.333 8.12109 88.5908 8.12109V8.33203H85.9365V8.12109H86.0479C86.2979 8.12109 86.4717 8.08398 86.5693 8.00977C86.6709 7.93164 86.7412 7.81836 86.7803 7.66992C86.7959 7.61133 86.8037 7.42773 86.8037 7.11914V4.92188C86.8037 4.43359 86.7393 4.08008 86.6104 3.86133C86.4854 3.63867 86.2725 3.52734 85.9717 3.52734C85.5068 3.52734 85.0439 3.78125 84.583 4.28906V7.11914C84.583 7.48242 84.6045 7.70703 84.6475 7.79297C84.7021 7.90625 84.7764 7.99023 84.8701 8.04492C84.9678 8.0957 85.1631 8.12109 85.4561 8.12109V8.33203H82.8018V8.12109H82.9189C83.1924 8.12109 83.376 8.05273 83.4697 7.91602C83.5674 7.77539 83.6162 7.50977 83.6162 7.11914V5.12695C83.6162 4.48242 83.6006 4.08984 83.5693 3.94922C83.542 3.80859 83.4971 3.71289 83.4346 3.66211C83.376 3.61133 83.2959 3.58594 83.1943 3.58594C83.085 3.58594 82.9541 3.61523 82.8018 3.67383L82.7139 3.46289L84.3311 2.80664H84.583V3.94336ZM44.2441 2.96484H46.4941V3.18164C46.2871 3.19727 46.1504 3.23438 46.084 3.29297C46.0215 3.35156 45.9902 3.43555 45.9902 3.54492C45.9902 3.66602 46.0234 3.8125 46.0898 3.98438L47.2383 7.07227L48.3926 4.55859L48.0879 3.76758C47.9941 3.5332 47.8711 3.37109 47.7188 3.28125C47.6328 3.22656 47.4727 3.19336 47.2383 3.18164V2.96484H49.793V3.18164C49.5117 3.19336 49.3125 3.24414 49.1953 3.33398C49.1172 3.39648 49.0781 3.49609 49.0781 3.63281C49.0781 3.71094 49.0938 3.79102 49.125 3.87305L50.3438 6.95508L51.4746 3.98438C51.5527 3.77344 51.5918 3.60547 51.5918 3.48047C51.5918 3.40625 51.5527 3.33984 51.4746 3.28125C51.4004 3.22266 51.252 3.18945 51.0293 3.18164V2.96484H52.7227V3.18164C52.3828 3.23242 52.1328 3.46289 51.9727 3.87305L50.1797 8.49609H49.9395L48.5977 5.06836L47.0332 8.49609H46.8164L45.0938 3.98438C44.9805 3.69922 44.8691 3.50781 44.7598 3.41016C44.6504 3.30859 44.4785 3.23242 44.2441 3.18164V2.96484ZM41.0059 6.86133C40.6152 6.4082 40.4219 5.7832 40.4258 4.98633H44.1348C44.1348 4.32227 43.9414 3.79297 43.5547 3.39844C43.168 3 42.6738 2.80078 42.0723 2.80078C41.3613 2.80078 40.7695 3.05859 40.2969 3.57422C39.8281 4.08594 39.5938 4.80078 39.5938 5.71875C39.5938 6.56641 39.8223 7.24219 40.2793 7.74609C40.7402 8.24609 41.293 8.49609 41.9375 8.49609C42.5312 8.49609 43.0254 8.27734 43.4199 7.83984C43.8145 7.39844 44.0527 6.91016 44.1348 6.375L43.9531 6.25781C43.7773 6.72656 43.5586 7.05859 43.2969 7.25391C43.0391 7.44531 42.7344 7.54102 42.3828 7.54102C41.8555 7.54102 41.3965 7.31445 41.0059 6.86133ZM42.9102 4.64648H40.4258C40.4688 4.19727 40.6172 3.84766 40.8711 3.59766C41.1289 3.34375 41.4199 3.2168 41.7441 3.2168C41.9551 3.2168 42.1562 3.2793 42.3477 3.4043C42.543 3.5293 42.6895 3.70117 42.7871 3.91992C42.8496 4.06055 42.8906 4.30273 42.9102 4.64648ZM27.5801 4.63477V2.80664H27.3867C27.3398 2.90039 27.2988 2.96094 27.2637 2.98828C27.2285 3.01562 27.1797 3.0293 27.1172 3.0293C27.0508 3.0293 26.918 3 26.7188 2.94141C26.418 2.85156 26.1621 2.80664 25.9512 2.80664C25.4707 2.80664 25.0781 2.95508 24.7734 3.25195C24.4727 3.54883 24.3223 3.91797 24.3223 4.35938C24.3223 4.69922 24.4102 4.98047 24.5859 5.20312C24.7617 5.42969 25.1328 5.68359 25.6992 5.96484C26.2656 6.24609 26.6426 6.47852 26.8301 6.66211C27.0215 6.8457 27.1172 7.07227 27.1172 7.3418C27.1172 7.56445 27.0312 7.75586 26.8594 7.91602C26.6914 8.07227 26.4727 8.15039 26.2031 8.15039C25.8203 8.15039 25.4746 8.01172 25.166 7.73438C24.8574 7.45703 24.6484 7.04492 24.5391 6.49805H24.3457V8.41406H24.5391C24.5898 8.3125 24.6602 8.26172 24.75 8.26172C24.832 8.26172 24.9375 8.28125 25.0664 8.32031C25.4883 8.4375 25.8633 8.49609 26.1914 8.49609C26.6484 8.49609 27.0605 8.34766 27.4277 8.05078C27.7988 7.75 27.9844 7.35547 27.9844 6.86719C27.9844 6.23438 27.5879 5.72461 26.7949 5.33789L25.9395 4.92188C25.5684 4.74219 25.3223 4.57227 25.2012 4.41211C25.0762 4.25586 25.0137 4.06836 25.0137 3.84961C25.0137 3.67383 25.0977 3.51367 25.2656 3.36914C25.4336 3.22461 25.6543 3.15234 25.9277 3.15234C26.2871 3.15234 26.582 3.25586 26.8125 3.46289C27.0469 3.66992 27.2383 4.06055 27.3867 4.63477H27.5801ZM19.9941 4.98633C19.9902 5.7832 20.1836 6.4082 20.5742 6.86133C20.9648 7.31445 21.4238 7.54102 21.9512 7.54102C22.3027 7.54102 22.6074 7.44531 22.8652 7.25391C23.127 7.05859 23.3457 6.72656 23.5215 6.25781L23.7031 6.375C23.6211 6.91016 23.3828 7.39844 22.9883 7.83984C22.5938 8.27734 22.0996 8.49609 21.5059 8.49609C20.8613 8.49609 20.3086 8.24609 19.8477 7.74609C19.3906 7.24219 19.1621 6.56641 19.1621 5.71875C19.1621 4.80078 19.3965 4.08594 19.8652 3.57422C20.3379 3.05859 20.9297 2.80078 21.6406 2.80078C22.2422 2.80078 22.7363 3 23.123 3.39844C23.5098 3.79297 23.7031 4.32227 23.7031 4.98633H19.9941ZM19.9941 4.64648H22.4785C22.459 4.30273 22.418 4.06055 22.3555 3.91992C22.2578 3.70117 22.1113 3.5293 21.916 3.4043C21.7246 3.2793 21.5234 3.2168 21.3125 3.2168C20.9883 3.2168 20.6973 3.34375 20.4395 3.59766C20.1855 3.84766 20.0371 4.19727 19.9941 4.64648ZM12.3486 3.27539C12.2783 3.33398 12.0479 3.55859 11.6572 3.94922V2.80664H11.4053L9.78809 3.46289L9.87598 3.67383C10.0283 3.61523 10.1592 3.58594 10.2686 3.58594C10.3701 3.58594 10.4502 3.61133 10.5088 3.66211C10.5674 3.70898 10.6104 3.79688 10.6377 3.92578C10.6729 4.09766 10.6904 4.47852 10.6904 5.06836V7.11914C10.6904 7.45117 10.665 7.67578 10.6143 7.79297C10.5635 7.90625 10.4893 7.99023 10.3916 8.04492C10.2939 8.0957 10.1221 8.12109 9.87598 8.12109V8.33203H12.5303V8.12109C12.2373 8.12109 12.042 8.0957 11.9443 8.04492C11.8506 7.99023 11.7783 7.91016 11.7275 7.80469C11.6807 7.69922 11.6572 7.4707 11.6572 7.11914V4.24219C11.833 4.02734 12.083 3.83398 12.4072 3.66211C12.6143 3.54883 12.8232 3.49219 13.0342 3.49219C13.3428 3.49219 13.583 3.61719 13.7549 3.86719C13.8838 4.05859 13.9482 4.37305 13.9482 4.81055V7.11914C13.9482 7.43945 13.9385 7.63281 13.9189 7.69922C13.876 7.83984 13.7979 7.94531 13.6846 8.01562C13.5752 8.08594 13.3721 8.12109 13.0752 8.12109V8.33203H15.7881V8.12109C15.5146 8.12109 15.3213 8.0918 15.208 8.0332C15.0947 7.9707 15.0166 7.89453 14.9736 7.80469C14.9346 7.71484 14.915 7.48633 14.915 7.11914V4.55859L14.9033 4.30664L14.915 4.24219C15.2119 3.96094 15.4639 3.76953 15.6709 3.66797C15.8818 3.5625 16.0908 3.50977 16.2979 3.50977C16.6338 3.50977 16.8779 3.63477 17.0303 3.88477C17.1357 4.06445 17.1885 4.37305 17.1885 4.81055V7.11914C17.1885 7.43164 17.1807 7.62109 17.165 7.6875C17.126 7.82422 17.0615 7.92383 16.9717 7.98633C16.8428 8.07617 16.6631 8.12109 16.4326 8.12109H16.3213V8.33203H18.9697V8.12109C18.7314 8.12109 18.5596 8.0918 18.4541 8.0332C18.3486 7.9707 18.2764 7.89648 18.2373 7.81055C18.1865 7.68555 18.1611 7.45508 18.1611 7.11914V4.81055C18.1611 4.32617 18.1182 3.9707 18.0322 3.74414C17.9033 3.41211 17.7275 3.17383 17.5049 3.0293C17.2861 2.88086 17.0342 2.80664 16.749 2.80664C16.4561 2.80664 16.1709 2.88086 15.8936 3.0293C15.6162 3.17383 15.2764 3.48047 14.874 3.94922C14.792 3.57812 14.6299 3.29492 14.3877 3.09961C14.1455 2.9043 13.8564 2.80664 13.5205 2.80664C13.3213 2.80664 13.1201 2.84766 12.917 2.92969C12.7139 3.01172 12.5244 3.12695 12.3486 3.27539ZM6.66797 2.25L6.58008 0.386719H0.09375L0 2.25H0.222656C0.25 1.89062 0.335938 1.60547 0.480469 1.39453C0.625 1.18359 0.798828 1.04102 1.00195 0.966797C1.1582 0.912109 1.42188 0.884766 1.79297 0.884766H2.74805V6.95508C2.74805 7.40039 2.70508 7.68555 2.61914 7.81055C2.47852 8.01367 2.24023 8.11523 1.9043 8.11523H1.62305V8.33203H4.99219V8.11523H4.7168C4.4082 8.11523 4.17969 8.0332 4.03125 7.86914C3.92578 7.74805 3.87305 7.44336 3.87305 6.95508V0.884766H4.99219C5.32031 0.884766 5.58398 0.939453 5.7832 1.04883C5.98633 1.1543 6.14844 1.32031 6.26953 1.54688C6.34375 1.6875 6.40234 1.92188 6.44531 2.25H6.66797Z\",\n fill: \"#343C6A\"\n})));\nexport default SvgTimesnewroman;","\n \n\n","\n \n\n","\n \n\n","\n \n\n","\n \n\n","\n \n\n","\n \n\n","var _path;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nconst SvgInformationIcon = props => /*#__PURE__*/React.createElement(\"svg\", _extends({\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 16 16\"\n}, props), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M15.3337 7.99935C15.3337 12.0494 12.0504 15.3327 8.00033 15.3327C3.95024 15.3327 0.666992 12.0494 0.666992 7.99935C0.666992 3.94926 3.95024 0.666016 8.00033 0.666016C12.0504 0.666016 15.3337 3.94926 15.3337 7.99935ZM8.00028 9.99935C7.63209 9.99935 7.33362 9.70087 7.33362 9.33268V4.66602C7.33362 4.29783 7.63209 3.99935 8.00029 3.99935C8.36847 3.99935 8.66695 4.29783 8.66695 4.66602V9.33268C8.66695 9.70087 8.36847 9.99935 8.00028 9.99935ZM8.00033 10.666C7.63214 10.666 7.33366 10.9645 7.33366 11.3327C7.33366 11.7009 7.63213 11.9993 8.00033 11.9993C8.36852 11.9993 8.66699 11.7009 8.66699 11.3327C8.66699 10.9645 8.36852 10.666 8.00033 10.666Z\",\n fill: \"currentColor\"\n})));\nexport default SvgInformationIcon;","\n \n\n","\n \n\n","\n \n\n","var _path, _g, _g2, _path2, _defs;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nconst SvgVisual = props => /*#__PURE__*/React.createElement(\"svg\", _extends({\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 254 176\"\n}, props), /*#__PURE__*/React.createElement(\"g\", {\n clipPath: \"url(#clip0_787_26951)\"\n}, /*#__PURE__*/React.createElement(\"mask\", {\n id: \"mask0_787_26951\",\n style: {\n maskType: \"luminance\"\n },\n maskUnits: \"userSpaceOnUse\",\n x: 0,\n y: 0,\n width: 254,\n height: 192\n}, _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M254 0H0V192H254V0Z\",\n fill: \"white\"\n}))), _g || (_g = /*#__PURE__*/React.createElement(\"g\", {\n mask: \"url(#mask0_787_26951)\"\n}, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M0 4.21429C0 1.88681 1.79086 0 4 0H250C252.209 0 254 1.8868 254 4.21429V177H0V4.21429Z\",\n fill: \"#F3F3FE\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M0 4C0 1.79086 1.79086 0 4 0H250C252.209 0 254 1.79086 254 4V40H0V4Z\",\n fill: \"#0A1551\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M17.8496 12.1722L12 27.9135H16.4732L17.2474 25.6772H20.6882V27.9135H25.0752V12.1722H17.8496ZM20.6023 21.1183H18.7957L20.6023 17.3333V21.1183ZM38.0641 12H31.0965C28.7736 12 27.9997 15.0108 27.9997 15.0108L26.3654 24.387C26.3654 24.387 25.7631 27.9138 28.7739 27.9138H35.3115L35.9997 23.2689H32.4729C32.4729 23.2689 30.9245 23.6131 31.1827 21.8925C31.2687 21.6343 31.8709 18.1935 31.8709 18.1935C31.8709 18.1935 32.0428 16.9892 32.817 16.9892H37.204L38.0641 12ZM40.1288 12.0862L36.8599 27.9135H41.1611L42.6233 21.2043L42.9674 27.9135H45.2902L47.8704 21.2043L46.5801 27.9135H50.4508L53.634 12H48.1288L45.4618 18.6235V12.0862H40.1288ZM52.6017 27.9135L55.6119 12H64.4723L63.7841 16.5594H59.1393L58.8811 18.1075H63.354L62.6661 21.5484L58.1069 21.4624L57.8488 23.0105H62.4077L61.4616 27.9135H52.6017ZM63.6982 27.6559C63.0959 27.6559 62.7518 27.2252 62.7518 26.6235C62.7518 26.0213 63.0959 25.5912 63.6982 25.5912C64.3004 25.5912 64.7305 26.0213 64.7305 26.6235C64.7305 27.2255 64.3004 27.6559 63.6982 27.6559ZM63.6982 28C64.4723 28 65.0746 27.3118 65.0746 26.6235C65.0746 25.8494 64.4723 25.2471 63.6982 25.2471C62.924 25.2471 62.3217 25.8494 62.3217 26.6235C62.322 27.3118 62.9243 28 63.6982 28ZM64.0423 26.7095C64.3004 26.7095 64.4723 26.6235 64.4723 26.2794C64.4723 25.9353 64.2142 25.8494 63.8701 25.8494H63.1818V27.3115H63.44V26.7092H63.6982L64.0423 27.3115H64.3864L64.0423 26.7095ZM63.44 26.5373V26.1072H63.7841C63.9563 26.1072 64.1282 26.1072 64.1282 26.2794C64.1282 26.4511 64.0423 26.537 63.8701 26.537L63.44 26.5373Z\",\n fill: \"white\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M34 71.1616C34 69.9678 34.8954 69 36 69H218C219.105 69 220 69.9678 220 71.1616V176H34V71.1616Z\",\n fill: \"white\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M49 142.118C49 140.949 49.6716 140 50.5 140H202.5C203.328 140 204 140.949 204 142.118V161.882C204 163.051 203.328 164 202.5 164H50.5C49.6716 164 49 163.051 49 161.882V142.118Z\",\n fill: \"white\",\n stroke: \"#E3E5F5\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M49 132C49 133.105 49.8954 134 51 134H84C85.105 134 86 133.105 86 132C86 130.895 85.105 130 84 130H51C49.8954 130 49 130.895 49 132Z\",\n fill: \"#F3F3FE\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M49 101.412C49 100.632 49.2166 100 49.4839 100H98.5161C98.7832 100 99 100.632 99 101.412V114.588C99 115.368 98.7832 116 98.5161 116H49.4839C49.2166 116 49 115.368 49 114.588V101.412Z\",\n fill: \"white\",\n stroke: \"#E3E5F5\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M49 92C49 93.105 49.8954 94 51 94H84C85.105 94 86 93.105 86 92C86 90.895 85.105 90 84 90H51C49.8954 90 49 90.895 49 92Z\",\n fill: \"#F3F3FE\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M105 108C105 109.105 105.29 110 105.649 110H116.351C116.71 110 117 109.105 117 108C117 106.895 116.71 106 116.351 106H105.649C105.29 106 105 106.895 105 108Z\",\n fill: \"#F3F3FE\"\n}))), _g2 || (_g2 = /*#__PURE__*/React.createElement(\"g\", {\n filter: \"url(#filter0_d_787_26951)\"\n}, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M19 35C19 32.7909 20.7909 31 23 31H143C145.209 31 147 32.7909 147 35V68C147 70.2091 145.209 72 143 72H23C20.7909 72 19 70.2091 19 68V35Z\",\n fill: \"white\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M20 35C20 33.3431 21.3431 32 23 32H143C144.657 32 146 33.3431 146 35V68C146 69.6569 144.657 71 143 71H23C21.3431 71 20 69.6569 20 68V35Z\",\n stroke: \"#979DC6\",\n strokeWidth: 2\n}))), _path2 || (_path2 = /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M50.75 48C50.75 47.5858 50.4142 47.25 50 47.25C49.5858 47.25 49.25 47.5858 49.25 48V50.25H47C46.5858 50.25 46.25 50.5858 46.25 51C46.25 51.4142 46.5858 51.75 47 51.75H49.25V54C49.25 54.4142 49.5858 54.75 50 54.75C50.4142 54.75 50.75 54.4142 50.75 54V51.75H53C53.4142 51.75 53.75 51.4142 53.75 51C53.75 50.5858 53.4142 50.25 53 50.25H50.75V48Z\",\n fill: \"#0A1551\"\n}))), _defs || (_defs = /*#__PURE__*/React.createElement(\"defs\", null, /*#__PURE__*/React.createElement(\"filter\", {\n id: \"filter0_d_787_26951\",\n x: 19,\n y: 31,\n width: 131.765,\n height: 45.7059,\n filterUnits: \"userSpaceOnUse\",\n colorInterpolationFilters: \"sRGB\"\n}, /*#__PURE__*/React.createElement(\"feFlood\", {\n floodOpacity: 0,\n result: \"BackgroundImageFix\"\n}), /*#__PURE__*/React.createElement(\"feColorMatrix\", {\n in: \"SourceAlpha\",\n type: \"matrix\",\n values: \"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0\",\n result: \"hardAlpha\"\n}), /*#__PURE__*/React.createElement(\"feOffset\", {\n dx: 3.76471,\n dy: 4.70588\n}), /*#__PURE__*/React.createElement(\"feColorMatrix\", {\n type: \"matrix\",\n values: \"0 0 0 0 0.356863 0 0 0 0 0.427451 0 0 0 0 0.780392 0 0 0 0.3 0\"\n}), /*#__PURE__*/React.createElement(\"feBlend\", {\n mode: \"normal\",\n in2: \"BackgroundImageFix\",\n result: \"effect1_dropShadow_787_26951\"\n}), /*#__PURE__*/React.createElement(\"feBlend\", {\n mode: \"normal\",\n in: \"SourceGraphic\",\n in2: \"effect1_dropShadow_787_26951\",\n result: \"shape\"\n})), /*#__PURE__*/React.createElement(\"clipPath\", {\n id: \"clip0_787_26951\"\n}, /*#__PURE__*/React.createElement(\"rect\", {\n width: 254,\n height: 192,\n fill: \"white\"\n})))));\nexport default SvgVisual;","\n \n\n","\n \n\n","var _path;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nconst SvgIconEnterprise = props => /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n width: 20,\n height: 20,\n fill: \"none\"\n}, props), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n fill: \"#5B6DC7\",\n fillRule: \"evenodd\",\n d: \"m6.66 16.08.36.144a.033.033 0 0 0 .04-.04 5.13 5.13 0 0 0-3.244-3.246.03.03 0 0 0-.018 0 .03.03 0 0 0-.024.025.03.03 0 0 0 .002.019l.143.357a1.686 1.686 0 0 1-1.033 2.227l-.161.053a1.85 1.85 0 0 1-1.27-.037l-.103-.041A2.15 2.15 0 0 1 0 13.544V3.334A3.333 3.333 0 0 1 3.333 0h13.334A3.333 3.333 0 0 1 20 3.333v13.334A3.333 3.333 0 0 1 16.667 20H6.456a2.15 2.15 0 0 1-1.997-1.352l-.041-.103a1.85 1.85 0 0 1-.037-1.27l.053-.16a1.686 1.686 0 0 1 2.227-1.034m-3.327-4.413S3.75 10 5 9.167c1.25-.834 1.667 0 1.667 0s1.666-5.834 10-5.834c0 8.334-5.834 10-5.834 10s.834.417 0 1.667c-.833 1.25-2.5 1.667-2.5 1.667a5 5 0 0 0-5-5M11.25 10a1.25 1.25 0 1 0 0-2.5 1.25 1.25 0 0 0 0 2.5\",\n clipRule: \"evenodd\"\n})));\nexport default SvgIconEnterprise;","var _g, _defs;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nconst SvgGraph = props => /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n width: 368,\n height: 240,\n fill: \"none\"\n}, props), _g || (_g = /*#__PURE__*/React.createElement(\"g\", {\n clipPath: \"url(#graph_svg__a)\"\n}, /*#__PURE__*/React.createElement(\"path\", {\n stroke: \"#7D8CE1\",\n strokeWidth: 0.5,\n d: \"M597.427 193.193H-227M597.427 138.23H-227\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n stroke: \"#616FC0\",\n strokeWidth: 0.5,\n d: \"M597.427 83.267H-227\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n stroke: \"url(#graph_svg__b)\",\n strokeWidth: 0.5,\n d: \"M52 252V10\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n stroke: \"url(#graph_svg__c)\",\n strokeWidth: 0.5,\n d: \"M106 252V10\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n stroke: \"url(#graph_svg__d)\",\n strokeWidth: 0.5,\n d: \"M161 252V10\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n stroke: \"url(#graph_svg__e)\",\n strokeWidth: 0.5,\n d: \"M216 252V10\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n stroke: \"url(#graph_svg__f)\",\n strokeWidth: 0.5,\n d: \"M271 252V10\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n stroke: \"url(#graph_svg__g)\",\n strokeWidth: 0.5,\n d: \"M326 252V10\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n fill: \"url(#graph_svg__h)\",\n d: \"M-1.99 214.5V111.482c17.681 1.328 28.476-9.292 33.5-11.377 5.026-2.086 24.009-34.134 27.731-41.34 3.722-7.205 11.167-18.204 32.197-22.944 21.031-4.741 34.989 12.515 36.478 14.601s29.033 44.752 34.989 52.717 32.383 22.945 54.53 18.962c22.147-3.982 30.336-17.256 35.361-25.03s17.681-28.065 22.519-30.91c4.839-2.844 12.098-5.12 17.681-4.551s35.919 11.188 41.875 12.895c4.764 1.365 24.07 3.73 33.128 4.74V214.5z\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n stroke: \"#8190E8\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 1.603,\n d: \"M-1.244 111.535c58.747 0 45.976-76.094 98.763-76.094s38.313 86.471 113.236 86.471c51.084 0 44.273-60.53 80.032-60.53 17.028 0 35.759 17.294 78.329 17.294\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n fill: \"#8190E8\",\n stroke: \"#fff\",\n strokeWidth: 1.046,\n d: \"M138.692 70.875c2.734 0 4.945-2.227 4.945-4.969 0-2.741-2.211-4.969-4.945-4.969s-4.945 2.228-4.945 4.97 2.211 4.968 4.945 4.968Z\"\n}), /*#__PURE__*/React.createElement(\"rect\", {\n width: 58.358,\n height: 39.117,\n x: 153.934,\n y: 46,\n fill: \"#252D5B\",\n rx: 3.009\n}), /*#__PURE__*/React.createElement(\"path\", {\n fill: \"#fff\",\n fillOpacity: 0.7,\n d: \"M165.495 60.017h.797l-2.121-5.333h-.85l-2.121 5.333h.789l.565-1.49h2.362zm-1.768-4.566.925 2.392h-1.835zm5.438 4.13c0 .15.015.353.03.436h.677a6 6 0 0 1-.038-.67V56.4h-.707v2.181c0 .55-.286.926-.857.926-.595 0-.82-.437-.82-.933v-2.174h-.707v2.28c0 .82.511 1.451 1.354 1.451.421 0 .872-.173 1.068-.55m1.576.632c.09.775.767 1.346 1.67 1.346 1.361 0 1.813-.895 1.813-1.813V56.4h-.7v.504c-.18-.361-.556-.572-1.113-.572-.993 0-1.663.783-1.663 1.76 0 1.023.7 1.753 1.663 1.753.542 0 .933-.263 1.106-.594v.519c0 .782-.346 1.174-1.106 1.174a.963.963 0 0 1-.986-.888zm1.775-.963c-.639 0-1.045-.451-1.045-1.158 0-.7.421-1.159 1.045-1.159.61 0 1.031.459 1.031 1.159s-.421 1.158-1.031 1.158m4.545.594c.24.166.752.286 1.128.286 1.64 0 2.437-1.068 2.437-2.858 0-1.558-.94-2.242-1.895-2.242s-1.798.677-1.798 1.685c0 1.076.842 1.647 1.685 1.647.662 0 1.091-.3 1.264-.624-.03.955-.512 1.73-1.693 1.73a1.9 1.9 0 0 1-.888-.233zm2.723-3.144c0 .647-.512 1.03-1.053 1.03-.557 0-1.053-.368-1.053-1.03 0-.64.511-1.023 1.053-1.023.534 0 1.053.391 1.053 1.023m1.444 2.836c0 .323.226.511.504.511a.33.33 0 0 0 .166-.037c-.008.36-.256.73-.625.812v.391c.467-.06 1.114-.474 1.114-1.467 0-.474-.286-.714-.61-.714-.316 0-.549.233-.549.504m2.745-2.64c-.007-.076-.015-.151-.015-.219 0-.556.301-1 .941-1 .617 0 .917.413.917.857 0 .377-.21.723-.669 1.016l-.812.526c-.828.535-1.144 1.144-1.159 1.941h3.415v-.684h-2.505c.068-.301.316-.504.595-.685l.962-.617c.557-.353.918-.865.918-1.504 0-.813-.602-1.497-1.647-1.497-1.068 0-1.685.745-1.685 1.58q-.002.092.007.195zm4.027.684c0-.745.136-1.271.429-1.58.188-.195.429-.316.775-.316s.587.12.775.316c.293.309.428.835.428 1.58s-.135 1.271-.428 1.58a1.01 1.01 0 0 1-.775.316c-.346 0-.587-.12-.775-.316-.293-.309-.429-.835-.429-1.58m-.729 0c0 .67.112 1.286.436 1.768.316.474.805.782 1.497.782s1.181-.308 1.497-.782c.323-.482.436-1.099.436-1.768 0-.67-.113-1.286-.436-1.768-.316-.474-.805-.782-1.497-.782s-1.181.308-1.497.782c-.324.482-.436 1.099-.436 1.768m5.305-.685a2 2 0 0 1-.015-.218c0-.556.301-1 .94-1 .617 0 .918.413.918.857 0 .377-.211.723-.67 1.016l-.812.526c-.828.535-1.144 1.144-1.159 1.941h3.416v-.684h-2.505c.067-.301.316-.504.594-.685l.963-.617c.556-.353.917-.865.917-1.504 0-.813-.601-1.497-1.647-1.497-1.068 0-1.685.745-1.685 1.58q-.002.092.008.195zm4.613.858c.128-.045.279-.075.429-.075.481 0 .993.27.993.91 0 .489-.361.903-1.031.903-.586 0-1.053-.407-1.083-1.053l-.722.165c.045.797.685 1.535 1.813 1.535 1.136 0 1.768-.745 1.768-1.565 0-1-.79-1.482-1.505-1.482l1.392-1.286v-.662h-3.31v.677h2.332l-1.437 1.324z\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n fill: \"#fff\",\n d: \"M164.052 74.053V67.23h-.906c-.158.737-.811 1.264-1.758 1.285v.726h1.653v4.813zm1.154-1.853c.094 1.074 1.074 2.022 2.527 2.022 1.517 0 2.507-1.043 2.507-2.328 0-1.411-.98-2.264-2.317-2.264-.537 0-1.085.168-1.39.505l.505-1.958h2.917v-.948h-3.601l-.885 3.39c.347.127.653.264 1.011.401.295-.305.758-.495 1.243-.495.789 0 1.474.474 1.474 1.411 0 .843-.653 1.38-1.464 1.38-.853 0-1.474-.569-1.537-1.411zm5.769.316h3.349v1.537h1.001v-1.537h1.169v-.959h-1.169V67.23h-1.422l-2.928 4.097zm3.349-.959h-2.401l2.401-3.338z\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n fill: \"#252D5B\",\n d: \"M147.793 65.357a.753.753 0 0 1 0-1.103l6.56-6.092a.752.752 0 0 1 1.264.551v12.185a.752.752 0 0 1-1.264.55z\"\n}))), _defs || (_defs = /*#__PURE__*/React.createElement(\"defs\", null, /*#__PURE__*/React.createElement(\"linearGradient\", {\n id: \"graph_svg__b\",\n x1: 52.5,\n x2: 52.5,\n y1: 10,\n y2: 252,\n gradientUnits: \"userSpaceOnUse\"\n}, /*#__PURE__*/React.createElement(\"stop\", {\n stopColor: \"#B0B7E7\",\n stopOpacity: 0\n}), /*#__PURE__*/React.createElement(\"stop\", {\n offset: 0.495,\n stopColor: \"#B0B7E7\"\n}), /*#__PURE__*/React.createElement(\"stop\", {\n offset: 1,\n stopColor: \"#B0B7E7\",\n stopOpacity: 0\n})), /*#__PURE__*/React.createElement(\"linearGradient\", {\n id: \"graph_svg__c\",\n x1: 106.5,\n x2: 106.5,\n y1: 10,\n y2: 252,\n gradientUnits: \"userSpaceOnUse\"\n}, /*#__PURE__*/React.createElement(\"stop\", {\n stopColor: \"#B0B7E7\",\n stopOpacity: 0\n}), /*#__PURE__*/React.createElement(\"stop\", {\n offset: 0.495,\n stopColor: \"#B0B7E7\"\n}), /*#__PURE__*/React.createElement(\"stop\", {\n offset: 1,\n stopColor: \"#B0B7E7\",\n stopOpacity: 0\n})), /*#__PURE__*/React.createElement(\"linearGradient\", {\n id: \"graph_svg__d\",\n x1: 161.5,\n x2: 161.5,\n y1: 10,\n y2: 252,\n gradientUnits: \"userSpaceOnUse\"\n}, /*#__PURE__*/React.createElement(\"stop\", {\n stopColor: \"#B0B7E7\",\n stopOpacity: 0\n}), /*#__PURE__*/React.createElement(\"stop\", {\n offset: 0.495,\n stopColor: \"#B0B7E7\"\n}), /*#__PURE__*/React.createElement(\"stop\", {\n offset: 1,\n stopColor: \"#B0B7E7\",\n stopOpacity: 0\n})), /*#__PURE__*/React.createElement(\"linearGradient\", {\n id: \"graph_svg__e\",\n x1: 216.5,\n x2: 216.5,\n y1: 10,\n y2: 252,\n gradientUnits: \"userSpaceOnUse\"\n}, /*#__PURE__*/React.createElement(\"stop\", {\n stopColor: \"#B0B7E7\",\n stopOpacity: 0\n}), /*#__PURE__*/React.createElement(\"stop\", {\n offset: 0.495,\n stopColor: \"#B0B7E7\"\n}), /*#__PURE__*/React.createElement(\"stop\", {\n offset: 1,\n stopColor: \"#B0B7E7\",\n stopOpacity: 0\n})), /*#__PURE__*/React.createElement(\"linearGradient\", {\n id: \"graph_svg__f\",\n x1: 271.5,\n x2: 271.5,\n y1: 10,\n y2: 252,\n gradientUnits: \"userSpaceOnUse\"\n}, /*#__PURE__*/React.createElement(\"stop\", {\n stopColor: \"#B0B7E7\",\n stopOpacity: 0\n}), /*#__PURE__*/React.createElement(\"stop\", {\n offset: 0.495,\n stopColor: \"#B0B7E7\"\n}), /*#__PURE__*/React.createElement(\"stop\", {\n offset: 1,\n stopColor: \"#B0B7E7\",\n stopOpacity: 0\n})), /*#__PURE__*/React.createElement(\"linearGradient\", {\n id: \"graph_svg__g\",\n x1: 326.5,\n x2: 326.5,\n y1: 10,\n y2: 252,\n gradientUnits: \"userSpaceOnUse\"\n}, /*#__PURE__*/React.createElement(\"stop\", {\n stopColor: \"#B0B7E7\",\n stopOpacity: 0\n}), /*#__PURE__*/React.createElement(\"stop\", {\n offset: 0.495,\n stopColor: \"#B0B7E7\"\n}), /*#__PURE__*/React.createElement(\"stop\", {\n offset: 1,\n stopColor: \"#B0B7E7\",\n stopOpacity: 0\n})), /*#__PURE__*/React.createElement(\"linearGradient\", {\n id: \"graph_svg__h\",\n x1: 183.005,\n x2: 183.005,\n y1: 35,\n y2: 127.601,\n gradientUnits: \"userSpaceOnUse\"\n}, /*#__PURE__*/React.createElement(\"stop\", {\n stopColor: \"#7D8CE1\",\n stopOpacity: 0.7\n}), /*#__PURE__*/React.createElement(\"stop\", {\n offset: 1,\n stopColor: \"#677FD5\",\n stopOpacity: 0\n})), /*#__PURE__*/React.createElement(\"clipPath\", {\n id: \"graph_svg__a\"\n}, /*#__PURE__*/React.createElement(\"path\", {\n fill: \"#fff\",\n d: \"M0 0h368v240H0z\"\n})))));\nexport default SvgGraph;","var _path, _path2;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nconst SvgEnterpriseRocketMini = props => /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n width: 24,\n height: 24,\n fill: \"none\"\n}, props), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n fill: \"#596ED7\",\n d: \"M13.414 10.627a1 1 0 1 0 1.414-1.414 1 1 0 0 0-1.414 1.414\"\n})), _path2 || (_path2 = /*#__PURE__*/React.createElement(\"path\", {\n fill: \"#596ED7\",\n fillRule: \"evenodd\",\n d: \"M2 5a3 3 0 0 1 3-3h14a3 3 0 0 1 3 3v14a3 3 0 0 1-3 3H4.99h2.667c-1.877-.421-2.19-2.964-.47-3.827l1.53-.77-2.12-2.12-.731 1.497C5.014 18.526 2.44 18.235 2 16.343zm11.04 10.203c4.263-.728 7.113-9.193 6.031-10.274C17.99 3.847 9.525 6.697 8.797 10.96l-1.592.016a1 1 0 0 0-.804.419L5.1 13.217a.2.2 0 0 0 .114.31l2.543.636 2.122 2.121.636 2.544a.2.2 0 0 0 .31.114l1.812-1.294a1 1 0 0 0 .419-.824z\",\n clipRule: \"evenodd\"\n})));\nexport default SvgEnterpriseRocketMini;","var _g, _defs;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nconst SvgEnterpriseRocket = props => /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n width: 24,\n height: 24,\n fill: \"none\"\n}, props), _g || (_g = /*#__PURE__*/React.createElement(\"g\", {\n clipPath: \"url(#enterpriseRocket_svg__a)\"\n}, /*#__PURE__*/React.createElement(\"path\", {\n fill: \"#5B6DC7\",\n fillRule: \"evenodd\",\n d: \"m8.919 17.534.407.081a.03.03 0 0 0 .033-.038 4.64 4.64 0 0 0-2.936-2.936.03.03 0 0 0-.038.033l.081.407a2.16 2.16 0 0 1-.92 2.221l-.487.326c-1.02.68-2.348.68-3.368 0l-.188-.126A3.38 3.38 0 0 1 0 14.694V3a3 3 0 0 1 3-3h18a3 3 0 0 1 3 3v18a3 3 0 0 1-3 3H9.306a3.38 3.38 0 0 1-2.808-1.503l-.126-.188a3.035 3.035 0 0 1 0-3.368l.325-.487a2.16 2.16 0 0 1 2.222-.92M6 13.5s.375-1.5 1.5-2.25 1.5 0 1.5 0S10.5 6 18 6c0 7.5-5.25 9-5.25 9s.75.375 0 1.5S10.5 18 10.5 18A4.5 4.5 0 0 0 6 13.5m7.125-1.5a1.125 1.125 0 1 0 0-2.25 1.125 1.125 0 0 0 0 2.25\",\n clipRule: \"evenodd\"\n}))), _defs || (_defs = /*#__PURE__*/React.createElement(\"defs\", null, /*#__PURE__*/React.createElement(\"clipPath\", {\n id: \"enterpriseRocket_svg__a\"\n}, /*#__PURE__*/React.createElement(\"path\", {\n fill: \"#fff\",\n d: \"M0 0h24v24H0z\"\n})))));\nexport default SvgEnterpriseRocket;","\n \n \n \n \n\n","\n \n \n\n","var _g;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nconst SvgIconAppAnalytics = props => /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 14 18\"\n}, props), _g || (_g = /*#__PURE__*/React.createElement(\"g\", {\n fill: \"#FFF\"\n}, /*#__PURE__*/React.createElement(\"rect\", {\n width: 2,\n height: 6,\n y: 12,\n opacity: 0.2,\n rx: 1\n}), /*#__PURE__*/React.createElement(\"rect\", {\n width: 2,\n height: 14,\n x: 4,\n y: 4,\n opacity: 0.45,\n rx: 1\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M9,7 L9,7 C9.55228475,7 10,7.44771525 10,8 L10,17 C10,17.5522847 9.55228475,18 9,18 L9,18 C8.44771525,18 8,17.5522847 8,17 L8,8 C8,7.44771525 8.44771525,7 9,7 Z\",\n opacity: 0.7\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M13,0 L13,0 C13.5522847,-1.01453063e-16 14,0.44771525 14,1 L14,17 C14,17.5522847 13.5522847,18 13,18 L13,18 C12.4477153,18 12,17.5522847 12,17 L12,1 C12,0.44771525 12.4477153,1.01453063e-16 13,0 Z\"\n}))));\nexport default SvgIconAppAnalytics;","var _g;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nconst SvgIconAppBuilder = props => /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 16 16\"\n}, props), _g || (_g = /*#__PURE__*/React.createElement(\"g\", {\n fill: \"#FFF\"\n}, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M3.42465964,13.6190476 L10.5913141,13.6190476 C10.6397095,13.0324257 11.1311487,12.5714286 11.7302595,12.5714286 L12.8731166,12.5714286 C13.5042992,12.5714286 14.0159738,13.0831031 14.0159738,13.7142857 L14.0159738,14.8571429 C14.0159738,15.4883254 13.5042992,16 12.8731166,16 L11.7302595,16 C11.1311487,16 10.6397095,15.5390029 10.5913141,14.952381 L3.42465964,14.952381 C3.37626432,15.5390029 2.88482512,16 2.28571429,16 L1.14285714,16 C0.511674572,16 6.34413157e-17,15.4883254 0,14.8571429 L0,13.7142857 C-1.20435454e-16,13.1151749 0.460997093,12.6237357 1.04761905,12.5753404 L1.04761905,5.42465964 C0.460997093,5.37626432 1.55925743e-12,4.88482512 1.55919722e-12,4.28571429 L1.55919722e-12,3.14285714 C1.55907033e-12,2.51167457 0.511674572,2 1.14285714,2 L2.28571429,2 C2.91689686,2 3.42857143,2.51167457 3.42857143,3.14285714 L3.42857143,4.28571429 C3.42857143,4.88482512 2.96757434,5.37626432 2.38095238,5.42465964 L2.38095238,12.5753404 C2.93617116,12.621145 3.37885503,13.0638288 3.42465964,13.6190476 Z M1.14285714,3.14285714 L1.14285714,4.28571429 L2.28571429,4.28571429 L2.28571429,3.14285714 L1.14285714,3.14285714 Z M11.7302595,13.7142857 L11.7302595,14.8571429 L12.8731166,14.8571429 L12.8731166,13.7142857 L11.7302595,13.7142857 Z M1.14285714,13.7142857 L1.14285714,14.8571429 L2.28571429,14.8571429 L2.28571429,13.7142857 L1.14285714,13.7142857 Z\",\n opacity: 0.6\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M13.6477844,0.177793826 L15.8222062,2.35221565 C16.0592646,2.58927408 16.0592646,2.97362175 15.8222062,3.21068018 L9.2989407,9.73394565 C9.2323045,9.80058186 9.15106879,9.85078828 9.06166694,9.8805889 L5.80003421,10.9677998 C5.32548669,11.1259823 4.87401768,10.6745133 5.03220019,10.1999658 L6.1194111,6.93833306 C6.14921172,6.84893121 6.19941814,6.7676955 6.26605435,6.7010593 L12.7893198,0.177793826 C13.0263783,-0.0592646087 13.4107259,-0.0592646087 13.6477844,0.177793826 Z M7.22584687,7.45819584 L6.56771558,9.43258972 L8.53121766,8.78473963 L14.5345094,2.78144792 L13.2185521,1.46549062 L7.22584687,7.45819584 Z\"\n}))));\nexport default SvgIconAppBuilder;","var _g;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nconst SvgIconAppCards = props => /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 16 16\"\n}, props), _g || (_g = /*#__PURE__*/React.createElement(\"g\", {\n fill: \"none\",\n fillRule: \"evenodd\"\n}, /*#__PURE__*/React.createElement(\"path\", {\n fill: \"#94BEFF\",\n d: \"M.5-1.73194792e-13L3.5-1.73305814e-13C3.77614237-1.73847068e-13 4 .223857625 4 .5L4 9.5C4 9.77614237 3.77614237 10 3.5 10L.5 10C.223857625 10-1.81895559e-12 9.77614237-1.8189894e-12 9.5L-1.8189894e-12.5C-1.81902322e-12.223857625.223857625-1.73144065e-13.5-1.73194792e-13zM6.5-4.4408921e-16L9.5-4.4408921e-16C9.77614237-4.94815741e-16 10 .223857625 10 .5L10 3.5C10 3.77614237 9.77614237 4 9.5 4L6.5 4C6.22385763 4 6 3.77614237 6 3.5L6 .5C6 .223857625 6.22385763-6.15407283e-16 6.5-6.66133815e-16z\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n fill: \"#FFF\",\n d: \"M12.5,10 L15.5,10 C15.7761424,10 16,10.2238576 16,10.5 L16,15.5 C16,15.7761424 15.7761424,16 15.5,16 L12.5,16 C12.2238576,16 12,15.7761424 12,15.5 L12,10.5 C12,10.2238576 12.2238576,10 12.5,10 Z\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n fill: \"#94BEFF\",\n d: \"M12.5,-9.09494702e-13 L15.5,-9.09494702e-13 C15.7761424,-9.09545428e-13 16,0.223857625 16,0.5 L16,7.5 C16,7.77614237 15.7761424,8 15.5,8 L12.5,8 C12.2238576,8 12,7.77614237 12,7.5 L12,0.5 C12,0.223857625 12.2238576,-9.09443975e-13 12.5,-9.09494702e-13 Z\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n fill: \"#FFF\",\n d: \"M6.5 6L9.5 6C9.77614237 6 10 6.22385763 10 6.5L10 15.5C10 15.7761424 9.77614237 16 9.5 16L6.5 16C6.22385763 16 6 15.7761424 6 15.5L6 6.5C6 6.22385763 6.22385763 6 6.5 6zM.5 12L3.5 12C3.77614237 12 4 12.2238576 4 12.5L4 15.5C4 15.7761424 3.77614237 16 3.5 16L.5 16C.223857625 16 2.79081386e-16 15.7761424 0 15.5L0 12.5C-3.38176876e-17 12.2238576.223857625 12 .5 12z\"\n}))));\nexport default SvgIconAppCards;","var _g;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nconst SvgIconAppForm = props => /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 16 18\"\n}, props), _g || (_g = /*#__PURE__*/React.createElement(\"g\", {\n fill: \"#FFF\"\n}, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M12.9010982,4.93150685 L10.0819672,2.1046522 L10.0819672,4.93150685 L12.9010982,4.93150685 Z M8.85245902,1.23287671 L1.2295082,1.23287671 L1.2295082,15.7671233 L6.38356164,15.7671233 C6.72401115,15.7671233 7,16.0431121 7,16.3835616 C7,16.7240111 6.72401115,17 6.38356164,17 L0.614754098,17 C0.275234785,17 8.8817842e-16,16.7240111 8.8817842e-16,16.3835616 L8.8817842e-16,0.616438356 C8.8817842e-16,0.275988853 0.275234785,0 0.614754098,0 L9.46721311,0 C9.63025604,0 9.78662115,0.0649459975 9.90190991,0.180550614 L14.8199427,5.11205746 C14.9352315,5.22766208 15,5.38445559 15,5.54794521 L15,8.3852459 C15,8.72476522 14.7247652,9 14.3852459,9 C14.0457266,9 13.7704918,8.72476522 13.7704918,8.3852459 L13.7704918,6.16438356 L9.46721311,6.16438356 C9.1276938,6.16438356 8.85245902,5.88839471 8.85245902,5.54794521 L8.85245902,1.23287671 Z\",\n opacity: 0.6\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M14.5070948,15.4508357 L15.7812416,16.7249825 C16.0729195,17.0166604 16.0729195,17.4895637 15.7812416,17.7812416 C15.4895637,18.0729195 15.0166604,18.0729195 14.7249825,17.7812416 L13.4508357,16.5070948 C12.8988752,16.8636094 12.241238,17.0705394 11.5352697,17.0705394 C9.58279417,17.0705394 8,15.4877453 8,13.5352697 C8,11.5827941 9.58279417,10 11.5352697,10 C13.4877453,10 15.0705394,11.5827941 15.0705394,13.5352697 C15.0705394,14.241238 14.8636094,14.8988752 14.5070948,15.4508357 Z M12.9940382,14.9634484 C13.3545249,14.5952892 13.5767635,14.0912328 13.5767635,13.5352697 C13.5767635,12.4077839 12.6627556,11.4937759 11.5352697,11.4937759 C10.4077839,11.4937759 9.49377594,12.4077839 9.49377594,13.5352697 C9.49377594,14.6627556 10.4077839,15.5767635 11.5352697,15.5767635 C12.0912328,15.5767635 12.5952892,15.3545249 12.9634484,14.9940382 C12.9683845,14.9888131 12.9734105,14.9836417 12.9785261,14.9785261 C12.9836417,14.9734105 12.9888131,14.9683845 12.9940382,14.9634484 Z\"\n}))));\nexport default SvgIconAppForm;","var _path;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nconst SvgIconAppInbox = props => /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 18 14\"\n}, props), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n fill: \"#FFF\",\n d: \"M0,7.35 C0,6.9357864 0.3357864,6.6 0.75,6.6 C1.1642136,6.6 1.5,6.9357864 1.5,7.35 L1.5,11.75 C1.5,12.1642136 1.8357864,12.5 2.25,12.5 L15.75,12.5 C16.1642136,12.5 16.5,12.1642136 16.5,11.75 L16.5,7.35 C16.5,6.9357864 16.8357864,6.6 17.25,6.6 C17.6642136,6.6 18,6.9357864 18,7.35 L18,11.75 C18,12.9926407 16.9926407,14 15.75,14 L2.25,14 C1.0073593,14 0,12.9926407 0,11.75 L0,7.35 Z M18,3.6 C18,3.8744582 17.8500847,4.1269968 17.6091391,4.2584217 L9.3591391,8.7584217 C9.135281,8.8805261 8.864719,8.8805261 8.6408609,8.7584217 L0.3908609,4.2584217 C0.1499153,4.1269968 0,3.8744582 0,3.6 L0,2.25 C0,1.0073593 1.0073593,0 2.25,0 L15.75,0 C16.9926407,0 18,1.0073593 18,2.25 L18,3.6 Z M16.5,3.1547752 L16.5,2.25 C16.5,1.8357864 16.1642136,1.5 15.75,1.5 L2.25,1.5 C1.8357864,1.5 1.5,1.8357864 1.5,2.25 L1.5,3.1547752 L9,7.2456843 L16.5,3.1547752 Z\"\n})));\nexport default SvgIconAppInbox;","var _path;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nconst SvgIconAppPdfEditor = props => /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 14 18\"\n}, props), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n fill: \"#FFF\",\n d: \"M14,3.6 L14,17.1 C14,17.5970563 13.6240563,18 13.127,18 L0.9,18 C0.402943725,18 4.0844654e-13,17.5970563 4.08384437e-13,17.1 L2.66453526e-15,0.9 C2.7254071e-15,0.402943725 0.402943725,2.69979351e-14 0.9,2.70283606e-14 L10.418,-7.36194959e-15 C10.5286597,-0.00226949012 10.6356203,0.0398665218 10.715,0.117 L13.883,3.312 C13.9579293,3.38915773 13.9998904,3.49244677 14,3.6 Z M10.832,1.413 L10.877,1.413 L10.877,3.168 L12.587,3.168 L10.832,1.413 Z M13.172,17.064 L13.172,4.023 L10.931,4.023 C10.4339437,4.023 10.031,3.62005627 10.031,3.123 L10.031,0.9 L0.9,0.9 L0.9,17.064 L13.172,17.064 Z M11.039,8.75266667 C11.2676459,8.75266667 11.453,8.93802078 11.453,9.16666667 C11.453,9.39531255 11.2676459,9.58066667 11.039,9.58066667 L2.961,9.58066667 C2.73235411,9.58066667 2.547,9.39531255 2.547,9.16666667 C2.547,8.93802078 2.73235411,8.75266667 2.961,8.75266667 L11.039,8.75266667 Z M11.039,6.086 C11.2676459,6.086 11.453,6.27135411 11.453,6.5 C11.453,6.72864589 11.2676459,6.914 11.039,6.914 L2.961,6.914 C2.73235411,6.914 2.547,6.72864589 2.547,6.5 C2.547,6.27135411 2.73235411,6.086 2.961,6.086 L11.039,6.086 Z M11.039,11.4193333 C11.2676459,11.4193333 11.453,11.6046874 11.453,11.8333333 C11.453,12.0619792 11.2676459,12.2473333 11.039,12.2473333 L2.961,12.2473333 C2.73235411,12.2473333 2.547,12.0619792 2.547,11.8333333 C2.547,11.6046874 2.73235411,11.4193333 2.961,11.4193333 L11.039,11.4193333 Z M2.961,14.086 L7.624,14.086 C7.85264589,14.086 8.038,14.2713541 8.038,14.5 C8.038,14.7286459 7.85264589,14.914 7.624,14.914 L2.961,14.914 C2.73235411,14.914 2.547,14.7286459 2.547,14.5 C2.547,14.2713541 2.73235411,14.086 2.961,14.086 Z\"\n})));\nexport default SvgIconAppPdfEditor;","var _g;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nconst SvgIconAppReports = props => /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 18 18\"\n}, props), _g || (_g = /*#__PURE__*/React.createElement(\"g\", {\n fill: \"#FFF\"\n}, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M12.4024708,10 L17.9450712,10 C17.4476269,14.4999505 13.6325537,18 9,18 C6.75238541,18 4.69720406,17.1760953 3.11999794,15.813828 L7.14265808,12.0206055 C7.68280333,12.3534438 8.31897841,12.5454545 9,12.5454545 C10.6108451,12.5454545 11.9707821,11.4711896 12.4024708,10 Z\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M10,5.5975292 L10,0.0549287778 C14.1716166,0.5160776 17.4839224,3.82838339 17.9450712,8 L12.4024708,8 C12.0638427,6.8459598 11.1540402,5.93615726 10,5.5975292 Z\",\n opacity: 0.4\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M8,5.5975292 C6.52881042,6.02921787 5.45454545,7.38915492 5.45454545,9 C5.45454545,9.54984279 5.57970988,10.0704519 5.803101,10.5348895 L1.76007055,14.3473204 C0.654003941,12.8522586 0,11.0025047 0,9 C0,4.36744635 3.50004954,0.552373066 8,0.0549287778 L8,5.5975292 L8,5.5975292 Z\",\n opacity: 0.7\n}))));\nexport default SvgIconAppReports;","var _path;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nconst SvgIconAppSheets = props => /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 16 16\"\n}, props), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n fill: \"#FFF\",\n d: \"M12.1496706,26.9997195 C11.2472314,26.9997195 11.0009443,26.7566301 11.0008474,25.8502081 C10.9996852,17.7216934 10.9997821,20.2597484 11.0007506,12.1312337 C11.0008474,11.2661184 11.2608871,11.0017938 12.1310756,11.0015999 C20.2661037,10.9994667 17.734465,10.9994667 25.8694931,11.0015999 C26.7274786,11.0017938 26.9986559,11.2764936 26.9988496,12.1379242 C27.0003992,20.2664389 27.0003023,17.7283839 26.9990433,25.8568986 C26.9988496,26.7531394 26.7448146,26.9996226 25.8396636,26.9997195 C21.772198,27.0002043 23.0379689,26.9999135 18.9705033,26.9999135 C14.9191146,26.9999135 16.2010593,27.0002043 12.1496706,26.9997195 Z M25.567718,25.8571429 C25.7275629,25.8571429 25.8571429,25.7275629 25.8571429,25.567718 L25.8571429,22.4508349 C25.8571429,22.2909899 25.7275629,22.16141 25.567718,22.16141 L22.4508349,22.16141 C22.2909899,22.16141 22.16141,22.2909899 22.16141,22.4508349 L22.16141,25.567718 C22.16141,25.7275629 22.2909899,25.8571429 22.4508349,25.8571429 L25.567718,25.8571429 Z M17.4415584,25.8571429 L20.5584416,25.8571429 C20.7182865,25.8571429 20.8478664,25.7275629 20.8478664,25.567718 L20.8478664,22.4508349 C20.8478664,22.2909899 20.7182865,22.16141 20.5584416,22.16141 L17.4415584,22.16141 C17.2817135,22.16141 17.1521336,22.2909899 17.1521336,22.4508349 L17.1521336,25.567718 C17.1521336,25.7275629 17.2817135,25.8571429 17.4415584,25.8571429 Z M12.432282,25.8571429 L15.5491651,25.8571429 C15.7090101,25.8571429 15.83859,25.7275629 15.83859,25.567718 L15.83859,22.4508349 C15.83859,22.2909899 15.7090101,22.16141 15.5491651,22.16141 L12.432282,22.16141 C12.2724371,22.16141 12.1428571,22.2909899 12.1428571,22.4508349 L12.1428571,25.567718 C12.1428571,25.7275629 12.2724371,25.8571429 12.432282,25.8571429 Z M22.4508349,20.8478664 L25.567718,20.8478664 C25.7275629,20.8478664 25.8571429,20.7182865 25.8571429,20.5584416 L25.8571429,17.4415584 C25.8571429,17.2817135 25.7275629,17.1521336 25.567718,17.1521336 L22.4508349,17.1521336 C22.2909899,17.1521336 22.16141,17.2817135 22.16141,17.4415584 L22.16141,20.5584416 C22.16141,20.7182865 22.2909899,20.8478664 22.4508349,20.8478664 Z M17.4415584,20.8478664 L20.5584416,20.8478664 C20.7182865,20.8478664 20.8478664,20.7182865 20.8478664,20.5584416 L20.8478664,17.4415584 C20.8478664,17.2817135 20.7182865,17.1521336 20.5584416,17.1521336 L17.4415584,17.1521336 C17.2817135,17.1521336 17.1521336,17.2817135 17.1521336,17.4415584 L17.1521336,20.5584416 C17.1521336,20.7182865 17.2817135,20.8478664 17.4415584,20.8478664 Z M12.432282,20.8478664 L15.5491651,20.8478664 C15.7090101,20.8478664 15.83859,20.7182865 15.83859,20.5584416 L15.83859,17.4415584 C15.83859,17.2817135 15.7090101,17.1521336 15.5491651,17.1521336 L12.432282,17.1521336 C12.2724371,17.1521336 12.1428571,17.2817135 12.1428571,17.4415584 L12.1428571,20.5584416 C12.1428571,20.7182865 12.2724371,20.8478664 12.432282,20.8478664 Z M22.4508349,15.83859 L25.567718,15.83859 C25.7275629,15.83859 25.8571429,15.7090101 25.8571429,15.5491651 L25.8571429,12.432282 C25.8571429,12.2724371 25.7275629,12.1428571 25.567718,12.1428571 L22.4508349,12.1428571 C22.2909899,12.1428571 22.16141,12.2724371 22.16141,12.432282 L22.16141,15.5491651 C22.16141,15.7090101 22.2909899,15.83859 22.4508349,15.83859 Z M17.4415584,15.83859 L20.5584416,15.83859 C20.7182865,15.83859 20.8478664,15.7090101 20.8478664,15.5491651 L20.8478664,12.432282 C20.8478664,12.2724371 20.7182865,12.1428571 20.5584416,12.1428571 L17.4415584,12.1428571 C17.2817135,12.1428571 17.1521336,12.2724371 17.1521336,12.432282 L17.1521336,15.5491651 C17.1521336,15.7090101 17.2817135,15.83859 17.4415584,15.83859 Z M12.432282,15.83859 L15.5491651,15.83859 C15.7090101,15.83859 15.83859,15.7090101 15.83859,15.5491651 L15.83859,12.432282 C15.83859,12.2724371 15.7090101,12.1428571 15.5491651,12.1428571 L12.432282,12.1428571 C12.2724371,12.1428571 12.1428571,12.2724371 12.1428571,12.432282 L12.1428571,15.5491651 C12.1428571,15.7090101 12.2724371,15.83859 12.432282,15.83859 Z\",\n transform: \"translate(-11 -11)\"\n})));\nexport default SvgIconAppSheets;","var _g;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nconst SvgIconAppUploads = props => /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 16 16\"\n}, props), _g || (_g = /*#__PURE__*/React.createElement(\"g\", {\n fill: \"none\"\n}, /*#__PURE__*/React.createElement(\"path\", {\n fill: \"#FFF\",\n d: \"M13.2,6.65148926 L7.61211411,6.65148926 C7.46190063,6.65148926 7.31964624,6.58395502 7.22468941,6.46756219 L6.1250094,5.11963533 C5.65022525,4.53767121 4.93895328,4.2 4.18788589,4.2 L-1.31109978e-09,4.2 L-1.31615252e-09,1 C-1.31615259e-09,0.44771525 0.447715249,-2.72848309e-10 0.999999999,-2.72848411e-10 L8.6,-1.36424205e-10 C9.15228475,-1.28574887e-10 9.6,0.44771525 9.6,1 L9.6,2.6 C9.6,3.15228475 10.0477152,3.6 10.6,3.6 L12.2,3.6 C12.7522847,3.6 13.2,4.04771525 13.2,4.6 L13.2,6.65148926 Z\",\n transform: \"translate(1.6)\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n fill: \"#FFF\",\n d: \"M12.8535534,0.924122051 L13.8758779,1.94644661 C14.0711401,2.14170876 14.0711401,2.45829124 13.8758779,2.65355339 C13.7821098,2.74732158 13.6549328,2.8 13.5223246,2.8 L12.5,2.8 C12.2238576,2.8 12,2.57614237 12,2.3 L12,1.27767544 C12,1.00153307 12.2238576,0.777675442 12.5,0.777675442 C12.6326082,0.777675442 12.7597852,0.830353862 12.8535534,0.924122051 Z\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n fill: \"#F89E92\",\n d: \"M1,5.2 L5.78788589,5.2 C6.23852632,5.2 6.66528951,5.40260273 6.95015999,5.7517812 L8.04984001,7.09970806 C8.33471049,7.44888653 8.76147368,7.65148926 9.21211411,7.65148926 L15,7.65148926 C15.5522847,7.65148926 16,8.09920451 16,8.65148926 L16,15 C16,15.5522847 15.5522847,16 15,16 L1,16 C0.44771525,16 6.76353751e-17,15.5522847 0,15 L5.10702591e-15,6.2 C5.03939054e-15,5.64771525 0.44771525,5.2 1,5.2 Z\"\n}))));\nexport default SvgIconAppUploads;","var _g;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nconst SvgIconAppMyApps = props => /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 16 17\"\n}, props), _g || (_g = /*#__PURE__*/React.createElement(\"g\", {\n fill: \"#FFF\"\n}, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M4.667 0H2C.897 0 0 .897 0 2v2.667c0 1.102.897 2 2 2h2.667c1.102 0 2-.898 2-2V2c0-1.103-.898-2-2-2zM14 0h-2.667c-1.102 0-2 .897-2 2v2.667c0 1.102.898 2 2 2H14c1.103 0 2-.898 2-2V2c0-1.103-.897-2-2-2zM4.667 9.333H2c-1.103 0-2 .898-2 2V14c0 1.103.897 2 2 2h2.667c1.102 0 2-.897 2-2v-2.667c0-1.102-.898-2-2-2zM15.333 12h-2v-2c0-.368-.298-.667-.666-.667-.369 0-.667.299-.667.667v2h-2c-.369 0-.667.299-.667.667 0 .368.298.666.667.666h2v2c0 .368.298.667.667.667.368 0 .666-.299.666-.667v-2h2c.369 0 .667-.298.667-.666 0-.368-.298-.667-.667-.667z\",\n transform: \"translate(0 .243)\"\n}))));\nexport default SvgIconAppMyApps;","var _path, _path2, _path3, _path4;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nconst SvgIconAppAiAgentBuilder1 = props => /*#__PURE__*/React.createElement(\"svg\", _extends({\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 205 205\"\n}, props), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M153.723 8.54016H51.2411C37.0913 8.54016 25.6206 20.0109 25.6206 34.1607V170.803C25.6206 184.953 37.0913 196.424 51.2411 196.424H153.723C167.873 196.424 179.344 184.953 179.344 170.803V34.1607C179.344 20.0109 167.873 8.54016 153.723 8.54016Z\",\n fill: \"white\"\n})), _path2 || (_path2 = /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M95.0957 53.5491C82.3481 53.5491 72.0142 63.8831 72.0142 76.6307C72.0142 89.3782 82.3481 99.7122 95.0957 99.7122C107.843 99.7122 118.177 89.3782 118.177 76.6307C118.177 63.8831 107.843 53.5491 95.0957 53.5491ZM95.0957 104.329C72.7484 104.329 53.549 120.303 53.549 141.259C53.549 143.808 55.6157 145.875 58.1653 145.875H96.7307C98.6503 145.875 100.37 144.687 101.049 142.892C101.728 141.096 101.225 139.068 99.7855 137.798C96.9027 135.254 95.0957 131.546 95.0957 127.41C95.0957 121.203 99.1826 115.938 104.823 114.183C106.837 113.557 108.17 111.646 108.062 109.54C107.955 107.435 106.434 105.669 104.368 105.251C101.381 104.647 98.2775 104.329 95.0957 104.329Z\",\n fill: \"#0099FF\"\n})), _path3 || (_path3 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M146.659 131.02C149.307 132 149.307 135.746 146.659 136.725L142.762 138.168C137.212 140.221 132.836 144.597 130.782 150.148L129.34 154.045C128.36 156.693 124.614 156.693 123.635 154.045L122.192 150.148C120.139 144.597 115.763 140.221 110.212 138.168L106.315 136.725C103.667 135.746 103.667 132 106.315 131.02L110.212 129.578C115.763 127.524 120.139 123.148 122.192 117.598L123.635 113.701C124.614 111.053 128.36 111.053 129.34 113.701L130.782 117.598C132.836 123.148 137.212 127.524 142.762 129.578L146.659 131.02Z\",\n fill: \"#FF6100\"\n})), _path4 || (_path4 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M153.867 97.9294C155.522 98.5418 155.522 100.883 153.867 101.495L151.431 102.396C147.962 103.68 145.227 106.415 143.943 109.884L143.042 112.32C142.429 113.975 140.089 113.975 139.476 112.32L138.575 109.884C137.291 106.415 134.556 103.68 131.087 102.396L128.651 101.495C126.996 100.883 126.996 98.5418 128.651 97.9294L131.087 97.0281C134.556 95.7444 137.291 93.0094 138.575 89.5405L139.476 87.1046C140.089 85.4496 142.429 85.4496 143.042 87.1046L143.943 89.5405C145.227 93.0094 147.962 95.7444 151.431 97.0281L153.867 97.9294Z\",\n fill: \"#FFB629\"\n})));\nexport default SvgIconAppAiAgentBuilder1;","var _path, _path2, _path3, _path4;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nconst SvgIconAppAiAgentBuilder2 = props => /*#__PURE__*/React.createElement(\"svg\", _extends({\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 205 205\"\n}, props), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M153.723 8.54016H51.2411C37.0913 8.54016 25.6206 20.0109 25.6206 34.1607V170.803C25.6206 184.953 37.0913 196.424 51.2411 196.424H153.723C167.873 196.424 179.344 184.953 179.344 170.803V34.1607C179.344 20.0109 167.873 8.54016 153.723 8.54016Z\",\n fill: \"#0099FF\"\n})), _path2 || (_path2 = /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M95.0957 53.5491C82.3481 53.5491 72.0142 63.8831 72.0142 76.6307C72.0142 89.3783 82.3481 99.7122 95.0957 99.7122C107.843 99.7122 118.177 89.3783 118.177 76.6307C118.177 63.8831 107.843 53.5491 95.0957 53.5491ZM95.0957 104.329C72.7484 104.329 53.549 120.303 53.549 141.259C53.549 143.809 55.6157 145.875 58.1653 145.875H96.7307C98.6503 145.875 100.37 144.687 101.049 142.892C101.728 141.096 101.225 139.068 99.7855 137.798C96.9027 135.254 95.0957 131.546 95.0957 127.41C95.0957 121.203 99.1826 115.938 104.823 114.183C106.837 113.557 108.17 111.646 108.062 109.54C107.955 107.435 106.434 105.669 104.368 105.251C101.381 104.647 98.2775 104.329 95.0957 104.329Z\",\n fill: \"white\"\n})), _path3 || (_path3 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M146.659 131.02C149.307 132 149.307 135.746 146.659 136.725L142.762 138.168C137.212 140.221 132.836 144.597 130.782 150.148L129.34 154.045C128.36 156.693 124.614 156.693 123.635 154.045L122.192 150.148C120.139 144.597 115.763 140.221 110.212 138.168L106.315 136.725C103.667 135.746 103.667 132 106.315 131.02L110.212 129.578C115.763 127.524 120.139 123.148 122.192 117.598L123.635 113.701C124.614 111.053 128.36 111.053 129.34 113.701L130.782 117.598C132.836 123.148 137.212 127.524 142.762 129.578L146.659 131.02Z\",\n fill: \"white\"\n})), _path4 || (_path4 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M153.867 97.9294C155.522 98.5418 155.522 100.883 153.867 101.495L151.431 102.396C147.962 103.68 145.227 106.415 143.943 109.884L143.042 112.32C142.429 113.975 140.089 113.975 139.476 112.32L138.575 109.884C137.291 106.415 134.556 103.68 131.087 102.396L128.651 101.495C126.996 100.883 126.996 98.5418 128.651 97.9294L131.087 97.0281C134.556 95.7444 137.291 93.0094 138.575 89.5405L139.476 87.1046C140.089 85.4496 142.429 85.4496 143.042 87.1046L143.943 89.5405C145.227 93.0094 147.962 95.7444 151.431 97.0281L153.867 97.9294Z\",\n fill: \"white\"\n})));\nexport default SvgIconAppAiAgentBuilder2;","var _path, _path2, _path3, _path4;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nconst SvgIconConversationsv1 = props => /*#__PURE__*/React.createElement(\"svg\", _extends({\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 32 32\"\n}, props), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M5 3H27C29.2091 3 31 4.79086 31 7V21C31 23.2091 29.2091 25 27 25H26V27.6638C26 28.7161 24.8382 29.3537 23.9506 28.7885L18.6553 25.4172C18.2273 25.1447 17.7305 25 17.2232 25H5C2.79086 25 1 23.2091 1 21V7C1 4.79086 2.79086 3 5 3Z\",\n fill: \"#0099FF\"\n})), _path2 || (_path2 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M12.5847 10.4909C12.8715 10.5971 12.8715 11.0027 12.5847 11.1089L12.1626 11.2651C11.5614 11.4875 11.0874 11.9615 10.865 12.5627L10.7088 12.9848C10.6026 13.2716 10.197 13.2716 10.0908 12.9848L9.93464 12.5627C9.71219 11.9615 9.23821 11.4875 8.63706 11.2651L8.21492 11.1089C7.92811 11.0027 7.92811 10.5971 8.21492 10.4909L8.63706 10.3347C9.23821 10.1123 9.71219 9.63831 9.93464 9.03715L10.0908 8.61501C10.197 8.3282 10.6026 8.3282 10.7088 8.61501L10.865 9.03715C11.0874 9.63831 11.5614 10.1123 12.1626 10.3347L12.5847 10.4909Z\",\n fill: \"white\"\n})), _path3 || (_path3 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M20.3696 16.582C20.9432 16.7942 20.9432 17.6056 20.3696 17.8178L19.5253 18.1302C18.323 18.5751 17.375 19.5231 16.9301 20.7254L16.6177 21.5697C16.4055 22.1433 15.5941 22.1433 15.3819 21.5697L15.0695 20.7254C14.6246 19.5231 13.6766 18.5751 12.4743 18.1302L11.63 17.8178C11.0564 17.6056 11.0564 16.7942 11.63 16.582L12.4743 16.2696C13.6766 15.8247 14.6246 14.8767 15.0695 13.6744L15.3819 12.8301C15.5941 12.2565 16.4055 12.2565 16.6177 12.8301L16.9301 13.6744C17.375 14.8767 18.323 15.8247 19.5253 16.2696L20.3696 16.582Z\",\n fill: \"white\"\n})), _path4 || (_path4 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M20.3881 6.28682C20.5297 5.9044 21.0705 5.90439 21.212 6.28681L21.4203 6.84966C21.7169 7.65121 22.3489 8.28317 23.1504 8.57977L23.7133 8.78805C24.0957 8.92955 24.0957 9.47044 23.7133 9.61195L23.1504 9.82022C22.3489 10.1168 21.7169 10.7488 21.4203 11.5503L21.212 12.1132C21.0705 12.4956 20.5297 12.4956 20.3881 12.1132L20.1799 11.5503C19.8833 10.7488 19.2513 10.1168 18.4498 9.82022L17.8869 9.61195C17.5045 9.47044 17.5045 8.92955 17.8869 8.78805L18.4498 8.57977C19.2513 8.28317 19.8833 7.65121 20.1799 6.84966L20.3881 6.28682Z\",\n fill: \"white\"\n})));\nexport default SvgIconConversationsv1;","var _path;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nconst SvgIconAppMyKiosks = props => /*#__PURE__*/React.createElement(\"svg\", _extends({\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 31 28\"\n}, props), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M25.7676 2.96726H4.91591C3.89633 2.96726 3.0698 3.79379 3.0698 4.81338V17.7142C3.0698 18.7338 3.89633 19.5603 4.91591 19.5603H25.7676C26.7872 19.5603 27.6137 18.7338 27.6137 17.7142V4.81338C27.6137 3.79379 26.7872 2.96726 25.7676 2.96726ZM4.91591 0C2.25756 0 0.102539 2.15503 0.102539 4.81338V17.7142C0.102539 20.3725 2.25756 22.5275 4.91591 22.5275H13.8587V25.0327H10.7031C9.88375 25.0327 9.2195 25.697 9.2195 26.5164C9.2195 27.3358 9.88375 28 10.7031 28L20.6418 28C21.4611 28 22.1254 27.3358 22.1254 26.5164C22.1254 25.697 21.4611 25.0327 20.6418 25.0327H16.8259V22.5275H25.7676C28.426 22.5275 30.581 20.3725 30.581 17.7142V4.81338C30.581 2.15502 28.426 0 25.7676 0H4.91591Z\",\n fill: \"#F9F9F9\"\n})));\nexport default SvgIconAppMyKiosks;","var _g;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nconst SvgIconAppMyForms = props => /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 15 18\"\n}, props), _g || (_g = /*#__PURE__*/React.createElement(\"g\", {\n fill: \"none\"\n}, /*#__PURE__*/React.createElement(\"rect\", {\n width: 14,\n height: 17,\n x: 0.5,\n y: 0.5,\n stroke: \"#FFF\",\n rx: 1\n}), /*#__PURE__*/React.createElement(\"g\", {\n fill: \"#FFF\",\n transform: \"translate(3 2.5)\"\n}, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M.5 0h4c.276 0 .5.224.5.5s-.224.5-.5.5h-4C.224 1 0 .776 0 .5S.224 0 .5 0zM.5 5h4c.276 0 .5.224.5.5s-.224.5-.5.5h-4C.224 6 0 5.776 0 5.5S.224 5 .5 5z\"\n}), /*#__PURE__*/React.createElement(\"rect\", {\n width: 9,\n height: 1,\n y: 2,\n rx: 0.5\n}), /*#__PURE__*/React.createElement(\"rect\", {\n width: 9,\n height: 1,\n y: 7,\n rx: 0.5\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M.5 10h4c.276 0 .5.224.5.5s-.224.5-.5.5h-4c-.276 0-.5-.224-.5-.5s.224-.5.5-.5z\"\n}), /*#__PURE__*/React.createElement(\"rect\", {\n width: 9,\n height: 1,\n y: 12,\n rx: 0.5\n})))));\nexport default SvgIconAppMyForms;","var _path;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nconst SvgIconAppMyTasks = props => /*#__PURE__*/React.createElement(\"svg\", _extends({\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 18 21\"\n}, props), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M1.37506 19.2668H12.3093V14.5634C12.2818 14.5656 12.2562 14.5672 12.2318 14.5687H12.2318C12.1834 14.5718 12.14 14.5745 12.0973 14.5812C10.6166 14.8124 9.2134 14.5711 7.87635 13.9021C7.75834 13.8431 7.61204 13.8168 7.47868 13.8162C6.50284 13.8113 5.52697 13.8117 4.5511 13.8122L3.70991 13.8124H3.43098V12.4111H5.87982C5.80104 12.2974 5.72252 12.1854 5.64462 12.0742C5.44604 11.7907 5.25149 11.5131 5.06683 11.2289C4.98502 11.103 4.90321 11.0544 4.75504 11.0576C4.44075 11.0644 4.12629 11.0632 3.80708 11.0619H3.80706H3.80704C3.68116 11.0615 3.55455 11.061 3.42691 11.061V9.67841H4.38729C4.12597 8.73588 4.04264 7.80827 4.16388 6.86678C4.28513 5.92499 4.59407 5.04328 5.06746 4.21509H1.37506V19.2668ZM11.0378 13.2751C14.0784 13.2819 16.5778 10.805 16.5866 7.77624C16.5957 4.71668 14.1199 2.19585 11.097 2.18643C7.99803 2.17687 5.52085 4.62614 5.50555 7.71483C5.49034 10.7846 7.96154 13.2683 11.0378 13.2751ZM13.7371 20.6836H0V2.82506H0.27461L1.36179 2.82528C2.88376 2.82574 4.40572 2.8262 5.92769 2.81859C6.05683 2.81795 6.21461 2.75684 6.3101 2.66998C7.82765 1.28982 9.61337 0.670458 11.649 0.831281C14.7482 1.07607 17.3316 3.46423 17.8601 6.52909C18.3995 9.65687 16.8077 12.6999 13.9293 14.0287C13.7774 14.0989 13.7331 14.1784 13.7335 14.3391C13.7378 15.9384 13.7375 17.5377 13.7372 19.1371L13.7371 20.3605V20.6836ZM9.98485 10.9275L6.72611 7.66804L7.68085 6.71669L9.99525 9.02451L14.037 4.97868L14.9752 5.93342L9.98485 10.9275ZM10.2591 16.5515H3.42052V15.1898H10.2591V16.5515Z\",\n fill: \"white\"\n})));\nexport default SvgIconAppMyTasks;","var _path;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nconst SvgIconAppSign = props => /*#__PURE__*/React.createElement(\"svg\", _extends({\n viewBox: \"0 0 28 19\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n}, props), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M18.35 16.36l.08-.13c.54-.9 2-.08 1.45.83-.7 1.16-1.82 2.33-3.35 1.81a3.53 3.53 0 01-1.7-1.35c-.16-.21-.3-.44-.43-.67l-.1-.17-.01-.01-.3-.47-.04-.05-.02-.03a2.4 2.4 0 00-.47.53l-.13.17c-.3.38-.6.75-1.03 1-.9.56-2.07.53-2.73-.34-.2-.28-.32-.61-.44-.93l-.06-.17-.04-.13-.01-.02-.04-.06-.15.1c-.05.01-.09.04-.1.05a12.77 12.77 0 01-.53.46l-1.17 1.03-.24.22c-.62.58-1.42 1.32-2.27.78-.47-.3-.54-.82-.6-1.32l-.01-.13a36.57 36.57 0 01-.14-1.26 14.7 14.7 0 00-.38-2.49l-.03-.12c-.07-.27-.17-.64-.4-.8-.25-.15-.57.01-.78.16-.37.27-.48.72-.5 1.17-.01.61.12 1.17.32 1.77.33 1-1.3 1.43-1.63.44a5.7 5.7 0 01-.26-3.07A2.82 2.82 0 012.67 11c1.65-.07 2.25 1.56 2.5 2.86a23.3 23.3 0 01.3 2.37l.07.72.05-.05.19-.19.97-.86.27-.24c.53-.5 1.1-1.02 1.85-1.09.68-.07 1.27.3 1.59.86.11.2.2.44.27.66l.04.12.03.08c.04.12.09.28.16.33.23.12.68-.3.83-.48l.35-.42c.3-.37.58-.73 1-1 1.32-.86 2.06.34 2.7 1.36l.44.67c.25.33.73.8 1.2.62.4-.15.66-.6.87-.96zM13.83 16h-.04c-.04-.1-.03-.1.04 0zm-4.82.15c.13-.01.01-.04 0 0zm-.07-.06v0zM27.78 4.4l-1.6 1.35-1.7 4.25a.62.62 0 01-.4.36l-8.27 2.61a.62.62 0 01-.78-.78l2.61-8.27a.62.62 0 01.36-.4l4.23-1.7 1.38-1.6a.62.62 0 01.9-.04l3.3 3.3a.62.62 0 01-.03.91zm-10.8 5.75l4.17-4.17a.62.62 0 01.87.88l-4.17 4.16 5.58-1.76 1.5-3.71-2.47-2.48-3.72 1.5-1.76 5.58zm6.47-7.84l.66-.78 2.36 2.35-.78.67-2.24-2.24z\",\n fill: \"#fff\"\n})));\nexport default SvgIconAppSign;","var _path;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nconst SvgIconAppApprovals = props => /*#__PURE__*/React.createElement(\"svg\", _extends({\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 18 21\"\n}, props), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M1.37506 18.7522H12.3093V14.0487C12.2818 14.051 12.2562 14.0526 12.2318 14.0541H12.2318C12.1834 14.0571 12.14 14.0598 12.0973 14.0665C10.6166 14.2978 9.2134 14.0564 7.87635 13.3875C7.75834 13.3285 7.61204 13.3022 7.47868 13.3015C6.50281 13.2966 5.5269 13.2971 4.55099 13.2975L3.70991 13.2978H3.43099V11.8965H5.87982C5.80104 11.7828 5.72252 11.6707 5.64463 11.5595C5.44605 11.2761 5.25149 10.9984 5.06683 10.7143C4.98502 10.5884 4.90321 10.5398 4.75504 10.5429C4.44075 10.5497 4.12629 10.5485 3.80708 10.5473H3.80706H3.80704C3.68117 10.5468 3.55455 10.5463 3.42692 10.5463V9.16376H4.38729C4.12597 8.22123 4.04264 7.29362 4.16389 6.35213C4.28513 5.41034 4.59407 4.52863 5.06747 3.70044H1.37506V18.7522ZM11.0378 12.7605C14.0784 12.7673 16.5778 10.2903 16.5866 7.26159C16.5957 4.20203 14.1199 1.6812 11.097 1.67178C7.99803 1.66222 5.52085 4.11149 5.50555 7.20019C5.49034 10.2699 7.96154 12.7537 11.0378 12.7605ZM13.7371 20.169H0V2.31041H0.27461L1.36175 2.31063C2.88373 2.31109 4.40571 2.31155 5.92769 2.30394C6.05683 2.3033 6.21461 2.24219 6.3101 2.15533C7.82765 0.775167 9.61337 0.15581 11.649 0.316633C14.7482 0.561423 17.3316 2.94959 17.8601 6.01444C18.3995 9.14222 16.8077 12.1853 13.9293 13.5141C13.7774 13.5843 13.7331 13.6638 13.7335 13.8244C13.7378 15.4237 13.7375 17.0231 13.7372 18.6224L13.7371 19.8459V20.169ZM9.98485 10.4128L6.72611 7.15339L7.68085 6.20203L9.99524 8.50986L14.037 4.46403L14.9752 5.41876L9.98485 10.4128ZM10.2591 16.0368H3.42052V14.6751H10.2591V16.0368Z\",\n fill: \"white\"\n})));\nexport default SvgIconAppApprovals;","var _path, _path2, _path3, _path4, _path5, _g, _defs;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nconst SvgIconAppMyContacts = props => /*#__PURE__*/React.createElement(\"svg\", _extends({\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 32 32\"\n}, props), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M22 6C22 5.44772 22.4477 5 23 5H29C29.5523 5 30 5.44772 30 6V9C30 9.55228 29.5523 10 29 10H23C22.4477 10 22 9.55228 22 9V6Z\",\n fill: \"#0099FF\"\n})), _path2 || (_path2 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M22 13C22 12.4477 22.4477 12 23 12H29C29.5523 12 30 12.4477 30 13V16C30 16.5523 29.5523 17 29 17H23C22.4477 17 22 16.5523 22 16V13Z\",\n fill: \"#FF6100\"\n})), _path3 || (_path3 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M22 20C22 19.4477 22.4477 19 23 19H29C29.5523 19 30 19.4477 30 20V23C30 23.5523 29.5523 24 29 24H23C22.4477 24 22 23.5523 22 23V20Z\",\n fill: \"#FFB629\"\n})), _path4 || (_path4 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M1 4C1 1.79086 2.79086 0 5 0H23C25.2091 0 27 1.79086 27 4V28C27 30.2091 25.2091 32 23 32H5C2.79086 32 1 30.2091 1 28V4Z\",\n fill: \"white\"\n})), _path5 || (_path5 = /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M23 1H5C3.34315 1 2 2.34315 2 4V28C2 29.6569 3.34315 31 5 31H23C24.6569 31 26 29.6569 26 28V4C26 2.34315 24.6569 1 23 1ZM5 0C2.79086 0 1 1.79086 1 4V28C1 30.2091 2.79086 32 5 32H23C25.2091 32 27 30.2091 27 28V4C27 1.79086 25.2091 0 23 0H5Z\",\n fill: \"white\"\n})), _g || (_g = /*#__PURE__*/React.createElement(\"g\", {\n clipPath: \"url(#clip0_9_14183)\"\n}, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M13.9999 16C15.7672 16 17.1999 14.5673 17.1999 12.8C17.1999 11.0327 15.7672 9.59998 13.9999 9.59998C12.2326 9.59998 10.7999 11.0327 10.7999 12.8C10.7999 14.5673 12.2326 16 13.9999 16Z\",\n fill: \"#8099CF\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M13.9998 17.0667C10.3998 17.0667 8.6665 19.3131 8.6665 20.6219V21.3333C8.6665 21.6162 8.77888 21.8875 8.97892 22.0876C9.17896 22.2876 9.45027 22.4 9.73317 22.4H18.2665C18.5494 22.4 18.8207 22.2876 19.0208 22.0876C19.2208 21.8875 19.3332 21.6162 19.3332 21.3333V20.6219C19.3332 19.3131 17.5998 17.0667 13.9998 17.0667Z\",\n fill: \"#8099CF\"\n}))), _defs || (_defs = /*#__PURE__*/React.createElement(\"defs\", null, /*#__PURE__*/React.createElement(\"clipPath\", {\n id: \"clip0_9_14183\"\n}, /*#__PURE__*/React.createElement(\"rect\", {\n width: 12.8,\n height: 12.8,\n fill: \"white\",\n transform: \"translate(7.59998 9.59998)\"\n})))));\nexport default SvgIconAppMyContacts;","var _rect, _path, _path2, _path3, _path4;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nconst SvgBoardsSelected = props => /*#__PURE__*/React.createElement(\"svg\", _extends({\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 30 30\"\n}, props), _rect || (_rect = /*#__PURE__*/React.createElement(\"rect\", {\n width: 30,\n height: 30,\n rx: 3.75,\n fill: \"white\"\n})), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M16.125 12.1875C16.125 11.8768 16.3768 11.625 16.6875 11.625H23.4375C23.7482 11.625 24 11.8768 24 12.1875V22.875C24 23.4963 23.4963 24 22.875 24H17.25C16.6287 24 16.125 23.4963 16.125 22.875V12.1875Z\",\n fill: \"#FFB629\"\n})), _path2 || (_path2 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M6 12.1875C6 11.8768 6.25184 11.625 6.5625 11.625H13.3125C13.6232 11.625 13.875 11.8768 13.875 12.1875V18.375C13.875 18.9963 13.3713 19.5 12.75 19.5H7.125C6.50368 19.5 6 18.9963 6 18.375V12.1875Z\",\n fill: \"#FFB629\"\n})), _path3 || (_path3 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M6 7.125C6 6.50368 6.50368 6 7.125 6H12.75C13.3713 6 13.875 6.50368 13.875 7.125V8.8125C13.875 9.12316 13.6232 9.375 13.3125 9.375H6.5625C6.25184 9.375 6 9.12316 6 8.8125V7.125Z\",\n fill: \"#FF6100\"\n})), _path4 || (_path4 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M16.125 7.125C16.125 6.50368 16.6287 6 17.25 6H22.875C23.4963 6 24 6.50368 24 7.125V8.8125C24 9.12316 23.7482 9.375 23.4375 9.375H16.6875C16.3768 9.375 16.125 9.12316 16.125 8.8125V7.125Z\",\n fill: \"#0099FF\"\n})));\nexport default SvgBoardsSelected;","\n \n \n\n","\n \n \n \n \n \n\n","\n \n\n","\n \n \n \n \n\n","\n \n\n","\n \n \n \n \n \n\n","\n \n \n \n \n\n","\n \n \n\n","\n \n \n \n \n \n\n","\n \n\n","\n \n \n \n \n\n","\n \n \n \n \n \n\n","\n \n\n","\n \n \n \n \n \n\n","\n \n\n","\n \n \n \n \n \n\n","var _path, _path2, _path3, _path4, _path5;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nconst SvgContactsDefault = props => /*#__PURE__*/React.createElement(\"svg\", _extends({\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 36 36\"\n}, props), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M24.6875 8.1875C24.6875 7.61796 25.1492 7.15625 25.7188 7.15625H31.9062C32.4758 7.15625 32.9375 7.61796 32.9375 8.1875V11.2812C32.9375 11.8508 32.4758 12.3125 31.9062 12.3125H25.7188C25.1492 12.3125 24.6875 11.8508 24.6875 11.2812V8.1875Z\",\n fill: \"#8099CF\"\n})), _path2 || (_path2 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M24.6875 15.4062C24.6875 14.8367 25.1492 14.375 25.7188 14.375H31.9062C32.4758 14.375 32.9375 14.8367 32.9375 15.4062V18.5C32.9375 19.0696 32.4758 19.5312 31.9062 19.5312H25.7188C25.1492 19.5312 24.6875 19.0696 24.6875 18.5V15.4062Z\",\n fill: \"#8099CF\"\n})), _path3 || (_path3 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M24.6875 22.625C24.6875 22.0554 25.1492 21.5938 25.7188 21.5938H31.9062C32.4758 21.5938 32.9375 22.0554 32.9375 22.625V25.7188C32.9375 26.2883 32.4758 26.75 31.9062 26.75H25.7188C25.1492 26.75 24.6875 26.2883 24.6875 25.7188V22.625Z\",\n fill: \"#8099CF\"\n})), _path4 || (_path4 = /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M3.03125 6.125C3.03125 3.84682 4.87807 2 7.15625 2H25.7188C27.9969 2 29.8438 3.84682 29.8438 6.125V30.875C29.8438 33.1531 27.9969 35 25.7188 35H7.15625C4.87807 35 3.03125 33.1531 3.03125 30.875V6.125ZM16.4409 18.5C18.2635 18.5 19.7409 17.0225 19.7409 15.2C19.7409 13.3775 18.2635 11.9 16.4409 11.9C14.6184 11.9 13.1409 13.3775 13.1409 15.2C13.1409 17.0225 14.6184 18.5 16.4409 18.5ZM10.9409 23.2663C10.9409 21.9166 12.7284 19.6 16.4409 19.6C20.1534 19.6 21.941 21.9166 21.941 23.2663V24.0001C21.941 24.2918 21.8251 24.5716 21.6187 24.7778C21.4125 24.9842 21.1327 25.1 20.8409 25.1H12.0409C11.7492 25.1 11.4694 24.9842 11.2631 24.7778C11.0568 24.5716 10.9409 24.2918 10.9409 24.0001V23.2663Z\",\n fill: \"#895FFF\"\n})), _path5 || (_path5 = /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M25.7188 3.03125H7.15625C5.44762 3.03125 4.0625 4.41637 4.0625 6.125V30.875C4.0625 32.5837 5.44762 33.9688 7.15625 33.9688H25.7188C27.4274 33.9688 28.8125 32.5837 28.8125 30.875V6.125C28.8125 4.41637 27.4274 3.03125 25.7188 3.03125ZM7.15625 2C4.87807 2 3.03125 3.84682 3.03125 6.125V30.875C3.03125 33.1531 4.87807 35 7.15625 35H25.7188C27.9969 35 29.8438 33.1531 29.8438 30.875V6.125C29.8438 3.84682 27.9969 2 25.7188 2H7.15625Z\",\n fill: \"#895FFF\"\n})));\nexport default SvgContactsDefault;","var _path, _path2, _path3, _path4, _path5, _path6, _g;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nconst SvgContactsSelected = props => /*#__PURE__*/React.createElement(\"svg\", _extends({\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 36 36\"\n}, props), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M24.6875 8.1875C24.6875 7.61796 25.1492 7.15625 25.7188 7.15625H31.9062C32.4758 7.15625 32.9375 7.61796 32.9375 8.1875V11.2812C32.9375 11.8508 32.4758 12.3125 31.9062 12.3125H25.7188C25.1492 12.3125 24.6875 11.8508 24.6875 11.2812V8.1875Z\",\n fill: \"#0099FF\"\n})), _path2 || (_path2 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M24.6875 15.4062C24.6875 14.8367 25.1492 14.375 25.7188 14.375H31.9062C32.4758 14.375 32.9375 14.8367 32.9375 15.4062V18.5C32.9375 19.0696 32.4758 19.5312 31.9062 19.5312H25.7188C25.1492 19.5312 24.6875 19.0696 24.6875 18.5V15.4062Z\",\n fill: \"#FF6100\"\n})), _path3 || (_path3 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M24.6875 22.625C24.6875 22.0554 25.1492 21.5938 25.7188 21.5938H31.9062C32.4758 21.5938 32.9375 22.0554 32.9375 22.625V25.7188C32.9375 26.2883 32.4758 26.75 31.9062 26.75H25.7188C25.1492 26.75 24.6875 26.2883 24.6875 25.7188V22.625Z\",\n fill: \"#FFB629\"\n})), _path4 || (_path4 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M3.03125 6.125C3.03125 3.84682 4.87807 2 7.15625 2H25.7188C27.9969 2 29.8438 3.84682 29.8438 6.125V30.875C29.8438 33.1531 27.9969 35 25.7188 35H7.15625C4.87807 35 3.03125 33.1531 3.03125 30.875V6.125Z\",\n fill: \"white\"\n})), _path5 || (_path5 = /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M25.7188 3.03125H7.15625C5.44762 3.03125 4.0625 4.41637 4.0625 6.125V30.875C4.0625 32.5837 5.44762 33.9688 7.15625 33.9688H25.7188C27.4274 33.9688 28.8125 32.5837 28.8125 30.875V6.125C28.8125 4.41637 27.4274 3.03125 25.7188 3.03125ZM7.15625 2C4.87807 2 3.03125 3.84682 3.03125 6.125V30.875C3.03125 33.1531 4.87807 35 7.15625 35H25.7188C27.9969 35 29.8438 33.1531 29.8438 30.875V6.125C29.8438 3.84682 27.9969 2 25.7188 2H7.15625Z\",\n fill: \"white\"\n})), /*#__PURE__*/React.createElement(\"mask\", {\n id: \"mask0_325_1161\",\n style: {\n maskType: \"luminance\"\n },\n maskUnits: \"userSpaceOnUse\",\n x: 9,\n y: 11,\n width: 15,\n height: 15\n}, _path6 || (_path6 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M23.0375 11.9H9.83746V25.1H23.0375V11.9Z\",\n fill: \"white\"\n}))), _g || (_g = /*#__PURE__*/React.createElement(\"g\", {\n mask: \"url(#mask0_325_1161)\"\n}, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M16.4374 18.5C18.2599 18.5 19.7374 17.0225 19.7374 15.2C19.7374 13.3775 18.2599 11.9 16.4374 11.9C14.6149 11.9 13.1374 13.3775 13.1374 15.2C13.1374 17.0225 14.6149 18.5 16.4374 18.5Z\",\n fill: \"#8099CF\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M16.4373 19.6C12.7248 19.6 10.9373 21.9166 10.9373 23.2663V24C10.9373 24.2917 11.0532 24.5715 11.2595 24.7778C11.4658 24.9841 11.7456 25.1 12.0373 25.1H20.8373C21.1291 25.1 21.4088 24.9841 21.6152 24.7778C21.8214 24.5715 21.9374 24.2917 21.9374 24V23.2663C21.9374 21.9166 20.1498 19.6 16.4373 19.6Z\",\n fill: \"#8099CF\"\n}))));\nexport default SvgContactsSelected;","var _rect, _path, _path2, _path3, _path4;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nconst SvgBoardsDefault = props => /*#__PURE__*/React.createElement(\"svg\", _extends({\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 30 30\"\n}, props), _rect || (_rect = /*#__PURE__*/React.createElement(\"rect\", {\n width: 30,\n height: 30,\n rx: 3.75,\n fill: \"#504ECC\"\n})), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M16.125 12.1875C16.125 11.8768 16.3768 11.625 16.6875 11.625H23.4375C23.7482 11.625 24 11.8768 24 12.1875V22.875C24 23.4963 23.4963 24 22.875 24H17.25C16.6287 24 16.125 23.4963 16.125 22.875V12.1875Z\",\n fill: \"white\"\n})), _path2 || (_path2 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M6 12.1875C6 11.8768 6.25184 11.625 6.5625 11.625H13.3125C13.6232 11.625 13.875 11.8768 13.875 12.1875V18.375C13.875 18.9963 13.3713 19.5 12.75 19.5H7.125C6.50368 19.5 6 18.9963 6 18.375V12.1875Z\",\n fill: \"white\"\n})), _path3 || (_path3 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M6 7.125C6 6.50368 6.50368 6 7.125 6H12.75C13.3713 6 13.875 6.50368 13.875 7.125V8.8125C13.875 9.12316 13.6232 9.375 13.3125 9.375H6.5625C6.25184 9.375 6 9.12316 6 8.8125V7.125Z\",\n fill: \"#ABAAF4\"\n})), _path4 || (_path4 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M16.125 7.125C16.125 6.50368 16.6287 6 17.25 6H22.875C23.4963 6 24 6.50368 24 7.125V8.8125C24 9.12316 23.7482 9.375 23.4375 9.375H16.6875C16.3768 9.375 16.125 9.12316 16.125 8.8125V7.125Z\",\n fill: \"#ABAAF4\"\n})));\nexport default SvgBoardsDefault;","var _path, _path2, _path3, _path4;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nconst SvgIconConversationsv2 = props => /*#__PURE__*/React.createElement(\"svg\", _extends({\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 32 32\"\n}, props), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M5 3H27C29.2091 3 31 4.79086 31 7V21C31 23.2091 29.2091 25 27 25H26V27.6638C26 28.7161 24.8382 29.3537 23.9506 28.7885L18.6553 25.4172C18.2273 25.1447 17.7305 25 17.2232 25H5C2.79086 25 1 23.2091 1 21V7C1 4.79086 2.79086 3 5 3Z\",\n fill: \"white\"\n})), _path2 || (_path2 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M12.5847 10.4909C12.8715 10.5971 12.8715 11.0027 12.5847 11.1089L12.1626 11.2651C11.5614 11.4875 11.0874 11.9615 10.865 12.5627L10.7088 12.9848C10.6026 13.2716 10.197 13.2716 10.0908 12.9848L9.93464 12.5627C9.71219 11.9615 9.23821 11.4875 8.63706 11.2651L8.21492 11.1089C7.92811 11.0027 7.92811 10.5971 8.21492 10.4909L8.63706 10.3347C9.23821 10.1123 9.71219 9.63831 9.93464 9.03715L10.0908 8.61501C10.197 8.3282 10.6026 8.3282 10.7088 8.61501L10.865 9.03715C11.0874 9.63831 11.5614 10.1123 12.1626 10.3347L12.5847 10.4909Z\",\n fill: \"#0099FF\"\n})), _path3 || (_path3 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M20.3696 16.582C20.9432 16.7942 20.9432 17.6056 20.3696 17.8178L19.5253 18.1302C18.323 18.5751 17.375 19.5231 16.9301 20.7254L16.6177 21.5697C16.4055 22.1433 15.5941 22.1433 15.3819 21.5697L15.0695 20.7254C14.6246 19.5231 13.6766 18.5751 12.4743 18.1302L11.63 17.8178C11.0564 17.6056 11.0564 16.7942 11.63 16.582L12.4743 16.2696C13.6766 15.8247 14.6246 14.8767 15.0695 13.6744L15.3819 12.8301C15.5941 12.2565 16.4055 12.2565 16.6177 12.8301L16.9301 13.6744C17.375 14.8767 18.323 15.8247 19.5253 16.2696L20.3696 16.582Z\",\n fill: \"#FF6100\"\n})), _path4 || (_path4 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M20.3877 6.28682C20.5292 5.9044 21.0701 5.90439 21.2116 6.28681L21.4198 6.84966C21.7164 7.65121 22.3484 8.28317 23.1499 8.57977L23.7128 8.78805C24.0952 8.92955 24.0952 9.47044 23.7128 9.61195L23.1499 9.82022C22.3484 10.1168 21.7164 10.7488 21.4198 11.5503L21.2116 12.1132C21.0701 12.4956 20.5292 12.4956 20.3877 12.1132L20.1794 11.5503C19.8828 10.7488 19.2508 10.1168 18.4493 9.82022L17.8864 9.61195C17.504 9.47044 17.504 8.92955 17.8864 8.78805L18.4493 8.57977C19.2508 8.28317 19.8828 7.65121 20.1794 6.84966L20.3877 6.28682Z\",\n fill: \"#FFB629\"\n})));\nexport default SvgIconConversationsv2;","/* eslint-disable max-lines */\nimport React from 'react';\n\nimport { IconProductPagesMono, IconProductPagesColor } from '@jotforminc/svg-icons';\n\nimport PropTypes, { oneOfType } from 'prop-types';\nimport { RESOURCE_TYPES } from '@jotforminc/resource-picker';\nimport IconAppAnalytics from '../../assets/svg/iconAppAnalytics.svg';\nimport IconAppBuilder from '../../assets/svg/iconAppBuilder.svg';\nimport IconAppCards from '../../assets/svg/iconAppCards.svg';\nimport IconAppForm from '../../assets/svg/iconAppForm.svg';\nimport IconAppInbox from '../../assets/svg/iconAppInbox.svg';\nimport IconAppPdfEditor from '../../assets/svg/iconAppPdfEditor.svg';\nimport IconAppReports from '../../assets/svg/iconAppReports.svg';\nimport IconAppSheets from '../../assets/svg/iconAppSheets.svg';\nimport IconAppUploads from '../../assets/svg/iconAppUploads.svg';\nimport IconAppMyApps from '../../assets/svg/iconAppMyApps.svg';\nimport IconAppAiAgentBuilder1 from '../../assets/svg/iconAppAiAgentBuilder1.svg';\nimport IconAppAiAgentBuilder2 from '../../assets/svg/iconAppAiAgentBuilder2.svg';\nimport IconConversations1 from '../../assets/svg/iconConversationsv1.svg';\nimport IconAppMyKiosks from '../../assets/svg/iconAppMyKiosks.svg';\nimport IconAppMyForms from '../../assets/svg/iconAppMyForms.svg';\nimport IconAppMyTasks from '../../assets/svg/iconAppMyTasks.svg';\nimport IconAppSign from '../../assets/svg/iconAppSign.svg';\nimport IconAppApprovals from '../../assets/svg/iconAppApprovals.svg';\nimport IconAppMyTeams from '../../assets/svg/iconAppMyTeams.svg';\nimport IconAppMyWorkspace from '../../assets/svg/iconAppMyWorkspace.svg';\nimport IconAppMyContacts from '../../assets/svg/iconAppMyContacts.svg';\nimport IconAppBoards from '../../assets/svg/appIcons/boards_selected.svg';\n\nimport AppIcons from './appIcons';\nimport { getDefaultLogoSrc } from '../../utils/utils';\n\n// TEMPORARY. WILL BE DELETED AFTER ACTUAL RELEASE :) SORRY AND THANKS.\nconst isWorkflowReleased = window?.isWorkflowReleased;\nconst MY_TASKS_TEXT = {\n appLink: isWorkflowReleased ? '/myworkflows/' : '/myapprovals/',\n title: isWorkflowReleased ? 'My Workflows' : 'My Approvals',\n titleForTeamContext: isWorkflowReleased ? 'Workflow' : 'Approvals'\n};\n\nconst APPROVALS_TEXT = {\n title: isWorkflowReleased ? 'Workflow Builder' : 'Approvals',\n explanation: `Build ${isWorkflowReleased ? 'workflows' : 'approval flows'} from your forms, create custom outcomes, and send email notifications to submitters.`\n};\n\n/** TODO::Branding\n * - Delete primary and secondary colors (we are using appColor prop)\n */\n\nexport const appToResourceType = app => {\n switch (app) {\n case 'portal':\n return RESOURCE_TYPES.APP;\n case 'approvals':\n return RESOURCE_TYPES.APPROVAL;\n case 'sign':\n return RESOURCE_TYPES.SIGN;\n case 'signInbox':\n return RESOURCE_TYPES.SIGN_INBOX;\n case 'boards':\n return RESOURCE_TYPES.BOARD;\n default:\n return RESOURCE_TYPES.FORM;\n }\n};\n\nexport const navigationItems = {\n viewForm: {\n 'data-icon': 'forForm',\n icon: ,\n appLink: formID => {\n const isProduction = 'JOTFORM_ENV' in window && window.JOTFORM_ENV === 'PRODUCTION';\n if (isProduction) {\n return `//form.jotform.com/${formID}`;\n }\n return `/${formID}`;\n },\n title: 'View Form',\n target: '_blank',\n primaryColor: '#5749C6',\n secondaryColor: '#4034B4',\n backgroundColor: '#FFFFFF'\n },\n formBuilder: {\n 'data-icon': 'forBuilder',\n icon: ,\n appLink: formID => `/build/${formID}`,\n title: 'Form Builder',\n className: 'isBuilder',\n target: '_self',\n components: {\n logo: {\n visible: true,\n src: 'https://cdn.jotfor.ms/assets/img/logo/jotform-logo-orange@4x.png'\n },\n title: {\n visible: true,\n editable: true,\n isIconVisible: false\n },\n subTitle: {\n visible: true,\n title: 'View This Form',\n isIconVisible: false\n }\n },\n primaryColor: '#F38632',\n secondaryColor: '#D26612',\n backgroundColor: '#FFFFFF'\n },\n pdfEditor: {\n 'data-icon': 'forPdfEditor',\n icon: ,\n appLink: formID => `/pdf-editor/${formID}`,\n title: 'PDF Editor',\n logo: 'https://cdn.jotfor.ms/assets/img/logo/jotform-logo-white@4x.png',\n className: 'isPdfEditor',\n target: '_self',\n components: {\n logo: {\n visible: true,\n src: 'https://cdn.jotfor.ms/assets/img/logo/jotform-logo-white@4x.png'\n },\n title: {\n visible: true,\n editable: false,\n isIconVisible: true\n },\n subTitle: {\n visible: true,\n title: 'View This Form',\n isIconVisible: false\n }\n },\n primaryColor: '#3468E7',\n secondaryColor: '#1C4BBE',\n backgroundColor: '#3161CF'\n },\n tables: {\n 'data-icon': 'forSheets',\n icon: ,\n appLink: formID => `/tables/${formID}`,\n title: 'Tables',\n className: 'isSheets',\n target: '_self',\n components: {\n logo: {\n visible: true,\n src: 'https://cdn.jotfor.ms/assets/img/logo/jotform-logo-white@4x.png'\n },\n title: {\n visible: true,\n editable: true,\n isIconVisible: true\n },\n subTitle: {\n visible: true,\n title: 'View This Form',\n isIconVisible: false\n }\n },\n primaryColor: '#38BA71',\n secondaryColor: '#0D9549',\n backgroundColor: '#0D9549'\n },\n appTables: {\n 'data-icon': 'forSheets',\n icon: ,\n icons: AppIcons.tables,\n appLink: formID => `/tables/withApp/${formID}`,\n title: 'Tables',\n className: 'isSheets',\n target: '_self',\n components: {\n title: {\n visible: true,\n editable: true,\n isIconVisible: true\n },\n subTitle: {\n visible: true,\n title: 'View This Form',\n isIconVisible: false\n }\n },\n primaryColor: '#FF6100',\n secondaryColor: '#FF6100',\n backgroundColor: '#FFFFFF',\n appColor: '#149F43'\n },\n cards: {\n 'data-icon': 'forCards',\n icon: ,\n appLink: formID => `/tables/${formID}`,\n title: 'Cards',\n className: 'isCards',\n target: '_self',\n components: {\n logo: {\n visible: true,\n src: 'https://cdn.jotfor.ms/assets/img/logo/jotform-logo-white@4x.png'\n },\n title: {\n visible: true,\n editable: false,\n isIconVisible: true\n },\n subTitle: {\n visible: false,\n title: 'View This Form',\n isIconVisible: false\n }\n },\n primaryColor: '#2E5DFF',\n secondaryColor: '#4277FF',\n backgroundColor: '#4277FF'\n },\n uploads: {\n 'data-icon': 'forUploads',\n icon: ,\n appLink: formID => `/tables/${formID}`,\n title: 'Uploads',\n className: 'isUploads',\n target: '_self',\n components: {\n logo: {\n visible: true,\n src: 'https://cdn.jotfor.ms/assets/img/logo/jotform-logo-white@4x.png'\n },\n title: {\n visible: true,\n editable: false,\n isIconVisible: true\n },\n subTitle: {\n visible: false,\n title: 'View This Form',\n isIconVisible: false\n }\n },\n primaryColor: '#EA6041',\n secondaryColor: '#F07A59',\n backgroundColor: '#F07A59'\n },\n inbox: {\n 'data-icon': 'forInbox',\n icon: ,\n appLink: formID => `/inbox/${formID}`,\n title: 'Inbox',\n className: 'isInbox',\n target: '_self',\n components: {\n logo: {\n visible: true,\n src: 'https://cdn.jotfor.ms/assets/img/logo/jotform-logo-white@4x.png'\n },\n title: {\n visible: true,\n editable: false,\n isIconVisible: true\n },\n subTitle: {\n visible: true,\n title: 'View This Form',\n isIconVisible: false\n }\n },\n primaryColor: '#39B9C5',\n secondaryColor: '#228DB5',\n backgroundColor: '#0097a7'\n },\n signInbox: {\n 'data-icon': 'forInbox',\n icon: ,\n appLink: formID => `/inbox/${formID}`,\n title: 'Sign Inbox',\n className: 'isInbox',\n target: '_self',\n components: {\n logo: {\n visible: true,\n src: 'https://cdn.jotfor.ms/assets/img/logo/jotform-logo-white@4x.png'\n },\n title: {\n visible: true,\n editable: false,\n isIconVisible: true\n },\n subTitle: {\n visible: true,\n title: 'View This Form',\n isIconVisible: false\n }\n },\n primaryColor: '#39B9C5',\n secondaryColor: '#228DB5',\n backgroundColor: '#0097a7'\n },\n portal: {\n 'data-icon': 'forPortal',\n icon: ,\n appLink: formID => `/app/buildWith/${formID}`,\n title: 'App Builder',\n className: 'isPortal',\n target: '_self',\n components: {\n logo: {\n visible: true,\n src: 'https://cdn.jotfor.ms/assets/img/logo/jotform-logo-white@4x.png'\n },\n title: {\n visible: true,\n editable: false,\n isIconVisible: true\n },\n subTitle: {\n visible: true,\n title: 'View This Form',\n isIconVisible: false\n }\n },\n primaryColor: '#69519d',\n secondaryColor: '#42277d',\n backgroundColor: '#69519d'\n },\n aiAgentBuilder: {\n 'data-icon': 'forAiAgentBuilder',\n icon: ,\n appLink: agentID => `/agent/build/${agentID}`,\n title: 'AI Agent Builder',\n className: 'isPortal',\n target: '_self',\n components: {\n logo: {\n visible: true,\n src: 'https://cdn.jotfor.ms/assets/img/logo/jotform-logo-white@4x.png'\n },\n title: {\n visible: true,\n editable: false,\n isIconVisible: true\n },\n subTitle: {\n visible: true,\n title: 'View This Form',\n isIconVisible: false\n }\n },\n primaryColor: '#69519d',\n secondaryColor: '#09f',\n appColor: '#09f',\n backgroundColor: '#69519d'\n },\n workflow: {\n 'data-icon': 'forWorkflow',\n icon: ,\n appLink: () => '/workflow',\n title: 'Workflow Builder',\n className: 'isWorkflow',\n target: '_self',\n components: {\n logo: {\n visible: true,\n src: 'https://cdn.jotfor.ms/assets/img/logo/jotform-logo-white@4x.png'\n },\n title: {\n visible: true,\n editable: false,\n isIconVisible: true\n },\n subTitle: {\n visible: true,\n title: '',\n isIconVisible: false\n }\n },\n primaryColor: '#37836F',\n secondaryColor: '#025F46',\n backgroundColor: '#37836F'\n },\n myForms: {\n 'data-icon': 'forMyForms',\n icon: ,\n appLink: () => '/myforms',\n title: 'My Forms',\n className: 'isMyForms',\n target: '_self',\n components: {\n logo: {\n visible: true,\n src: 'https://cdn.jotfor.ms/assets/img/logo/jotform-logo-white@4x.png'\n },\n title: {\n visible: false,\n editable: false,\n isIconVisible: false\n },\n subTitle: {\n visible: false,\n isIconVisible: false\n }\n },\n primaryColor: '#FFB448',\n secondaryColor: '#e89010',\n backgroundColor: '#2D364C'\n },\n myApps: {\n 'data-icon': 'forMyApps',\n icon: ,\n appLink: '/myapps/',\n title: 'My Apps',\n className: 'isMyApps',\n target: '_self',\n components: {\n logo: {\n visible: true,\n src: 'https://cdn.jotfor.ms/assets/img/logo/jotform-logo-white@4x.png'\n },\n title: {\n visible: false,\n editable: false,\n isIconVisible: false\n },\n subTitle: {\n visible: false,\n isIconVisible: false\n }\n },\n primaryColor: '#69519d',\n secondaryColor: '#42277d',\n backgroundColor: '#745CA9'\n },\n myKiosks: {\n 'data-icon': 'forMyKiosks',\n icon: ,\n appLink: '/mykiosks/',\n title: 'My Kiosks',\n className: 'isMyKiosks',\n target: '_self',\n components: {\n logo: {\n visible: true,\n src: 'https://cdn.jotfor.ms/assets/img/logo/jotform-logo-white@4x.png'\n },\n title: {\n visible: false,\n editable: false,\n isIconVisible: false\n },\n subTitle: {\n visible: false,\n isIconVisible: false\n }\n },\n primaryColor: '#BDC1D7',\n secondaryColor: '#ADB2CD',\n backgroundColor: '#BDC1D7'\n },\n enterpriseAdmin: {\n 'data-icon': 'forEnterpriseAdmin',\n icon: ,\n appLink: () => '/enterprise-admin/',\n title: 'Admin',\n target: '_self',\n components: {\n logo: {\n visible: true,\n src: 'https://cdn.jotfor.ms/assets/img/logo/jotform-logo-white@4x.png'\n },\n title: {\n visible: true,\n editable: false,\n isIconVisible: true\n },\n subTitle: {\n visible: true,\n title: 'View This Form',\n isIconVisible: false\n }\n },\n primaryColor: '#30336A',\n secondaryColor: '#3E417C',\n backgroundColor: '#30336A'\n },\n formAnalytics: {\n 'data-icon': 'forAnalytics',\n icon: ,\n appLink: formID => `/analytics/${formID}`,\n title: 'Form Analytics',\n target: '_self',\n primaryColor: '#AF4AE9',\n secondaryColor: '#8F2DD5',\n backgroundColor: '#5C268B'\n },\n reports: {\n 'data-icon': 'forReports',\n icon: ,\n appLink: formID => `/reports/${formID}`,\n components: {\n logo: {\n visible: true,\n src: 'https://cdn.jotfor.ms/assets/img/logo/jotform-logo-white@4x.png'\n },\n title: {\n visible: true,\n editable: true,\n isIconVisible: true\n },\n subTitle: {\n visible: true,\n title: 'View This Form',\n isIconVisible: false\n }\n },\n title: 'Report Builder',\n target: '_self',\n primaryColor: '#4D5773',\n secondaryColor: '#2E354A',\n backgroundColor: '#2E354A'\n },\n boards: {\n 'data-icon': 'forBoards',\n components: {\n logo: {\n visible: true,\n src: 'https://cdn.jotfor.ms/assets/img/logo/jotform-logo-white@4x.png'\n },\n title: {\n visible: true,\n editable: true,\n isIconVisible: false\n },\n subTitle: {\n visible: true,\n isIconVisible: false\n }\n },\n icon: ,\n icons: AppIcons.boards,\n appLink: formID => {\n return `/boards/new/${formID}?from=formBuilder-navigation`;\n },\n title: 'Boards',\n className: 'isBoards',\n target: '_self',\n primaryColor: '#FF6100',\n secondaryColor: '#5C59ED',\n backgroundColor: '#5C59ED'\n },\n conversations: {\n 'data-icon': 'forConversations',\n components: {\n logo: {\n visible: true,\n src: 'https://cdn.jotfor.ms/assets/img/logo/jotform-logo-white@4x.png'\n },\n title: {\n visible: true,\n editable: false,\n isIconVisible: false\n },\n subTitle: {\n visible: true,\n isIconVisible: false\n }\n },\n icon: ,\n icons: AppIcons.conversations,\n appLink: formID => {\n return `/conversations/withForm/${formID}`;\n },\n title: 'Conversations',\n className: 'isConversations',\n target: '_self',\n primaryColor: '#FF6100',\n secondaryColor: '#5C59ED',\n backgroundColor: '#5C59ED'\n },\n myReports: {\n 'data-icon': 'forMyReports',\n icon: ,\n appLink: '/myreports/',\n title: 'My Reports',\n className: 'isMyReports',\n target: '_self',\n components: {\n logo: {\n visible: true,\n src: 'https://cdn.jotfor.ms/assets/img/logo/jotform-logo-white@4x.png'\n },\n title: {\n visible: false,\n editable: false,\n isIconVisible: false\n },\n subTitle: {\n visible: false,\n isIconVisible: false\n }\n },\n primaryColor: '#4E5773',\n secondaryColor: '#323F62',\n backgroundColor: '#3c4253'\n },\n myTables: {\n 'data-icon': 'forSheets',\n icon: ,\n appLink: '/mytables/',\n title: 'My Tables',\n className: 'isMySheets',\n target: '_self',\n components: {\n logo: {\n visible: true,\n src: 'https://cdn.jotfor.ms/assets/img/logo/jotform-logo-white@4x.png'\n },\n title: {\n visible: false,\n editable: false,\n isIconVisible: false\n },\n subTitle: {\n visible: false,\n isIconVisible: false\n }\n },\n primaryColor: '#38ba71',\n secondaryColor: '#0d9549',\n backgroundColor: '#0d9549'\n },\n myTasks: {\n 'data-icon': 'forTasks',\n icon: ,\n ...MY_TASKS_TEXT,\n className: 'isMyTasks',\n target: '_self',\n components: {\n logo: {\n visible: true,\n src: 'https://cdn.jotfor.ms/assets/img/logo/jotform-logo-white@4x.png'\n },\n title: {\n visible: false,\n editable: false,\n isIconVisible: false\n },\n subTitle: {\n visible: false,\n isIconVisible: false\n }\n },\n primaryColor: '#37836F',\n secondaryColor: '#025F46',\n backgroundColor: '#025F46'\n },\n submissions: {\n 'data-icon': 'forSheets',\n icon: ,\n appLink: formID => `/submissions/${formID}`,\n title: 'Submissions',\n className: 'isSheets',\n target: '_self',\n components: {\n logo: {\n visible: true,\n src: 'https://cdn.jotfor.ms/assets/img/logo/jotform-logo-white@4x.png'\n },\n title: {\n visible: true,\n editable: false,\n isIconVisible: true\n },\n subTitle: {\n visible: true,\n title: 'View This Form',\n isIconVisible: false\n }\n },\n primaryColor: '#037B38',\n secondaryColor: '#0D9549',\n backgroundColor: '#0D9549'\n },\n oldPdfEditor: {\n 'data-icon': 'forPdfEditor',\n icon: ,\n appLink: formID => `/page.php?p=pdfEditor&formID=${formID}`,\n title: 'PDF Editor',\n logo: 'https://cdn.jotfor.ms/assets/img/logo/jotform-logo-white@4x.png',\n className: 'isPdfEditor',\n target: '_self',\n components: {\n logo: {\n visible: true,\n src: 'https://cdn.jotfor.ms/assets/img/logo/jotform-logo-white@4x.png'\n },\n title: {\n visible: true,\n editable: false,\n isIconVisible: true\n },\n subTitle: {\n visible: true,\n title: 'View This Form',\n isIconVisible: false\n }\n },\n primaryColor: '#254DB3',\n secondaryColor: '#3161CF',\n backgroundColor: '#3161CF'\n },\n sign: {\n 'data-icon': 'forSign',\n icon: ,\n appLink: formID => `/sign/${formID}`,\n title: 'Sign Builder',\n className: 'isSign',\n target: '_self',\n components: {\n logo: {\n visible: true,\n src: 'https://cdn.jotfor.ms/assets/img/logo/jotform-logo-white@4x.png'\n },\n title: {\n visible: true,\n editable: true,\n isIconVisible: true\n },\n subTitle: {\n visible: false,\n isIconVisible: false\n }\n },\n primaryColor: '#7BB60F',\n secondaryColor: '#6b9e0d',\n backgroundColor: '#7BB60F'\n },\n approvals: {\n 'data-icon': 'forApprovals',\n icon: ,\n appLink: formID => `/workflow/withForm/${formID}`,\n title: 'Approvals',\n className: 'isApprovals',\n target: '_self',\n components: {\n logo: {\n visible: true,\n src: 'https://cdn.jotfor.ms/assets/img/logo/jotform-logo-white@4x.png'\n },\n title: {\n visible: true,\n editable: true,\n isIconVisible: true\n },\n subTitle: {\n visible: false,\n isIconVisible: false\n }\n },\n primaryColor: '#37836F',\n secondaryColor: '#025F46',\n backgroundColor: '#37836F'\n },\n myDocuments: {\n 'data-icon': 'forMyDocuments',\n icon: ,\n appLink: '/mysigndocuments/',\n title: 'My Sign Documents',\n className: 'isMyDocuments',\n target: '_self',\n components: {\n logo: {\n visible: true,\n src: 'https://cdn.jotfor.ms/assets/img/logo/jotform-logo-white@4x.png'\n },\n title: {\n visible: false,\n editable: false,\n isIconVisible: false\n },\n subTitle: {\n visible: false,\n isIconVisible: false\n }\n },\n primaryColor: '#7BB60F',\n secondaryColor: '#6b9e0d',\n backgroundColor: '#7BB60F'\n },\n myTeams: {\n 'data-icon': 'forMyTeams',\n icon: ,\n appLink: '/myteams/',\n title: 'My Teams',\n target: '_self',\n primaryColor: '#18235C',\n secondaryColor: '#18235C',\n backgroundColor: '#18235C'\n },\n myWorkspace: {\n 'data-icon': 'forMyWorkspace',\n icon: ,\n appLink: '/myworkspace/',\n title: 'My Workspace',\n target: '_self',\n primaryColor: '#18235C',\n secondaryColor: '#18235C',\n backgroundColor: '#18235C'\n },\n myAgents: {\n 'data-icon': 'forMyAgents',\n icon: ,\n appLink: '/myagents/',\n title: 'My Agents',\n target: '_self',\n primaryColor: '#0099ff',\n secondaryColor: '#0099ff',\n backgroundColor: '#0099ff'\n },\n myContacts: {\n 'data-icon': 'forMyContacts',\n icon: ,\n appLink: '/mycontacts/',\n title: 'My Contacts',\n target: '_self',\n primaryColor: '#895FFF',\n secondaryColor: '#895FFF',\n backgroundColor: '#895FFF'\n },\n myPages: {\n 'data-icon': 'forMyPages',\n icon: ,\n appLink: '/mypages/',\n title: 'My Pages',\n className: 'isMyPages',\n target: '_self',\n primaryColor: '#034f96',\n secondaryColor: '#034f96',\n backgroundColor: '#034f96'\n },\n myBoards: {\n 'data-icon': 'forMyBoards',\n components: {\n logo: {\n visible: true,\n src: 'https://cdn.jotfor.ms/assets/img/logo/jotform-logo-white@4x.png'\n },\n title: {\n visible: true,\n editable: false,\n isIconVisible: true\n },\n subTitle: {\n visible: false,\n isIconVisible: false\n }\n },\n icon: ,\n icons: AppIcons.boards,\n appLink: '/myboards/',\n title: 'My Boards',\n className: 'isBoards',\n target: '_self',\n primaryColor: '#FF6100',\n secondaryColor: '#5C59ED',\n backgroundColor: '#5C59ED'\n }\n};\n\nconst branding21sharedConfigs = {\n components: {\n logo: {\n visible: true,\n src: getDefaultLogoSrc()\n }\n },\n colors: {\n accountBoxBorderColor: '#FF6100'\n }\n};\n\nexport const navigationItemsForBranding21 = {\n viewForm: {\n 'data-icon': 'forForm',\n icon: ,\n icons: AppIcons.viewForm,\n appLink: formID => {\n const isProduction = 'JOTFORM_ENV' in window && window.JOTFORM_ENV === 'PRODUCTION';\n if (isProduction) {\n return `//form.jotform.com/${formID}`;\n }\n return `/${formID}`;\n },\n title: 'View Form',\n explanation: 'See your form in action.',\n target: '_blank',\n primaryColor: '#5749C6',\n secondaryColor: '#4034B4',\n backgroundColor: '#FFFFFF',\n appColor: '#343C6A',\n ...branding21sharedConfigs.colors\n },\n formBuilder: {\n 'data-icon': 'forBuilder',\n icon: ,\n icons: AppIcons.formBuilder,\n appLink: formID => `/build/${formID}`,\n title: 'Form Builder',\n explanation: 'Create forms and customize them with styling options to match your branding.',\n className: 'isBuilder',\n target: '_self',\n components: {\n ...branding21sharedConfigs.components,\n title: {\n visible: true,\n editable: true,\n isIconVisible: false\n },\n subTitle: {\n visible: true,\n title: 'View This Form',\n isIconVisible: false\n }\n },\n primaryColor: '#F38632',\n secondaryColor: '#D26612',\n backgroundColor: '#FFFFFF',\n appColor: '#FF6100',\n ...branding21sharedConfigs.colors\n },\n pdfEditor: {\n 'data-icon': 'forPdfEditor',\n icon: ,\n icons: AppIcons.pdfEditor,\n appLink: formID => `/pdf-editor/${formID}`,\n title: 'PDF Editor',\n explanation: 'Automatically convert your form responses into professional-looking PDF documents.',\n logo: getDefaultLogoSrc(),\n className: 'isPdfEditor',\n target: '_self',\n components: {\n ...branding21sharedConfigs.components,\n title: {\n visible: true,\n editable: false,\n isIconVisible: true\n },\n subTitle: {\n visible: true,\n title: 'View This Form',\n isIconVisible: false\n }\n },\n primaryColor: '#3468E7',\n secondaryColor: '#1C4BBE',\n backgroundColor: '#3161CF',\n appColor: '#3E62C8',\n ...branding21sharedConfigs.colors\n },\n tables: {\n 'data-icon': 'forSheets',\n icon: ,\n icons: AppIcons.tables,\n appLink: formID => `/tables/${formID}`,\n title: 'Tables',\n explanation: 'View and manage your form responses, collaborate with teammates, and more.',\n className: 'isSheets',\n target: '_self',\n components: {\n ...branding21sharedConfigs.components,\n title: {\n visible: true,\n editable: true,\n isIconVisible: true\n },\n subTitle: {\n visible: true,\n title: 'View This Form',\n isIconVisible: false\n }\n },\n primaryColor: '#FF6100',\n secondaryColor: '#FF6100',\n backgroundColor: '#FFFFFF',\n appColor: '#149F43',\n ...branding21sharedConfigs.colors\n },\n appTables: {\n 'data-icon': 'forSheets',\n icon: ,\n icons: AppIcons.tables,\n appLink: formID => `/tables/withApp/${formID}`,\n title: 'Tables',\n className: 'isSheets',\n target: '_self',\n components: {\n ...branding21sharedConfigs.components,\n title: {\n visible: true,\n editable: true,\n isIconVisible: true\n },\n subTitle: {\n visible: true,\n title: 'View This Form',\n isIconVisible: false\n }\n },\n primaryColor: '#FF6100',\n secondaryColor: '#FF6100',\n backgroundColor: '#FFFFFF',\n appColor: '#149F43',\n ...branding21sharedConfigs.colors\n },\n inbox: {\n 'data-icon': 'forInbox',\n icon: ,\n icons: AppIcons.inbox,\n appLink: formID => `/inbox/${formID}`,\n title: 'Inbox',\n explanation: 'Manage your communications — respond to messages, forward form responses, leave comments, and tag teammates.',\n className: 'isInbox',\n target: '_self',\n components: {\n ...branding21sharedConfigs.components,\n title: {\n visible: true,\n editable: false,\n isIconVisible: true\n },\n subTitle: {\n visible: true,\n title: 'View This Form',\n isIconVisible: false\n }\n },\n primaryColor: '#39B9C5',\n secondaryColor: '#228DB5',\n backgroundColor: '#0097a7',\n appColor: '#249BB4',\n ...branding21sharedConfigs.colors\n },\n signInbox: {\n 'data-icon': 'forInbox',\n icon: ,\n icons: AppIcons.inbox,\n appLink: formID => `/inbox/${formID}`,\n title: 'Sign Inbox',\n explanation: 'Manage your communications — respond to messages, forward form responses, leave comments, and tag teammates.',\n className: 'isInbox',\n target: '_self',\n components: {\n ...branding21sharedConfigs.components,\n title: {\n visible: true,\n editable: false,\n isIconVisible: true\n },\n subTitle: {\n visible: true,\n title: 'View This Form',\n isIconVisible: false\n }\n },\n primaryColor: '#39B9C5',\n secondaryColor: '#228DB5',\n backgroundColor: '#0097a7',\n appColor: '#249BB4',\n ...branding21sharedConfigs.colors\n },\n portal: {\n 'data-icon': 'forPortal',\n icon: ,\n icons: AppIcons.portal,\n appLink: (formID, oldNavigation) => `/app/${oldNavigation ? 'buildWith' : 'build'}/${formID}`,\n createLink: formIDs => {\n if (typeof formIDs === 'string') {\n return `/app/create/${formIDs}`;\n }\n if (formIDs.length === 0) {\n return '/app';\n }\n return `/app/create/${formIDs.join(',')}`;\n },\n title: 'App Builder',\n explanation: 'Make downloadable no-code apps for your business. Add forms, links, widgets, and your branding.',\n className: 'isPortal',\n target: '_self',\n components: {\n ...branding21sharedConfigs.components,\n title: {\n visible: true,\n editable: false,\n isIconVisible: true\n },\n subTitle: {\n visible: true,\n title: 'View This Form',\n isIconVisible: false\n }\n },\n primaryColor: '#69519d',\n secondaryColor: '#42277d',\n backgroundColor: '#69519d',\n appColor: '#8D4ECC',\n ...branding21sharedConfigs.colors\n },\n workflow: {\n 'data-icon': 'forWorkflow',\n icon: ,\n appLink: () => '/workflow',\n title: 'Workflow Builder',\n className: 'isWorkflow',\n target: '_self',\n components: {\n ...branding21sharedConfigs.components,\n title: {\n visible: true,\n editable: false,\n isIconVisible: true\n },\n subTitle: {\n visible: true,\n title: '',\n isIconVisible: false\n }\n },\n primaryColor: '#37836F',\n secondaryColor: '#025F46',\n backgroundColor: '#37836F',\n ...branding21sharedConfigs.colors\n },\n myForms: {\n 'data-icon': 'forMyForms',\n icon: ,\n icons: AppIcons.formBuilder,\n appLink: () => '/myforms/',\n title: 'My Forms',\n titleForTeamContext: 'Forms',\n className: 'isMyForms',\n target: '_self',\n components: {\n ...branding21sharedConfigs.components,\n title: {\n visible: false,\n editable: false,\n isIconVisible: false\n },\n subTitle: {\n visible: false,\n isIconVisible: false\n }\n },\n primaryColor: '#FFB448',\n secondaryColor: '#e89010',\n backgroundColor: '#2D364C',\n appColor: '#FF6100',\n ...branding21sharedConfigs.colors\n },\n myApps: {\n 'data-icon': 'forMyApps',\n icon: ,\n icons: AppIcons.portal,\n appLink: '/myapps/',\n title: 'My Apps',\n titleForTeamContext: 'Apps',\n className: 'isMyApps',\n target: '_self',\n components: {\n ...branding21sharedConfigs.components,\n title: {\n visible: false,\n editable: false,\n isIconVisible: false\n },\n subTitle: {\n visible: false,\n isIconVisible: false\n }\n },\n primaryColor: '#69519d',\n secondaryColor: '#42277d',\n backgroundColor: '#745CA9',\n appColor: '#7B5FD4',\n ...branding21sharedConfigs.colors\n },\n enterpriseAdmin: {\n 'data-icon': 'forEnterpriseAdmin',\n icon: ,\n appLink: () => '/enterprise-admin/',\n title: 'Admin',\n target: '_self',\n components: {\n ...branding21sharedConfigs.components,\n title: {\n visible: true,\n editable: false,\n isIconVisible: true\n },\n subTitle: {\n visible: true,\n title: 'View This Form',\n isIconVisible: false\n }\n },\n primaryColor: '#30336A',\n secondaryColor: '#3E417C',\n backgroundColor: '#30336A',\n ...branding21sharedConfigs.color\n },\n enterpriseManagementPanel: {\n 'data-icon': 'forEnterpriseManagementPanel',\n icon: ,\n appLink: () => '/enterprise-admin/',\n title: 'Admin',\n target: '_self',\n components: {\n ...branding21sharedConfigs.components,\n title: {\n visible: true,\n editable: false,\n isIconVisible: true\n },\n subTitle: {\n visible: true,\n title: 'View This Form',\n isIconVisible: false\n }\n },\n primaryColor: '#30336A',\n secondaryColor: '#3E417C',\n backgroundColor: '#30336A',\n ...branding21sharedConfigs.color\n },\n formAnalytics: {\n 'data-icon': 'forAnalytics',\n icon: ,\n icons: AppIcons.formAnalytics,\n appLink: formID => `/analytics/${formID}`,\n title: 'Form Analytics',\n explanation: 'Get the inside scoop on your form’s performance, including its conversion rate and where traffic is coming from.',\n target: '_self',\n primaryColor: '#AF4AE9',\n secondaryColor: '#8F2DD5',\n backgroundColor: '#5C268B',\n appColor: '#8F96CC',\n ...branding21sharedConfigs.colors\n },\n reports: {\n 'data-icon': 'forReports',\n components: {\n ...branding21sharedConfigs.components,\n title: {\n visible: true,\n editable: false,\n isIconVisible: true\n },\n subTitle: {\n visible: true,\n title: 'View This Form',\n isIconVisible: false\n }\n },\n icon: ,\n icons: AppIcons.reports,\n appLink: formID => `/reports/${formID}`,\n title: 'Report Builder',\n explanation: 'Automatically turn form responses into eye-catching reports with bar graphs, pie charts, and data grids.',\n target: '_self',\n primaryColor: '#4D5773',\n secondaryColor: '#2E354A',\n backgroundColor: '#2E354A',\n appColor: '#344067',\n ...branding21sharedConfigs.colors\n },\n boards: {\n 'data-icon': 'forBoards',\n components: {\n ...branding21sharedConfigs.components,\n title: {\n visible: true,\n editable: true,\n isIconVisible: false\n },\n subTitle: {\n visible: true,\n isIconVisible: false\n }\n },\n icon: ,\n icons: AppIcons.boards,\n title: 'Boards',\n explanation: 'Whatever the task, Jotform Boards is here to help you manage.',\n appLink: (formID, oldNavigation) => {\n if (oldNavigation) {\n return `/boards/new/${formID}?from=formBuilder-navigation`;\n }\n\n return `/boards/${formID}`;\n },\n createLink: formID => {\n return `/boards/new/${formID}?from=formBuilder-navigation`;\n },\n className: 'isBoards',\n target: '_self',\n primaryColor: '#FF6100',\n secondaryColor: '#5C59ED',\n backgroundColor: '#5C59ED',\n appColor: '#504ECC',\n ...branding21sharedConfigs.colors\n },\n conversations: {\n 'data-icon': 'forConversations',\n components: {\n ...branding21sharedConfigs.components,\n title: {\n visible: true,\n editable: false,\n isIconVisible: false\n },\n subTitle: {\n visible: true,\n isIconVisible: false\n }\n },\n icon: ,\n icons: AppIcons.conversations,\n title: 'Conversations',\n explanation: 'Whatever the task, Jotform Boards is here to help you manage.',\n appLink: formID => {\n return `/conversations/withForm/${formID}`;\n },\n className: 'isConversations',\n target: '_self',\n primaryColor: '#FF6100',\n secondaryColor: '#5C59ED',\n backgroundColor: '#5C59ED',\n appColor: '#504ECC',\n ...branding21sharedConfigs.colors\n },\n aiAgentBuilder: {\n 'data-icon': 'forAiAgentBuilder',\n icon: ,\n appLink: agentID => `/agent/build/${agentID}`,\n title: 'AI Agent Builder',\n className: 'isPortal',\n target: '_self',\n components: {\n ...branding21sharedConfigs.components,\n title: {\n visible: true,\n editable: false,\n isIconVisible: true\n },\n subTitle: {\n visible: true,\n isIconVisible: false\n }\n },\n primaryColor: '#69519d',\n secondaryColor: '#09f',\n appColor: '#09f',\n backgroundColor: '#69519d',\n ...branding21sharedConfigs.colors\n },\n myBoards: {\n 'data-icon': 'forMyBoards',\n components: {\n ...branding21sharedConfigs.components,\n title: {\n visible: true,\n editable: false,\n isIconVisible: true\n },\n subTitle: {\n visible: false,\n isIconVisible: false\n }\n },\n icon: ,\n icons: AppIcons.boards,\n appLink: '/myboards/',\n titleForTeamContext: 'Boards',\n title: 'My Boards',\n className: 'isBoards',\n target: '_self',\n primaryColor: '#FF6100',\n secondaryColor: '#5C59ED',\n backgroundColor: '#5C59ED',\n appColor: '#504ECC',\n ...branding21sharedConfigs.colors\n },\n myReports: {\n 'data-icon': 'forMyReports',\n icon: ,\n icons: AppIcons.reports,\n appLink: '/myreports/',\n title: 'My Reports',\n titleForTeamContext: 'Reports',\n className: 'isMyReports',\n target: '_self',\n components: {\n ...branding21sharedConfigs.components,\n title: {\n visible: false,\n editable: false,\n isIconVisible: false\n },\n subTitle: {\n visible: false,\n isIconVisible: false\n }\n },\n primaryColor: '#4E5773',\n secondaryColor: '#323F62',\n backgroundColor: '#3c4253',\n appColor: '#344168',\n ...branding21sharedConfigs.colors\n },\n myTables: {\n 'data-icon': 'forSheets',\n icon: ,\n icons: AppIcons.tables,\n appLink: '/mytables/',\n title: 'My Tables',\n titleForTeamContext: 'Tables',\n className: 'isMySheets',\n target: '_self',\n components: {\n ...branding21sharedConfigs.components,\n title: {\n visible: false,\n editable: false,\n isIconVisible: false\n },\n subTitle: {\n visible: false,\n isIconVisible: false\n }\n },\n primaryColor: '#38ba71',\n secondaryColor: '#0d9549',\n backgroundColor: '#0d9549',\n appColor: '#0D953B',\n ...branding21sharedConfigs.colors\n },\n myTasks: {\n 'data-icon': 'forTasks',\n icon: ,\n icons: AppIcons.approvals,\n ...MY_TASKS_TEXT,\n className: 'isMyTasks',\n target: '_self',\n components: {\n ...branding21sharedConfigs.components,\n title: {\n visible: false,\n editable: false,\n isIconVisible: false\n },\n subTitle: {\n visible: false,\n isIconVisible: false\n }\n },\n primaryColor: '#37836F',\n secondaryColor: '#025F46',\n backgroundColor: '#025F46',\n appColor: '#308A69',\n ...branding21sharedConfigs.colors\n },\n submissions: {\n 'data-icon': 'forSheets',\n icon: ,\n appLink: formID => `/submissions/${formID}`,\n title: 'Submissions',\n className: 'isSheets',\n target: '_self',\n components: {\n ...branding21sharedConfigs.components,\n title: {\n visible: true,\n editable: false,\n isIconVisible: true\n },\n subTitle: {\n visible: true,\n title: 'View This Form',\n isIconVisible: false\n }\n },\n primaryColor: '#037B38',\n secondaryColor: '#0D9549',\n backgroundColor: '#0D9549',\n ...branding21sharedConfigs.colors\n },\n oldPdfEditor: {\n 'data-icon': 'forPdfEditor',\n icon: ,\n appLink: formID => `/page.php?p=pdfEditor&formID=${formID}`,\n title: 'PDF Editor',\n logo: getDefaultLogoSrc(),\n className: 'isPdfEditor',\n target: '_self',\n components: {\n ...branding21sharedConfigs.components,\n title: {\n visible: true,\n editable: false,\n isIconVisible: true\n },\n subTitle: {\n visible: true,\n title: 'View This Form',\n isIconVisible: false\n }\n },\n primaryColor: '#254DB3',\n secondaryColor: '#3161CF',\n backgroundColor: '#3161CF',\n ...branding21sharedConfigs.colors\n },\n sign: {\n 'data-icon': 'forSign',\n icon: ,\n icons: AppIcons.sign,\n appLink: formID => `/sign/${formID}`,\n title: 'Sign Builder',\n explanation: 'Collect signatures on important documents in a few easy steps.',\n className: 'isSign',\n target: '_self',\n components: {\n ...branding21sharedConfigs.components,\n title: {\n visible: true,\n editable: true,\n isIconVisible: true\n },\n subTitle: {\n visible: true,\n isIconVisible: false\n }\n },\n primaryColor: '#7BB60F',\n secondaryColor: '#6b9e0d',\n backgroundColor: '#7BB60F',\n appColor: '#94CD2A',\n ...branding21sharedConfigs.colors\n },\n approvals: {\n 'data-icon': 'forApprovals',\n icon: ,\n icons: AppIcons.approvals,\n appLink: (formID, oldNavigation) => `/workflow/${oldNavigation ? 'withForm/' : ''}${formID}`,\n ...APPROVALS_TEXT,\n className: 'isApprovals',\n target: '_self',\n components: {\n ...branding21sharedConfigs.components,\n title: {\n visible: true,\n editable: true,\n isIconVisible: true\n },\n subTitle: {\n visible: false,\n isIconVisible: false\n }\n },\n primaryColor: '#37836F',\n secondaryColor: '#025F46',\n backgroundColor: '#37836F',\n appColor: '#007862',\n ...branding21sharedConfigs.colors\n },\n myDocuments: {\n 'data-icon': 'forMyDocuments',\n icon: ,\n icons: AppIcons.sign,\n appLink: '/mysigndocuments/',\n title: 'My Sign Documents',\n titleForTeamContext: 'Sign Documents',\n className: 'isMyDocuments',\n target: '_self',\n components: {\n ...branding21sharedConfigs.components,\n title: {\n visible: false,\n editable: false,\n isIconVisible: false\n },\n subTitle: {\n visible: false,\n isIconVisible: false\n }\n },\n primaryColor: '#7BB60F',\n secondaryColor: '#6b9e0d',\n backgroundColor: '#7BB60F',\n appColor: '#78BB07',\n ...branding21sharedConfigs.colors\n },\n pageBuilder: {\n 'data-icon': 'forPageBuilder',\n title: 'Page Builder',\n className: 'isPageBuilder',\n target: '_self',\n components: {\n ...branding21sharedConfigs.components,\n title: {\n visible: false,\n editable: false,\n isIconVisible: false\n },\n subTitle: {\n visible: false,\n isIconVisible: false\n }\n },\n primaryColor: '#0A1551',\n secondaryColor: '#18265b',\n backgroundColor: '#FFFFFF',\n appColor: '#0A1551',\n ...branding21sharedConfigs.colors\n },\n myTeams: {\n 'data-icon': 'forMyTeams',\n icon: ,\n icons: AppIcons.myTeams,\n appLink: '/myteams/',\n title: 'My Teams',\n target: '_self',\n primaryColor: '#18235C',\n secondaryColor: '#18235C',\n backgroundColor: '#18235C',\n appColor: '#18235C',\n ...branding21sharedConfigs.colors\n },\n myWorkspace: {\n 'data-icon': 'forMyWorkspace',\n icon: ,\n icons: AppIcons.myWorkspace,\n appLink: '/myworkspace/',\n title: 'My Workspace',\n target: '_self',\n primaryColor: '#18235C',\n secondaryColor: '#18235C',\n backgroundColor: '#18235C',\n appColor: '#18235C',\n ...branding21sharedConfigs.colors\n },\n myAgents: {\n 'data-icon': 'forMyAgents',\n icon: ,\n icons: AppIcons.myAgents,\n appLink: '/myagents/',\n title: 'My Agents',\n target: '_self',\n primaryColor: '#0099ff',\n secondaryColor: '#0099ff',\n backgroundColor: '#0099ff',\n appColor: '#0099ff',\n ...branding21sharedConfigs.colors\n },\n myContacts: {\n 'data-icon': 'forMyContacts',\n icon: ,\n icons: AppIcons.myContacts,\n appLink: '/mycontacts/',\n title: 'My Contacts',\n target: '_self',\n primaryColor: '#895FFF',\n secondaryColor: '#895FFF',\n backgroundColor: '#895FFF',\n appColor: '#895FFF',\n ...branding21sharedConfigs.colors\n },\n myPages: {\n 'data-icon': 'forMyPages',\n icon: ,\n icons: AppIcons.pages,\n appLink: '/mypages/',\n title: 'My Pages',\n className: 'isMyPages',\n target: '_self',\n primaryColor: '#034f96',\n secondaryColor: '#034f96',\n backgroundColor: '#034f96',\n appColor: '#034f96',\n ...branding21sharedConfigs.colors\n },\n singleSubmissionViewer: {\n title: 'Submission',\n className: 'isSingleSubmissionViewer',\n target: '_self',\n components: {\n ...branding21sharedConfigs.components,\n logo: {\n visible: true,\n src: 'https://cdn.jotfor.ms/assets/img/logo2021/jotform-logo-white.svg'\n },\n title: {\n visible: true,\n editable: false,\n isIconVisible: false\n },\n subTitle: {\n visible: true,\n title: 'View Form',\n isIconVisible: false\n }\n },\n primaryColor: '#39B9C5',\n secondaryColor: '#228DB5',\n backgroundColor: '#0097a7',\n appColor: '#249BB4',\n ...branding21sharedConfigs.colors\n },\n AIAgentSubmissionViewer: {\n title: 'AI Agent',\n className: 'isAIAgentSubmissionViewer',\n target: '_self',\n components: {\n ...branding21sharedConfigs.components,\n logo: {\n visible: true,\n src: 'https://cdn.jotfor.ms/assets/img/logo2021/jotform-logo-white.svg'\n },\n title: {\n visible: true,\n editable: false,\n isIconVisible: false\n },\n subTitle: {\n visible: true,\n title: 'View This Agent',\n isIconVisible: false\n }\n },\n primaryColor: '#39B9C5',\n secondaryColor: '#228DB5',\n backgroundColor: '#0097a7',\n appColor: '#249BB4',\n ...branding21sharedConfigs.colors\n }\n};\n\nexport const appConfigPropsTypes = PropTypes.shape({\n 'data-icon': PropTypes.string,\n icon: PropTypes.element,\n appLink: PropTypes.func,\n title: oneOfType([PropTypes.string, PropTypes.node]),\n className: PropTypes.string,\n target: PropTypes.string,\n components: PropTypes.shape({\n logo: PropTypes.shape({\n visible: PropTypes.bool,\n src: PropTypes.string\n }),\n title: PropTypes.shape({\n visible: PropTypes.bool,\n editable: PropTypes.bool,\n isIconVisible: PropTypes.bool\n }),\n subTitle: PropTypes.shape({\n visible: PropTypes.bool,\n title: PropTypes.string,\n isIconVisible: PropTypes.bool\n })\n })\n});\n\nconst defaultNavigationItemObject = appTitle => {\n return {\n 'data-icon': `for${appTitle}`,\n icon: ,\n appLink: formID => `/${formID}`,\n title: appTitle,\n className: `is${appTitle}`,\n components: {\n logo: {\n visible: true,\n src: 'https://cdn.jotfor.ms/assets/img/logo/jotform-logo-white@4x.png'\n },\n title: {\n visible: false,\n editable: false,\n isIconVisible: true\n },\n subTitle: {\n visible: false,\n title: 'View This Form',\n isIconVisible: false\n }\n },\n primaryColor: '#f38632',\n secondaryColor: '#d27e2d',\n backgroundColor: '#d27e2d'\n };\n};\n\nconst defaultBranding21NavigationItemObject = appTitle => {\n return {\n 'data-icon': `for${appTitle}`,\n icon: ,\n appLink: formID => `/${formID}`,\n title: appTitle,\n className: `is${appTitle}`,\n components: {\n logo: {\n visible: true,\n src: getDefaultLogoSrc()\n },\n title: {\n visible: false,\n editable: false,\n isIconVisible: true\n },\n subTitle: {\n visible: false,\n title: 'View This Form',\n isIconVisible: false\n }\n },\n primaryColor: '#f38632',\n secondaryColor: '#d27e2d',\n backgroundColor: '#d27e2d'\n };\n};\n\nexport const defaultNavigationItem = (appName, branding21) => {\n const appTitle = `${appName.charAt(0).toUpperCase()}${appName.substr(1)}`;\n\n return branding21 ? defaultBranding21NavigationItemObject(appTitle) : defaultNavigationItemObject(appTitle);\n};\n\nexport const getDefaultNavItems = branding21 => {\n return branding21 ? navigationItemsForBranding21 : navigationItems;\n};\n","var _circle, _rect, _path, _rect2, _path2, _path3, _path4;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nconst SvgTeamselectionNoteam = props => /*#__PURE__*/React.createElement(\"svg\", _extends({\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 47 61\"\n}, props), _circle || (_circle = /*#__PURE__*/React.createElement(\"circle\", {\n cx: 23.5,\n cy: 37.5,\n r: 23.5,\n fill: \"#E3E5F5\"\n})), _rect || (_rect = /*#__PURE__*/React.createElement(\"rect\", {\n x: 13,\n y: 24,\n width: 21.86,\n height: 26.91,\n rx: 3,\n fill: \"#fff\"\n})), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M31.72 42.56a3.44 3.44 0 1 1-6.87 0 3.44 3.44 0 0 1 6.87 0M26.82 36.87h2.95c1.07 0 1.95-.87 1.95-1.97v-2.93c0-1.1-.88-1.97-1.97-1.97h-2.93c-1.1 0-1.97.87-1.97 1.97v2.95c0 1.08.87 1.95 1.97 1.95ZM20.9 39.13h-2.93c-1.1 0-1.97.87-1.97 1.97v2.95c0 1.08.87 1.95 1.97 1.95h2.95c1.08 0 1.95-.87 1.95-1.97V41.1c0-1.1-.87-1.97-1.97-1.97ZM19.06 30.23a.4.4 0 0 1 .74 0l3.02 6.04a.4.4 0 0 1-.37.6h-6.04a.4.4 0 0 1-.37-.6l3.02-6.04Z\",\n fill: \"#6F76A7\"\n})), _rect2 || (_rect2 = /*#__PURE__*/React.createElement(\"rect\", {\n x: 9,\n y: 0.49,\n width: 29.7,\n height: 16.14,\n rx: 4,\n fill: \"#343C6A\"\n})), _path2 || (_path2 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M24.5 14.02a1 1 0 0 0-1.4 0l-1.63 1.6a1 1 0 0 0-.09 1.33l1.64 2.06a1 1 0 0 0 1.56 0l1.64-2.06a1 1 0 0 0-.09-1.34l-1.63-1.6Z\",\n fill: \"#343C6A\"\n})), _path3 || (_path3 = /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M13.4 6a2.07 2.07 0 1 0 4.15 0 2.07 2.07 0 0 0-4.15 0Zm5.25 1.07a1.75 1.75 0 1 0 3.5 0 1.75 1.75 0 0 0-3.5 0Zm.47 5.87h-7.3a.37.37 0 0 1-.36-.37 4.03 4.03 0 0 1 4-4.01h.01c2.22 0 4.02 1.8 4.02 4.01 0 .2-.16.37-.37.37Zm4.37 0h-3.2l.02-.16a4.9 4.9 0 0 0-1.25-3.28 3.4 3.4 0 0 1 4.74 3.12.3.3 0 0 1-.31.32Z\",\n fill: \"#fff\"\n})), _path4 || (_path4 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M33.6 8.46c0-1.14-.2-2.03-.65-2.59-.3-.4-.74-.67-1.4-.67-.66 0-1.08.27-1.4.67-.43.56-.63 1.45-.63 2.6 0 1.14.2 2.02.63 2.58.32.41.74.68 1.4.68.66 0 1.1-.27 1.4-.68.44-.56.65-1.44.65-2.59Zm1.66 0c0 1.2-.2 2.34-.8 3.27a3.31 3.31 0 0 1-2.9 1.48c-1.37 0-2.3-.6-2.9-1.48a5.78 5.78 0 0 1-.8-3.27c0-1.2.2-2.33.8-3.26a3.29 3.29 0 0 1 2.9-1.48c1.35 0 2.3.6 2.89 1.48.62.93.81 2.06.81 3.26Z\",\n fill: \"#fff\"\n})));\nexport default SvgTeamselectionNoteam;","var _defs, _g;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nconst SvgEmptyFormList = props => /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n xmlnsXlink: \"http://www.w3.org/1999/xlink\",\n viewBox: \"0 0 180 180\"\n}, props), _defs || (_defs = /*#__PURE__*/React.createElement(\"defs\", null, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M3.47 1.916L.423 60.092c-.049.93.644 1.722 1.545 1.769l45.738 2.397c.902.047 1.673-.668 1.722-1.597l3.049-58.178c.048-.928-.643-1.72-1.545-1.767L5.192.32C5.164.317 5.135.317 5.107.317c-.865 0-1.589.7-1.636 1.599z\",\n id: \"a\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M3.47 1.916L.423 60.092c-.049.93.644 1.722 1.545 1.769l45.738 2.397c.902.047 1.673-.668 1.722-1.597l3.049-58.178c.048-.928-.643-1.72-1.545-1.767L5.192.32C5.164.317 5.135.317 5.107.317c-.865 0-1.589.7-1.636 1.599z\",\n id: \"c\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M.569 1.405L.5 2.685a1.263 1.263 0 001.196 1.327l19.258 1.01a1.263 1.263 0 001.328-1.196l.067-1.28a1.264 1.264 0 00-1.196-1.327L1.897.209A1.263 1.263 0 00.569 1.405z\",\n id: \"e\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M.347 1.666L.279 2.945a1.264 1.264 0 001.196 1.328l19.258 1.01a1.263 1.263 0 001.328-1.196l.067-1.28a1.264 1.264 0 00-1.196-1.328L1.674.47A1.263 1.263 0 00.347 1.666v.001z\",\n id: \"g\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M.205 1.676L.14 2.956c-.037.696.482 1.29 1.159 1.325l39.85 2.09c.676.034 1.255-.502 1.291-1.199l.067-1.28c.037-.696-.482-1.29-1.159-1.325L1.497.478a1.14 1.14 0 00-.063-.001C.784.477.24 1 .205 1.677z\",\n id: \"i\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M.205 1.676L.14 2.956c-.037.696.482 1.29 1.159 1.325l39.85 2.09c.676.034 1.255-.502 1.291-1.199l.067-1.28c.037-.696-.482-1.29-1.159-1.325L1.497.478a1.161 1.161 0 00-.064-.001C.784.477.241 1 .205 1.677z\",\n id: \"k\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M.562 1.292l-.067 1.28c-.037.697.483 1.29 1.159 1.326l39.85 2.089c.677.035 1.255-.501 1.292-1.198l.067-1.28c.036-.696-.482-1.29-1.16-1.326L1.854.095A1.161 1.161 0 001.79.093c-.648 0-1.192.525-1.228 1.2z\",\n id: \"m\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M.562 1.292l-.067 1.28c-.037.697.483 1.29 1.159 1.326l39.85 2.089c.677.035 1.255-.501 1.292-1.198l.067-1.28c.036-.696-.482-1.29-1.16-1.326L1.854.095A1.161 1.161 0 001.79.093c-.649 0-1.192.525-1.228 1.2z\",\n id: \"o\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M47.788.244L2.013 1.79c-.903.031-1.61.81-1.578 1.74l1.97 58.223c.032.93.788 1.66 1.691 1.629l45.775-1.548c.903-.03 1.61-.81 1.578-1.74l-1.97-58.223c-.03-.91-.757-1.63-1.635-1.63-.019 0-.037 0-.056.002z\",\n id: \"q\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M41.11.274L2.046 1.594c-.904.032-1.61.81-1.578 1.74L.845 14.5c.031.93.789 1.659 1.692 1.63l39.064-1.323c.904-.03 1.61-.809 1.578-1.739l-.377-11.164c-.031-.912-.76-1.63-1.638-1.63h-.054z\",\n id: \"s\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M21.005.213L1.732.864A1.264 1.264 0 00.512 2.17l.043 1.28A1.264 1.264 0 001.86 4.67l19.274-.65a1.264 1.264 0 001.22-1.307l-.043-1.28A1.263 1.263 0 0021.05.213h-.045z\",\n id: \"u\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M20.989.485h-.044l-19.273.652a1.264 1.264 0 00-1.22 1.306l.043 1.28a1.263 1.263 0 001.306 1.22l19.273-.652a1.263 1.263 0 001.22-1.305l-.043-1.28A1.263 1.263 0 0020.99.486h-.001z\",\n id: \"w\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M41.208.37L1.326 1.719C.65 1.742.12 2.326.143 3.023l.043 1.28c.023.698.592 1.245 1.269 1.222l39.882-1.349c.677-.022 1.207-.606 1.184-1.304l-.043-1.28c-.024-.684-.57-1.223-1.229-1.223h-.04z\",\n id: \"y\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M41.146.574L1.263 1.922C.586 1.945.057 2.529.08 3.227l.044 1.28c.023.698.591 1.244 1.269 1.222l39.882-1.35c.677-.022 1.207-.606 1.183-1.304l-.043-1.28c-.023-.683-.569-1.222-1.228-1.222h-.041z\",\n id: \"A\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M4.133.14a4.001 4.001 0 10.27 7.999A4.002 4.002 0 004.271.138c-.046 0-.092 0-.138.002z\",\n id: \"C\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n id: \"E\",\n d: \"M.17 9.045l17.162-.58L8.466.335z\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n id: \"G\",\n d: \"M.417 8.813l17.163-.581L8.714.102z\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M.537 89.938c0 49.483 40.114 89.597 89.596 89.597 49.484 0 89.597-40.114 89.597-89.597S139.617.342 90.133.342C40.651.342.537 40.455.537 89.938\",\n id: \"I\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M.537 89.938c0 49.483 40.114 89.597 89.596 89.597 49.484 0 89.597-40.114 89.597-89.597S139.617.342 90.133.342C40.651.342.537 40.455.537 89.938\",\n id: \"K\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M.537 89.938c0 49.483 40.114 89.597 89.596 89.597 49.484 0 89.597-40.114 89.597-89.597S139.617.342 90.133.342C40.651.342.537 40.455.537 89.938\",\n id: \"M\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M.537 89.938c0 49.483 40.114 89.597 89.596 89.597 49.484 0 89.597-40.114 89.597-89.597S139.617.342 90.133.342C40.651.342.537 40.455.537 89.938\",\n id: \"O\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M.537 89.938c0 49.483 40.114 89.597 89.596 89.597 49.484 0 89.597-40.114 89.597-89.597S139.617.342 90.133.342C40.651.342.537 40.455.537 89.938\",\n id: \"Q\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M.537 89.938c0 49.483 40.114 89.597 89.596 89.597 49.484 0 89.597-40.114 89.597-89.597S139.617.342 90.133.342C40.651.342.537 40.455.537 89.938z\",\n id: \"S\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M.537 89.938c0 49.483 40.114 89.597 89.596 89.597 49.484 0 89.597-40.114 89.597-89.597S139.617.342 90.133.342C40.651.342.537 40.455.537 89.938\",\n id: \"U\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M.537 89.938c0 49.483 40.114 89.597 89.596 89.597 49.484 0 89.597-40.114 89.597-89.597S139.617.342 90.133.342C40.651.342.537 40.455.537 89.938\",\n id: \"W\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M.537 89.938c0 49.483 40.114 89.597 89.596 89.597 49.484 0 89.597-40.114 89.597-89.597S139.617.342 90.133.342C40.651.342.537 40.455.537 89.938\",\n id: \"Y\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M.537 89.938c0 49.483 40.114 89.597 89.596 89.597 49.484 0 89.597-40.114 89.597-89.597S139.617.342 90.133.342C40.651.342.537 40.455.537 89.938\",\n id: \"aa\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M.537 89.938c0 49.483 40.114 89.597 89.596 89.597 49.484 0 89.597-40.114 89.597-89.597S139.617.342 90.133.342C40.651.342.537 40.455.537 89.938\",\n id: \"ac\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M.537 89.938c0 49.483 40.114 89.597 89.596 89.597 49.484 0 89.597-40.114 89.597-89.597S139.617.342 90.133.342C40.651.342.537 40.455.537 89.938\",\n id: \"ae\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M.537 89.938c0 49.483 40.114 89.597 89.596 89.597 49.484 0 89.597-40.114 89.597-89.597S139.617.342 90.133.342C40.651.342.537 40.455.537 89.938z\",\n id: \"ag\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M.537 89.938c0 49.483 40.114 89.597 89.596 89.597 49.484 0 89.597-40.114 89.597-89.597S139.617.342 90.133.342C40.651.342.537 40.455.537 89.938z\",\n id: \"ai\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M.537 89.938c0 49.483 40.114 89.597 89.596 89.597 49.484 0 89.597-40.114 89.597-89.597S139.617.342 90.133.342C40.651.342.537 40.455.537 89.938z\",\n id: \"ak\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M.537 89.938c0 49.483 40.114 89.597 89.596 89.597 49.484 0 89.597-40.114 89.597-89.597S139.617.342 90.133.342C40.651.342.537 40.455.537 89.938\",\n id: \"am\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M.537 89.938c0 49.483 40.114 89.597 89.596 89.597 49.484 0 89.597-40.114 89.597-89.597S139.617.342 90.133.342C40.651.342.537 40.455.537 89.938z\",\n id: \"ao\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M.537 89.938c0 49.483 40.114 89.597 89.596 89.597 49.484 0 89.597-40.114 89.597-89.597S139.617.342 90.133.342C40.651.342.537 40.455.537 89.938\",\n id: \"aq\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M.537 89.938c0 49.483 40.114 89.597 89.596 89.597 49.484 0 89.597-40.114 89.597-89.597S139.617.342 90.133.342C40.651.342.537 40.455.537 89.938\",\n id: \"as\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M.537 89.938c0 49.483 40.114 89.597 89.596 89.597 49.484 0 89.597-40.114 89.597-89.597S139.617.342 90.133.342C40.651.342.537 40.455.537 89.938z\",\n id: \"au\"\n}))), _g || (_g = /*#__PURE__*/React.createElement(\"g\", {\n fill: \"none\",\n fillRule: \"evenodd\"\n}, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M179.73 90.097c0 49.483-40.114 89.597-89.596 89.597C40.65 179.694.537 139.58.537 90.097.537 40.613 40.65.5 90.134.5c49.482 0 89.597 40.113 89.597 89.597\",\n fill: \"#FFEADC\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M161.213 130.865l-44.848-5.165a3.373 3.373 0 01-2.965-3.737l5.904-51.262a3.372 3.372 0 013.737-2.964l44.848 5.165a3.372 3.372 0 012.964 3.737L164.95 127.9a3.373 3.373 0 01-3.737 2.964\",\n fill: \"#F2F4F9\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M163.254 94.92l-48.93-5.636a1.319 1.319 0 01-1.159-1.46l.25-2.162a1.319 1.319 0 011.46-1.159l48.93 5.636a1.319 1.319 0 011.158 1.46l-.248 2.161a1.318 1.318 0 01-1.461 1.16M162.204 104.035l-48.93-5.635a1.319 1.319 0 01-1.159-1.46l.25-2.162a1.319 1.319 0 011.46-1.159l48.93 5.636a1.319 1.319 0 011.158 1.46l-.248 2.161a1.318 1.318 0 01-1.46 1.16\",\n fill: \"#D6DDED\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M162.38 131l-47.181-5.435a2.199 2.199 0 01-1.933-2.436l.867-7.528 51.557 5.873-.875 7.593A2.199 2.199 0 01162.38 131\",\n fill: \"#597CC1\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M106.982 48.21l45.738 2.396c.902.047 1.594.84 1.545 1.768l-3.05 58.177c-.047.929-.818 1.644-1.72 1.597l-45.738-2.397c-.903-.047-1.594-.839-1.546-1.769l3.049-58.176c.049-.93.82-1.645 1.722-1.597\",\n fill: \"#F8FAFF\"\n}), /*#__PURE__*/React.createElement(\"g\", {\n transform: \"translate(101.79 47.89)\"\n}, /*#__PURE__*/React.createElement(\"mask\", {\n id: \"b\",\n fill: \"#fff\"\n}, /*#__PURE__*/React.createElement(\"use\", {\n xlinkHref: \"#a\"\n})), /*#__PURE__*/React.createElement(\"path\", {\n fill: \"#F8FAFF\",\n mask: \"url(#b)\",\n d: \"M-282.161 287.274l588.06 30.82 21.803-416.027-588.06-30.82z\"\n})), /*#__PURE__*/React.createElement(\"g\", {\n transform: \"translate(101.79 47.89)\"\n}, /*#__PURE__*/React.createElement(\"mask\", {\n id: \"d\",\n fill: \"#fff\"\n}, /*#__PURE__*/React.createElement(\"use\", {\n xlinkHref: \"#c\"\n})), /*#__PURE__*/React.createElement(\"path\", {\n fill: \"#F8FAFF\",\n mask: \"url(#d)\",\n d: \"M-1.818 63.771l53.088 2.783L54.716.805 1.628-1.977z\"\n})), /*#__PURE__*/React.createElement(\"g\", {\n transform: \"translate(106.965 69.743)\"\n}, /*#__PURE__*/React.createElement(\"mask\", {\n id: \"f\",\n fill: \"#fff\"\n}, /*#__PURE__*/React.createElement(\"use\", {\n xlinkHref: \"#e\"\n})), /*#__PURE__*/React.createElement(\"path\", {\n fill: \"#C6CDD9\",\n mask: \"url(#f)\",\n d: \"M-1.778 5.94L24.21 7.3l.42-8.01L-1.358-2.07z\"\n})), /*#__PURE__*/React.createElement(\"g\", {\n transform: \"translate(106.39 84.695)\"\n}, /*#__PURE__*/React.createElement(\"mask\", {\n id: \"h\",\n fill: \"#fff\"\n}, /*#__PURE__*/React.createElement(\"use\", {\n xlinkHref: \"#g\"\n})), /*#__PURE__*/React.createElement(\"path\", {\n fill: \"#C6CDD9\",\n mask: \"url(#h)\",\n d: \"M-2 6.2l25.988 1.362.42-8.01L-1.58-1.81z\"\n})), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M108.462 76.548l39.85 2.088c.677.035 1.196.63 1.16 1.326l-.068 1.28c-.036.696-.615 1.233-1.291 1.197l-39.85-2.088c-.677-.035-1.197-.629-1.16-1.326l.067-1.28c.037-.696.615-1.233 1.292-1.197\",\n fill: \"#EDF0F9\"\n}), /*#__PURE__*/React.createElement(\"g\", {\n transform: \"translate(106.965 76.07)\"\n}, /*#__PURE__*/React.createElement(\"mask\", {\n id: \"j\",\n fill: \"#fff\"\n}, /*#__PURE__*/React.createElement(\"use\", {\n xlinkHref: \"#i\"\n})), /*#__PURE__*/React.createElement(\"path\", {\n fill: \"#EDF0F9\",\n mask: \"url(#j)\",\n d: \"M-287.297 259.097l588.185 30.826 21.803-416.026-588.185-30.826z\"\n})), /*#__PURE__*/React.createElement(\"g\", {\n transform: \"translate(106.965 76.07)\"\n}, /*#__PURE__*/React.createElement(\"mask\", {\n id: \"l\",\n fill: \"#fff\"\n}, /*#__PURE__*/React.createElement(\"use\", {\n xlinkHref: \"#k\"\n})), /*#__PURE__*/React.createElement(\"path\", {\n fill: \"#EDF0F9\",\n mask: \"url(#l)\",\n d: \"M-2.08 6.213l46.385 2.432.42-8.01-46.386-2.431z\"\n})), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M107.668 91.691l39.85 2.089c.677.035 1.196.629 1.16 1.325l-.068 1.28c-.036.697-.614 1.234-1.29 1.198l-39.851-2.089c-.677-.035-1.196-.628-1.16-1.325l.067-1.28c.037-.697.615-1.233 1.292-1.198\",\n fill: \"#EDF0F9\"\n}), /*#__PURE__*/React.createElement(\"g\", {\n transform: \"translate(105.815 91.596)\"\n}, /*#__PURE__*/React.createElement(\"mask\", {\n id: \"n\",\n fill: \"#fff\"\n}, /*#__PURE__*/React.createElement(\"use\", {\n xlinkHref: \"#m\"\n})), /*#__PURE__*/React.createElement(\"path\", {\n fill: \"#EDF0F9\",\n mask: \"url(#n)\",\n d: \"M-286.147 243.57l588.186 30.826L323.84-141.63l-588.185-30.826z\"\n})), /*#__PURE__*/React.createElement(\"g\", {\n transform: \"translate(105.815 91.596)\"\n}, /*#__PURE__*/React.createElement(\"mask\", {\n id: \"p\",\n fill: \"#fff\"\n}, /*#__PURE__*/React.createElement(\"use\", {\n xlinkHref: \"#o\"\n})), /*#__PURE__*/React.createElement(\"path\", {\n fill: \"#EDF0F9\",\n mask: \"url(#p)\",\n d: \"M-1.724 5.83L44.662 8.26l.42-8.01-46.386-2.43z\"\n})), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M148.847 53.778l-9.155-.48a1.992 1.992 0 00-2.095 1.886l-.48 9.156a1.994 1.994 0 001.886 2.095l9.156.48a1.993 1.993 0 002.095-1.887l.48-9.155a1.994 1.994 0 00-1.887-2.095\",\n fill: \"#F78D3E\"\n}), /*#__PURE__*/React.createElement(\"g\", {\n transform: \"translate(80.511 36.389)\"\n}, /*#__PURE__*/React.createElement(\"mask\", {\n id: \"r\",\n fill: \"#fff\"\n}, /*#__PURE__*/React.createElement(\"use\", {\n xlinkHref: \"#q\"\n})), /*#__PURE__*/React.createElement(\"path\", {\n fill: \"#FFF\",\n mask: \"url(#r)\",\n d: \"M.49 65.612l53.13-1.797-2.224-65.801L-1.736-.189z\"\n})), /*#__PURE__*/React.createElement(\"g\", {\n transform: \"translate(83.962 39.84)\"\n}, /*#__PURE__*/React.createElement(\"mask\", {\n id: \"t\",\n fill: \"#fff\"\n}, /*#__PURE__*/React.createElement(\"use\", {\n xlinkHref: \"#s\"\n})), /*#__PURE__*/React.createElement(\"path\", {\n fill: \"#4675E2\",\n mask: \"url(#t)\",\n d: \"M-1.071 18.357l46.423-1.57-.634-18.742-46.423 1.57z\"\n})), /*#__PURE__*/React.createElement(\"g\", {\n transform: \"translate(84.537 58.817)\"\n}, /*#__PURE__*/React.createElement(\"mask\", {\n id: \"v\",\n fill: \"#fff\"\n}, /*#__PURE__*/React.createElement(\"use\", {\n xlinkHref: \"#u\"\n})), /*#__PURE__*/React.createElement(\"path\", {\n fill: \"#C6CDD9\",\n mask: \"url(#v)\",\n d: \"M-1.436 6.89l26.01-.88-.272-8.016-26.01.88z\"\n})), /*#__PURE__*/React.createElement(\"g\", {\n transform: \"translate(85.112 73.769)\"\n}, /*#__PURE__*/React.createElement(\"mask\", {\n id: \"x\",\n fill: \"#fff\"\n}, /*#__PURE__*/React.createElement(\"use\", {\n xlinkHref: \"#w\"\n})), /*#__PURE__*/React.createElement(\"path\", {\n fill: \"#C6CDD9\",\n mask: \"url(#x)\",\n d: \"M-1.496 7.163l26.009-.88-.271-8.016-26.01.88z\"\n})), /*#__PURE__*/React.createElement(\"g\", {\n transform: \"translate(85.112 64.568)\"\n}, /*#__PURE__*/React.createElement(\"mask\", {\n id: \"z\",\n fill: \"#fff\"\n}, /*#__PURE__*/React.createElement(\"use\", {\n xlinkHref: \"#y\"\n})), /*#__PURE__*/React.createElement(\"path\", {\n fill: \"#A7B1C0\",\n mask: \"url(#z)\",\n d: \"M-1.744 7.74L44.68 6.171l-.272-8.017-46.422 1.57z\"\n})), /*#__PURE__*/React.createElement(\"g\", {\n transform: \"translate(85.687 79.52)\"\n}, /*#__PURE__*/React.createElement(\"mask\", {\n id: \"B\",\n fill: \"#fff\"\n}, /*#__PURE__*/React.createElement(\"use\", {\n xlinkHref: \"#A\"\n})), /*#__PURE__*/React.createElement(\"path\", {\n fill: \"#A7B1C0\",\n mask: \"url(#B)\",\n d: \"M-1.807 7.944l46.423-1.57-.271-8.016-46.423 1.57z\"\n})), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M116.477 88.721l8.056-.169c.677-.023 1.245.524 1.269 1.222l.043 1.28c.023.698-.506 1.281-1.184 1.304l-8.055.17c-.677.023-1.245-.524-1.269-1.222l-.043-1.28c-.024-.697.506-1.282 1.183-1.305\",\n fill: \"#35DC86\"\n}), /*#__PURE__*/React.createElement(\"g\", {\n transform: \"translate(88.562 44.44)\"\n}, /*#__PURE__*/React.createElement(\"mask\", {\n id: \"D\",\n fill: \"#fff\"\n}, /*#__PURE__*/React.createElement(\"use\", {\n xlinkHref: \"#C\"\n})), /*#__PURE__*/React.createElement(\"path\", {\n fill: \"#FED049\",\n mask: \"url(#D)\",\n d: \"M-1.63 10.45l12.208-.413-.412-12.208-12.209.413z\"\n})), /*#__PURE__*/React.createElement(\"g\", {\n transform: \"translate(108.69 46.165)\"\n}, /*#__PURE__*/React.createElement(\"mask\", {\n id: \"F\",\n fill: \"#fff\"\n}, /*#__PURE__*/React.createElement(\"use\", {\n xlinkHref: \"#E\"\n})), /*#__PURE__*/React.createElement(\"path\", {\n fill: \"#2EBC70\",\n mask: \"url(#F)\",\n d: \"M-1.864 11.222l21.373-.723-.428-12.63-21.372.723z\"\n})), /*#__PURE__*/React.createElement(\"g\", {\n transform: \"translate(98.339 46.74)\"\n}, /*#__PURE__*/React.createElement(\"mask\", {\n id: \"H\",\n fill: \"#fff\"\n}, /*#__PURE__*/React.createElement(\"use\", {\n xlinkHref: \"#G\"\n})), /*#__PURE__*/React.createElement(\"path\", {\n fill: \"#35DC86\",\n mask: \"url(#H)\",\n d: \"M-1.616 10.989l21.372-.724-.427-12.629-21.373.723z\"\n})), /*#__PURE__*/React.createElement(\"g\", null, /*#__PURE__*/React.createElement(\"g\", {\n transform: \"translate(0 .159)\"\n}, /*#__PURE__*/React.createElement(\"mask\", {\n id: \"J\",\n fill: \"#fff\"\n}, /*#__PURE__*/React.createElement(\"use\", {\n xlinkHref: \"#I\"\n})), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M59.267 92.03s-6.544 1.596 1.783 11.027c5.322 6.026 38.14 33.119 46.186 26.327 10.474-8.842 16.97-20.834 22.218-27.042l-5.62-3.114-21.096 17.395C87.09 111.419 70.465 83.2 59.268 92.03\",\n fill: \"#F6B595\",\n mask: \"url(#J)\"\n})), /*#__PURE__*/React.createElement(\"g\", {\n transform: \"translate(0 .159)\"\n}, /*#__PURE__*/React.createElement(\"mask\", {\n id: \"L\",\n fill: \"#fff\"\n}, /*#__PURE__*/React.createElement(\"use\", {\n xlinkHref: \"#K\"\n})), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M28.979 103.426s-2.163-6.574-10.91 3.202c-5.591 6.248-19.14 47.811-11.634 55.3 9.77 9.747 14.269 11.546 20.948 16.21l2.864-7.676-14.573-16.994c3.877-16.83 23.125-39.543 13.305-50.042\",\n fill: \"#F6B595\",\n mask: \"url(#L)\"\n})), /*#__PURE__*/React.createElement(\"g\", {\n transform: \"translate(0 .159)\"\n}, /*#__PURE__*/React.createElement(\"mask\", {\n id: \"N\",\n fill: \"#fff\"\n}, /*#__PURE__*/React.createElement(\"use\", {\n xlinkHref: \"#M\"\n})), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M71.842 270.689c-2.63 9.033-5.654 49.496-6.794 69.573H52.425c-.555-7.92-.913-22.373-1.655-27.408-2.396-16.265-.71-32.738.858-48.994 1.002-10.39 1.26-20.83 1.436-31.263.075-4.474.532-8.931.602-13.404.036-2.235-.015-4.476-.27-6.698-.153-1.333-.191-4.506-1.573-5.295-3.46-1.978-5.005 9.65-5.399 11.748-4.577 24.408-14.313 46.201-20.817 70.012-4.643 16.999-8.884 34.114-12.769 51.302H.768c1.004-9.318 1.93-25.606 2.094-31.54.46-16.62 3.008-30.674 9.71-45.822 7.06-15.96 2.861-36.764 4.175-53.949 1.43-18.707 5.543-37.69 16.82-53.091l40.17-.528s15.948 33.914 6.666 76.344c-3.495 17.192-7.023 33.733-8.56 39.013\",\n fill: \"#042499\",\n mask: \"url(#N)\"\n})), /*#__PURE__*/React.createElement(\"g\", {\n transform: \"translate(0 .159)\"\n}, /*#__PURE__*/React.createElement(\"mask\", {\n id: \"P\",\n fill: \"#fff\"\n}, /*#__PURE__*/React.createElement(\"use\", {\n xlinkHref: \"#O\"\n})), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M55.34 155.574l-21.774.286c-11.276 15.401-15.389 34.384-16.818 53.09-1.315 17.186 2.884 37.99-4.177 53.95-6.701 15.148-9.249 29.202-9.709 45.822-.163 5.934-1.089 22.222-2.094 31.54h12.07c3.885-17.188 8.126-34.303 12.77-51.303 6.503-23.81 16.24-45.603 20.817-70.01.393-2.1 1.938-13.727 5.398-11.75.158.091.297.216.422.362.144-.976.289-1.952.427-2.929 1.408-9.937 4.44-19.46 3.818-29.596-.334-5.445-2.071-10.826-1.548-16.309.04-.429.205-1.61.399-3.153\",\n fill: \"#0F2AB2\",\n mask: \"url(#P)\"\n})), /*#__PURE__*/React.createElement(\"g\", {\n transform: \"translate(0 .159)\"\n}, /*#__PURE__*/React.createElement(\"mask\", {\n id: \"R\",\n fill: \"#fff\"\n}, /*#__PURE__*/React.createElement(\"use\", {\n xlinkHref: \"#Q\"\n})), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M24.402 69.556c-3.133-10.404-5.064-28.193 8.11-40.36 10.07-9.297 37.27-10.234 46.733 10.043 1.579 3.385-.58 8.69-4.828 8.497-1.67-.076-2.704 5.213-3.67 8.496 1.352 13.324 13.396 13.57 19.505 23.752 7.531 12.553-1.738 31.09-23.945 31.09-22.208 0-34.939-18.382-41.905-41.518\",\n fill: \"#13235D\",\n mask: \"url(#R)\"\n})), /*#__PURE__*/React.createElement(\"g\", {\n transform: \"translate(0 .159)\"\n}, /*#__PURE__*/React.createElement(\"mask\", {\n id: \"T\",\n fill: \"#fff\"\n}, /*#__PURE__*/React.createElement(\"use\", {\n xlinkHref: \"#S\"\n})), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M43.32 85.812c3.287 1.802 6.443 2.703 9.467 2.703 3.024 0 5.708-.62 8.731-2.423l.34-8.777c1.157.206 2.043.176 2.953.176 9.264-.002 12.757-13.496 10.952-29.914-1.16 0-3.863 0-7.725-5.408.966 7.532-10.234 6.373-14.483.387 2.125 7.145-3.475 11.973-8.303 9.076-9.467-5.68-11.595 11.635-1.931 11.78v22.4z\",\n fill: \"#F6B595\",\n mask: \"url(#T)\"\n})), /*#__PURE__*/React.createElement(\"g\", {\n transform: \"translate(0 .159)\"\n}, /*#__PURE__*/React.createElement(\"mask\", {\n id: \"V\",\n fill: \"#fff\"\n}, /*#__PURE__*/React.createElement(\"use\", {\n xlinkHref: \"#U\"\n})), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M64.672 56.656c-.57 0-1.034-.93-1.034-2.077 0-1.148.463-2.079 1.034-2.079.572 0 1.035.931 1.035 2.079 0 1.147-.463 2.077-1.035 2.077\",\n fill: \"#343B48\",\n mask: \"url(#V)\"\n})), /*#__PURE__*/React.createElement(\"g\", {\n transform: \"translate(0 .159)\"\n}, /*#__PURE__*/React.createElement(\"mask\", {\n id: \"X\",\n fill: \"#fff\"\n}, /*#__PURE__*/React.createElement(\"use\", {\n xlinkHref: \"#W\"\n})), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M73.482 55.617c-.571 0-1.034-.93-1.034-2.077 0-1.148.463-2.079 1.034-2.079s1.034.931 1.034 2.079c0 1.147-.463 2.077-1.034 2.077\",\n fill: \"#343B48\",\n mask: \"url(#X)\"\n})), /*#__PURE__*/React.createElement(\"g\", {\n transform: \"translate(0 .159)\"\n}, /*#__PURE__*/React.createElement(\"mask\", {\n id: \"Z\",\n fill: \"#fff\"\n}, /*#__PURE__*/React.createElement(\"use\", {\n xlinkHref: \"#Y\"\n})), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M58.54 64.636c-3.426 0-6.203-1.516-6.203-3.384 0-1.869 2.777-3.383 6.203-3.383s6.203 1.514 6.203 3.383c0 1.868-2.777 3.384-6.203 3.384\",\n fill: \"#F4A48D\",\n mask: \"url(#Z)\"\n})), /*#__PURE__*/React.createElement(\"g\", {\n transform: \"translate(0 .159)\"\n}, /*#__PURE__*/React.createElement(\"mask\", {\n id: \"ab\",\n fill: \"#fff\"\n}, /*#__PURE__*/React.createElement(\"use\", {\n xlinkHref: \"#aa\"\n})), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M74.28 60.255c0 .848.576 1.62 1.521 2.215.192-1.478.322-3.03.38-4.65-1.17.616-1.9 1.478-1.9 2.435\",\n fill: \"#F4A48D\",\n mask: \"url(#ab)\"\n})), /*#__PURE__*/React.createElement(\"g\", {\n transform: \"translate(0 .159)\"\n}, /*#__PURE__*/React.createElement(\"mask\", {\n id: \"ad\",\n fill: \"#fff\"\n}, /*#__PURE__*/React.createElement(\"use\", {\n xlinkHref: \"#ac\"\n})), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M68.675 52.041c.727 3.168 1.735 4.236 3.693 6.562 1.657 1.966-2.185 3.608-3.484 2.356\",\n stroke: \"#EA9581\",\n mask: \"url(#ad)\"\n})), /*#__PURE__*/React.createElement(\"g\", {\n transform: \"translate(0 .159)\"\n}, /*#__PURE__*/React.createElement(\"mask\", {\n id: \"af\",\n fill: \"#fff\"\n}, /*#__PURE__*/React.createElement(\"use\", {\n xlinkHref: \"#ae\"\n})), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M72.591 66c-1.076.592-3.793 1.643-7.45-.12-.172-.084-.384.024-.365.189.132 1.155.76 4.494 3.618 4.824 2.8.325 4.147-3.284 4.56-4.679.053-.176-.181-.315-.363-.215\",\n fill: \"#D15A5A\",\n mask: \"url(#af)\"\n})), /*#__PURE__*/React.createElement(\"g\", {\n transform: \"translate(0 .159)\"\n}, /*#__PURE__*/React.createElement(\"mask\", {\n id: \"ah\",\n fill: \"#fff\"\n}, /*#__PURE__*/React.createElement(\"use\", {\n xlinkHref: \"#ag\"\n})), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M60.918 85.816s-7.089 7.849-16.326 0l-8.573.577s-9.962 66.189-12.54 70.7c0 0 35.224 13.62 54.772 2.02 0 0-2.742-26.235-5.574-46.586-1.28-9.198-4.561-17.753-4.154-23.204l-7.605-3.507z\",\n fill: \"#FAB62D\",\n mask: \"url(#ah)\"\n})), /*#__PURE__*/React.createElement(\"g\", {\n transform: \"translate(0 .159)\"\n}, /*#__PURE__*/React.createElement(\"mask\", {\n id: \"aj\",\n fill: \"#fff\"\n}, /*#__PURE__*/React.createElement(\"use\", {\n xlinkHref: \"#ai\"\n})), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M61.86 77.315s-6.803-.492-12.787-5.978c0 0 2.706 8.883 12.68 9.88l.106-3.902z\",\n fill: \"#F4A48D\",\n mask: \"url(#aj)\"\n})), /*#__PURE__*/React.createElement(\"g\", {\n transform: \"translate(0 .159)\"\n}, /*#__PURE__*/React.createElement(\"mask\", {\n id: \"al\",\n fill: \"#fff\"\n}, /*#__PURE__*/React.createElement(\"use\", {\n xlinkHref: \"#ak\"\n})), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M74.165 105.029s5.039 6.088 5.878 11.126c.84 5.038-5.668 12.805-5.668 12.805l-15.114-5.458 14.904-18.473z\",\n fill: \"#FAB62D\",\n mask: \"url(#al)\"\n})), /*#__PURE__*/React.createElement(\"g\", {\n transform: \"translate(0 .159)\"\n}, /*#__PURE__*/React.createElement(\"mask\", {\n id: \"an\",\n fill: \"#fff\"\n}, /*#__PURE__*/React.createElement(\"use\", {\n xlinkHref: \"#am\"\n})), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M61.518 86.092c.05.162 1.926.321 2.182.363.795.13 1.589.269 2.371.458 1.53.371 2.983.987 4.39 1.687 3.736 1.86 7.153 4.345 10.364 6.993 2.71 2.235 5.286 4.63 7.768 7.116l-15.631 20.176-11.444-36.793\",\n fill: \"#FAB62D\",\n mask: \"url(#an)\"\n})), /*#__PURE__*/React.createElement(\"g\", {\n transform: \"translate(0 .159)\"\n}, /*#__PURE__*/React.createElement(\"mask\", {\n id: \"ap\",\n fill: \"#fff\"\n}, /*#__PURE__*/React.createElement(\"use\", {\n xlinkHref: \"#ao\"\n})), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M116.051 107.113l9.666-10.71s-.652-3.942-.525-9.547-.281-9.524.719-8.227c1 1.296 1.739 9.657 3.786 9.137 2.047-.52 13.618-13.067 14.157-11.99.54 1.079-7.737 9.725-7.978 11.085-.241 1.36 7.971-8.22 8.035-6.978.064 1.24-7 9.068-7.263 10.014-.262.948 8.574-8.042 8.525-6.311-.05 1.73-7.08 6.825-7.75 8.588-.67 1.762 7.753-5.824 7.838-4.17.084 1.655-9.09 8.761-12.783 11.543-3.693 2.781-9.69 11.018-9.69 11.018l-6.737-3.452z\",\n fill: \"#F6B595\",\n mask: \"url(#ap)\"\n})), /*#__PURE__*/React.createElement(\"g\", {\n transform: \"translate(0 .159)\"\n}, /*#__PURE__*/React.createElement(\"mask\", {\n id: \"ar\",\n fill: \"#fff\"\n}, /*#__PURE__*/React.createElement(\"use\", {\n xlinkHref: \"#aq\"\n})), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M32.618 87.32c.034.1.01.204-.039.312l.039-.312s-9.256 1.815-13.907 12.127l-.013.034c-.173.317-.346.634-.517.956-.653 1.23-7.33 16.384-6.84 16.61l19.736 7.884s7.359-21.884 1.541-37.611\",\n fill: \"#FAB62D\",\n mask: \"url(#ar)\"\n})), /*#__PURE__*/React.createElement(\"g\", {\n transform: \"translate(0 .159)\"\n}, /*#__PURE__*/React.createElement(\"mask\", {\n id: \"at\",\n fill: \"#fff\"\n}, /*#__PURE__*/React.createElement(\"use\", {\n xlinkHref: \"#as\"\n})), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M43.32 85.135s-18.298-1.31-25.138 15.301c-6.84 16.611 32.683 10.638 32.683 10.638s-7.544-22.351-7.544-25.939\",\n fill: \"#FAB62D\",\n mask: \"url(#at)\"\n})), /*#__PURE__*/React.createElement(\"g\", {\n transform: \"translate(0 .159)\"\n}, /*#__PURE__*/React.createElement(\"mask\", {\n id: \"av\",\n fill: \"#fff\"\n}, /*#__PURE__*/React.createElement(\"use\", {\n xlinkHref: \"#au\"\n})), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M61.519 86.092s.13 7.083-8.745 6.729c-8.876-.355-9.453-7.686-9.453-7.686l3.063-3.32 6.922-1.217 8.213 5.494z\",\n fill: \"#F6B595\",\n mask: \"url(#av)\"\n}))))));\nexport default SvgEmptyFormList;","var _path, _path2;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nconst SvgIconHipaa = props => /*#__PURE__*/React.createElement(\"svg\", _extends({\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 34 40\"\n}, props), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M30.5792 5.24699L18.8622 1.56902C18.8621 1.56898 18.8619 1.56893 18.8618 1.56889C17.5151 1.14372 16.0487 1.1437 14.702 1.56883C14.7018 1.5689 14.7016 1.56896 14.7014 1.56902L2.97788 5.24905C1.95095 5.56416 1.25 6.53412 1.25 7.58947V11.9744C1.25 22.2598 6.30408 31.9055 14.7898 37.8108C15.3703 38.2388 16.1006 38.4387 16.7545 38.4387C17.3776 38.4387 18.1238 38.2805 18.7285 37.8046C22.9927 34.8672 26.3665 30.9904 28.682 26.5341C31.0301 22.1216 32.2864 17.1024 32.2864 11.9744V7.62709C32.3882 6.51107 31.6311 5.55041 30.5792 5.24699Z\",\n fill: \"#0C8FF2\",\n stroke: \"#51B4FF\",\n strokeWidth: 1.5\n})), _path2 || (_path2 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M21.6364 8.91578C20.8454 8.26615 20.2727 8.42856 19.4818 9.83608C18.9636 10.7834 18.1182 10.8917 17.6 10.8646V10.6752C18.2 10.3774 18.6363 9.78194 18.6363 9.07818C18.6363 8.07668 17.8182 7.26465 16.8091 7.26465C15.8 7.26465 14.9818 8.07668 14.9818 9.07818C14.9818 9.78194 15.4182 10.3774 16.0182 10.6752V10.8646C15.5 10.8917 14.6545 10.7834 14.1363 9.83608C13.3454 8.40149 12.7727 8.26615 11.9818 8.91578C11.1636 9.5654 7.99999 13.3278 4.12726 12.9759C4.12726 12.9759 4.89089 14.7083 6.99089 14.3293C6.99089 14.3293 8.10908 15.4932 9.90908 14.6812C9.90908 14.6812 10.8636 15.5203 12.3636 14.7624C12.3636 14.7624 13.4818 15.6015 14.6545 14.8707C14.6545 14.8707 15.3364 15.3579 16.0727 15.2225L16.1273 19.5804C16.0454 19.5534 15.9636 19.5534 15.8818 19.5263C15.8818 19.5263 14.5727 19.2556 13.2091 18.8767C11.9 18.5248 10.4545 17.9834 10.2363 17.6857C10.2636 17.6586 10.2909 17.6586 10.3182 17.6316C10.4273 17.5774 10.6454 17.4962 10.8636 17.4692C11.3545 17.3609 12.0091 17.3338 12.6636 17.3068C13.9727 17.2526 14.2182 17.3068 14.2454 17.3338C14.2454 17.2797 15.0091 17.415 15.2 16.6571C15.2 16.6571 15.2273 16.6301 15.2 16.603C15.1454 16.0887 14.7363 16.0616 14.4091 15.9804C13.8636 15.8992 14.1363 15.9263 13.4273 15.9534C12.2273 16.0346 8.51817 15.7368 8.05453 17.6857C8.05453 17.7398 8.05453 17.7669 8.05453 17.821C8.21817 19.4992 11.7091 20.2301 14.2727 20.7443C13.4 21.3398 12.9363 22.0977 12.7727 23.0722C12.6909 24.1278 13.5363 25.1293 15.4727 26.2391C14 27.2947 13.0182 28.2692 13.1 29.4331C13.2363 30.4075 14.1091 31.6797 15.7727 32.4917C15.7727 32.4917 14.6 30.7052 14.5182 29.7308C14.4363 29.1624 14.7636 28.3233 16.2091 27.2947L16.2636 30.8677C16.2636 31.1654 16.5091 31.409 16.8091 31.409C17.1091 31.409 17.3545 31.1654 17.3545 30.8677L17.4091 27.3759C18.7182 28.3504 19.0182 29.1624 18.9636 29.7037C18.8818 30.6782 17.7091 32.4646 17.7091 32.4646C19.4 31.6526 20.2454 30.3534 20.3818 29.406C20.4636 28.215 19.4818 27.2406 18.0091 26.212C19.9727 25.1022 20.7909 24.1007 20.7091 23.0451C20.5182 22.0707 20.0545 21.2857 19.2091 20.7173C21.7454 20.203 25.2636 19.4722 25.4273 17.794C25.4273 17.7398 25.4273 17.7128 25.4273 17.6586C24.9636 15.7368 21.2545 16.0346 20.0545 15.9263C19.3182 15.9263 19.6182 15.8992 19.0727 15.9534C18.7454 16.0075 18.3364 16.0346 18.2818 16.5759C18.2818 16.603 18.2818 16.6301 18.2818 16.6301C18.5 17.388 19.2364 17.2526 19.2364 17.3068C19.2636 17.3068 19.4818 17.2526 20.8182 17.2797C21.4727 17.3068 22.1273 17.3609 22.6182 17.4421C22.8636 17.4962 23.0545 17.5504 23.1636 17.6045C23.1909 17.6316 23.2454 17.6316 23.2454 17.6586C23.0273 17.9564 21.5818 18.4977 20.2727 18.8496C18.9091 19.2286 17.6 19.4992 17.6 19.4992C17.5727 19.4992 17.5454 19.4992 17.5182 19.5263L17.5727 15.2225C18.3364 15.3579 18.9909 14.8707 18.9909 14.8707C20.1636 15.6015 21.2818 14.7624 21.2818 14.7624C22.7818 15.5203 23.7091 14.6812 23.7091 14.6812C25.5091 15.4932 26.6273 14.3293 26.6273 14.3293C28.7273 14.7083 29.4909 12.9759 29.4909 12.9759C25.5909 13.3278 22.4273 9.5654 21.6364 8.91578ZM15.0636 24.3173C14.5727 24.0195 14.3545 23.6135 14.4091 23.3428C14.4363 22.9639 14.3 22.0707 16.1 21.394L16.1545 24.994C15.8 24.7774 15.4454 24.5338 15.0636 24.3173ZM18.9909 23.3428C19.0454 23.6135 18.8 24.0195 18.3363 24.3173C18.0091 24.5068 17.7091 24.7233 17.4091 24.9128L17.4636 21.4752C19.0727 22.0977 18.9636 22.9639 18.9909 23.3428Z\",\n fill: \"white\"\n})));\nexport default SvgIconHipaa;","\n \n\n","\n \n\n","\n \n\n","\n \n\n","\n \n\n","var _path;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nconst SvgCloseRevised = props => /*#__PURE__*/React.createElement(\"svg\", _extends({\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 20 20\"\n}, props), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M14.7559 6.42259C15.0814 6.09715 15.0814 5.56951 14.7559 5.24408C14.4305 4.91864 13.9028 4.91864 13.5774 5.24408L10 8.82149L6.42259 5.24408C6.09715 4.91864 5.56951 4.91864 5.24408 5.24408C4.91864 5.56951 4.91864 6.09715 5.24408 6.42259L8.82149 10L5.24408 13.5774C4.91864 13.9028 4.91864 14.4305 5.24408 14.7559C5.56951 15.0814 6.09715 15.0814 6.42259 14.7559L10 11.1785L13.5774 14.7559C13.9028 15.0814 14.4305 15.0814 14.7559 14.7559C15.0814 14.4305 15.0814 13.9028 14.7559 13.5774L11.1785 10L14.7559 6.42259Z\",\n fill: \"#343C6A\"\n})));\nexport default SvgCloseRevised;","\n \n\n","var _path;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nconst SvgFaq = props => /*#__PURE__*/React.createElement(\"svg\", _extends({\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 16 16\"\n}, props), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n opacity: 0.46,\n d: \"M8 0C3.6 0 0 3.6 0 8C0 12.4 3.6 16 8 16C12.4 16 16 12.4 16 8C16 3.6 12.4 0 8 0ZM8 13C7.4 13 7 12.6 7 12C7 11.4 7.4 11 8 11C8.6 11 9 11.4 9 12C9 12.6 8.6 13 8 13ZM9.5 8.4C9 8.7 9 8.8 9 9V10H7V9C7 7.7 7.8 7.1 8.4 6.7C8.9 6.4 9 6.3 9 6C9 5.4 8.6 5 8 5C7.6 5 7.3 5.2 7.1 5.5L6.6 6.4L4.9 5.4L5.4 4.5C5.9 3.6 6.9 3 8 3C9.7 3 11 4.3 11 6C11 7.4 10.1 8 9.5 8.4Z\",\n fill: \"#8583A9\"\n})));\nexport default SvgFaq;","\n \n\n","/* global EnterpriseConfigs */\nimport React, {\n useCallback,\n useRef\n} from 'react';\nimport { connect } from 'react-redux';\nimport { shape, string } from 'prop-types';\nimport {\n ShareButton as CommonShareButton,\n SharePanelTexts\n} from '@jotforminc/share-panel';\nimport {\n IconUserPlusFilled\n} from '@jotforminc/svg-icons';\nimport { getAppPath } from '@jotforminc/router-bridge';\n\nimport { t } from '@jotforminc/translation';\nimport { isEnterprise } from '@jotforminc/enterprise-utils';\nimport * as actions from '../actions';\nimport { useShareButtonTracking } from '../libs/useShareButtonTracking';\n\nconst texts = {\n ...SharePanelTexts,\n SHARE_LINK_HEADER: 'Invite by Link',\n SHARE_LINK_HEADER_DESC: '',\n ADD_MULTIPLE_EMAIL_ADDRESSES: 'Enter email addresses to send invitation',\n ASSIGNED_TO: 'Shared with:',\n ASSIGNED_TO_NUMBER: 'Shared with {numberOfUsers} {formNoun}',\n LIST_WILL_APPEAR_HERE: 'User list will appear here.',\n ASSIGNED_TO_NO_ONE: 'Shared with no one',\n NO_ONE_ASSIGNED: 'This form is not shared for collaboration with anyone',\n REMOVE_USER_DESCRIPTION: 'If you remove this user, they will no longer have access to this form.',\n REMOVE_USER_DESCRIPTION_MULTIPLE: 'If you remove these users, they will no longer have access to this form.',\n YES_DELETE: 'Yes, Revoke',\n REMOVE_USER_CONFIRM: '',\n ONLY_AVAILABLE_TO_ASSIGNEES: 'Only available to invited people',\n ONLY_AVAILABLE_TO_ORGANIZATION: 'Only available to people in your organization',\n ALLOW_REQUEST_ACCESS: 'Allow users to request edit access to this form'\n};\n\nconst ModalHeader = () => {\n return (\n
    \n \n \n \n
    \n

    \n {t('Add Collaborator')}\n

    \n

    {t('Invite your teammates to edit this form simultaneously')}

    \n
    \n
    \n );\n};\n\n// Out of Server sharing permission config for form builder product\nconst OOS_PERMITTED = isEnterprise() && (EnterpriseConfigs?.FORM_BUILDER_OOS_SHARE_ENABLED || false);\n\nconst ShareButton = ({\n user = {},\n link = '',\n initilizeShareProps,\n onGenerateNewLink,\n onSend,\n onRevokeUsers,\n onResendInvitation,\n onRemoveAccessRequest,\n onApproveAccessRequest,\n onPropertyChange,\n permissions,\n sharedWith,\n isHIPAA,\n formID\n}) => {\n const shareBtn = useRef();\n const formBuilderUrl = `${document.location.origin}${getAppPath()}/${formID}`;\n\n // Map the single remove case to bulk remove.\n const onRevokeSingleUsers = useCallback(\n ({ email }) => onRevokeUsers([email]),\n [onRevokeUsers]\n );\n\n const onShareButtonClick = useCallback(() => {\n initilizeShareProps();\n }, [initilizeShareProps]);\n\n const {\n onGenerateLinkClickWithTracking,\n onSendInvitationClickWithTracking,\n onShareButtonClickWithTracking\n } = useShareButtonTracking({\n formID,\n user,\n shareLink: link,\n onSendInvitationClick: onSend,\n onGenerateLinkClick: onGenerateNewLink,\n onShareButtonClick\n });\n\n return (\n ,\n usePortal: true,\n className: 'csi-modal',\n ariaLabel: t('Add Collaborator')\n }}\n onClick={onShareButtonClickWithTracking}\n >\n {t('Add Collaborator')}\n \n );\n};\n\nShareButton.propTypes = {\n user: shape({}),\n link: string\n};\n\nconst mapStateToProps = state => {\n const {\n share: {\n permissions,\n shareLink,\n sharedWith\n },\n user,\n formProperties: {\n isHIPAA: isHIPAANumeric = '0',\n id: formID\n },\n } = state;\n const isHIPAA = isHIPAANumeric === '1';\n return {\n user,\n sharedWith,\n link: shareLink || '',\n permissions,\n isHIPAA,\n formID\n };\n};\n\nconst mapActionsToProps = {\n initilizeShareProps: actions.initilizeShareProps,\n onGenerateNewLink: actions.onGenerateNewLink,\n onSend: actions.onShareInvitationSend,\n onRevokeUsers: actions.onRevokeUsers,\n onResendInvitation: actions.onResendInvitation,\n onPropertyChange: actions.onSharePropertyChange\n};\n\nexport default connect(mapStateToProps, mapActionsToProps)(ShareButton);\n","\n \n\n","import PropTypes from 'prop-types';\nimport React from 'react';\nimport { NavLink, withRouter } from 'react-router-dom';\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport { t } from '@jotforminc/translation';\nimport { a11yListNavigation } from '@jotforminc/utils';\nimport {\n IconGearFilled,\n IconEnvelopeClosedFilled,\n IconConditionalBranchFilled,\n IconCheckCircleFilled,\n IconPuzzlePieceFilled,\n IconProductApprovalsFilled,\n IconPenSignFilled,\n IconMobileBell\n} from '@jotforminc/svg-icons';\nimport { SettingsPanelListItem, SettingsPanelListNavigation, SettingsPanelWrapper } from '@jotforminc/panel-components';\nimport * as actions from '../actions';\nimport { logJotFormEvents } from '../libs/Utils';\n\nconst isWorkflowReleased = window?.isWorkflowReleased;\n\nlet LinkObjects = [\n {\n key: 'general-link',\n text: 'Form Settings',\n linkTo: 'general',\n desc: 'Customize form status and properties',\n Icon: IconGearFilled\n },\n {\n key: 'emails-link',\n text: 'Emails',\n linkTo: 'emails',\n desc: 'Send autoresponders and notifications',\n Icon: IconEnvelopeClosedFilled\n },\n {\n key: 'conditions-link',\n text: 'Conditions',\n linkTo: 'conditions',\n desc: 'Set up conditional logic',\n Icon: IconConditionalBranchFilled\n },\n {\n key: 'thankyou-link',\n text: 'Thank You Page',\n linkTo: 'thankyou',\n desc: 'Show page after submission',\n Icon: IconCheckCircleFilled\n },\n {\n key: 'integrations-link',\n text: 'Integrations',\n linkTo: 'integrations',\n desc: 'Connect your form to other apps',\n Icon: IconPuzzlePieceFilled,\n showMsLaunchBadge: true\n },\n {\n key: 'approval-builder',\n text: isWorkflowReleased ? 'Workflows' : 'Approval Flows',\n subtext: isWorkflowReleased ? '/ Formerly Approvals' : '',\n linkTo: isWorkflowReleased ? 'workflows' : 'approvals',\n desc: isWorkflowReleased ? 'Turn your form into a workflow' : 'Create and manage approvals',\n hideForCSI: true,\n Icon: IconProductApprovalsFilled\n },\n {\n key: 'useJotformSign-settings',\n text: 'Jotform Sign',\n linkTo: 'sign',\n desc: 'Power your forms with Jotform Sign',\n Icon: IconPenSignFilled,\n hideForCSI: true\n },\n {\n key: 'mobile-notifications',\n text: 'Mobile Notifications',\n linkTo: 'mobile-notifications',\n desc: 'Customize mobile app notifications',\n hideForCSI: true,\n Icon: IconMobileBell\n },\n];\n\nclass SettingsPanel extends React.Component {\n constructor(props) {\n super(props);\n if (global && global.JOTFORM_ENV !== 'DEVELOPMENT') {\n LinkObjects = LinkObjects.filter(a => a.developmentOnly !== true);\n }\n if (global.JOTFORM_ENV !== 'ENTERPRISE' && props.accountType !== 'ADMIN') {\n LinkObjects = LinkObjects.filter(a => a.adminOnly !== true);\n }\n if (global && global.JOTFORM_ENV !== 'ENTERPRISE') {\n LinkObjects = LinkObjects.filter(a => a.enterpriseOnly !== true);\n }\n if (global.csiCollaborator) {\n // Some settings are not visible for users coming from the\n // common share infrastructure.\n LinkObjects = LinkObjects.filter(({ hideForCSI }) => !hideForCSI);\n }\n this.onLinkClicked = this.onLinkClicked.bind(this);\n this.filterNotWantedPanels = this.filterNotWantedPanels.bind(this);\n this.getActiveClass = this.getActiveClass.bind(this);\n this.hiddenPanels = global.CUSTOMIZED_CONFIGS && global.CUSTOMIZED_CONFIGS.HIDE_SETTINGS_PANEL_TABS;\n }\n\n onLinkClicked(e, route) {\n e.preventDefault();\n if (route.indexOf('settings/integrations') > -1) {\n logJotFormEvents('integrations', {\n actor: this.props.userName,\n action: 'integrations_page_opened',\n target: this.props.formID\n }, this.props.userAccountType);\n }\n const _stageScroller = global.document.querySelector('.stageScroller');\n if (_stageScroller) {\n _stageScroller.scrollTop = 0;\n }\n\n this.props.history.push(route);\n\n // discoverabilityTracking\n const { userName, userAccountType } = this.props;\n const linkName = route.split('/').slice(-1).pop();\n logJotFormEvents('discoverabilityTracking', {\n actor: userName,\n action: 'click',\n target: `settings-${linkName}`\n }, userAccountType);\n }\n\n getActiveClass(o) {\n const { leftSelection } = this.props.ui;\n if (this.props.ui.device !== 'isMobile') {\n const activeTab = {\n general: leftSelection === 'general' ? 'active' : '',\n conditions: leftSelection === 'conditions' ? 'active' : '',\n emails: leftSelection === 'emails' ? 'active' : '',\n 'mobile-notifications': leftSelection === 'mobile-notifications' ? 'active' : '',\n integrations: leftSelection === 'integrations' ? 'active' : '',\n thankyou: leftSelection === 'thankyou' ? 'active' : '',\n approvals: leftSelection === 'approvals' ? 'active' : '',\n workflows: leftSelection === 'workflows' ? 'active' : '',\n sign: leftSelection === 'sign' ? 'active' : '',\n };\n if (o.linkTo === 'general' && leftSelection === 'default') {\n return 'active';\n }\n return activeTab[o.linkTo];\n }\n return '';\n }\n\n filterNotWantedPanels() {\n const { formType, isSignAllowed } = this.props;\n if (formType === 'cardForm') {\n LinkObjects = LinkObjects.filter(item => {\n return item.linkTo !== 'thankyou';\n });\n }\n if (global.JOTFORM_ENV === 'ENTERPRISE' && Array.isArray(this.hiddenPanels) && this.hiddenPanels.length > 0) {\n LinkObjects = LinkObjects.filter(item => {\n return this.hiddenPanels.indexOf(item.linkTo) < 0;\n });\n }\n\n if (!isSignAllowed) {\n LinkObjects = LinkObjects.filter(({ linkTo }) => linkTo !== 'sign');\n }\n\n return LinkObjects;\n }\n\n onKeyDown = e => {\n a11yListNavigation(e, (nextEvent, nextElement) => this.onLinkClicked(nextEvent, nextElement?.dataset?.route), 'li > a');\n };\n\n render() {\n LinkObjects = this.filterNotWantedPanels();\n const { ui: { integrationErrors }, campaign } = this.props;\n const showIntegrationErrorIcon = integrationErrors && Object.keys(integrationErrors).some(prop => integrationErrors[prop] === true);\n const searchParam = global.location && global.location.search;\n\n return (\n \n {\n LinkObjects.map(({ ...o }) => (\n \n this.onLinkClicked(e, `/${global.__BASE_ROUTE_PATH}/${this.props.formID}/settings/${o.linkTo}${searchParam ? searchParam : ''}`)}\n activeClassName=\"active\"\n className={`navLink ${this.getActiveClass(o)}`}\n tabIndex={this.getActiveClass(o)?.indexOf('active') > -1 ? '0' : '-1'}\n onKeyDown={this.onKeyDown}\n data-route={`${this.props.match.url}/settings/${o.linkTo}`}\n >\n \n \n \n ))\n }\n \n );\n }\n}\n\nSettingsPanel.propTypes = {\n formID: PropTypes.string,\n ui: PropTypes.shape({\n device: PropTypes.string,\n isPDFImporter: PropTypes.bool\n }),\n userName: PropTypes.string,\n userAccountType: PropTypes.string\n};\n\nfunction mapDispatchToProps(dispatch) {\n return {\n actions: bindActionCreators(actions, dispatch)\n };\n}\n\nfunction mapStateToProps(state) {\n return {\n ui: state.ui,\n accountType: state.user ? state.user.accountType : 'GUEST',\n campaign: state.user ? state.user.campaign : {},\n isSignAllowed: state.user?.allowSign\n };\n}\n\nexport default connect(mapStateToProps, mapDispatchToProps)(withRouter(SettingsPanel));\n","\n \n\n","var _path;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nconst SvgFormCopilotLogo = props => /*#__PURE__*/React.createElement(\"svg\", _extends({\n fill: \"currentColor\",\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 23 27\"\n}, props), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M2.92745 0C1.31067 0 0 1.31067 0 2.92746V24.0073C0 25.6241 1.31067 26.9347 2.92746 26.9347H19.2138C20.8306 26.9347 22.1413 25.624 22.1413 24.0073V2.92745C22.1413 1.31067 20.8306 0 19.2138 0H2.92745ZM7.7018 10.615C7.98482 10.5102 7.98482 10.1099 7.7018 10.0052L7.28526 9.85109C6.69206 9.63159 6.22437 9.16389 6.00487 8.5707L5.85073 8.15416C5.74601 7.87114 5.34572 7.87114 5.24099 8.15416L5.08686 8.5707C4.86736 9.16389 4.39966 9.63159 3.80647 9.85109L3.38992 10.0052C3.10691 10.1099 3.10691 10.5102 3.38992 10.615L3.80647 10.7691C4.39966 10.9886 4.86736 11.4563 5.08686 12.0495L5.24099 12.466C5.34572 12.749 5.74601 12.749 5.85073 12.466L6.00487 12.0495C6.22437 11.4563 6.69207 10.9886 7.28526 10.7691L7.7018 10.615ZM15.3831 16.0148C15.9491 16.2243 15.9491 17.0249 15.3831 17.2343L14.55 17.5426C13.3636 17.9816 12.4282 18.917 11.9892 20.1034L11.681 20.9365C11.4715 21.5025 10.6709 21.5025 10.4615 20.9365L10.1532 20.1034C9.7142 18.917 8.77881 17.9816 7.59243 17.5426L6.75934 17.2343C6.19331 17.0249 6.19331 16.2243 6.75934 16.0148L7.59243 15.7066C8.77881 15.2676 9.7142 14.3322 10.1532 13.1458L10.4615 12.3127C10.6709 11.7467 11.4715 11.7467 11.681 12.3127L11.9892 13.1458C12.4282 14.3322 13.3636 15.2676 14.55 15.7066L15.3831 16.0148ZM16.2145 5.85675C16.0749 5.47939 15.5411 5.47939 15.4015 5.85675L15.196 6.41214C14.9033 7.20306 14.2797 7.82666 13.4888 8.11932L12.9334 8.32484C12.5561 8.46447 12.5561 8.99819 12.9334 9.13783L13.4888 9.34334C14.2797 9.63601 14.9033 10.2596 15.196 11.0505L15.4015 11.6059C15.5411 11.9833 16.0749 11.9833 16.2145 11.6059L16.42 11.0505C16.7127 10.2596 17.3363 9.63601 18.1272 9.34334L18.6826 9.13783C19.0599 8.99819 19.0599 8.46447 18.6826 8.32484L18.1272 8.11932C17.3363 7.82666 16.7127 7.20306 16.42 6.41214L16.2145 5.85675Z\"\n})));\nexport default SvgFormCopilotLogo;","import { getAssetPath } from './index';\n\n// eslint-disable-next-line no-undef, camelcase\n__webpack_public_path__ = `${getAssetPath()}/`;\n","import TrackingManager from './index';\nimport { getActiveApp } from '@jotforminc/router-bridge'; // eslint-disable-line\n\nconst activeApp = getActiveApp();\nexport default TrackingManager.enableErrorTracking(activeApp);\n","/* eslint-disable max-statements */\n/* eslint-disable max-len */\n/* eslint-disable no-use-before-define, no-param-reassign */\n\nimport { t } from '@jotforminc/translation';\nimport './styles/style.scss';\n\nexport function normalizeHours(hour) {\n let normalizedHour = hour;\n if (normalizedHour >= 24) {\n normalizedHour %= 24;\n }\n if (normalizedHour < 0) {\n normalizedHour = 24 + normalizedHour;\n }\n\n if (normalizedHour.toString().length === 1) {\n normalizedHour = `0${normalizedHour}`;\n }\n return normalizedHour.toString();\n}\n\n// 75, 11 to [15, 12] - 30, 07 to [30, 07]\nexport function normalizeMinutes(minutes, hours) {\n let normalizedMinutes = minutes;\n let normalizedHours = hours;\n if (normalizedMinutes >= 60) {\n normalizedMinutes %= 60;\n normalizedHours += 1;\n }\n if (normalizedMinutes < 0) {\n normalizedMinutes = 60 + normalizedMinutes;\n normalizedHours -= 1;\n }\n if (normalizedMinutes.toString().length === 1) {\n normalizedMinutes = `0${normalizedMinutes}`;\n }\n return [normalizedMinutes.toString(), normalizedHours];\n}\n\n// 08:08 to 08:08 am - 16:30 to 04:30 pm\nexport function convertPmAm(_hour, _minute) {\n const hour = parseInt(_hour, 10);\n const minute = parseInt(_minute, 10);\n let hourToShow = hour;\n let minuteToShow = minute;\n let isResultAm = true;\n if (hour > 12) {\n hourToShow = hour % 12;\n isResultAm = false;\n }\n if (hour === 12) {\n isResultAm = false;\n }\n if (hour === 24) { // this should not be happen but what if?\n isResultAm = true;\n }\n if (hourToShow.toString().length === 1) {\n hourToShow = `0${hourToShow}`;\n }\n if (minuteToShow.toString().length === 1) {\n minuteToShow = `0${minuteToShow}`;\n }\n if (isResultAm) {\n return `${hourToShow}:${minuteToShow} ${t('AM')}`;\n }\n return `${hourToShow}:${minuteToShow} ${t('PM')}`;\n}\n\nexport function getCityAndGmtFromTimezoneValue(val) {\n const splitted = val.split('(');\n const city = splitted[0].trim();\n const gmt = `${splitted[1].split(')')[0]}`;\n return { city, gmt };\n}\n\n// ex: GMT+03:00 to +03:00\nexport function getNumberPartFromGmt(gmt) {\n const lowerCaseGmt = gmt.toLowerCase();\n const splitted = lowerCaseGmt.split('gmt');\n const numberPart = splitted[1];\n return numberPart;\n}\n\n// ex: +03:00 to [3, 0] for negative -03:00 to [-3, 0]\nexport function getHoursAndMinutesFromGmtNumberPart(gmtNumberPart) {\n const sign = gmtNumberPart.charAt(0);\n const withoutPlusOrMinus = gmtNumberPart.substring(1);\n const gmtHourMinutesSplit = withoutPlusOrMinus.split(':');\n const gmtHour = parseInt(`${sign}${gmtHourMinutesSplit[0]}`, 10);\n let gmtMinutes = parseInt(gmtHourMinutesSplit[1], 10);\n if (gmtHour < 0) {\n gmtMinutes = -gmtMinutes;\n }\n return [gmtHour, gmtMinutes];\n}\n\nexport function getCurrentGMTHourAndMinute() {\n const date = new Date();\n const gmtHour = date.getUTCHours();\n const gmtMinutes = date.getUTCMinutes();\n return [gmtHour, gmtMinutes];\n}\n\nexport function calculateTimeFromGmt(gmt, isAm) {\n const [gmtHour, gmtMinutes] = getCurrentGMTHourAndMinute();\n const numberPart = getNumberPartFromGmt(gmt);\n let hoursToShow;\n let minutesToShow;\n\n // if it just GMT without any number\n if (!numberPart) {\n [minutesToShow, hoursToShow] = normalizeMinutes(gmtMinutes, gmtHour);\n } else {\n const [gmtHourDifference, gmtMinutesDifference] = getHoursAndMinutesFromGmtNumberPart(numberPart);\n hoursToShow = gmtHour + gmtHourDifference;\n minutesToShow = gmtMinutesDifference + gmtMinutes;\n [minutesToShow, hoursToShow] = normalizeMinutes(minutesToShow, hoursToShow);\n }\n\n hoursToShow = normalizeHours(hoursToShow);\n let result = `${hoursToShow}:${minutesToShow}`;\n if (isAm) {\n result = convertPmAm(hoursToShow, minutesToShow);\n }\n return result;\n}\n\nexport function getSelectedTimezoneCityTimeValues(val, isAm) {\n const { city, gmt } = getCityAndGmtFromTimezoneValue(val);\n const time = calculateTimeFromGmt(gmt, isAm);\n return [city, time, gmt];\n}\n\nfunction TimezonePicker({\n id,\n timezones,\n selectedTimezone = 'Europe/Istanbul (GMT+03:00)',\n onOptionClick,\n cssThemeProp = '',\n isCardForm,\n isAutoSelectTimezoneOpen = 'Yes',\n usePortal,\n isAm\n}) {\n const wrapperId = `jDropdownWG-id-${id}`;\n const togglerId = `jDropdownWG-toggler-${id}`;\n const isCardFormBuilder = document.body.classList.contains('JotFormCardBuilder') && cssThemeProp !== 'isPropertiesPanel';\n const rules = {\n preventToggleOnNoAutoSelectTimeZone: isAutoSelectTimezone => isAutoSelectTimezone === 'No' && cssThemeProp !== 'isPropertiesPanel'\n };\n const state = {\n filteredTimezones: timezones,\n isAm,\n lastMinutes: new Date().getMinutes(),\n oldScrollPosition: undefined,\n isWrapperRendered: false,\n isSearching: false,\n searchingTimeOut: undefined,\n selectedOptionIndex: 0,\n filter: 0\n };\n const selectors = {\n wrapper: `#${wrapperId}`,\n selectedTimezoneOpton: `#${wrapperId} [data-value=\"${selectedTimezone}\"]`,\n toggler: `#${togglerId}`,\n listOptionItemWrapper: `#${wrapperId} .jDropdownWG-list-option-item-wrapper`,\n listWrapper: `#${wrapperId} .jDropdownWG-list-wrapper`,\n searchInput: `#${wrapperId} .jDropdownWG-search-input`,\n headerInputWrapper: `#${wrapperId} .jDropdownWG-header-input-wrapper`,\n amPmTogglerWrapper: `#${wrapperId} .jDropdownWG-AmPm-toggler-wrapper`,\n amPmTogglerBall: '.jDropdownWG-AmPm-toggler-ball',\n portalRoot: '#portal-root'\n };\n const checkIsIOS = /iPad|iPhone|iPod/.test(window.navigator.userAgent) && !window.MSStream;\n const meta = document.querySelector('meta[name=viewport]');\n function filterTimezones({ target: { value } }) {\n const filteredArray = [];\n timezones.forEach(({ group, cities }) => {\n const filteredCities = cities.filter(city => (\n city.toLowerCase().includes(value.toLowerCase())\n || city.toLowerCase().replace(new RegExp('_', 'g'), ' ').includes(value.toLowerCase())\n ));\n if (filteredCities.length > 0) {\n filteredArray.push({ group, cities: filteredCities });\n }\n });\n state.filteredTimezones = filteredArray;\n }\n\n function hasMinuteChanged() {\n const date = new Date();\n const currentMinutes = date.getMinutes();\n if (currentMinutes !== state.lastMinutes) {\n state.lastMinutes = currentMinutes;\n return true;\n }\n\n return false;\n }\n\n let timeInterval;\n\n const clearTimeInterval = () => {\n if (timeInterval) {\n clearInterval(timeInterval);\n timeInterval = undefined;\n }\n };\n\n function getSelectedTizoneOptionElement() {\n const el = document.querySelector(selectors.selectedTimezoneOpton);\n return el;\n }\n\n function setIsAutoSelectTimezoneOpen(val) {\n isAutoSelectTimezoneOpen = val;\n }\n\n function setSelectedTimezone(val) {\n selectedTimezone = val;\n }\n\n function isSelected(val) {\n return selectedTimezone === val;\n }\n\n function isAmPm() {\n return state.isAm;\n }\n\n function renderTimezoneOptions() {\n return `${state.filteredTimezones.map(({ group, cities }, stateIndex) => `\n
    \n
    \n
    ${group}
    \n
    \n
    \n ${cities.map((val, cityIndex) => {\n const { city, gmt } = getCityAndGmtFromTimezoneValue(val);\n const dataValue = `${group}/${city} (${gmt})`;\n if (isSelected(dataValue)) {\n state.filter = stateIndex;\n state.selectedOptionIndex = cityIndex;\n }\n return `\n
    \n
  • \n \n ${normalizeCityText(city)}\n (${gmt})\n \n ${calculateTimeFromGmt(gmt, state.isAm)}\n
  • \n
    \n `;\n }).join('')}\n \n\n
    \n
    `).join('')}`;\n }\n\n function renderTimezoneWrapper() {\n return `\n
    \n
    \n
    \n ${t('Time Zone').toUpperCase()}\n \n AM/PM\n
    \n \n
    \n 24h\n
    \n
    \n
    \n \n
    \n
    \n
    \n ${renderTimezoneOptions()}\n
    \n
    \n `;\n }\n\n function normalizeCityText(city) {\n return city.replaceAll('_', ' ');\n }\n\n function onOptionClickInner(value) {\n selectedTimezone = value;\n const picker = document.querySelector(selectors.toggler);\n const { city, gmt } = getCityAndGmtFromTimezoneValue(value);\n const time = calculateTimeFromGmt(gmt, state.isAm);\n picker.querySelector('span.city-time').innerText = `${normalizeCityText(city)} (${time})`;\n toggleDropdown();\n clearSearch();\n }\n\n function addOnOptionClickListeners() {\n const options = document.querySelectorAll(selectors.listOptionItemWrapper);\n for (let i = 0; i < options.length; i++) {\n const option = options[i];\n const { value } = option.dataset;\n option.addEventListener('click', () => onOptionClickInner(value));\n option.addEventListener('click', () => onOptionClick(value));\n }\n }\n\n function focusCurrentOption() {\n // Focus selected Index option\n const option = document.querySelector(`li[index=\"${state.selectedOptionIndex}\"][filter=\"${state.filter}\"]`);\n if (option) {\n option.focus();\n }\n }\n\n function keyboardNavListener(e) {\n if (e.key === 'ArrowUp') {\n if (state.selectedOptionIndex > 0) {\n state.selectedOptionIndex = state.selectedOptionIndex - 1;\n } else if (state.filter > 0) {\n state.filter = state.filter - 1;\n state.selectedOptionIndex = 0;\n }\n }\n\n if (e.key === 'ArrowDown') {\n const optionLength = document.querySelectorAll(`li[filter=\"${state.filter}\"]`).length;\n if (state.selectedOptionIndex < optionLength) {\n state.selectedOptionIndex = state.selectedOptionIndex + 1;\n } else if (state.filter < state.filteredTimezones.length) {\n // switch next group\n state.filter = state.filter + 1;\n state.selectedOptionIndex = 0;\n }\n }\n\n focusCurrentOption();\n\n if (e.key === 'Enter') {\n const option = document.querySelector(`li[index=\"${state.selectedOptionIndex}\"][filter=\"${state.filter}\"]`);\n if (option) {\n option.click();\n clickOutside({ target: document.createElement('div') });\n }\n }\n }\n\n function renderTimezoneOptionsIntoWrapper() {\n const listWrapper = document.querySelector(selectors.listWrapper);\n if (!listWrapper) return;\n listWrapper.removeEventListener('keyup', keyboardNavListener);\n listWrapper.addEventListener('keyup', keyboardNavListener);\n listWrapper.innerHTML = renderTimezoneOptions();\n addOnOptionClickListeners();\n }\n\n function clearSearch() {\n const searchInput = document.querySelector(selectors.searchInput);\n if (!searchInput) return;\n searchInput.value = '';\n state.filteredTimezones = timezones;\n renderTimezoneOptionsIntoWrapper();\n }\n\n function stickWrapperToPicker(wrapper) {\n const picker = document.querySelector(selectors.toggler);\n\n const {\n top,\n left,\n width: pickerWidth,\n height: pickerHeight\n } = picker.getBoundingClientRect();\n\n const { width, height } = wrapper.getBoundingClientRect();\n const verticalMargin = pickerHeight + 4;\n\n wrapper.style.top = `${top + window.scrollY + verticalMargin - (top + height > window.innerHeight ? height + verticalMargin : 0)}px`;\n wrapper.style.left = `${left - (left + width > window.innerWidth ? width - pickerWidth : 0)}px`;\n }\n\n function focusOnSearchArea() {\n const searchArea = document.querySelector(selectors.searchInput);\n if (searchArea) searchArea.focus();\n }\n\n function scrollWrapperToTheSelectedOption(wrapper, selected) {\n wrapper.scrollTop = selected.offsetTop - wrapper.getBoundingClientRect().height / 2; // scroll to the selected option\n }\n function toggleDropdown() {\n if (rules.preventToggleOnNoAutoSelectTimeZone(isAutoSelectTimezoneOpen)) return;\n meta.setAttribute('content', 'width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=1');\n const wrapper = getDropdownWrapper();\n if (!wrapper) return;\n clearSearch();\n const { classList: wrapperClassList } = wrapper;\n if (wrapperClassList.contains('isClose')) {\n wrapperClassList.remove('isClose');\n\n const selected = getSelectedTizoneOptionElement();\n if (selected) {\n scrollWrapperToTheSelectedOption(wrapper, selected);\n }\n if (usePortal) {\n stickWrapperToPicker(wrapper);\n }\n } else {\n wrapperClassList.add('isClose');\n }\n focusOnSearchArea();\n if (checkIsIOS) {\n document.addEventListener('focusout', e => {\n setTimeout(() => { // waiting for selection done before close\n closeDropdown(e, wrapper);\n }, 50);\n }, true);\n }\n state.oldScrollPosition = wrapper.scrollTop; // to make sticky of header part work\n }\n\n function renderPicker() {\n const [city, time] = getSelectedTimezoneCityTimeValues(selectedTimezone, state.isAm);\n return `\n
    \n ${normalizeCityText(city)} (${time})\n
    `;\n }\n\n function renderLockedPicker() {\n const [city, time] = getSelectedTimezoneCityTimeValues(selectedTimezone, state.isAm);\n return `\n
    \n ${normalizeCityText(city)} (${time})\n
    \n\n `;\n }\n\n function updatePickersTimeValue() {\n const picker = document.querySelector(selectors.toggler);\n if (!picker || !picker.innerHTML) return;\n const [city, time] = getSelectedTimezoneCityTimeValues(selectedTimezone, state.isAm);\n picker.querySelector('span.city-time').innerHTML = `${normalizeCityText(city)} (${time})`;\n }\n\n function toggleAmPm() {\n const amPmToggler = document.querySelector(selectors.amPmTogglerWrapper);\n const ball = amPmToggler.querySelector(selectors.amPmTogglerBall);\n const { classList } = ball;\n classList.toggle('am-side');\n classList.toggle('pm-side');\n state.isAm = !state.isAm;\n renderTimezoneOptionsIntoWrapper();\n }\n\n function onSearch(e) {\n state.filter = 0;\n state.selectedOptionIndex = 0;\n state.isSearching = true;\n if (state.searchingTimeOut) {\n clearTimeout(state.searchingTimeOut);\n }\n addStickyToHeader();\n filterTimezones(e);\n renderTimezoneOptionsIntoWrapper();\n state.searchingTimeOut = setTimeout(() => {\n state.isSearching = false;\n }, 100);\n }\n\n function clickOutside(e) {\n const wrapper = document.getElementById(wrapperId);\n const toggler = document.getElementById(togglerId);\n if (!wrapper || !toggler) return;\n const isClosed = wrapper.classList.contains('isClose');\n if (isClosed) return;\n if (!wrapper.contains(e.target) && !toggler.contains(e.target)) {\n if (!isClosed) {\n wrapper.classList.add('isClose');\n state.filteredTimezones = timezones;\n }\n }\n }\n\n function addStickyToHeader() {\n const headerArea = document.querySelector(selectors.headerInputWrapper);\n headerArea.classList.add('isSticky');\n }\n\n function stickHeaderControl(e, headerArea) {\n if (state.isSearching) return;\n const isSticky = 'isSticky';\n const newScrollPosition = e.target.scrollTop;\n if (headerArea) {\n if (newScrollPosition > headerArea?.clientHeight && newScrollPosition > state.oldScrollPosition) {\n headerArea.classList.remove(isSticky);\n } else {\n headerArea.classList.add(isSticky);\n }\n }\n\n state.oldScrollPosition = newScrollPosition;\n }\n\n function closeDropdown(e, wrapper) {\n meta.setAttribute('content', 'width=device-width, initial-scale=1.0, maximum-scale=2.0, user-scalable=1');\n if (wrapper && window.navigator.userAgent.indexOf('Android') < 0) {\n if (e.type === 'scroll' && !wrapper.contains(e.target)) {\n wrapper.classList.add('isClose');\n }\n if (e.type === 'resize' || e.type === 'focusout') {\n window.removeEventListener('click', closeDropdown);\n wrapper.classList.add('isClose');\n }\n }\n }\n\n function getDropdownWrapper() {\n const wrapper = document.querySelector(selectors.wrapper);\n return wrapper;\n }\n\n function getIsAutoSelectTimezoneOpenBoolean() {\n return isAutoSelectTimezoneOpen !== 'No';\n }\n\n function setTimezoneClockInterval(wrapper) {\n timeInterval = setInterval(() => {\n if (hasMinuteChanged()) {\n if (getIsAutoSelectTimezoneOpenBoolean() && wrapper) {\n renderTimezoneOptionsIntoWrapper();\n }\n updatePickersTimeValue();\n }\n }, 1000);\n }\n\n function addEventsToDropdownWrapperElements() {\n const wrapper = getDropdownWrapper();\n const searchInput = document.querySelector(selectors.searchInput);\n if (searchInput) {\n searchInput.addEventListener('input', onSearch);\n searchInput.addEventListener('keyup', e => {\n if (e.key === 'Escape') {\n clickOutside({ target: document.createElement('div') });\n }\n });\n }\n\n const dropdownToggler = document.querySelector(selectors.toggler);\n\n const headerArea = document.querySelector(selectors.headerInputWrapper);\n if (wrapper) {\n wrapper.addEventListener('scroll', e => stickHeaderControl(e, headerArea));\n wrapper.addEventListener('keyup', e => {\n if (e.key === 'Escape') {\n clickOutside({ target: document.createElement('div') });\n }\n });\n }\n\n if ((wrapper || dropdownToggler) && !timeInterval) {\n setTimezoneClockInterval(wrapper);\n addOnOptionClickListeners();\n window.addEventListener('click', clickOutside, true);\n }\n }\n\n function addEventsToPickerElement() {\n const dropdownToggler = document.querySelector(selectors.toggler);\n if (dropdownToggler) {\n dropdownToggler.addEventListener('click', toggleDropdown);\n dropdownToggler.addEventListener('keydown', e => {\n if (e.key === 'Enter') {\n toggleDropdown();\n }\n });\n }\n }\n\n function addPortalToDom() {\n const portal = document.createElement('div');\n portal.id = 'portal-root';\n document.body.appendChild(portal);\n return portal;\n }\n\n function renderWrapperToPortal(portal) {\n const div = document.createElement('div');\n div.innerHTML = renderTimezoneWrapper();\n portal.appendChild(div);\n state.isWrapperRendered = true;\n }\n\n function addCloseDropdownOnUsePortal() {\n const wrapper = getDropdownWrapper();\n window.addEventListener('resize', e => closeDropdown(e, wrapper), true);\n if (checkIsIOS) return;\n window.addEventListener('scroll', e => closeDropdown(e, wrapper), true);\n }\n\n function usePortalRender() {\n let portal = document.querySelector(selectors.portalRoot);\n if (!portal) {\n portal = addPortalToDom();\n }\n if (!state.isWrapperRendered) {\n renderWrapperToPortal(portal);\n addCloseDropdownOnUsePortal();\n addEventsToDropdownWrapperElements();\n }\n }\n\n function renderApp(timezoneWrapper) {\n if (usePortal) {\n usePortalRender();\n }\n\n timezoneWrapper.innerHTML = `\n
    \n ${timezoneWrapper.innerHTML = getIsAutoSelectTimezoneOpenBoolean() ? renderPicker() : renderLockedPicker()}\n ${!usePortal ? renderTimezoneWrapper() : ''}\n
    \n `;\n\n if (!usePortal) addEventsToDropdownWrapperElements();\n addEventsToPickerElement();\n }\n\n return {\n init: renderApp,\n clearTimeInterval,\n setIsAutoSelectTimezoneOpen,\n setSelectedTimezone,\n toggleAmPm,\n isAmPm\n };\n}\n\nexport { TimezonePicker };\n","/* eslint-disable no-param-reassign */\n\nconst injectGetStyle = () => {\n function getStyle(el, styleProp) {\n let value; const\n { defaultView } = el.ownerDocument || document;\n // W3C standard way:\n if (defaultView && defaultView.getComputedStyle) {\n // sanitize property name to css notation\n // (hypen separated words eg. font-Size)\n styleProp = styleProp.replace(/([A-Z])/g, '-$1').toLowerCase();\n return defaultView.getComputedStyle(el, null).getPropertyValue(styleProp);\n } if (el.currentStyle) { // IE\n // sanitize property name to camelCase\n styleProp = styleProp.replace(/-(\\w)/g, (str, letter) => {\n return letter.toUpperCase();\n });\n value = el.currentStyle[styleProp];\n // convert other units to pixels on IE\n if (/^\\d+(em|pt|%|ex)?$/i.test(value)) {\n return (val => {\n const oldLeft = el.style.left;\n const oldRsLeft = el.runtimeStyle.left;\n el.runtimeStyle.left = el.currentStyle.left;\n el.style.left = val || 0;\n val = `${el.style.pixelLeft}px`;\n el.style.left = oldLeft;\n el.runtimeStyle.left = oldRsLeft;\n return val;\n })(value);\n }\n return value;\n }\n }\n\n if (!window.getStyle) {\n window.getStyle = getStyle;\n }\n};\n\nexport default injectGetStyle;\n","/* eslint-disable camelcase */\nconst injectPostMessage = () => {\n if (window.getIframeWindow === undefined) {\n window.getIframeWindow = function getIframeWindow(iframeObject) {\n let doc;\n if (iframeObject.contentWindow) {\n return iframeObject.contentWindow;\n }\n if (iframeObject.window) {\n return iframeObject.window;\n }\n if (!doc && iframeObject.contentDocument) {\n doc = iframeObject.contentDocument;\n }\n if (!doc && iframeObject.document) {\n doc = iframeObject.document;\n }\n if (doc && doc.defaultView) {\n return doc.defaultView;\n }\n if (doc && doc.parentWindow) {\n return doc.parentWindow;\n }\n };\n }\n\n // postMessage utility function\n if (typeof window.XD === 'undefined') {\n window.XD = (() => {\n let interval_id;\n let last_hash;\n let cache_bust = 1;\n let attached_callback;\n return {\n postMessage: (message, target_url, _target) => {\n if (!target_url) {\n return;\n }\n\n let target = _target || window.parent; // default to parent\n if (window.postMessage) {\n let postMessageTarget = target_url.replace(/([^:]+:\\/\\/[^/]+).*/, '$1');\n // the browser supports window.postMessage, so call it with a targetOrigin\n // set appropriately, based on the target_url parameter.\n if (!('postMessage' in target)) {\n // we have a problem, update target\n target = window.getIframeWindow(target);\n }\n if (!target) {\n return;\n }\n if (postMessageTarget.indexOf('file://') === 0) { // This means we are using file locally. (like offline forms)\n postMessageTarget = '*';\n }\n target.postMessage(message, postMessageTarget);\n } else if (target_url) {\n // the browser does not support window.postMessage, so use the window.location.hash fragment hack\n target.location = `${target_url.replace(/#.*$/, '')}#${+new Date()}${cache_bust++}&${message}`;\n }\n },\n receiveMessage: (callback, source_origin) => {\n // browser supports window.postMessage\n if (window.postMessage) {\n // bind the callback to the actual event associated with window.postMessage\n\n if (callback) {\n attached_callback = e => {\n const params = window.location.search.split('?').join('');\n const isOfflineForms = params.indexOf('offline_forms=true') > -1 || params.indexOf('offline_forms=si') > -1;\n\n // eslint-disable-next-line max-len\n if (!isOfflineForms && ((typeof source_origin === 'string' && e.origin !== source_origin) || (Object.prototype.toString.call(source_origin) === '[object Function]' && source_origin(e.origin) === !1))) {\n return !1;\n }\n callback(e);\n };\n }\n if (window.addEventListener) {\n window[callback ? 'addEventListener' : 'removeEventListener']('message', attached_callback, !1);\n } else {\n window[callback ? 'attachEvent' : 'detachEvent']('onmessage', attached_callback);\n }\n } else {\n // a polling loop is started & callback is called whenever the location.hash changes\n if (interval_id) {\n clearInterval(interval_id);\n }\n interval_id = null;\n if (callback) {\n interval_id = setInterval(() => {\n const { hash } = document.location;\n const re = /^#?\\d+&/;\n if (hash !== last_hash && re.test(hash)) {\n last_hash = hash;\n callback({\n data: hash.replace(re, '')\n });\n }\n }, 100);\n }\n }\n }\n };\n })();\n }\n};\nexport default injectPostMessage;\n","/* Widget Constants */\nconst widgetTranlatebles = {\n '533946093c1ad0c45d000070' /* Configurable List */: {\n SHOW_HIDE_CALENDAR: 'Show/hide calendar'\n }\n};\n\n/* TRANSLATABLE WORDS PARSER (Field Declarations) */\n\n// Configurable List : 533946093c1ad0c45d000070\n\nconst parseConfigurableListFieldDeclarations = declaration => {\n /*\n Text: [label]:text[:placeholder]\n Number: [label]:number[:placeholder:step,min,max]\n Textarea: [label]:textarea[:placeholder]\n Dropdown: [label]:dropdown:option1[,option2,...:placeholder]\n Radio: [label]:radio:option1[,option2,...]\n Checkbox: [label]:checkbox:option1[,option2,...]\n Date Input: [label]:dateInput[:format]\n Time Input: [label]:timeInput:format[,now]\n Date: [label]:date[:format:range:today]\n Time: [label]:time[:format,now]\n Static Text: [label]:static:[text]\n */\n\n function moveAsteriskToEnd(input = '') {\n if (input.startsWith('*')) {\n return `${input.substring(1).trim()}`;\n }\n return input;\n }\n if (declaration) {\n const translatables = [];\n const lines = declaration.split('\\n');\n lines.forEach(line => {\n const type = line.split(':')[1]?.trim();\n switch (type) {\n case 'number':\n case 'textarea':\n case 'static':\n case 'text':\n // label\n translatables.push(moveAsteriskToEnd(line.split(':')[0]));\n // placeholder or text (static)\n translatables.push(moveAsteriskToEnd(line.split(':')[2]));\n break;\n case 'radio':\n case 'checkbox':\n case 'dropdown':\n // label\n translatables.push(moveAsteriskToEnd(line.split(':')[0]));\n // options\n const options = line.split(':')[2] ? line.split(':')[2].split(',') : [];\n translatables.push([...translatables, ...options]);\n // placeholder (dropdown)\n if (line.split(':')[3]) {\n translatables.push(line.split(':')[3]);\n }\n break;\n case 'dateInput':\n case 'timeInput':\n case 'time':\n case 'date':\n // only label\n translatables.push(moveAsteriskToEnd(line.split(':')[0]));\n break;\n default:\n break;\n }\n });\n return translatables;\n }\n\n return [];\n};\n\nconst parseMatrixDynamiqueDeclations = declaration => {\n // ex: head1:60,head2:120\n\n if (declaration) {\n const columns = declaration.split(',');\n return columns.map(column => column && column.split(':')[0]);\n }\n\n return [];\n};\n\nconst getWidgetFieldParser = widgetID => {\n switch (widgetID) {\n case '533946093c1ad0c45d000070': /* Configurable List */\n return parseConfigurableListFieldDeclarations;\n case '5299b58aba554b7e24000007': /* Matrix Dynamique */\n return parseMatrixDynamiqueDeclations;\n default:\n return null;\n }\n};\n\nconst getWidgetTranslatebleTexts = (widgetID, fieldDeclaration) => {\n if (fieldDeclaration) {\n const parser = getWidgetFieldParser(widgetID);\n return [...new Set([\n ...(Object.values(widgetTranlatebles[widgetID]) || []),\n ...parser(fieldDeclaration).flat(Infinity)\n ])];\n }\n return Object.values(widgetTranlatebles[widgetID]);\n};\n\nexport {\n widgetTranlatebles,\n getWidgetTranslatebleTexts,\n parseConfigurableListFieldDeclarations\n};\n","export const loadWidgetImageInParentWindow = imageUrl => {\n let url;\n try {\n url = new URL(imageUrl, window.location.origin);\n url.hostname = window.location.hostname;\n url = url.toString();\n } catch (e) {\n url = imageUrl;\n }\n return new Promise((resolve, reject) => {\n const xhr = new window.XMLHttpRequest();\n\n xhr.open('GET', url, true);\n xhr.withCredentials = true;\n xhr.responseType = 'blob';\n xhr.onerror = reject;\n xhr.onload = () => {\n const reader = new global.FileReader();\n reader.onloadend = () => {\n if (typeof reader.result === 'string' && (reader.result.substr(0, 10) === 'data:image' || reader.result.substr(0, 29) === 'data:application/octet-stream')) {\n resolve(reader.result.replace('data:application/octet-stream', 'data:image/png'));\n } else {\n reject(new Error('Blob is not an image'));\n }\n };\n reader.readAsDataURL(xhr.response);\n };\n xhr.send();\n });\n};\n\nexport const isBase64LoadedField = (msg, clientId) => (!!msg.enterprise || msg.isHipaa) && [\n '529467003477f3512000001f', // Smooth Signature\n '533a8c19a3f5fec35d00009a', // Initials\n '5d493b3b3ecd623d69000045', // Annotate Picture\n '535a49d40a05fdff5200002b' // Draw on Image\n].includes(clientId);\n","/* eslint-disable */\n/**\n * WidgetsServerBuilder.js 1.5.2\n *\n * (c) 2013 JotForm Easiest Form Builder\n */\nimport { getActiveApp, getEnv, getBaseURL, isEU, isHIPAA } from '@jotforminc/router-bridge';\nimport { getWidgetTranslatebleTexts } from '../translations';\nimport { StorageHelper } from '@jotforminc/storage-helper';\nimport { loadWidgetImageInParentWindow, isBase64LoadedField } from '../utils/loadWidgetImageAsBase64';\n\nfunction widgetFrameLoaded(id, formProps, value, questionProps) {\n formProps = typeof formProps === 'undefined' ? {} : formProps;\n questionProps = typeof questionProps === 'undefined' ? {} : questionProps;\n\n var enableLog = false;\n\n enableLog && console.log('SERVER: widget frame onload for', id);\n\n var frameObj = document.getElementById(`customFieldFrame_${id}`);\n var { src } = frameObj;\n\n // because we are changing iframe src dynamically\n if (src.match('/form/')) {\n return;\n }\n\n var refererArr = src.match(/^(ftp:\\/\\/|https?:\\/\\/)?(.+@)?([a-zA-Z0-9\\.\\-]+).*$/);\n var referer = refererArr[1] + refererArr[3];\n // var thisForm = (JotForm.forms[0] == undefined || typeof JotForm.forms[0] == \"undefined\" ) ? $($$('.jotform-form')[0].id) : JotForm.forms[0];\n\n // check a valid json string\n function IsValidJsonString(str) {\n try {\n JSON.parse(str);\n } catch (e) {\n return false;\n }\n return true;\n }\n\n function sendMessage(msg, id) {\n try {\n if (navigator.userAgent.indexOf('Firefox') != -1) {\n XD.postMessage(msg, referer, getIframeWindow(window.frames[`customFieldFrame_${id}`]));\n } else {\n XD.postMessage(msg, referer, window.frames[`customFieldFrame_${id}`]);\n }\n } catch (e) {\n console.log(e);\n }\n }\n\n // note that we are binding receiveMessage on iframe load\n XD.receiveMessage(message => {\n // don't parse some unknown text from third party api of widgets like google recapthca\n if (!IsValidJsonString(message.data)) {\n return;\n }\n\n // parse message\n var data = JSON.parse(message.data);\n\n enableLog && console.log('SERVER: message coming form client type ', data.type);\n // sendSubmit\n if (data.type === 'submit') {\n if (typeof data.value === 'number') {\n data.value = `${data.value}`;\n }\n var required = $(document.getElementById(`input_${data.qid}`)).hasClassName('widget-required');\n if (!(required)) {\n if (data.valid === false) {\n document.getElementById(`input_${data.qid}`).value = 'widget not used';\n } else if (data.value !== undefined) {\n document.getElementById(`input_${data.qid}`).value = data.value;\n } else {\n document.getElementById(`input_${data.qid}`).value = '';\n }\n } else if (data.valid === false) {\n JotForm.errored(document.getElementById(`input_${data.qid}`), 'Please fill this field');\n } else {\n JotForm.corrected(document.getElementById(`input_${data.qid}`));\n if (data.value !== undefined) {\n document.getElementById(`input_${data.qid}`).value = data.value;\n } else {\n document.getElementById(`input_${data.qid}`).value = '';\n }\n }\n\n // if no value was set, dont show it to submission data\n if (typeof data.value === 'undefined' || data.value == false) {\n var el = document.getElementById(`input_${data.qid}`);\n el.value = '';\n el.removeAttribute('name');\n }\n\n var allInputs = document.getElementsByClassName('widget-required');\n var sendSubmit = true;\n for (var i = -0; i < allInputs.length; i++) {\n if (allInputs[i].value.length === 0) {\n sendSubmit = false;\n }\n }\n }\n\n // sendData\n if (data.type === 'data' && document.getElementById(`input_${data.qid}`)) {\n document.getElementById(`input_${data.qid}`).value = data.value;\n }\n\n // requestFrameSize\n if (data.type === 'size') {\n var { width } = data;\n var { height } = data;\n\n enableLog && console.log('SERVER: resizing widget width', width, 'height', height);\n if (width !== undefined && width !== null) {\n document.getElementById(`customFieldFrame_${data.qid}`) ? document.getElementById(`customFieldFrame_${data.qid}`).style.width = `${width}px` : null;\n }\n if (height !== undefined && height !== null) {\n document.getElementById(`customFieldFrame_${data.qid}`) ? document.getElementById(`customFieldFrame_${data.qid}`).style.height = `${height}px` : null;\n }\n }\n\n // Translatable text (from IFrame widget)\n if (data.type === 'translation') {\n if (data.data.length > 0) {\n // Check if there is already data for this form\n var wtData = window.widgetTranslatables[formProps.formID];\n if (typeof wtData === 'undefined') {\n wtData = {};\n }\n wtData[`qid_${data.qid}`] = data.data;\n window.widgetTranslatables[formProps.formID] = wtData;\n\n try {\n StorageHelper.setLocalStorageItem({key:'wStorage', value:JSON.stringify(window.widgetTranslatables)});\n } catch (e) {\n console.log(e);\n }\n }\n }\n\n if (data.type === 'fields:capture') {\n sendMessage(JSON.stringify({\n eventID: data.eventID,\n type: 'event:receiver',\n data: []\n }), data.qid);\n }\n }, `${document.location.protocol}//${frameObj.src.match(/^(ftp:\\/\\/|https?:\\/\\/)?(.+@)?([a-zA-Z0-9\\.\\-]+).*$/)[3]}`);\n\n // function that gets the widget settings from data-settings attribute of the iframe\n function getWidgetSettings() {\n var el = document.getElementById(`widget_settings_${id}`);\n return (el) ? el.value : null;\n }\n\n //get form environment\n var env = getEnv();\n var baseUrl = getBaseURL();\n var isApp = getActiveApp();\n var isEu = isEU();\n var isHipaa = isHIPAA();\n var enterprise = env === \"ENTERPRISE\" ? baseUrl.replace('https://', '') : false;\n\n function isOnFormBuilder() {\n return isApp === 'form-builder';\n }\n\n // function to check if a widget is required\n function isWidgetRequired() {\n var classNames = document.getElementById(`id_${id}`)?.className;\n return classNames?.includes('jf-required') || classNames?.includes('isRequired');\n }\n\n function isWidgetLabelEnabled() {\n var labelElement = document.getElementById(`label_${id}`);\n if (labelElement) {\n return labelElement.className.indexOf('form-label') > -1;\n }\n return false;\n }\n\n function getWidgetLabel(id) {\n var labelElement = document.getElementById(`label_${id}`);\n if (labelElement && labelElement.textContent) {\n return labelElement.textContent;\n }\n return '';\n }\n\n // send auto ready message to widget\n // do not call v3 functions when inside v4\n var isCardForm = (window.FORM_MODE == 'cardform' || window.buildermode === 'card');\n\n // Check theme version\n var themeVersion = (window && window.newDefaultTheme) || '';\n var isOpenedInPortal = src.match('isOpenedInPortal=true');\n var isOpenedInAgent = src.match('isOpenedInAgent=true');\n if (isOpenedInPortal || isOpenedInAgent) {\n sendMessage(JSON.stringify({type: 'theme', themeVersion: 'v2', isExtendedTheme: false}), id);\n }\n\n var formBackgroundv3 = (typeof getAllProperties === 'function') ? getAllProperties().form_background : '#fff';\n var formFontv3 = (typeof getAllProperties === 'function') ? getAllProperties().form_font : '';\n var msg = {\n type: 'ready',\n qid: `${id}`,\n background: formProps.formBackground || formBackgroundv3,\n fontFamily: formProps.formFont || formFontv3,\n formID: formProps.formID || BuildSource.formID,\n cardform: isCardForm,\n jotformNext: window.location.href.indexOf('jotformNext=1') > -1 || window.isComingFromJotFormNext == 1,\n onWizard: isOnFormBuilder(),\n settings: getWidgetSettings(),\n required: isWidgetRequired(),\n origin: window.location.origin || (`${window.location.protocol}//${window.location.hostname}${window.location.port ? `:${window.location.port}` : ''}`),\n themeVersion: themeVersion,\n isWidgetLabelEnabled: isWidgetLabelEnabled(),\n qlabel: getWidgetLabel(id),\n value,\n isApp,\n isEu,\n isHipaa,\n enterprise,\n lang: document.documentElement.lang\n };\n\n // include initial width and height of the widget\n var fwidth = frameObj.getAttribute('data-width') || frameObj.style.width;\n var fheight = frameObj.getAttribute('data-height') || frameObj.style.height;\n msg.width = parseInt(fwidth);\n msg.height = parseInt(fheight);\n // data-value attribute is set if form is in editMode.\n if (isCardForm && frameObj && typeof frameObj.up === 'function') {\n var jfFieldDiv = frameObj.up('.jfField') || false;\n var widgetID = jfFieldDiv && typeof jfFieldDiv.getAttribute === 'function' ? jfFieldDiv.getAttribute('data-widget-id') : false;\n if (widgetID) {\n msg.widgetID = widgetID;\n }\n }\n\n if (isBase64LoadedField(msg, questionProps.selectedField)) {\n loadWidgetImageInParentWindow(msg.value)\n .then((base64Image) => sendMessage(JSON.stringify({ ...msg, value: base64Image }), `${id}`))\n .catch(() => sendMessage(JSON.stringify(msg), `${id}`))\n } else {\n sendMessage(JSON.stringify(msg), `${id}`);\n }\n\n // Request IFrame widget for translatable text (if there is any)\n var translatableRequest = {\n type: 'translatable',\n formID: formProps.formID || BuildSource.formID,\n qid: `${id}`\n };\n sendMessage(JSON.stringify(translatableRequest), `${id}`);\n}\n\nfunction getWidgetTranslatables(widgetID, options = {}) {\n\n const { fieldDeclaration, fid, qid } = options;\n\n var response = {\n isTranslatable: false,\n data: []\n };\n\n const parsableWidgets = ['5299b58aba554b7e24000007'/* Configurable List */, '533946093c1ad0c45d000070'/* Matrix Dynamique */];\n if(parsableWidgets.includes(widgetID)) {\n const texts = getWidgetTranslatebleTexts(widgetID, fieldDeclaration);\n if(texts && texts.length > 0){\n response.isTranslatable = true;\n response.data = texts;\n }\n return response;\n }\n\n if (typeof fid !== 'undefined' && typeof qid !== 'undefined' && !isNaN(fid) && !isNaN(qid) && fid !== '' && qid !== '') {\n var widgetTranslatables = StorageHelper.getLocalStorageItem({key:'wStorage'});\n\n if (widgetTranslatables !== undefined && widgetTranslatables !== null) {\n var widgetTranslatables = JSON.parse(widgetTranslatables);\n if (typeof widgetTranslatables[fid] !== 'undefined') {\n var widgetTranslatables = widgetTranslatables[fid];\n if (typeof widgetTranslatables[`qid_${qid}`] !== 'undefined') {\n var translatable = widgetTranslatables[`qid_${qid}`];\n if (typeof translatable !== 'undefined') {\n if (translatable.length > 0) {\n response.isTranslatable = true;\n response.data = translatable;\n }\n }\n }\n }\n }\n }\n\n return response;\n}\n\nexport {\n widgetFrameLoaded,\n getWidgetTranslatables\n}\n","import createWidgetTranslations from './customfield/language';\nimport createCustomWidget from './customfield/customWidget';\nimport createWidgetUtils from './customfield/utils';\n\nimport injectGetStyle from './utils/getStyle';\nimport injectPostMessage from './utils/postmessage';\nimport makeJCFServerCommonChecks from './utils/makeJCFServerCommonChecks';\nimport clientWidgetFrameLoaded from './widgetsServer/client';\nimport JFExternalWidgetParamsServer from './external/server';\nimport JFExternalWidgetParamsClient from './external/client';\nimport {\n widgetFrameLoaded as builderWidgetFrameLoaded,\n getWidgetTranslatables as builderGetWidgetTranslatables\n} from './widgetsServer/builder';\n\nconst initWidgetsBuilder = () => {\n // good to go\n // Replaces the old behaviour of WidgetsServerBuilder.js\n if (window.JCFServerCommon === undefined) {\n window.JCFServerCommon = {\n frames: {}\n };\n }\n\n if (window.widgetTranslatables === undefined) {\n window.widgetTranslatables = {};\n }\n injectPostMessage();\n injectGetStyle();\n window.widgetFrameLoaded = builderWidgetFrameLoaded;\n window.getWidgetTranslatables = builderGetWidgetTranslatables;\n // eslint-disable-next-line no-undef\n if (!Element.prototype.addClassName) {\n // eslint-disable-next-line no-undef\n Element.prototype.addClassName = function elemFn(className) {\n if (this.className.includes(className)) return;\n this.className += `${this.className.length ? ' ' : ''}${className}`;\n };\n }\n};\n\nexport {\n createWidgetTranslations,\n createCustomWidget,\n createWidgetUtils,\n clientWidgetFrameLoaded,\n builderWidgetFrameLoaded,\n builderGetWidgetTranslatables,\n injectGetStyle,\n injectPostMessage,\n makeJCFServerCommonChecks,\n JFExternalWidgetParamsServer,\n initWidgetsBuilder,\n JFExternalWidgetParamsClient\n};\n","/* eslint-disable max-classes-per-file */\nimport 'core-js/actual/array/find';\nimport Emitter from 'quill/core/emitter';\nimport BaseTheme, { BaseTooltip } from 'quill/themes/base';\nimport icons from 'quill/ui/icons';\n\nconst TOOLBAR_CONFIG = [\n ['bold', 'italic', 'link'],\n // [{ header: 1 }, { header: 2 }, 'blockquote']\n];\n\nclass JotFormQuillTooltip extends BaseTooltip {\n constructor(quill, bounds) {\n super(quill, bounds);\n this.quill.on(Emitter.events.EDITOR_CHANGE, (type, range, oldRange, source) => {\n if (type !== Emitter.events.SELECTION_CHANGE) return;\n if (range != null && range.length > 0 && source === Emitter.sources.USER) {\n this.show();\n this.position();\n } else if (global.document.activeElement !== this.textbox && this.quill.hasFocus() && source === Emitter.sources.USER) {\n this.hide();\n } else if (global.document.activeElement !== this.textbox && (!range || range.lengt === 0)) {\n this.hide();\n }\n });\n }\n\n listen() {\n super.listen();\n this.quill.on(Emitter.events.SCROLL_OPTIMIZE, () => {\n // Let selection be restored by toolbar handlers before repositioning\n setTimeout(() => {\n if (this.root.classList.contains('ql-hidden')) return;\n const range = this.quill.getSelection();\n if (range != null) {\n this.position();\n }\n }, 1);\n });\n }\n\n cancel() {\n this.show();\n }\n\n getFirstParentWithTransform(el) {\n let element = el;\n while (element = element.parentElement) { // eslint-disable-line\n const transFormValue = global.getComputedStyle(element).transform;\n const hasTransform = element.style.transform || (transFormValue && transFormValue !== 'none');\n if (hasTransform || element === global.document.body) {\n return element;\n }\n }\n return element;\n }\n\n position() {\n const transformElement = this.getFirstParentWithTransform(this.root).getBoundingClientRect();\n const selectionBounds = (() => {\n const selection = global.window.getSelection();\n const selectionRange = selection.getRangeAt(0);\n return selectionRange.getBoundingClientRect();\n })();\n const tooltipLeft = ((selectionBounds.left - transformElement.left) + (selectionBounds.width / 2));\n this.root.style.left = `${tooltipLeft}px`;\n this.root.style.transform = 'translate(-50%, 0)';\n this.root.style.top = `${selectionBounds.bottom - transformElement.top}px`;\n }\n}\n\nclass JotFormQuillTheme extends BaseTheme {\n constructor(quill, options) {\n const newOptions = options;\n\n if (newOptions.modules.toolbar != null && newOptions.modules.toolbar.container == null) {\n newOptions.modules.toolbar.container = TOOLBAR_CONFIG;\n }\n\n super(quill, newOptions);\n\n // Add required css class to container\n this.quill.container.classList.add('ql-bubble');\n }\n\n extendToolbar(toolbar) {\n this.tooltip = new JotFormQuillTooltip(this.quill, this.options.bounds);\n this.tooltip.root.appendChild(toolbar.container);\n this.buildButtons([].slice.call(toolbar.container.querySelectorAll('button')), icons);\n this.buildPickers([].slice.call(toolbar.container.querySelectorAll('select')), icons);\n }\n}\nJotFormQuillTheme.DEFAULTS = {\n ...BaseTheme.DEFAULTS,\n modules: {\n toolbar: {\n handlers: {\n /* eslint-disable */\n link: function (value) {\n if (!value) {\n this.quill.format('link', false);\n } else {\n this.quill.theme.tooltip.edit();\n }\n }\n /* eslint-enable */\n }\n }\n }\n};\n\nJotFormQuillTooltip.TEMPLATE = [\n '',\n '
    ',\n '',\n '',\n '
    '\n].join('');\n\nexport { JotFormQuillTooltip, JotFormQuillTheme as default };\n","import PropTypes from 'prop-types';\nimport React, { Component } from 'react';\nimport NotificationSystem from 'react-notification-system';\nimport DOMPurify from 'dompurify';\nimport isUndefined from 'lodash/isUndefined';\nimport { connect } from 'react-redux';\nimport { bindActionCreators } from 'redux';\nimport { t } from '@jotforminc/translation';\nimport {\n Button,\n Dialog,\n DialogBody,\n DialogIcon,\n DialogTitle,\n DialogDescription,\n DialogContent,\n DialogActions,\n DialogCloseButton\n} from '@jotforminc/magnet';\nimport { IconTrashExclamationFilled, IconExclamationCircleFilled, IconQuestionCircleFilled } from '@jotforminc/svg-icons';\nimport { addNotification, removeNotification } from '../actions';\n\nclass NotificationContainer extends Component {\n constructor(props) {\n super(props);\n this.generateUUID = this.generateUUID.bind(this);\n }\n\n UNSAFE_componentWillReceiveProps(newProps) {\n let { dismissible, type } = newProps.notification;\n const { mainLevel } = newProps.notification;\n const {\n state,\n uid,\n title,\n message,\n hint,\n onBeforeRemove,\n onHideCallback,\n backdrop,\n callback,\n deleteButtonText = 'Delete Field',\n cancelButtonText = 'Cancel',\n additionalClasses\n } = newProps.notification;\n let notificationTemplate;\n let notificationBackdrop;\n let dismissButton;\n let actionButtons = [];\n const uuid = uid || this.generateUUID();\n const html = DOMPurify.sanitize(typeof message === 'function' ? message() : message);\n\n if (mainLevel !== newProps.mainLevel) {\n return;\n }\n switch (state) {\n case 'NOTIFICATION_CONFIRM':\n type = type || 'modal';\n if (type !== 'confirm') {\n actionButtons = [(\n {\n const denyRemove = callback(false);\n if (!denyRemove) {\n this.notificationSystem.removeNotification(uuid);\n }\n }}\n >\n {t(cancelButtonText)}\n \n ), (\n { this.okButton = p; }}\n className=\"notification-success\"\n onClick={() => {\n const denyRemove = callback(true);\n if (!denyRemove) {\n this.notificationSystem.removeNotification(uuid);\n }\n }}\n >\n {t('OK')}\n \n )];\n } else {\n actionButtons = [(\n {\n const denyRemove = callback(false);\n if (!denyRemove) {\n this.notificationSystem.removeNotification(uuid);\n }\n }}\n >\n {t('Cancel')}\n \n ), (\n { this.okButton = p; }}\n className=\"notification-error\"\n onClick={() => {\n const denyRemove = callback(true);\n if (!denyRemove) {\n this.notificationSystem.removeNotification(uuid);\n }\n }}\n >\n {t(deleteButtonText)}\n \n )];\n }\n // There is no break, this is intentional.\n case 'NOTIFICATION_ADD': // eslint-disable-line\n if (newProps.notification.actions) {\n const actions = newProps.notification.actions.map(a => {\n return typeof a === 'function' ? a() : a;\n });\n actionButtons = [...actions];\n }\n\n dismissible = isUndefined(dismissible) ? true : dismissible;\n\n let dismissButtonState = dismissible;\n if (type === 'modal' || type === 'confirm') {\n dismissButtonState = dismissible && (dismissible === 'both' || dismissible === 'button');\n }\n\n if (dismissButtonState) {\n dismissButton = (\n {\n if (typeof onBeforeRemove === 'function') {\n onBeforeRemove(uuid, this);\n }\n this.notificationSystem.removeNotification(uuid);\n }}\n >\n
    \n \n );\n\n actionButtons = [...actionButtons, dismissButton];\n }\n\n switch (type) {\n case 'delete':\n notificationTemplate = (\n {\n const denyRemove = callback(false);\n if (!denyRemove) {\n this.notificationSystem.removeNotification(uuid);\n }\n }}\n ariaLabel={title}\n zIndex={999999999}\n colorStyle=\"error\"\n >\n \n {\n if (typeof onBeforeRemove === 'function') {\n onBeforeRemove(uuid, this);\n }\n this.notificationSystem.removeNotification(uuid);\n }}\n />\n {title}\n \n \n
    \n
    \n \n \n \n

    \n

    \n
    \n
    \n
    \n \n {\n if (typeof onHideCallback === 'function') {\n onHideCallback(uuid, this);\n }\n this.notificationSystem.removeNotification(uuid);\n }}\n >\n Hide Field\n \n {\n const denyRemove = callback(false);\n if (!denyRemove) {\n this.notificationSystem.removeNotification(uuid);\n }\n }}\n >\n Cancel\n \n {\n const denyRemove = callback(true);\n if (!denyRemove) {\n this.notificationSystem.removeNotification(uuid);\n }\n }}\n >\n Delete Field\n \n \n {\n if (typeof onBeforeRemove === 'function') {\n onBeforeRemove(uuid, this);\n }\n this.notificationSystem.removeNotification(uuid);\n }}\n />\n \n );\n break;\n case 'modal':\n notificationTemplate = (\n { if (p.key === 'Escape') this.notificationSystem.removeNotification(uuid); }}\n >\n {(dismissible === true || dismissible === 'both')\n ? (\n {\n if (typeof onBeforeRemove === 'function') {\n onBeforeRemove(uuid, this);\n }\n this.notificationSystem.removeNotification(uuid);\n }}\n >\n ×\n \n )\n : null }\n

    \n {t(title)}\n

    \n
    \n {html}\n
    \n {actionButtons.length\n ? (\n
    \n {actionButtons}\n
    \n )\n : '' }\n
    \n );\n break;\n case 'confirm':\n notificationTemplate = (\n { if (p.key === 'Escape') this.notificationSystem.removeNotification(uuid); }}\n >\n {(dismissible === true || dismissible === 'both')\n ? (\n {\n if (typeof onBeforeRemove === 'function') {\n onBeforeRemove(uuid, this);\n }\n this.notificationSystem.removeNotification(uuid);\n }}\n >\n ×\n \n )\n : null }\n

    \n {t(title)}\n

    \n
    \n {actionButtons.length ? actionButtons : '' }\n
    \n {hint && (\n \n \n

    \n \n )}\n

    \n
    \n );\n break;\n case 'toast':\n default:\n notificationTemplate = (\n {\n if (dismissible === 'both') {\n if (typeof onBeforeRemove === 'function') {\n onBeforeRemove(uuid, this);\n }\n this.notificationSystem.removeNotification(uuid);\n }\n }}\n >\n \n
    \n \n \n
    \n {actionButtons.length\n ? (\n
    \n
    \n {actionButtons.map((btn, index) =>
    {btn}
    )}\n
    \n
    \n )\n : '' }\n
    \n \n );\n break;\n }\n\n if (backdrop) {\n notificationBackdrop = (\n
    \n );\n }\n\n const notificationBody = (\n \n {notificationBackdrop}\n {notificationTemplate}\n
    \n );\n\n const notification = {\n level: 'info',\n autoDismiss: false,\n ...newProps.notification,\n uid: uuid,\n message: null,\n title: null,\n dismissible: false,\n children: notificationBody\n };\n\n const addResult = this.notificationSystem.addNotification(notification);\n if (!addResult) {\n this.notificationSystem.editNotification(uuid, notification);\n }\n break;\n\n case 'NOTIFICATION_REMOVE':\n this.notificationSystem.removeNotification(uid);\n break;\n default:\n // Nope\n break;\n }\n }\n\n shouldComponentUpdate(newProps) {\n return !!(this.okButton) || (!this.props.isTranslationLoaded && newProps.isTranslationLoaded);\n }\n\n componentDidUpdate() {\n if (this.okButton) {\n setTimeout(() => {\n if (this && this.okButton && this.okButton.focus) { // check if component is unmounted\n this.okButton.focus();\n }\n }, 10);\n }\n }\n\n generateUUID() {\n /* eslint-disable */\n // Disabled because eslint goes crazy.\n const UUID = (function () {\n const self = {};\n const lut = [];\n for (let i = 0; i < 256; i++) {\n lut[i] = (i < 16 ? '0' : '') + (i).toString(16);\n }\n self.generate = function () {\n const d0 = Math.random() * 0xffffffff | 0;\n const d1 = Math.random() * 0xffffffff | 0;\n const d2 = Math.random() * 0xffffffff | 0;\n const d3 = Math.random() * 0xffffffff | 0;\n return `${lut[d0 & 0xff] + lut[d0 >> 8 & 0xff] + lut[d0 >> 16 & 0xff] + lut[d0 >> 24 & 0xff]}-${\n lut[d1 & 0xff]}${lut[d1 >> 8 & 0xff]}-${lut[d1 >> 16 & 0x0f | 0x40]}${lut[d1 >> 24 & 0xff]}-${\n lut[d2 & 0x3f | 0x80]}${lut[d2 >> 8 & 0xff]}-${lut[d2 >> 16 & 0xff]}${lut[d2 >> 24 & 0xff]\n }${lut[d3 & 0xff]}${lut[d3 >> 8 & 0xff]}${lut[d3 >> 16 & 0xff]}${lut[d3 >> 24 & 0xff]}`;\n };\n return self;\n }());\n /* eslint-enable */\n return UUID.generate();\n }\n\n render() {\n return (\n { this.notificationSystem = c; }}\n style={false} // eslint-disable-line\n />\n );\n // style={false} is intended.\n }\n}\n\nfunction mapStateToProps(state) {\n return {\n notification: state.notification,\n isTranslationLoaded: state.ui.isTranslationLoaded\n };\n}\n\nfunction mapDispatchToProps(dispatch) {\n return {\n actions: bindActionCreators({\n addNotification,\n removeNotification\n }, dispatch)\n };\n}\n\nNotificationContainer.propTypes = {\n isTranslationLoaded: PropTypes.bool\n};\n\nexport default connect(\n mapStateToProps,\n mapDispatchToProps\n)(NotificationContainer);\n","import React from 'react';\nimport propTypes from 'prop-types';\nimport { IconExclamationCircleFilled } from '@jotforminc/svg-icons';\nimport { t } from '@jotforminc/translation';\nimport { Button } from '@jotforminc/magnet';\nimport { isFormUnpublished } from '.';\n\n/**\n * Warning bar that pops up on preview when the\n * warning is clicked.\n */\nconst PreviewWarningBar = ({\n onClickEnable,\n onClickCancel,\n publishData\n}) => {\n const isUnpublished = isFormUnpublished({ publishData: publishData });\n return (\n \n
    \n
    \n
    \n \n {t('ENABLE YOUR FORM')}\n \n \n {t('Enable your form to start receiving submissions')}\n

    \n
    \n
    \n
    \n \n {t(isUnpublished ? 'Enable' : 'Enabled')}\n \n \n {t('Not now')}\n \n
    \n \n );\n};\n\nPreviewWarningBar.propTypes = {\n onClickEnable: propTypes.func.isRequired,\n onClickCancel: propTypes.func.isRequired,\n publishData: propTypes.string.isRequired\n};\n\nexport default PreviewWarningBar;\n","import PropTypes from 'prop-types';\nimport React, { Component } from 'react';\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport { handlePublishPRLink } from '@jotforminc/utils';\nimport { t } from '@jotforminc/translation';\nimport { IconMobile, IconTablet } from '@jotforminc/svg-icons';\nimport { PreviewWarningBar, isFormUnpublished } from '@jotforminc/builder-components';\n\nimport * as actions from '../../actions';\n\nclass PreviewIframe extends Component {\n constructor(props) {\n super(props);\n this.state = {\n loadIframe: global.queryQueue ? global.queryQueue.length === 0 : true,\n tryCount: 0,\n isSubmissionCompleted: false,\n isUnpublishedWarningBarOpen: false\n };\n this.checkNetworkState = this.checkNetworkState.bind(this);\n this.setDeviceOrientation = this.setDeviceOrientation.bind(this);\n this.setPreviewScaling = this.setPreviewScaling.bind(this);\n this.timeoutFunc = undefined;\n }\n\n componentDidMount() {\n const { publishData } = this.props;\n this.checkNetworkState();\n this.setState({\n isUnpublishedWarningBarOpen: isFormUnpublished({ publishData: publishData }),\n });\n\n global.window.addEventListener('resize', this.setPreviewScaling);\n }\n\n componentDidUpdate() {\n this.setPreviewScaling();\n }\n\n componentWillUnmount() {\n if (this.timeoutFunc) {\n clearTimeout(this.timeoutFunc);\n }\n\n global.window.removeEventListener('resize', this.setPreviewScaling);\n }\n\n setDeviceOrientation(orientation) {\n const { previewModeDeviceType } = this.props;\n if (!previewModeDeviceType || previewModeDeviceType === 'desktop') { return; }\n\n switch (orientation) {\n case 'portrait':\n this.props.actions.setPreviewDeviceType(this.currentDevice);\n break;\n case 'landscape':\n this.props.actions.setPreviewDeviceType(`${this.currentDevice}_vertical`);\n break;\n default:\n // Noop.\n break;\n }\n }\n\n setPreviewScaling() {\n const { previewModeDeviceType } = this.props;\n const { previewFrameContainer } = this;\n // const previewFrameWrapper = this.previewFrameWrapper;\n\n if (previewFrameContainer && ['mobile', 'tablet'].indexOf(previewModeDeviceType) !== -1) {\n const frameTop = previewFrameContainer.getBoundingClientRect().top;\n const frameHeight = previewFrameContainer.clientHeight;\n const windowHeight = global.window.innerHeight;\n const availableArea = windowHeight - frameTop;\n const scaleValue = parseFloat((availableArea / frameHeight).toFixed(2), 10) - 0.02;\n\n const maxScaleValue = 1;\n const minScaleValue = 0.65;\n\n if (scaleValue < maxScaleValue && scaleValue > minScaleValue) {\n previewFrameContainer.style.transform = `scale(${scaleValue > minScaleValue ? scaleValue : 1})`;\n // previewFrameWrapper.style.overflow = 'hidden';\n } else {\n this.resetPreviewScaling();\n }\n } else {\n this.resetPreviewScaling();\n }\n }\n\n resetPreviewScaling() {\n const { previewFrameContainer } = this;\n // const previewFrameWrapper = this.previewFrameWrapper;\n\n if (previewFrameContainer) {\n previewFrameContainer.style.transform = null;\n // previewFrameWrapper.style.overflow = null;\n }\n }\n\n get currentOrientation() {\n if (this.props.previewModeDeviceType.indexOf('_vertical') !== -1) {\n return 'landscape';\n }\n return 'portrait';\n }\n\n get currentDevice() {\n return this.props.previewModeDeviceType.replace('_vertical', '');\n }\n\n checkNetworkState() {\n const isThereAnyRequest = global.queryQueue ? global.queryQueue.length !== 0 : true;\n const { loadIframe, tryCount } = this.state;\n if (!loadIframe && tryCount < 10) {\n this.setState({\n loadIframe: !isThereAnyRequest,\n tryCount: tryCount + 1\n }, () => {\n this.timeoutFunc = setTimeout(this.checkNetworkState, 250);\n });\n } else {\n this.setState({\n loadIframe: true,\n tryCount: 0\n });\n if (this.timeoutFunc) clearTimeout(this.timeoutFunc);\n }\n }\n\n render() {\n const { isUnpublishedWarningBarOpen } = this.state;\n const { publishData } = this.props;\n const handleCloseUnpublishedWarningBar = () => {\n this.setState({\n isUnpublishedWarningBarOpen: false\n });\n };\n const jumpToPage = this.props.ui.activePage ? `?jumpToPage=${this.props.ui.activePage}` : '';\n let urlParams = '';\n let deviceClass = 'forDesktop';\n let deviceIcon = null;\n switch (this.props.previewModeDeviceType) {\n case 'desktop':\n deviceClass = 'forDesktop';\n break;\n case 'mobile':\n urlParams = '&forceMobileDevice=1';\n deviceClass = 'forMobile';\n deviceIcon = ;\n break;\n case 'tablet':\n deviceClass = 'forTablet';\n deviceIcon = ;\n break;\n case 'mobile_vertical':\n urlParams = '&forceMobileDevice=1';\n deviceClass = 'forMobile-landscape';\n deviceIcon = ;\n break;\n case 'tablet_vertical':\n deviceClass = 'forTablet-landscape';\n deviceIcon = ;\n break;\n default:\n break;\n }\n\n const containerClass = `js-device-frame iframeWrapper ${deviceClass}`;\n const opacity = this.props.ui.isPreviewModReady ? '1' : '0';\n const publishLink = (window.location.origin.includes('ooo') && window.JOTFORM_ENV === 'TESTING') ? `${handlePublishPRLink(window.location.href)}?preview=true` : this.props.src;\n\n return (\n { this.previewFrameWrapper = previewFrameWrapper; }}\n id=\"iframeWrapper-container\"\n tabIndex={0}\n aria-label={t('Preview Container')}\n >\n
    \n
    {t('ORIENTATION')}
    \n
    \n { this.setDeviceOrientation('portrait'); }}\n title={t('Portrait Mode')}\n >\n {deviceIcon}\n \n \n { this.setDeviceOrientation('landscape'); }}\n title={t('Landscape Mode')}\n >\n {deviceIcon}\n \n
    \n
    \n { this.previewFrameContainer = previewFrameContainer; }}\n >\n
    \n {this.state.loadIframe\n ? (\n {\n this.props.actions.togglePreviewReady(true);\n }}\n />\n )\n : null}\n
    \n \n {isUnpublishedWarningBarOpen && (\n {\n this.props.actions.updateFormProperty({\n status: 'ENABLED',\n // This is a placeholder and the actual value will\n // be inserted in the backend.\n publishData: `${Date.now()}`\n });\n setTimeout(() => {\n handleCloseUnpublishedWarningBar();\n }, 2200);\n }\n }\n onClickCancel={handleCloseUnpublishedWarningBar}\n publishData={publishData}\n />\n )}\n \n );\n }\n}\n\nPreviewIframe.propTypes = {\n src: PropTypes.string,\n style: PropTypes.shape(),\n actions: PropTypes.shape(),\n ui: PropTypes.shape(),\n publishData: PropTypes.shape()\n // previewModeDeviceType: PropTypes.string\n};\n\nfunction mapDispatchToProps(dispatch) {\n return {\n actions: bindActionCreators(actions, dispatch),\n };\n}\n\nfunction mapStateToProps(state) {\n return {\n ui: state.ui,\n form: state.form,\n user: state.user\n };\n}\n\nexport default connect(mapStateToProps, mapDispatchToProps)(PreviewIframe);\n","export default function extractUrlValue(key, _url) {\n let url = _url;\n if (typeof url === 'undefined') {\n url = global.location.href;\n }\n const match = url.match(`[?&]${key}=([^&]+)`);\n return match ? match[1] : null;\n}\n","// TODO: In the future this class should support AI based APIs too.\nexport default class SpeechRecognition {\n activeEngine = null;\n\n fullCapturedSpeech = '';\n\n #autoStopTimeoutID;\n\n #autoStopInSeconds;\n\n getBrowserSpeechEngine = () => {\n return window.SpeechRecognition || window.webkitSpeechRecognition;\n };\n\n isSupported = () => {\n if (this.getBrowserSpeechEngine()) {\n return true;\n }\n return false;\n };\n\n start = ({\n onStop,\n onError,\n onInterimResults,\n onSpeechEnd,\n autoStopInSeconds\n }) => {\n if (!this.isSupported()) {\n onError(new Error('Browser Not Supported'));\n return;\n }\n this.onInterimResults = onInterimResults;\n this.#autoStopInSeconds = autoStopInSeconds;\n\n const BrowserSpeechEngine = this.getBrowserSpeechEngine();\n const engine = new BrowserSpeechEngine();\n engine.continuous = true;\n engine.interimResults = true;\n engine.lang = 'en-US'; // TODO: get from browser or user somehow\n\n engine.onresult = this.#onVoice;\n\n engine.addEventListener('speechend', () => {\n this.fullCapturedSpeech = '';\n onSpeechEnd?.();\n });\n\n engine.addEventListener('error', () => {\n onError('Speech Engine Error');\n });\n\n engine.addEventListener('end', () => {\n onStop();\n this.fullCapturedSpeech = '';\n });\n\n engine.start();\n\n this.activeEngine = engine;\n this.#autoStop(this.#autoStopInSeconds);\n };\n\n stop = () => {\n clearTimeout(this.#autoStopTimeoutID);\n this.activeEngine?.stop();\n };\n\n #onVoice = event => {\n let interimTranscript = '';\n let finalInterimTranscript = '';\n\n for (let i = event.resultIndex; i < event.results.length; ++i) {\n if (event.results[i].isFinal) {\n finalInterimTranscript += event.results[i][0].transcript;\n } else {\n interimTranscript += event.results[i][0].transcript;\n }\n }\n\n if (finalInterimTranscript) {\n this.fullCapturedSpeech = `${this.fullCapturedSpeech} ${finalInterimTranscript}`;\n }\n\n const value = {\n interimTranscript,\n finalInterimTranscript,\n activeText: `${this.fullCapturedSpeech} ${interimTranscript}`,\n fullTranscript: this.fullCapturedSpeech\n };\n\n this.#autoStop(this.#autoStopInSeconds);\n this.onInterimResults(value);\n };\n\n #autoStop(autoStopInSeconds) {\n clearTimeout(this.#autoStopTimeoutID);\n if (!autoStopInSeconds) return;\n\n this.#autoStopTimeoutID = setTimeout(() => this.stop(), autoStopInSeconds * 1000);\n }\n}\n","/* eslint-disable react/prop-types */\nimport React, { useState, useEffect, useMemo } from 'react';\nimport { Button } from '@jotforminc/magnet';\nimport { IconMicrophoneFilled, IconSquareFilled } from '@jotforminc/svg-icons';\nimport '../styles/index.scss';\nimport { t } from '@jotforminc/translation';\nimport { Tooltip } from '@jotforminc/tooltip';\nimport SpeechRecognition from './SpeechRecognition';\n\nconst noop = () => {};\n\nconst VoiceButton = ({\n disabled,\n initialText,\n onSpeechInterim,\n onSpeechEnd,\n autoStopInSeconds,\n onClick = noop,\n onStart = noop,\n onStop = noop,\n onError = noop,\n micColor\n}) => {\n const [hasError, setHasError] = useState(false);\n const [isActive, setIsActive] = useState(false);\n const [isTooltipVisible, setIsTooltipVisible] = useState();\n\n const recognition = useMemo(() => new SpeechRecognition(), []);\n\n const handleClick = () => {\n onClick();\n if (isActive) {\n recognition.stop();\n setIsActive(false);\n return;\n }\n\n setIsActive(true);\n onStart();\n recognition.start({\n autoStopInSeconds,\n onSpeechEnd,\n onError: () => {\n setHasError(true);\n setIsActive(false);\n onError();\n },\n onStop: () => {\n setIsActive(false);\n onStop();\n },\n onInterimResults: values => {\n const previousInputValue = initialText ? `${initialText} ` : '';\n onSpeechInterim(`${previousInputValue}${values.activeText}`);\n }\n });\n };\n\n useEffect(() => {\n if (!hasError) return;\n\n setIsTooltipVisible(true);\n setTimeout(() => {\n setIsTooltipVisible(false);\n }, 3000);\n }, [hasError]);\n\n useEffect(() => {\n if (!disabled || !recognition) return;\n recognition.stop();\n }, [disabled]);\n\n return (\n
    \n : () => }\n rounded\n aria-label={!isActive ? t('Start Recording') : t('Stop Recording')}\n onClick={handleClick}\n variant='ghost'\n {...(micColor && { variant: 'ghost' })}\n />\n {isTooltipVisible ? (\n \n ) : null}\n
    \n );\n};\n\nexport default VoiceButton;\n","import React, { useEffect, useRef } from 'react';\nimport { t } from '@jotforminc/translation';\nimport { PROMT_PROPS } from '../../constants';\nimport './ai-chat.scss';\nimport { MessageState } from '../../typings/state';\n\ntype Props = {\n text: string,\n setText: (text: string) => void,\n handleSend?: () => void,\n disabled?: boolean,\n inputProps?: object,\n isOpened?: boolean\n isWaitingAnswer?: boolean\n messages: MessageState[]\n}\n\nconst ChatInput: React.FC = ({\n text = '',\n setText,\n handleSend,\n disabled,\n inputProps,\n isOpened,\n messages = []\n}) => {\n const inputRef = useRef(null);\n const handleKeyDown = (e: React.KeyboardEvent) => {\n if (e.key === 'ArrowUp') {\n if (text) return;\n e.preventDefault();\n\n setText(messages.at(-1)?.content ?? '');\n } else if (e.key === 'Enter' && !e.shiftKey && !disabled) {\n handleSend?.();\n e.preventDefault();\n } else if (e.key === 'Enter' && disabled) {\n e.preventDefault();\n }\n };\n const setViewport = () => {\n const viewport = document.querySelector('meta[name=viewport]');\n viewport?.setAttribute('content', `${isOpened ? 'maximum-scale=1.0' : ''} width=device-width, initial-scale=1.0`);\n };\n\n useEffect(() => {\n const element = inputRef.current;\n if (!element) return;\n element.style.height = '1px';\n const maxHeight = element.scrollHeight >= 128 ? '128' : `${element.scrollHeight}`;\n element.style.height = ((element.scrollHeight >= element.clientHeight)) ? `${maxHeight}px` : '28px';\n }, [text]);\n useEffect(() => {\n setViewport();\n if (!isOpened || !inputRef.current) return;\n inputRef.current.focus();\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [isOpened, messages.length]);\n\n return (\n
    \n
    \n
    \n setText?.(e.target.value)}\n aria-label={t('Chat Input')}\n onKeyDown={handleKeyDown}\n maxLength={PROMT_PROPS.MAX_LENGTH}\n {...inputProps}\n />\n
    \n
    \n
    \n );\n};\n\nexport default ChatInput;\n","import React, {\n useEffect, useState, useRef, ReactNode\n} from 'react';\nimport DOMPurify from 'dompurify';\nimport AILogo from '../../assets/svg/AILogo.svg';\nimport GuestLogo from '../../assets/svg/guest-podo.svg';\n\n// TODO add to SVGs lib.\nconst AIIcon = () => {\n return ;\n};\n\ntype Props = {\n avatarUrl?: string\n text?: string\n isAssistant?: boolean\n index: number\n actionButtons: ReactNode\n username?: string\n autofocus?: boolean\n isLastMessage?: boolean\n}\n\nconst Message: React.FC = ({\n avatarUrl = '', text = '', isAssistant, index, actionButtons, username = 'Jotform AI', autofocus, isLastMessage\n}) => {\n const [isMounted, setIsMounted] = useState(false);\n const [isAnimationStarted, setIsAnimationStarted] = useState(true);\n const messageRef = useRef(null);\n\n useEffect(() => {\n if (autofocus) {\n messageRef.current?.focus();\n }\n setTimeout(() => {\n setIsMounted(true);\n setTimeout(() => {\n setIsAnimationStarted(false);\n }, 600);\n }, 100);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n const userImg = avatarUrl ? user : ;\n\n return (\n
  • \n {isAssistant && isAnimationStarted && isLastMessage &&
    }\n
    \n {isAssistant ? : userImg}\n
    \n\n
    \n
    \n {username}\n
    \n {actionButtons && actionButtons}\n
    \n
    \n \n
    \n
  • \n );\n};\n\nexport default Message;\n","import React, { SVGProps } from 'react';\nimport { capitalizeEachLetter } from '@jotforminc/utils';\n\nimport {\n IconFaceSmile as IconFriendly,\n IconBuildings as IconProfessional,\n IconUserWomanFilled as IconCasual,\n IconPlusCircleFilled as IconAddALogoToYourForm,\n IconPencilLineFilled as IconChangeToneOfVoice,\n IconTypeSquareFilled as IconChangeFont,\n IconPaletteFilled as IconChangeColorScheme,\n IconBoltFilled\n} from '@jotforminc/svg-icons';\n\nimport IconRoboto from '../../assets/svg/roboto.svg';\nimport IconOpenSans from '../../assets/svg/opensans.svg';\nimport IconHelvetica from '../../assets/svg/helvetica.svg';\nimport IconInter from '../../assets/svg/inter.svg';\nimport IconTahoma from '../../assets/svg/tahoma.svg';\nimport IconCourierNew from '../../assets/svg/couriernew.svg';\nimport IconTrebuchetMS from '../../assets/svg/trebuchetms.svg';\nimport IconLucidaGrande from '../../assets/svg/lucidagrande.svg';\nimport IconTimesNewRoman from '../../assets/svg/timesnewroman.svg';\nimport { AnyString, StripPrefix } from '../../utils/type-utils';\n\nconst SVGComponents = {\n IconFriendly,\n IconChangeToneOfVoice,\n IconAddALogoToYourForm,\n IconProfessional,\n IconCasual,\n IconChangeFont,\n IconChangeColorScheme,\n IconBoltFilled,\n IconRoboto,\n IconOpenSans,\n IconHelvetica,\n IconInter,\n IconTahoma,\n IconCourierNew,\n IconTrebuchetMS,\n IconLucidaGrande,\n IconTimesNewRoman\n};\n\n// eslint-disable-next-line @typescript-eslint/ban-types\nexport type SVGName = StripPrefix\n\ntype Props = Omit, 'name'> & {\n // eslint-disable-next-line @typescript-eslint/ban-types\n name: SVGName | AnyString\n className?: string\n}\n\nconst SVG = React.forwardRef(({\n name,\n className,\n ...remainingProps\n}, ref) => {\n if (typeof name !== 'string') return null;\n\n const SVGName = capitalizeEachLetter(name).split(' ').join('') as SVGName;\n const SVGComponent = SVGComponents[`Icon${SVGName}`];\n\n if (!SVGComponent) {\n return null;\n }\n\n return (\n \n );\n});\n\nexport default SVG;\n","import { Button } from '@jotforminc/magnet';\nimport React, { useRef, useState } from 'react';\nimport { ContextMenu as Context } from '@jotforminc/context-menu';\nimport { t } from '@jotforminc/translation';\nimport SVG from '../SVG';\nimport { ActionState } from '../../typings/state';\n\ntype Props = {\n logAIBuilderActions?: (opt:{ actor?: string, target?: string, action: string }) => void,\n actions: ActionState[]\n isWaitingAnswer?: boolean\n\n}\n\nconst ActionGroup:React.FC = ({\n logAIBuilderActions,\n actions,\n isWaitingAnswer\n}) => {\n const [isActionGroupOpen, setIsActionGroupOpen] = useState(false);\n const actionBtnRef = useRef(null);\n\n const getActionSchema = () => {\n if (actions) {\n const staticActions = Object.values(actions).filter(action => action && typeof action === 'object');\n const actionChildren = staticActions.map((act:ActionState) => {\n const { ActionComponent = null } = act;\n const ActionContainer = ActionComponent && (\n {\n setIsActionGroupOpen(false);\n if (logAIBuilderActions) {\n logAIBuilderActions(({ action: 'ActionGroupClosed' }));\n }\n }\n }}\n {...act}\n />\n );\n return { ...act, type: 'item', customComponent: ActionContainer };\n });\n const defaultSchema = { id: 'root', children: actionChildren };\n return defaultSchema;\n }\n return {};\n };\n\n const handleActionGroupClick = () => {\n setIsActionGroupOpen(prevState => {\n if (logAIBuilderActions) {\n logAIBuilderActions(({ action: !isActionGroupOpen ? 'ActionGroupClicked' : 'ActionGroupClosed' }));\n }\n return !prevState;\n });\n };\n return (\n
    \n {isActionGroupOpen && (\n
    \n \n
    \n )}\n \n \n \n
    \n\n );\n};\n\nexport default ActionGroup;\n","/* eslint-disable max-len */\nimport React, {\n useState, useEffect, useRef,\n FormEvent,\n ComponentProps\n} from 'react';\n\n// @components\nimport { Button } from '@jotforminc/magnet';\nimport {\n IconArrowReverseLeft, IconPaperPlaneFilled\n} from '@jotforminc/svg-icons';\nimport VoiceButton from '@jotforminc/voice-button';\nimport { t } from '@jotforminc/translation';\nimport { isSafari, isUserAllowedView } from '@jotforminc/utils';\nimport type { User } from '@jotforminc/types';\nimport ChatInput from '../ChatInput';\nimport Message from '../Message';\n// import Loading from '../Loading';\nimport PromptLoader from '../../assets/svg/PromptLoader.svg';\nimport {\n ASSISTANT_ROLES,\n EXCEPTIONAL_ASSISTANT_ROLES,\n MessageTypes\n} from '../../constants';\nimport { formatMessage, noop, promptLengthLimit } from '../../utils';\nimport { ActionState, MessageState } from '../../typings/state';\nimport ActionGroup from '../ActionGroup';\n\n// TODO: add to SVG icons lib.\nconst LoadingIcon = () => {\n return ;\n};\n\ntype MessageSource = 'actionButton' | 'speechToText' | undefined\ntype Props = {\n isLoading?: boolean\n isOpened?: boolean\n user: User\n messages: MessageState[]\n inputProps: ComponentProps['inputProps']\n isWaitingAnswer: boolean\n WelcomeScreenRenderer?: React.FC\n addMessage: (prompt: string, messageSource: MessageSource) => void\n undoLastAction: (messageID: string) => void\n onSpeechEnd?: () => void,\n logAIBuilderActions?: (opt:{ actor?: string, target?: string, action: string }) => void\n hideActionsIn?: number\n isUserFormOwner?: boolean,\n chatName?: string,\n staticActions?: ActionState[] | null,\n undoable?: boolean\n}\n\nconst Chat: React.FC = ({\n isOpened,\n user,\n messages = [],\n inputProps = {},\n isWaitingAnswer,\n WelcomeScreenRenderer = () =>
    There are no messages to display here.
    ,\n addMessage,\n undoLastAction,\n onSpeechEnd = noop,\n hideActionsIn = 0,\n isUserFormOwner = false,\n chatName = 'Jotform AI',\n logAIBuilderActions = noop,\n staticActions = null,\n undoable = true\n}) => {\n const scrollDivRef = useRef(null);\n\n const [prompt, setPrompt] = useState('');\n const [selectedAction, setSelectedAction] = useState('');\n const [isActionsHidden, setIsActionsHidden] = useState(true);\n const [isDirty, setIsDirty] = useState(false);\n const messageSourceRef = useRef();\n messageSourceRef.current = prompt === '' ? undefined : messageSourceRef.current;\n\n const lastMessageIndex = messages.length - 1;\n const disableChat = isWaitingAnswer || !prompt || !(prompt.trim().length > 0);\n\n const isAdminDoesntOwnForm = isUserAllowedView(user) && !isUserFormOwner;\n const currUserAvatar = !isAdminDoesntOwnForm && user.avatarUrl ? user.avatarUrl : 'https://www.jotform.com/assets/img/v4/avatar/Podo-Avatar2-05.png';\n\n useEffect(() => {\n let timerID: number;\n\n if (isDirty) {\n setIsActionsHidden(false);\n }\n\n if (selectedAction) {\n setSelectedAction('');\n }\n\n if (hideActionsIn) {\n timerID = window.setTimeout(() => {\n setIsActionsHidden(true);\n }, hideActionsIn * 1000);\n }\n return () => {\n clearTimeout(timerID);\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [messages]);\n\n const addChatMessage = () => {\n addMessage(prompt, messageSourceRef.current);\n setPrompt('');\n messageSourceRef.current = undefined;\n if (!isDirty) {\n setIsDirty(true);\n }\n };\n\n const onHandleSubmit = (e: FormEvent) => {\n e.preventDefault();\n addChatMessage();\n };\n\n const undo = (messageID: string) => {\n undoLastAction(messageID);\n };\n\n useEffect(() => {\n const scrollToElement = () => {\n const { current } = scrollDivRef;\n\n if (current !== null) {\n current.scrollIntoView({ behavior: isSafari() ? 'auto' : 'smooth', inline: 'nearest', block: 'nearest' });\n }\n };\n\n scrollToElement();\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [messages]);\n\n const textLimit = promptLengthLimit(prompt.length);\n\n return (\n
    \n
    \n {/* loading screen ready to use...\n
    \n
    \n \n
    \n
    */}\n
      \n {messages?.map(({\n message_id: messageID, content, message_type: messageType, actions, user: messageUser\n }, index) => {\n const isLastMessage = lastMessageIndex === index;\n const isAssistant = ASSISTANT_ROLES.includes(messageType);\n const isWelcome = MessageTypes.WELCOME === messageType;\n const showButtons = isLastMessage && isAssistant && !EXCEPTIONAL_ASSISTANT_ROLES.includes(messageType) && undoable;\n\n const showUndoButton = showButtons && index > 1 && !isActionsHidden;\n const userName = user.username === messageUser?.username ? t('you') : (messageUser?.username || t('you'));\n const chatUserName = isAssistant ? chatName : userName;\n const text = formatMessage(content, messageType, user.username);\n\n return (\n \n {isWelcome ? (\n \n {text || ''}\n \n ) : (\n \n {showUndoButton && (\n undo(messageID)}\n >\n {t('Undo')}\n \n )}\n \n )}\n username={chatUserName}\n avatarUrl={messageUser?.avatarUrl || currUserAvatar}\n text={t(text)}\n isAssistant={isAssistant}\n index={index}\n autofocus={isAssistant && isLastMessage}\n isLastMessage={isLastMessage}\n />\n )}\n { actions && actions.length > 0 && (\n
      \n {actions.map(({\n actionID, ActionComponent, disabled, ...rest\n }) => (\n ActionComponent && (\n setSelectedAction(actionID)\n }}\n {...rest}\n />\n )\n ))}\n
      \n )}\n
      \n );\n })}\n {messages.length === 0 && }\n {isWaitingAnswer && }\n
      \n
    \n
    \n message.message_type === MessageTypes.USER_MESSAGE)}\n />\n
    \n
    \n
    \n { staticActions && (\n \n )}\n
    \n
    \n
    \n
    \n {\n onSpeechEnd?.();\n messageSourceRef.current = 'speechToText';\n }}\n initialText={prompt}\n forceDisable={false}\n onSpeechInterim={(result: string) => setPrompt?.(result)}\n onClick={() => {\n if (logAIBuilderActions) {\n logAIBuilderActions({ action: 'SpeechToTextClicked' });\n }\n }}\n />\n
    \n {textLimit < 20 &&
    {textLimit}
    }\n \n
    \n
    \n \n );\n};\n\nexport default Chat;\n","import { useState, useEffect } from 'react';\nimport featureFlag from './FeatureFlag';\n\n// TODO: support multiple features\nexport const useFeatureValue = feature => {\n const [state, setState] = useState(featureFlag.getFeature(feature));\n useEffect(() => {\n return featureFlag.store.subscribe(() => {\n setState(featureFlag.getFeature(feature));\n });\n }, []);\n return state;\n};\n","import propTypes from 'prop-types';\nimport { useFeatureValue } from './useFeatureValue';\n\nconst Feature = ({ feature, children, fallback = null }) => {\n const isFeatureAvailable = useFeatureValue(feature);\n if (isFeatureAvailable) return children;\n if (fallback) return fallback;\n return null;\n};\n\nFeature.defaultProps = {\n feature: undefined,\n children: null,\n fallback: null\n};\n\nFeature.propTypes = {\n feature: propTypes.string,\n children: propTypes.node,\n fallback: propTypes.func\n};\n\nexport default Feature;\n","import { CustomWebSocket, getChannelNamespace, getSocketURL } from '@jotforminc/custom-socket-client';\n\nexport const createDummySocketClient = () => {\n return {\n on: () => { },\n emit: () => { }\n };\n};\n\nconst websocketHandlerMap = {};\nconst getActionAndActionType = action => {\n switch (action) {\n case 'join-channel':\n case 'leave-channel':\n case 'set-client-id':\n case 'set-available':\n case 'reconnect-channel': {\n return { action, actionType: '' };\n }\n default: {\n return { action: 'zoom-support-action', actionType: action };\n }\n }\n};\n\nconst getChannel = () => {\n const namespace = getChannelNamespace();\n\n return `${namespace}/zoomsupport`;\n};\n\nconst getAction = (action, actionType) => {\n switch (action) {\n case 'join-channel':\n case 'leave-channel':\n case 'set-available':\n case 'set-client-id': {\n return action;\n }\n default: {\n return actionType;\n }\n }\n};\n\nconst onMessage = event => {\n const message = JSON.parse(event.data);\n const { action: _action, payload, payload: { actionType } } = message;\n const action = getAction(_action, actionType);\n if (websocketHandlerMap[action]) websocketHandlerMap[action](payload);\n};\n\nexport const createWebSocketClient = async () => {\n let socketSecret = null;\n\n try {\n const response = await fetch('/API/share/socketChannel/createSocketSecret').then(res => res.json());\n socketSecret = response.content;\n } catch (e) {\n console.log('error', e);\n }\n\n const socket = new CustomWebSocket(getSocketURL(), { onMessage, socketSecret });\n\n return {\n on: (action, handler) => {\n websocketHandlerMap[action] = handler;\n },\n emit: (_action, payload) => {\n const channel = getChannel(payload);\n\n const { action, actionType } = getActionAndActionType(_action);\n if (actionType) {\n // eslint-disable-next-line no-param-reassign\n payload.actionType = actionType;\n }\n const data = JSON.stringify({ channel, payload, action });\n socket.send(data);\n }\n };\n};\n","import { createWebSocketClient, createDummySocketClient } from './zoomSocketAdapter';\n\nconst isDevEnvironment = window.JOTFORM_ENV === 'DEVELOPMENT';\n\nexport const Config = {\n socket: undefined,\n user: undefined\n};\n\nexport async function connect() {\n if (isDevEnvironment && false) {\n Config.socket = createDummySocketClient();\n return;\n }\n Config.socket = await createWebSocketClient();\n}\n\nexport function enableMockSocket() {\n Config.socket = createDummySocketClient();\n}\n\nexport function setUser(user) {\n Config.user = user;\n}\n\nconst getUser = ({ username, name, avatarUrl }) => ({ username, name, avatarUrl });\n\nexport function initialize() {\n const COLLAB_KEY_REGEX = /iak=([\\d | \\w | -]*)/;\n const isThereInvitation = global.location.href.match(COLLAB_KEY_REGEX) !== null && global.location.href.match(COLLAB_KEY_REGEX).length === 2;\n const invitationAPIKey = isThereInvitation ? global.location.href.match(COLLAB_KEY_REGEX)[1] : '';\n if (Config.user) {\n Config.socket.emit('join-channel', {\n timestamp: Config.socket.lastActivity,\n sid: Config.sid,\n user: {\n ...getUser(Config.user),\n type: 'USER',\n socketAPIKey: invitationAPIKey\n }\n });\n }\n}\n\nexport function createZoomRequest() {\n Config.socket.emit('chat-request', {\n user: {\n ...getUser(Config.user),\n type: 'USER'\n }\n });\n}\n\nexport function selfDenyRequest() {\n Config.socket.emit('self-deny', {\n user: {\n ...getUser(Config.user),\n type: 'USER'\n }\n });\n}\n\nasync function logSupportAction(product, username, action, keepAlive) {\n const data = {\n type: 'EVENT',\n product,\n username,\n location: window.location?.href,\n action\n };\n\n try {\n await fetch('/API/support-product-logs', {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json'\n },\n keepalive: keepAlive,\n body: JSON.stringify(data)\n });\n } catch (error) {\n console.log(error);\n }\n}\n\nexport function handleZoomSupportLog(username, action, keepAlive = false) {\n logSupportAction('zoom-widget', username, action, keepAlive);\n}\n\nexport function joinRoom() {\n initialize();\n}\n","/* eslint-disable react/prop-types */\n/* eslint-disable react/destructuring-assignment */\nimport React from 'react';\nimport { handleZoomSupportLog } from '../../libs/zoomSocket';\n\nclass RequestHelp extends React.Component {\n handleRequest = () => {\n const { username } = this.props.user;\n\n handleZoomSupportLog(username, 'request-help-click');\n this.props.changeStep('connection-start');\n };\n\n handleClose = () => {\n this.props.closeWidget(true);\n };\n\n getTypeText = () => {\n const from = this.props.from || '';\n\n switch (from) {\n case 'form-builder':\n return 'form';\n case 'app-builder':\n return 'app';\n default:\n return 'form';\n }\n };\n\n render() {\n return (\n <>\n
    \n \n
    \n

    \n Need help with creating \n {this.getTypeText()}\n ?\n

    \n

    \n Feel free to request personalized assistance. We would be delighted to assist you in creating your \n {this.getTypeText()}\n  through a\n Zoom video call. \n It’s\n FREE!\n

    \n
    \n \n Request Help\n \n \n Ask Me Later\n \n
    \n \n );\n }\n}\n\nexport default RequestHelp;\n","/* eslint-disable react/jsx-one-expression-per-line */\n/* eslint-disable react/prop-types */\n/* eslint-disable react/destructuring-assignment */\nimport React from 'react';\nimport { IconMicrophoneFilled, IconScreencast } from '@jotforminc/svg-icons';\nimport { createZoomRequest, handleZoomSupportLog } from '../../libs/zoomSocket';\n\nclass ConnectSection extends React.Component {\n handleConnect = () => {\n const { username } = this.props.user;\n\n handleZoomSupportLog(username, 'connect-meeting-click');\n\n createZoomRequest();\n this.props.changeStep('waiting-agent-response');\n };\n\n render() {\n const name = this.props.user.name || this.props.user.username;\n return (\n <>\n
    \n \n \n Hello {name},\n \n
    \n Before starting the call, please make sure that:\n
    \n \n \n \n Your microphone is working properly.\n
    \n
    \n \n \n \n You are available for screen sharing during the meeting.\n
    \n \n Request Help\n \n \n );\n }\n}\n\nexport default ConnectSection;\n","/* eslint-disable react/prop-types */\n/* eslint-disable react/destructuring-assignment */\nimport React from 'react';\n\nimport { Loader } from '@jotforminc/magnet';\n\nclass WaitingAgentResponse extends React.Component {\n render() {\n return (\n <>\n
    \n \n Please wait...\n
    \n We are looking for a support agent who is available to assist you.\n \n Waiting\n \n \n \n );\n }\n}\n\nexport default WaitingAgentResponse;\n","/* eslint-disable react/prop-types */\n/* eslint-disable react/no-access-state-in-setstate */\n/* eslint-disable react/destructuring-assignment */\nimport React from 'react';\n\nimport { IconCheck } from '@jotforminc/svg-icons';\nimport { handleCustomNavigation } from '@jotforminc/utils';\nimport { handleZoomSupportLog } from '../../libs/zoomSocket';\n\nclass MeetingReady extends React.Component {\n constructor(props) {\n super(props);\n this.state = {\n time: 300\n };\n\n this.meetingTimeInterval = null;\n }\n\n componentDidMount() {\n this.playNotificationSFX();\n this.meetingTimeInterval = setInterval(() => {\n if (this.state.time === 0) {\n this.props.closeWidget();\n } else {\n this.setState({\n time: this.state.time - 1\n });\n }\n }, 1000);\n }\n\n componentWillUnmount() {\n clearInterval(this.meetingTimeInterval);\n }\n\n handleStartMeeting = () => {\n const { username } = this.props.user;\n const { agentResponse } = this.props;\n const { zoomLink } = agentResponse;\n\n handleZoomSupportLog(username, 'start-meeting-click');\n handleCustomNavigation(zoomLink, '_blank', true);\n };\n\n playNotificationSFX() {\n // eslint-disable-next-line no-undef\n const notificationAudio = new Audio('https://batuhanbudak.jotform.pro/opt/notification_sfx.mp3');\n notificationAudio.play();\n }\n\n formatTime = () => {\n const minutes = Math.floor(this.state.time / 60);\n const remainingSeconds = this.state.time % 60;\n return `${String(minutes).padStart(2, '0')}:${String(remainingSeconds).padStart(2, '0')}`;\n };\n\n render() {\n return (\n <>\n
    \n \n \n \n Your meeting is ready!\n
    \n Start meeting to get help from our support agent.\n \n Join Meeting (\n {this.formatTime()}\n )\n \n \n );\n }\n}\n\nexport default MeetingReady;\n","/* eslint-disable react/prop-types */\n/* eslint-disable react/destructuring-assignment */\nimport React from 'react';\nimport { handleZoomSupportLog } from '../../libs/zoomSocket';\n\nclass NotAvailableScreen extends React.Component {\n constructor(props) {\n super(props);\n\n this.meetingTimeOut = null;\n }\n\n componentDidMount() {\n const { username } = this.props.user;\n\n handleZoomSupportLog(username, 'not-available-screen-shown');\n\n this.meetingTimeOut = setTimeout(() => {\n this.props.closeWidget();\n }, 10000);\n }\n\n componentWillUnmount() {\n clearTimeout(this.meetingTimeOut);\n }\n\n render() {\n return (\n <>\n
    \n \n We are sorry :(\n
    \n All of our support agents are busy right now. Please try again later.\n \n );\n }\n}\n\nexport default NotAvailableScreen;\n","/* eslint-disable react/prop-types */\n/* eslint-disable react/destructuring-assignment */\n/* eslint-disable react/jsx-one-expression-per-line */\nimport React from 'react';\n\nimport { handleZoomSupportLog } from '../../libs/zoomSocket';\n\nclass NotAvailableScreen extends React.Component {\n constructor(props) {\n super(props);\n\n this.meetingTimeOut = null;\n }\n\n componentDidMount() {\n const { username } = this.props.user;\n\n handleZoomSupportLog(username, 'declined-screen-shown');\n\n this.meetingTimeOut = setTimeout(() => {\n this.props.closeWidget();\n }, 10000);\n }\n\n componentWillUnmount() {\n clearTimeout(this.meetingTimeOut);\n }\n\n render() {\n const name = this.props.user.name || this.props.user.username;\n\n return (\n <>\n
    \n \n \n Hello {name},\n \n
    \n Thank you for using Jotform. All our support agents are too busy with helping other users. Please try again later.\n \n );\n }\n}\n\nexport default NotAvailableScreen;\n","import RequestHelp from './RequestHelp';\nimport ConnectSection from './ConnectSection';\nimport WaitingAgentResponse from './WaitingAgentResponse';\nimport MeetingReady from './MeetingReady';\nimport NotAvailableScreen from './NotAvailableScreen';\nimport DeclinedScreen from './DeclinedScreen';\n\nexport const stepConfig = [\n {\n key: 'request-help',\n name: 'Request Help',\n component: RequestHelp\n }, {\n key: 'connection-start',\n name: 'Connection Start',\n component: ConnectSection\n }, {\n key: 'waiting-agent-response',\n name: 'Waiting Agent Response',\n component: WaitingAgentResponse\n }, {\n key: 'meeting-ready',\n name: 'Meeting Ready',\n component: MeetingReady\n }, {\n key: 'not-available',\n name: 'Not available',\n component: NotAvailableScreen\n }, {\n key: 'declined',\n name: 'Declined',\n component: DeclinedScreen\n }\n];\n","/* eslint-disable react/prop-types */\n/* eslint-disable react/destructuring-assignment */\nimport React from 'react';\n\nimport { IconXmarkSm } from '@jotforminc/svg-icons';\n\nimport { stepConfig } from './steps';\nimport NotAvailableScreen from './NotAvailableScreen';\nimport { handleZoomSupportLog, selfDenyRequest } from '../../libs/zoomSocket';\n\nclass ZoomWidget extends React.Component {\n constructor(props) {\n super(props);\n this.state = {\n step: 'request-help',\n closedWidgetByUser: false,\n agentResponse: {}\n };\n this.agentImage = 'https://support.jotform.com/uploads/forum/muhammetburak/1704728810_659c18ea1e281_shutterstock_1170187057.png';\n }\n\n componentDidMount() {\n window.addEventListener('beforeunload', this.handleBeforeUnload);\n }\n\n UNSAFE_componentWillReceiveProps(nextProps) {\n if (nextProps.user?.username === nextProps.agentResponse?.target || nextProps.agentResponse?.targets?.includes(nextProps.user?.username)) {\n this.setState({\n agentResponse: nextProps.agentResponse\n });\n if (nextProps.agentResponse?.actionType === 'accept-request') {\n this.setState({\n step: 'meeting-ready'\n });\n } else if (nextProps.agentResponse?.actionType === 'deny-request') {\n this.setState({\n step: 'declined'\n });\n } else if (this.state.step !== 'request-help') {\n this.setState({\n step: 'declined'\n });\n }\n }\n }\n\n componentDidUpdate(prevProps) {\n const prevOptions = prevProps.zoomWidgetOptions;\n const currentOptions = this.props.zoomWidgetOptions;\n\n // Check if there's a change in the relevant props\n if (prevOptions.isAgentsAvailable !== currentOptions.isAgentsAvailable || prevOptions.isChatLimitReached !== currentOptions.isChatLimitReached) {\n this.checkAndLogZoomWidget();\n }\n }\n\n componentWillUnmount() {\n window.removeEventListener('beforeunload', this.handleBeforeUnload);\n }\n\n handleBeforeUnload = () => {\n const { username } = this.props.user;\n\n const { isAgentsAvailable, isChatLimitReached } = this.props.zoomWidgetOptions;\n const showZoomWidget = isAgentsAvailable && !isChatLimitReached;\n\n if (showZoomWidget) {\n handleZoomSupportLog(username, 'page-closed', true);\n }\n };\n\n checkAndLogZoomWidget = () => {\n const { isAgentsAvailable, isChatLimitReached } = this.props.zoomWidgetOptions;\n const showZoomWidget = isAgentsAvailable && !isChatLimitReached;\n\n if (showZoomWidget) {\n const { username } = this.props.user;\n handleZoomSupportLog(username, 'zoom-widget-shown');\n }\n };\n\n closeWidget = (isUserClick = false) => {\n if (isUserClick) {\n selfDenyRequest(); // Removes chat request on close button click\n const { username } = this.props.user;\n\n handleZoomSupportLog(username, 'close-widget-click');\n }\n\n this.setState({\n closedWidgetByUser: true\n });\n };\n\n changeStep = (step = 'request-help') => {\n this.setState({\n step: step\n });\n };\n\n renderStep = () => {\n const { step } = this.state;\n const { isAgentsAvailable, isChatLimitReached } = this.props.zoomWidgetOptions;\n\n const showZoomWidget = isAgentsAvailable && !isChatLimitReached;\n\n const Component = stepConfig.find(item => item.key === step)?.component;\n\n if (!showZoomWidget && step === 'connection-start') {\n return (\n \n );\n }\n\n if (!isAgentsAvailable && step === 'waiting-agent-response') {\n return (\n \n );\n }\n\n return (\n \n );\n };\n\n render() {\n const { step, closedWidgetByUser } = this.state;\n const { isAgentsAvailable, isChatLimitReached } = this.props.zoomWidgetOptions;\n\n const showZoomWidget = isAgentsAvailable && !isChatLimitReached;\n\n // If user closes, return null\n if (closedWidgetByUser) {\n return null;\n }\n\n // If show is false and step is request-help\n if (!showZoomWidget && step === 'request-help') {\n return null;\n }\n\n return (\n
    \n {this.state.step !== 'request-help' && (\n \n )}\n {this.renderStep()}\n
    \n );\n }\n}\n\nexport default ZoomWidget;\n","/* eslint-disable react/prop-types */\nimport React from 'react';\n\nimport ZoomWidget from './ZoomWidget/ZoomWidget';\nimport * as ZoomSocket from '../libs/zoomSocket';\nimport '../styles/style.css';\n\nclass ZoomSocketLayer extends React.Component {\n constructor(props) {\n super(props);\n this.state = {\n agentResponse: {},\n zoomWidgetOptions: {\n isAgentsAvailable: false,\n isChatLimitReached: true\n }\n };\n }\n\n UNSAFE_componentWillMount() {\n const { user, isAllowedToSeeZoomWidget } = this.props;\n if (user && isAllowedToSeeZoomWidget) {\n ZoomSocket.connect()\n .then(() => {\n ZoomSocket.setUser(user);\n ZoomSocket.initialize();\n this.initZoomSocketMessageListeners();\n });\n }\n }\n\n initZoomSocketMessageListeners = () => {\n ZoomSocket.Config.socket.on('reconnect', () => {\n if (ZoomSocket.Config.user) {\n ZoomSocket.joinRoom();\n }\n });\n\n ZoomSocket.Config.socket.on('set-client-id', () => {\n ZoomSocket.joinRoom();\n });\n\n ZoomSocket.Config.socket.on('status', data => {\n const { isAgentsAvailable, isChatLimitReached } = data;\n this.setState({\n zoomWidgetOptions: {\n isAgentsAvailable: isAgentsAvailable, isChatLimitReached: isChatLimitReached\n }\n });\n });\n\n ZoomSocket.Config.socket.on('accept-request', data => {\n this.setState({\n agentResponse: data\n });\n });\n\n ZoomSocket.Config.socket.on('deny-request', data => {\n this.setState({\n agentResponse: data\n });\n });\n };\n\n render() {\n const { agentResponse, zoomWidgetOptions } = this.state;\n\n return (\n \n );\n }\n}\n\nexport default ZoomSocketLayer;\n","import React, { useEffect } from 'react';\nimport PropTypes from 'prop-types';\nimport { IconExclamationCircleFilled } from '@jotforminc/svg-icons';\nimport { t, translationRenderer } from '@jotforminc/translation';\n\nimport { BUILDER_BRANDING_WARNING } from '../../constants/texts';\nimport { actionTracker, freeBuilderUtmCreator } from '../../utils';\nimport '../../assets/builder-remove-branding.scss';\n\nconst BrandingRemoveButton = ({ username, formId, campaign }) => {\n const assetType = 'remove-branding-variant1';\n\n useEffect(() => {\n actionTracker({\n username,\n target: assetType,\n action: 'seen'\n });\n }, []);\n\n const handleUpgradeClicked = () => {\n actionTracker({\n username,\n target: assetType,\n action: 'upgrade-btn-clicked'\n });\n\n window.open(`/pricing${freeBuilderUtmCreator({ formId, assetType, campaign })}`, '_blank');\n };\n\n return (\n \n \n

    \n {translationRenderer(BUILDER_BRANDING_WARNING)({\n renderer1: upgradeText => (\n handleUpgradeClicked()}\n >\n {t(upgradeText)}\n \n )\n })}\n

    \n \n );\n};\n\nBrandingRemoveButton.propTypes = {\n username: PropTypes.string,\n formId: PropTypes.string,\n campaign: PropTypes.string\n};\n\nBrandingRemoveButton.defaultProps = {\n username: '',\n formId: '',\n campaign: ''\n};\n\nexport default BrandingRemoveButton;\n","import { BLOT_REGEX } from '../components/TextEditor/helpers/constants';\nimport { parseBlotId, isOldBlotId, setBlotId } from '../components/TextEditor/helpers/utils';\n\nexport const BGColorLightness = hex => {\n const isHex = /^#[0-9A-F]{6}$/i.test(hex);\n let result = [];\n // is hex value\n if (!isHex) {\n // Get r, g, b values\n result = hex.match(/\\d+/g);\n } else {\n // turn hex val to RGB\n result = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(hex);\n result.shift();\n }\n\n // Do not proceed if these conditions does not match\n if (!result || result.length < 3) return false;\n\n const r = parseInt(result[0], 16) / 255;\n const g = parseInt(result[1], 16) / 255;\n const b = parseInt(result[2], 16) / 255;\n // Calculate max/min\n const maxColor = Math.max(r, g, b);\n const minColor = Math.min(r, g, b);\n // Calculate lightness\n const lightness = ((maxColor + minColor) / 2) * 100;\n\n return !(lightness > 65);\n};\n\nexport {\n BLOT_REGEX,\n parseBlotId,\n isOldBlotId,\n setBlotId\n};\n","import React, { useMemo } from 'react';\nimport { bool, string } from 'prop-types';\nimport { t, translationRenderer } from '@jotforminc/translation';\n\nimport InformationIcon from '../assets/icons/information-icon.svg';\n\n// We shouldn't show HIPAA's protected healthcare information warning under these fields\nconst unanswerableFields = [\n 'control_collapse',\n 'control_divider',\n 'control_head',\n 'control_image',\n 'control_pagebreak',\n 'control_text'\n];\n\nconst HipaaWarnings = ({\n isProtected,\n questionType,\n hideProtectedToggle\n}) => {\n const hipaaWarningText = useMemo(isProtected\n ? t('You\\'ve indicated that this field doesn\\'t contain sensitive information. The information in this field will be included in notification and autoresponder emails.')\n : translationRenderer('[1[Protected Health Information]]This field includes sensitive information. This data won\\'t be included in notification and autoresponder emails.')({\n renderer1: titleTmp => {titleTmp}\n }), [isProtected]);\n\n if (hideProtectedToggle || unanswerableFields.indexOf(questionType) === -1) {\n return null;\n }\n\n return (\n
    \n \n {hipaaWarningText}\n
    \n );\n};\n\nHipaaWarnings.propTypes = {\n isProtected: bool,\n questionType: string,\n hideProtectedToggle: bool\n};\n\nexport default HipaaWarnings;\n","import React from 'react';\nimport { t } from '@jotforminc/translation';\n\nimport InformationIcon from '../assets/icons/information-icon.svg';\n\nconst InlineWarnings = () => (\n
    \n \n {t('This field will be hidden until a new field added in.')}\n
    \n);\n\nexport default InlineWarnings;\n","import React from 'react';\nimport { string } from 'prop-types';\nimport { t } from '@jotforminc/translation';\n\nimport InformationIcon from '../assets/icons/information-icon.svg';\n\nconst HiddenIndicator = ({ questionType }) => (\n
    \n \n \n {questionType === 'control_captcha'\n ? t('This field is hidden and will not be seen on the form. However, if Google detects suspicious activity, users will be asked to solve a captcha.')\n : t('This field is hidden and will not be seen on the form.')}\n \n
    \n);\n\nHiddenIndicator.propTypes = {\n questionType: string\n};\n\nexport default HiddenIndicator;\n","import PropTypes from 'prop-types';\nimport React, { Component } from 'react';\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport { t } from '@jotforminc/translation';\nimport * as actions from '../../actions';\n\nclass AddOtherOption extends Component {\n constructor(props) {\n super(props);\n this.onClick = this.onClick.bind(this);\n }\n\n onClick() {\n setTimeout(\n () => {\n const { updateFormQuestion } = this.props.actions;\n const { qid } = this.props;\n updateFormQuestion(qid, { allowOther: 'Yes' });\n }, 0,\n );\n }\n\n render() {\n return (\n \n {t(this.props.label)}\n \n );\n }\n}\n\nAddOtherOption.propTypes = {\n qid: PropTypes.string,\n label: PropTypes.string,\n actions: PropTypes.shape({\n updateFormQuestion: PropTypes.func\n })\n};\n\nfunction mapDispatchToProps(dispatch) {\n return {\n actions: bindActionCreators(actions, dispatch)\n };\n}\n\nfunction mapStateToProps(state) {\n return {\n questions: state.questions\n };\n}\nexport default connect(mapStateToProps, mapDispatchToProps)(AddOtherOption);\n","import PropTypes from 'prop-types';\nimport React, { Component } from 'react';\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport cloneDeep from 'lodash/cloneDeep';\nimport { JFSortable as ReactSortable } from '@jotforminc/builder-components';\nimport * as actions from '../../actions';\nimport * as pdfImportActions from '../../actions/pdfImport';\n\nclass SortableOptions extends Component {\n constructor(props, context) {\n super(props, context);\n this.handleSortableChange = this.handleSortableChange.bind(this);\n }\n\n handleSortableChange(order, sortable, { oldIndex, newIndex }) {\n const question = cloneDeep(this.props.questions.find(p => p.qid === this.props.qid));\n if (question.type === 'control_imagechoice') {\n const { options } = question;\n const movedOption = options.splice(oldIndex, 1);\n options.splice(newIndex, 0, movedOption[0]);\n this.props.actions.updateFormQuestion(this.props.qid, { options });\n } else {\n const opts = question.options.split('|');\n const movedOption = opts.splice(oldIndex, 1);\n opts.splice(newIndex, 0, movedOption);\n this.props.actions.updateFormQuestion(this.props.qid, { options: opts.join('|') });\n\n if (question.pdfDetails && question.pdfDetails.pdfFields) {\n this.props.pdfImportActions.updatePDFFieldsForSortedOptions({ oldIndex, newIndex }, this.props.qid);\n }\n }\n }\n\n render() {\n const classNames = this.props.className || '';\n return (\n \n {this.props.children}\n \n );\n }\n}\n\nSortableOptions.propTypes = {\n qid: PropTypes.string,\n children: PropTypes.node,\n questions: PropTypes.arrayOf(PropTypes.shape()),\n className: PropTypes.string,\n actions: PropTypes.shape({\n updateFormQuestion: PropTypes.func\n }),\n};\n\nfunction mapDispatchToProps(dispatch) {\n return {\n actions: bindActionCreators(actions, dispatch),\n pdfImportActions: bindActionCreators(pdfImportActions, dispatch),\n };\n}\n\nfunction mapStateToProps(state) {\n return {\n questions: state.questions\n };\n}\nexport default connect(mapStateToProps, mapDispatchToProps)(SortableOptions);\n","import PropTypes from 'prop-types';\nimport React, { Component } from 'react';\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport * as actions from '../../actions';\n\nclass EditOptionImage extends Component {\n constructor(props) {\n super(props);\n this.onClick = this.onClick.bind(this);\n }\n\n onClick(e) {\n e.stopPropagation();\n const { rightPanelToggle, updateQuestionPropertiesActiveTab, updateRightPanelMode } = this.props.actions;\n const { imageIndex } = this.props;\n updateRightPanelMode('questionsettings');\n rightPanelToggle(true);\n updateQuestionPropertiesActiveTab('field');\n setTimeout(() => {\n const imageUploadField = global.document.querySelector(`[data-imageIndex=\"${imageIndex}\"]`);\n if (imageUploadField) imageUploadField.click();\n }, 10);\n }\n\n render() {\n return (\n
    \n {this.props.children}\n
    \n );\n }\n}\n\nEditOptionImage.propTypes = {\n actions: PropTypes.shape({\n rightPanelToggle: PropTypes.func,\n updateQuestionPropertiesActiveTab: PropTypes.func\n }),\n imageIndex: PropTypes.number\n};\n\nfunction mapDispatchToProps(dispatch) {\n return {\n actions: bindActionCreators(actions, dispatch)\n };\n}\n\nfunction mapStateToProps(state) {\n return {\n questions: state.questions\n };\n}\nexport default connect(mapStateToProps, mapDispatchToProps)(EditOptionImage);\n","import React, { Suspense } from 'react';\n\nimport {\n bool,\n node,\n shape,\n number,\n string,\n elementType\n} from 'prop-types';\n\nconst CardQuestionWrapper = ({\n qid,\n index,\n children,\n FormField,\n questionEl,\n description,\n hiddenClass,\n wrapperStyle,\n questionCount,\n labelAlignment,\n questionKeyValuePair,\n inlineEditTouchBlockLayer,\n inlineEditClass,\n inlineEditIsQuestionSelected,\n isOfflineModeEnabled,\n inlineEditFocusToElement,\n fieldComponentProps\n}) => (\n \n \n \n {questionEl}\n {children}\n \n \n {inlineEditTouchBlockLayer}\n \n);\n\nCardQuestionWrapper.propTypes = {\n qid: string,\n index: number,\n children: node,\n FormField: elementType,\n questionEl: node,\n description: string,\n hiddenClass: string,\n wrapperStyle: shape({}),\n questionCount: number,\n labelAlignment: string,\n fieldComponentProps: shape({}),\n questionKeyValuePair: shape({}),\n inlineEditTouchBlockLayer: node,\n inlineEditClass: node,\n inlineEditIsQuestionSelected: bool,\n isOfflineModeEnabled: bool,\n inlineEditFocusToElement: bool\n};\n\nexport default CardQuestionWrapper;\n","import PropTypes from 'prop-types';\nimport React, { Component } from 'react';\nimport { t } from '@jotforminc/translation';\n\nclass EditDropdown extends Component {\n constructor(props) {\n super(props);\n this.state = {\n show: false,\n options: this.props.options,\n showPlaceholder: this.props.options.length <= 0\n };\n this.toggleEditableState = this.toggleEditableState.bind(this);\n this.applyChanges = this.applyChanges.bind(this);\n this.handleTextAreaChange = this.handleTextAreaChange.bind(this);\n }\n\n UNSAFE_componentWillReceiveProps(nextProps) {\n if (nextProps.options !== this.props.options) {\n this.setState({\n options: nextProps.options,\n });\n }\n }\n\n toggleEditableState() {\n this.setState({ show: !this.state.show });\n\n if (!this.state.show) {\n setTimeout(() => {\n if (this.textArea) {\n this.textArea.focus();\n this.textArea.setSelectionRange(this.textArea.value.length, this.textArea.value.length);\n }\n }, 0);\n }\n }\n\n applyChanges() {\n const {\n props: {\n qid,\n update,\n },\n state: {\n options,\n }\n } = this;\n update(qid, { options });\n this.toggleEditableState();\n }\n\n handleTextAreaChange(e) {\n this.setState({\n options: e.target.value.split('\\n').join('|'),\n showPlaceholder: e.target.value.length <= 0\n });\n }\n\n get options() {\n return this.state.options.split('|').join('\\n');\n }\n\n render() {\n return (\n \n \n { this.textArea = c; }}\n className=\"dropdownOptionsEditable form-textarea\"\n onBlur={this.applyChanges}\n onChange={this.handleTextAreaChange}\n value={this.options}\n />\n {this.state.showPlaceholder && !this.state.options\n && (\n
    \n \n {t('option')}\n {' '}\n 1\n \n \n {t('option')}\n {' '}\n 2\n \n \n {t('option')}\n {' '}\n 3\n \n
    \n )}\n \n \n \n );\n }\n}\n\nEditDropdown.propTypes = {\n options: PropTypes.string,\n qid: PropTypes.string,\n update: PropTypes.func\n};\n\nexport default EditDropdown;\n","import PropTypes from 'prop-types';\nimport React, { Component } from 'react';\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport { IconXmark } from '@jotforminc/svg-icons';\nimport * as actions from '../../actions';\n\nclass RemoveOtherOption extends Component {\n constructor(props) {\n super(props);\n this.onClick = this.onClick.bind(this);\n }\n\n onClick() {\n const { updateFormQuestion } = this.props.actions;\n const { qid } = this.props;\n updateFormQuestion(qid, { allowOther: 'No' });\n }\n\n render() {\n return (\n \n \n \n );\n }\n}\n\nRemoveOtherOption.propTypes = {\n qid: PropTypes.string.isRequired,\n actions: PropTypes.shape({\n updateFormQuestion: PropTypes.func\n })\n};\n\nfunction mapDispatchToProps(dispatch) {\n return {\n actions: bindActionCreators(actions, dispatch)\n };\n}\n\nfunction mapStateToProps(state) {\n return {\n questions: state.questions\n };\n}\nexport default connect(mapStateToProps, mapDispatchToProps)(RemoveOtherOption);\n","import PropTypes from 'prop-types';\nimport React, { Component } from 'react';\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport {\n IconInputTextShort,\n IconDropdownFilled,\n IconSingleSelectionFilled,\n IconCheckSquareFilled,\n IconTrashFilled\n} from '@jotforminc/svg-icons';\nimport * as actions from '../../../actions';\n\nclass ColumnEditContext extends Component {\n constructor(props) {\n super(props);\n this.updateDropDownOptions = this.updateDropDownOptions.bind(this);\n this.updateColumnType = this.updateColumnType.bind(this);\n this.removeColumn = this.removeColumn.bind(this);\n this.updateColumn = this.updateColumn.bind(this);\n }\n\n updateColumn(props) {\n const { question, optionIndex, updateQuestion } = this.props;\n const dcolumns = [...question.dcolumns];\n dcolumns[optionIndex] = { ...dcolumns[optionIndex], ...props };\n updateQuestion({ dcolumns });\n this.props.actions.setContextMenu(null);\n }\n\n updateDropDownOptions() {\n const options = this.dropdownOptions.value.trim().split('\\n').join('|');\n this.updateColumn({ options });\n }\n\n updateColumnType(type) {\n return () => {\n this.updateColumn({ type });\n };\n }\n\n handleContextCollapse(collapsedPart) {\n this.contextMenu.classList.toggle(`collapse-${collapsedPart}`);\n }\n\n removeColumn() {\n const {\n question, optionIndex, setDeletedItem, hasSubmission, handleRemoveColumn\n } = this.props;\n\n if (hasSubmission) {\n setDeletedItem(question.dcolumns[optionIndex], optionIndex, 'column');\n } else {\n handleRemoveColumn(optionIndex);\n }\n this.props.actions.setContextMenu(null);\n }\n\n render() {\n const {\n question, optionIndex, isPDFImporter, colOptions\n } = this.props;\n const col = question.dcolumns[optionIndex];\n\n return (\n
    { this.contextMenu = r; }}>\n {col.type === 'Drop Down' && (\n
    \n this.handleContextCollapse('dropdown')}\n >\n Edit Dropdown Options\n
    \n
    \n { this.dropdownOptions = r; }}\n defaultValue={(col.options || '').trim().replace(/\\|/gi, '\\n')}\n placeholder={'option 1\\noption2\\noption3'}\n />\n \n
    \n
    \n )}\n {!isPDFImporter && (\n
    \n this.handleContextCollapse('list')}\n >\n Change Column Type\n
    \n
      \n
    • \n \n Single Choice Column\n
    • \n
    • \n \n Checkbox Column\n
    • \n
    • \n \n Textbox Column\n
    • \n
    • \n \n Dropdown Column\n
    • \n
    \n \n )}\n {colOptions.length > 1 && (\n
      \n
    • \n \n Delete Column\n
    • \n
    \n )}\n \n );\n }\n}\n\nColumnEditContext.propTypes = {\n optionIndex: PropTypes.number,\n question: PropTypes.shape({}),\n actions: PropTypes.shape({\n setContextMenu: PropTypes.func\n }),\n colOptions: PropTypes.arrayOf(PropTypes.string),\n updateQuestion: PropTypes.func\n};\n\nfunction mapDispatchToProps(dispatch) {\n return {\n actions: bindActionCreators(actions, dispatch)\n };\n}\n\nexport default connect(() => ({}), mapDispatchToProps)(ColumnEditContext);\n","import PropTypes from 'prop-types';\nimport React, { Component } from 'react';\nimport find from 'lodash/find';\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport { t, translationRenderer } from '@jotforminc/translation';\nimport { MagnetDialog } from '@jotforminc/dialog';\nimport Icon from '../../Icon';\nimport * as actions from '../../../actions';\nimport ColumnEditContext from './ColumnEditContext';\n\nconst getColOptions = question => (\n question.inputType === 'Dynamic' || useDcols(question) ? question.dcolumns.map(({ text }) => text) : question.mcolumns\n);\n\nconst hasFeature = feature => question => {\n if (!question.featureSet) return false;\n return question.featureSet.includes(feature);\n};\n\nconst useDcols = hasFeature('useDcols');\n\nconst useIds = hasFeature('useIds');\n\nclass EditMatrixOptions extends Component {\n constructor(props) {\n super(props);\n this.onClick = this.onClick.bind(this);\n this.getOptions = this.getOptions.bind(this);\n this.addColumn = this.addColumn.bind(this);\n this.updateQuestion = this.updateQuestion.bind(this);\n this.setDeletedItem = this.setDeletedItem.bind(this);\n this.removeColumn = this.removeColumn.bind(this);\n\n this.state = { deletedItem: null };\n }\n\n onClick() {\n const {\n type, operation, qid, optionIndex, questions\n } = this.props;\n const { deletedItem } = this.state;\n let fixedOptionIndex = optionIndex;\n const { setFocusedInlineEditInfo } = this.props.actions;\n let optsArray = this.getOptions();\n if (!optsArray) return;\n const question = find(questions, { qid });\n\n if (operation === 'addContext') {\n return this.addColumnContext();\n }\n\n if (operation === 'editContext') {\n if (deletedItem) {\n return this.removeColumn(deletedItem.optionIndex);\n }\n return this.editColumnContext();\n }\n\n if (useDcols(question) && type === 'column') {\n if (operation === 'remove') return this.removeColumn(optionIndex);\n if (operation === 'add') {\n setFocusedInlineEditInfo({ qid, mcolumns: optionIndex + 1 });\n return this.addColumn(question.inputType);\n }\n }\n\n if (useIds(question) && type === 'row') {\n if (operation === 'remove') return this.removeRow(optionIndex);\n if (operation === 'add') {\n setFocusedInlineEditInfo({ qid, mrows: optionIndex + 1 });\n return this.addRow();\n }\n }\n\n if (operation === 'add') {\n const first = optsArray.slice(0, optionIndex + 1);\n const last = optsArray.slice(optionIndex + 1);\n optsArray = [...first, '', ...last];\n fixedOptionIndex = questions[0]?.inputType === 'Emoji Slider' ? optsArray.length - 1 : optionIndex;\n } else if (operation === 'remove') {\n optsArray.splice(optionIndex, 1);\n }\n if (type === 'column') {\n this.updateQuestion({ mcolumns: optsArray.join('|') });\n if (operation === 'add') {\n setFocusedInlineEditInfo({ qid, mcolumns: optionIndex + 1 });\n this.onAddColumn(qid);\n }\n } else if (type === 'row') {\n this.updateQuestion({ mrows: optsArray.join('|') });\n if (operation === 'add') {\n setFocusedInlineEditInfo({ qid, mrows: fixedOptionIndex + 1 });\n this.onAddRow(qid, optsArray);\n }\n }\n }\n\n onAddColumn(qid) {\n if (global.buildermode === 'card') {\n // scroll to left if necessary otherwise user can't see inline editor and cant write anything\n const scrollArea = global.document.querySelector(`#matrix_${qid} .jfMatrix-innerScrollableArea`);\n const row = scrollArea && scrollArea.querySelector('.jfMatrixTable-row');\n if (!this.props.isMobile && row) {\n const matrixContainer = global.document.querySelector(`#matrix_${qid}`);\n setTimeout(() => {\n scrollArea.scrollLeft = Math.abs(matrixContainer.getWidth() - row.getWidth());\n }, 100);\n }\n }\n }\n\n onAddRow(qid, optsArray) {\n if (this.props.isMobile && global.buildermode === 'card') {\n // Calculate again and focus to newly added column on mobile. (yes column!)\n setTimeout(() => {\n global.JotForm.setMatrixLayout(qid, true, optsArray.length - 1);\n }, 0);\n }\n }\n\n getOptions() {\n try {\n const { type, qid, questions } = this.props;\n const question = find(questions, { qid });\n const options = type === 'column' ? getColOptions(question) : question.mrows;\n const optionsArray = Array.isArray(options) ? options : options.split('|');\n return optionsArray;\n } catch (e) {\n console.log(e);\n }\n }\n\n addColumn(type) {\n const { qid, questions, optionIndex } = this.props;\n const { setFocusedInlineEditInfo } = this.props.actions;\n const question = find(questions, { qid });\n const { dcolumns = [], lastColumnId } = question;\n const nextId = parseInt(lastColumnId, 10) + 1;\n const dynamicCol = {\n type,\n text: '',\n ...(useDcols(question) && { id: nextId })\n };\n setFocusedInlineEditInfo({ qid, mcolumns: optionIndex + 1 });\n this.updateQuestion({\n dcolumns: [...dcolumns, dynamicCol],\n ...(useDcols(question) && { lastColumnId: nextId })\n });\n }\n\n removeColumn(index) {\n const { qid, questions } = this.props;\n const question = find(questions, { qid });\n const dcolumns = [...question.dcolumns];\n dcolumns.splice(index, 1);\n this.updateQuestion({ dcolumns });\n }\n\n addRow() {\n const { qid, questions } = this.props;\n const question = find(questions, { qid });\n const { drows = [], mrows, lastRowId } = question;\n let drowsData = [...drows];\n const nextId = parseInt(lastRowId, 10) + 1;\n const dynamicRow = {\n text: '',\n id: nextId\n };\n\n if (typeof drows === 'string') {\n drowsData = mrows.split('|').map((item, i) => ({ id: i, text: item }));\n }\n\n const updatedRows = [...drowsData, dynamicRow];\n\n this.updateQuestion({\n drows: updatedRows,\n lastRowId: nextId\n });\n\n this.onAddRow(qid, updatedRows);\n }\n\n removeRow(index) {\n const { qid, questions } = this.props;\n const question = find(questions, { qid });\n const drows = [...question.drows];\n drows.splice(index, 1);\n this.updateQuestion({ drows });\n }\n\n setDeletedItem(item, optionIndex, type) {\n const deletedItem = {\n ...item,\n optionIndex,\n type\n };\n this.setState({ deletedItem });\n }\n\n updateQuestion(prop) {\n const { qid, questions } = this.props;\n const question = find(questions, { qid });\n const changes = { ...prop };\n\n if (useDcols(question)) {\n if (Object.hasOwn(prop, 'dcolumns')) {\n changes.mcolumns = changes.dcolumns.map(col => col.text).join('|');\n }\n }\n\n if (useIds(question)) {\n if (Object.hasOwn(prop, 'drows')) {\n changes.mrows = changes.drows.map(col => col.text).join('|');\n }\n }\n\n this.props.actions.updateFormQuestion(qid, changes);\n }\n\n addColumnContext() {\n const buttonPosition = this.button.getBoundingClientRect();\n const position = { x: buttonPosition.left, y: buttonPosition.top + buttonPosition.height };\n\n const items = [\n {\n group: 1,\n label: 'Single Choice Column',\n icon: ,\n action: () => {\n this.addColumn('Radio Button');\n }\n },\n {\n group: 1,\n label: 'Checkbox Column',\n icon: ,\n action: () => {\n this.addColumn('Check Box');\n }\n },\n {\n group: 1,\n label: 'Textbox Column',\n icon: ,\n action: () => {\n this.addColumn('Text Box');\n }\n },\n {\n group: 1,\n label: 'Dropdown Column',\n icon: ,\n action: () => {\n this.addColumn('Drop Down');\n }\n },\n ];\n\n this.props.actions.setContextMenu({ position, items });\n }\n\n editColumnContext() {\n const {\n questions, qid, optionIndex, isPDFImporter, hasSubmission\n } = this.props;\n const buttonPosition = this.button.getBoundingClientRect();\n const position = { x: buttonPosition.left, y: buttonPosition.top + buttonPosition.height };\n const question = find(questions, { qid });\n /* eslint-disable react/no-children-prop */\n this.props.actions.setContextMenu({\n position,\n children: (\n \n )\n });\n /* eslint-enable react/no-children-prop */\n }\n\n handleClickActionButtons(type) {\n const {\n optionIndex, questions, qid, operation, hasSubmission, isBetaUser\n } = this.props;\n if (isBetaUser && hasSubmission && operation === 'remove') {\n const question = find(questions, { qid });\n if (useIds(question) || useDcols(question)) {\n return this.setDeletedItem(type === 'row' ? question.drows[optionIndex] : question.dcolumns[optionIndex], optionIndex, type);\n }\n const optsArray = this.getOptions();\n if (!optsArray) return;\n return this.setDeletedItem({ text: optsArray[optionIndex] }, optionIndex, type);\n }\n return this.onClick();\n }\n\n render() {\n const {\n label, operation, isPDFImporter, type\n } = this.props;\n const { deletedItem } = this.state;\n const questions = this.getOptions();\n const forAdd = ['add', 'addContext', 'editContext'].indexOf(operation) > -1;\n\n if (questions && questions.length <= 1 && (!forAdd || (isPDFImporter && operation === 'editContext'))) return null;\n return (\n <>\n { this.button = r; }}\n onClick={() => this.handleClickActionButtons(type)}\n className={`questionLine-editButton ${forAdd ? 'forAdd' : 'forRemove'} ${operation}`}\n >\n {t(label)}\n \n this.setState({ deletedItem: null })}\n onPrimaryAction={() => { this.onClick(); this.setState({ deletedItem: null }); }}\n onSecondaryAction={() => this.setState({ deletedItem: null })}\n title={`Do you want to delete this ${deletedItem?.type}?`}\n description={(translationRenderer(`If you delete [1[{str}]] ${deletedItem?.type}, you [2[will lose existing submission data]].`)({\n renderer1: () => (\n \n {deletedItem?.text}\n \n ),\n renderer2: loseData => (\n \n {loseData}\n \n )\n })\n )}\n primaryActionText={t('Yes, Delete')}\n secondaryActionText={t('No, Keep')}\n />\n \n );\n }\n}\n\nEditMatrixOptions.propTypes = {\n qid: PropTypes.string,\n label: PropTypes.string,\n optionIndex: PropTypes.number,\n questions: PropTypes.arrayOf(PropTypes.shape()),\n operation: PropTypes.string,\n type: PropTypes.string,\n actions: PropTypes.shape({\n updateFormQuestion: PropTypes.func,\n setContextMenu: PropTypes.func,\n setFocusedInlineEditInfo: PropTypes.func\n }),\n hasSubmission: PropTypes.bool\n};\n\nfunction mapDispatchToProps(dispatch) {\n return {\n actions: bindActionCreators(actions, dispatch)\n };\n}\n\nfunction mapStateToProps(state) {\n return {\n questions: state.questions,\n isPDFImporter: state.ui.isPDFImporter,\n hasSubmission: Number(state.form?.count) > 0,\n isBetaUser: state.user.isInputTableBetaUserEnabled === true\n };\n}\nexport default connect(mapStateToProps, mapDispatchToProps)(EditMatrixOptions);\n","import PropTypes from 'prop-types';\nimport React, { Component } from 'react';\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport { t, translationRenderer } from '@jotforminc/translation';\n\nimport { IconPencilToSquare } from '@jotforminc/svg-icons';\nimport IconSVG from './IconSVG';\nimport * as allActions from '../actions';\n\nclass SalesforceInformation extends Component {\n render() {\n const { mappedObjects, actions } = this.props;\n\n return (\n
    \n {\n mappedObjects.map(({ fields, object, id }) => {\n return (\n <>\n
    \n \n \n \n \n {\n translationRenderer('This field is connected to [1[{object}]]')({\n renderer1: () => (\n <>\n {`${object} `}\n \n {` ${fields.join(', ')}`}\n \n )\n })\n }\n \n \n actions.setSalesforceModalProps({\n actionId: id,\n isVisible: true,\n buttons: null,\n overflow: false,\n })}\n onKeyDown={() => {}}\n style={{\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n cursor: 'pointer'\n }}\n >\n \n

    \n {\n t('Edit')\n }\n

    \n
    \n
    \n \n \n );\n })\n }\n \n );\n }\n}\n\nSalesforceInformation.propTypes = {\n mappedObjects: PropTypes.arrayOf(PropTypes.shape({\n object: PropTypes.string,\n fieldKey: PropTypes.string,\n fieldText: PropTypes.string\n }))\n};\n\nfunction mapDispatchToProps(dispatch) {\n return {\n actions: bindActionCreators(allActions, dispatch)\n };\n}\n\nfunction mapStateToProps() {\n return {};\n}\n\nexport default connect(mapStateToProps, mapDispatchToProps)(SalesforceInformation);\n","import PropTypes from 'prop-types';\nimport React, { Component } from 'react';\nimport { htmlDecode } from '@jotforminc/form-common';\nimport { FieldUtils } from '@jotforminc/form-fields'; // eslint-disable-line\nimport InlineEditor from './InlineEditor';\n\nclass Label extends Component {\n getClassNamesNewTheme() {\n const {\n required, shrink, isPaymentSearchEnabled, isPaymentSortingEnabled, isCategoryEnabled, isPaymentField, type\n } = this.props;\n let { labelAlign = 'Auto', formLabelAlign } = this.props;\n\n let classNames = 'form-label';\n const forceLabelTop = (\n (shrink === 'Yes')\n || (type === 'control_fullname' && (this.props.suffix === 'Yes' || this.props.middle === 'Yes' || this.props.prefix === 'Yes'))\n );\n\n if (forceLabelTop) {\n formLabelAlign = 'Top';\n labelAlign = labelAlign === 'Auto' ? 'Auto' : 'Top';\n }\n\n if (labelAlign !== 'Auto') {\n classNames = `form-label form-label-${labelAlign.toString().toLowerCase()}`;\n } else {\n classNames = `form-label form-label-${formLabelAlign.toString().toLowerCase()} form-label-auto`;\n }\n\n if (isPaymentField) {\n classNames = 'form-label form-label-top';\n }\n\n if (required && required !== 'No') {\n classNames += ' form-required-field';\n }\n\n if (isPaymentSearchEnabled && isPaymentField) {\n classNames += ' search-enabled';\n }\n\n if (isPaymentSortingEnabled && isPaymentField) {\n classNames += ' product-sorting-enabled';\n }\n\n if (isCategoryEnabled && isPaymentField) {\n classNames += ' category-enabled';\n }\n\n if (isPaymentField) {\n let trueCount = 0;\n [isPaymentSearchEnabled, isPaymentSortingEnabled, isCategoryEnabled].forEach(p => {\n if (p === 'Yes' || p === true) { trueCount++; }\n });\n\n if (trueCount === 1) { classNames += ' p-filter-one-column'; }\n if (trueCount === 2) { classNames += ' p-filter-two-column'; }\n if (trueCount === 3) { classNames += ' p-filter-three-column'; }\n }\n\n return classNames.trim();\n }\n\n getWidthNewTheme() {\n const {\n labelAlign = 'Auto', width = '150', formLabelAlign, shrink, type\n } = this.props;\n let newThemeWidth = (labelAlign === 'Top' || (formLabelAlign === 'Top' && labelAlign === 'Auto')) ? '100%' : `${width}px`;\n if (shrink === 'Yes'\n || (type === 'control_fullname' && (this.props.suffix === 'Yes' || this.props.middle === 'Yes' || this.props.prefix === 'Yes'))) {\n newThemeWidth = '100%';\n }\n\n return newThemeWidth;\n }\n\n getClassNames() {\n const {\n labelAlign = 'Auto', formLabelAlign, required, isPaymentSearchEnabled, isPaymentSortingEnabled, isCategoryEnabled, isPaymentField\n } = this.props;\n let classNames = 'form-label';\n\n if (formLabelAlign === 'Top') {\n classNames = 'form-label form-label-top';\n } else {\n classNames = `form-label form-label-${formLabelAlign.toString().toLowerCase()}`;\n }\n\n if (labelAlign !== 'Auto') {\n if (labelAlign === 'Top') {\n classNames = 'form-label form-label-top';\n } else {\n classNames = `form-label form-label-${labelAlign.toString().toLowerCase()}`;\n }\n } else {\n classNames += ' form-label-auto';\n }\n\n if (isPaymentField && this.props.isNewPaymentUI) {\n classNames = 'form-label form-label-top';\n }\n\n if (required && required !== 'No') {\n classNames += ' form-required-field';\n }\n\n if (isPaymentSearchEnabled && isPaymentField) {\n classNames += ' search-enabled';\n }\n\n if (isPaymentSortingEnabled && isPaymentField) {\n classNames += ' product-sorting-enabled';\n }\n\n if (isCategoryEnabled && isPaymentField) {\n classNames += ' category-enabled';\n }\n\n if (isPaymentField) {\n let trueCount = 0;\n [isPaymentSearchEnabled, isPaymentSortingEnabled, isCategoryEnabled].forEach(p => {\n if (p === 'Yes' || p === true) { trueCount++; }\n });\n\n if (trueCount === 1) { classNames += ' p-filter-one-column'; }\n if (trueCount === 2) { classNames += ' p-filter-two-column'; }\n if (trueCount === 3) { classNames += ' p-filter-three-column'; }\n }\n\n return classNames.trim();\n }\n\n sanitizeAndDecode(text) {\n let sanitized = FieldUtils.sanitize(text);\n if (sanitized && sanitized.indexOf('
    ') > -1) {\n sanitized = sanitized.split('
    ').join('
    '); // Fix
    tags\n }\n return htmlDecode(sanitized);\n }\n\n render() {\n const {\n qid,\n labelAlign = 'Auto',\n width = '150',\n formLabelAlign,\n required,\n text,\n disableInlineEdit,\n focusToElement,\n inlineEditDefaultValue,\n isMobile,\n defaultThemeVersion,\n isNewPaymentUI,\n isPaymentField\n } = this.props;\n\n const classNames = defaultThemeVersion === 'v2' ? this.getClassNamesNewTheme(labelAlign, formLabelAlign, required) : this.getClassNames(labelAlign, formLabelAlign, required);\n const themeWidth = (labelAlign === 'Top' || (formLabelAlign === 'Top' && labelAlign === 'Auto')) ? '100%' : `${width}px`;\n let newWidth = defaultThemeVersion === 'v2' ? this.getWidthNewTheme(labelAlign, formLabelAlign, width) : themeWidth;\n\n if (isPaymentField && (defaultThemeVersion === 'v2' || isNewPaymentUI)) {\n newWidth = '100%';\n }\n\n const styles = { width: newWidth };\n const isInlineBlock = true; // !this.props.isMobile && (this.props.labelAlign === 'Top' || (this.props.labelAlign === 'Auto' && this.props.formLabelAlign === 'Top'));\n return (\n \n {\n !disableInlineEdit\n ? (\n \n )\n : (\n \n {text}\n \n )\n }\n \n );\n }\n}\n\nLabel.propTypes = {\n text: PropTypes.string.isRequired,\n labelAlign: PropTypes.string,\n width: PropTypes.string,\n qid: PropTypes.string.isRequired,\n focusToElement: PropTypes.bool,\n isMobile: PropTypes.bool,\n formLabelAlign: PropTypes.string,\n inlineEditDefaultValue: PropTypes.string,\n disableInlineEdit: PropTypes.bool,\n required: PropTypes.string,\n defaultThemeVersion: PropTypes.string\n};\n\nexport default Label;\n","export const NoCurtainWidgets = [\n '53eba61513722c9c2a000019', // User contributed radio\n '53ea27a3a122f41c12000043', // User contributed checkbox\n '53e4f95be39aed094c00009c' // User contributed dropdown\n];\n","import React, { Fragment } from 'react';\nimport { t } from '@jotforminc/translation';\nimport {\n bool,\n string,\n shape,\n node,\n oneOfType\n} from 'prop-types';\n\nimport Label from './form/Label';\n\nimport { getQuestionLayout } from '../libs/Utils';\n\nimport PaymentTypes from '../constants/payment_types';\nimport { NoCurtainWidgets } from '../constants/widgets';\n\nconst LegacyQuestionWrapper = ({\n isMobile,\n children,\n question,\n FormField,\n alignment,\n questionEl,\n labelWidth,\n hiddenClass,\n wrapperStyle,\n isNewPaymentUI,\n isLabelAvailable,\n isCategoryEnabled,\n defaultThemeVersion,\n inputWrapperClassName,\n isLastCreatedQuestion,\n isQuestionInMultiSelect,\n isPaymentSearchEnabled,\n isPaymentSortingEnabled,\n inlineEditTouchBlockLayer\n}) => {\n const isNoCurtainWidgets = (question.type === 'control_widget' && NoCurtainWidgets.indexOf(question.selectedField) === -1);\n\n return (\n \n \n {isLabelAvailable\n && (\n \n )}\n
    \n {isNoCurtainWidgets ?
    : ''}\n {FormField\n ? questionEl : (\n
    \n {question.type}\n {' '}\n {t('not implemented yet')}\n {' '}\n |\n {' '}\n (ಠ ∩ಠ)\n
    \n )}\n
    \n {inlineEditTouchBlockLayer}\n
    \n {children}\n
    \n );\n};\n\nLegacyQuestionWrapper.propTypes = {\n isMobile: bool,\n children: node,\n question: shape({}),\n FormField: oneOfType([node, shape({})]),\n alignment: string,\n questionEl: node,\n labelWidth: string,\n hiddenClass: string,\n wrapperStyle: shape({}),\n isNewPaymentUI: bool,\n isLabelAvailable: bool,\n isCategoryEnabled: bool,\n defaultThemeVersion: string,\n inputWrapperClassName: string,\n isLastCreatedQuestion: bool,\n isQuestionInMultiSelect: bool,\n isPaymentSearchEnabled: bool,\n isPaymentSortingEnabled: bool,\n inlineEditTouchBlockLayer: node\n};\n\nexport default LegacyQuestionWrapper;\n","import PropTypes from 'prop-types';\nimport React, { Component } from 'react';\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport { t } from '@jotforminc/translation';\nimport * as actions from '../../actions';\n\nclass EditEmailVerification extends Component {\n constructor(props) {\n super(props);\n this.onClick = this.onClick.bind(this);\n this.onKeyDown = this.onKeyDown.bind(this);\n }\n\n onClick() {\n const { qid, verificationCode } = this.props;\n const newValue = verificationCode === 'Yes' ? 'No' : 'Yes';\n // update email verification code prop\n this.props.actions.updateFormQuestion(qid, { verificationCode: newValue });\n }\n\n onKeyDown(e) {\n if (e.key === ' ' || e.key === 'Enter') {\n this.onClick();\n }\n }\n\n render() {\n // will be used\n const isVerificationEnabled = this.props.verificationCode === 'Yes';\n return (\n \n \n \n );\n }\n}\n\nEditEmailVerification.propTypes = {\n qid: PropTypes.string,\n text: PropTypes.string,\n verificationCode: PropTypes.string,\n actions: PropTypes.shape({\n updateFormQuestion: PropTypes.func\n })\n};\n\nfunction mapDispatchToProps(dispatch) {\n return {\n actions: bindActionCreators(actions, dispatch)\n };\n}\n\nfunction mapStateToProps(state) {\n return {\n questions: state.questions,\n formProperties: state.formProperties,\n user: state.user\n };\n}\nexport default connect(mapStateToProps, mapDispatchToProps)(EditEmailVerification);\n","import PropTypes from 'prop-types';\nimport React, { Component } from 'react';\nimport find from 'lodash/find';\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport { t } from '@jotforminc/translation';\nimport { safeJSONParse } from '@jotforminc/utils';\nimport * as actions from '../../actions';\nimport * as pdfImportActions from '../../actions/pdfImport';\n\nconst imagePlaceholder = 'https://www.jotform.com/images/image_placeholder.png';\n\nclass AddCheckboxRadioOption extends Component {\n constructor(props) {\n super(props);\n this.onClick = this.onClick.bind(this);\n }\n\n onClick() {\n setTimeout(\n () => {\n const { updateFormQuestion, setFocusedInlineEditInfo } = this.props.actions;\n const { updatePDFFieldsForNewOption } = this.props.pdfImportActions;\n\n const { qid } = this.props;\n const { options, type } = find(this.props.questions, { qid });\n if (type === 'control_imagechoice') {\n const parsedOptions = Array.isArray(options) ? options : safeJSONParse(options, []);\n updateFormQuestion(qid, { options: parsedOptions.concat([{ text: '', link: imagePlaceholder }]) });\n setFocusedInlineEditInfo({ qid, options: parsedOptions.length });\n } else {\n const optsArray = options !== null ? options.split('|') : [];\n\n if (optsArray.indexOf('') > -1) return;\n\n optsArray.push(this.props.value);\n updateFormQuestion(qid, { options: optsArray.join('|') });\n setFocusedInlineEditInfo({ qid, options: optsArray.length - 1 });\n updatePDFFieldsForNewOption(qid, `options||${optsArray.length - 2}`, optsArray[optsArray.length - 2]);\n }\n },\n 0,\n );\n }\n\n render() {\n const { type } = find(this.props.questions, { qid: this.props.qid });\n const button = (\n \n {t(this.props.label)}\n \n );\n if (type === 'control_imagechoice') {\n return (\n \n \n {button}\n \n );\n }\n return button;\n }\n}\n\nAddCheckboxRadioOption.propTypes = {\n qid: PropTypes.string,\n label: PropTypes.string,\n value: PropTypes.string,\n questions: PropTypes.arrayOf(PropTypes.shape()),\n actions: PropTypes.shape({\n updateFormQuestion: PropTypes.func,\n setFocusedInlineEditInfo: PropTypes.func,\n }),\n};\n\nfunction mapDispatchToProps(dispatch) {\n return {\n actions: bindActionCreators(actions, dispatch),\n pdfImportActions: bindActionCreators(pdfImportActions, dispatch),\n };\n}\n\nfunction mapStateToProps(state) {\n return {\n questions: state.questions,\n };\n}\nexport default connect(mapStateToProps, mapDispatchToProps)(AddCheckboxRadioOption);\n","import PropTypes from 'prop-types';\nimport React, { Component } from 'react';\nimport find from 'lodash/find';\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport cloneDeep from 'lodash/cloneDeep';\nimport { IconXmark } from '@jotforminc/svg-icons';\nimport * as actions from '../../actions';\nimport * as pdfImportActions from '../../actions/pdfImport';\n\nclass RemoveCheckboxRadioOption extends Component {\n constructor(props) {\n super(props);\n this.onClick = this.onClick.bind(this);\n }\n\n onClick() {\n const { updateFormQuestion, recalculateOptionColumnCount } = this.props.actions;\n const { updatePDFFieldsForNewOption } = this.props.pdfImportActions;\n\n const { qid } = this.props;\n const { options, type } = find(this.props.questions, { qid });\n const { optionIndex: index } = this.props;\n if (type === 'control_imagechoice') {\n const value = cloneDeep(options);\n value.splice(index, 1);\n updateFormQuestion(qid, { options: value });\n } else {\n const optsArray = options.split('|');\n optsArray.splice(index, 1);\n if (optsArray.length === 0) {\n const label = global.document.getElementById(`label_input_${qid}_${index}`);\n if (label && label.classList.contains('inlineEditNotEmpty')) {\n label.classList.remove('inlineEditNotEmpty');\n }\n }\n updateFormQuestion(qid, { options: optsArray.join('|') });\n updatePDFFieldsForNewOption(qid, `options|${index}`, '');\n }\n\n recalculateOptionColumnCount(qid);\n }\n\n render() {\n return (\n \n \n \n );\n }\n}\n\nRemoveCheckboxRadioOption.propTypes = {\n optionIndex: PropTypes.number.isRequired,\n qid: PropTypes.string.isRequired,\n questions: PropTypes.arrayOf(PropTypes.shape()),\n actions: PropTypes.shape({\n updateFormQuestion: PropTypes.func\n })\n};\n\nfunction mapDispatchToProps(dispatch) {\n return {\n actions: bindActionCreators(actions, dispatch),\n pdfImportActions: bindActionCreators(pdfImportActions, dispatch),\n };\n}\n\nfunction mapStateToProps(state) {\n return {\n questions: state.questions\n };\n}\nexport default connect(mapStateToProps, mapDispatchToProps)(RemoveCheckboxRadioOption);\n","import PropTypes from 'prop-types';\nimport React, { Component } from 'react';\nimport { t } from '@jotforminc/translation';\nimport find from 'lodash/find';\nimport cloneDeep from 'lodash/cloneDeep';\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport * as actions from '../../../actions';\nimport Icon from '../../Icon';\n\nconst defaultSublabels = {\n textbox: '',\n email: 'Please enter your email',\n number: 'Please enter a number',\n dropdown: '',\n phone: 'Please enter your phone'\n};\n\nclass AddFieldToMixed extends Component {\n getFieldListPosition() {\n const qLine = global.document.querySelector(`#id_${this.props.qid}`);\n\n const qLabel = qLine.querySelector('.jfQuestion-label');\n const labelHeight = qLabel.getBoundingClientRect().height;\n\n const qDesc = qLine.querySelector('.jfQuestion-description');\n const descHeight = qDesc.getBoundingClientRect().height;\n\n if (this.props.type === 'row') {\n const fieldsWrapper = qLine.querySelector('.jfQuestion-fields');\n const fieldsWrapperHeight = fieldsWrapper.getBoundingClientRect().height;\n\n const addFieldButton = qLine.querySelector('.mixed-newFormElement');\n const addFieldButtonHeigth = addFieldButton.getBoundingClientRect().height;\n\n const positionTop = (labelHeight + descHeight + fieldsWrapperHeight) - addFieldButtonHeigth;\n\n return { x: '50px', y: positionTop };\n }\n\n const field = qLine.querySelector(`[data-row=\"${this.props.rowIndex}\"]`);\n const fieldPosition = field.getBoundingClientRect();\n\n const positionLeft = parseInt(fieldPosition.width, 10) + 35;\n\n const margin = (this.props.rowIndex * parseInt(0.4 * 16, 10)) - parseInt(fieldPosition.height / 2, 10);\n\n const positionTop = labelHeight + descHeight + (this.props.rowIndex * parseInt(fieldPosition.height, 10)) + margin;\n return { x: positionLeft, y: positionTop };\n }\n\n saveField(type) {\n const { qid } = this.props;\n const question = find(this.props.questions, { qid });\n // in some forms it happens to be question.fields is an array converted to string\n const fields = typeof (question.fields) === 'object' ? cloneDeep(question.fields) : [];\n\n const subLabels = { ...question.sublabels };\n\n let row = 1;\n let fieldID = 1;\n if (fields.length > 0) {\n const maxRow = Math.max(...fields.map(f => { return f.row; }));\n row = maxRow + 1;\n\n const maxID = Math.max(...fields.map(f => { return f.fieldID; }));\n fieldID = maxID + 1;\n }\n\n subLabels[`field_${fieldID}`] = defaultSublabels[type];\n\n const newField = {\n fieldID: fieldID,\n type: type,\n row: this.props.type === 'row' ? row : this.props.rowIndex,\n col: this.props.type === 'row' ? 1 : 2\n };\n\n if (type === 'dropdown') {\n newField.options = 'Option 1\\nOption 2\\nOption 3';\n } else if (type === 'number') {\n newField.hint = 'ex:23';\n }\n\n fields.push(newField);\n fields.sort((a, b) => a.col - b.col);\n fields.sort((a, b) => a.row - b.row);\n\n this.props.actions.updateFormQuestion(qid, { fields: fields, sublabels: subLabels });\n this.props.actions.updateMixedQuestionSelectedField(newField.fieldID);\n this.props.actions.toggleMixedFields(false);\n }\n\n handleAddFieldToRow(e, items) {\n const buttonPosition = this.plusButton.getBoundingClientRect();\n const position = { x: buttonPosition.left, y: buttonPosition.top + buttonPosition.height };\n\n this.props.actions.toggleMixedFields({ type: 'row' });\n this.props.actions.setContextMenu({ position, items });\n }\n\n handleAddFieldToCol(e, items) {\n if (this.props.ui.isMixedFieldsOpen.enableAddButton && this.props.ui.isMixedFieldsOpen.fieldID === this.props.fieldID) {\n if (this.props.ui.contextMenu) {\n this.props.actions.setContextMenu(null);\n } else {\n const buttonPosition = this.plusColButton.getBoundingClientRect();\n const position = { x: buttonPosition.left, y: buttonPosition.top + buttonPosition.height };\n\n this.props.actions.setContextMenu({ position, items });\n }\n } else {\n this.props.actions.toggleMixedFields({ type: 'col', fieldID: this.props.fieldID, enableAddButton: true });\n }\n }\n\n render() {\n if (this.props.ui.isMixedFieldDragging) return null;\n\n const listItems = [\n {\n group: 1,\n label: t('Add a Text Box Field'),\n icon: ,\n action: () => {\n this.saveField('textbox');\n }\n },\n {\n group: 1,\n label: t('Add an Email Field'),\n icon: ,\n action: () => {\n this.saveField('email');\n }\n },\n {\n group: 1,\n label: t('Add a Number Field'),\n icon: ,\n action: () => {\n this.saveField('number');\n }\n },\n {\n group: 1,\n label: t('Add a Dropdown Field'),\n icon: ,\n action: () => {\n this.saveField('dropdown');\n }\n },\n {\n group: 1,\n label: t('Add a Phone Field'),\n icon: ,\n action: () => {\n this.saveField('phone');\n }\n },\n ];\n\n if (this.props.type === 'col') {\n const isAnimated = (this.props.ui.isMixedFieldsOpen.fieldID && this.props.ui.isMixedFieldsOpen.fieldID === this.props.fieldID) && this.props.ui.isMixedFieldsOpen.enableAddButton;\n\n const openedFieldTypes = isAnimated && this.props.ui.contextMenu;\n return (\n this.handleAddFieldToCol(e, listItems)}\n className={`mixed-subFormElement${isAnimated ? ' animate' : ''}${openedFieldTypes ? ' openedFieldTypes' : ''}`}\n >\n { this.plusColButton = ref; }}\n className=\"mixed-plusIcon\"\n >\n Plus Icon\n
    \n
    {t('Add a new field element')}
    \n \n );\n }\n\n const openedFieldTypes = this.props.ui.isMixedFieldsOpen && this.props.ui.isMixedFieldsOpen.type === 'row';\n return (\n
    \n this.handleAddFieldToRow(e, listItems)}\n className=\"mixed-newFormElement\"\n >\n { this.plusButton = ref; }} className=\"mixed-plusIcon\"> Plus Icon \n {' '}\n {t('Add a new field element')}\n \n
    \n );\n }\n}\n\nAddFieldToMixed.propTypes = {\n qid: PropTypes.string,\n type: PropTypes.string,\n rowIndex: PropTypes.number,\n fieldID: PropTypes.string,\n questions: PropTypes.arrayOf(PropTypes.shape()),\n actions: PropTypes.shape({\n updateFormQuestion: PropTypes.func,\n updateMixedQuestionSelectedField: PropTypes.func\n })\n};\n\nfunction mapDispatchToProps(dispatch) {\n return {\n actions: bindActionCreators(actions, dispatch)\n };\n}\n\nfunction mapStateToProps(state) {\n return {\n ui: state.ui,\n questions: state.questions\n };\n}\nexport default connect(mapStateToProps, mapDispatchToProps)(AddFieldToMixed);\n","import PropTypes from 'prop-types';\nimport React, { Component } from 'react';\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport find from 'lodash/find';\nimport cloneDeep from 'lodash/cloneDeep';\nimport { JFSortable as ReactSortable } from '@jotforminc/builder-components';\nimport * as actions from '../../../actions';\n\nclass MixedQuestionSortableOptions extends Component {\n constructor(props, context) {\n super(props, context);\n this.handleItemSort = this.handleItemSort.bind(this);\n this.onDragStart = this.onDragStart.bind(this);\n this.onDragEnd = this.onDragEnd.bind(this);\n }\n\n onDragStart() {\n this.props.actions.draggingMixedFields(true);\n }\n\n onDragEnd() {\n this.props.actions.draggingMixedFields(false);\n }\n\n handleItemSort(order, sortable, { oldIndex, newIndex }) {\n const { qid } = this.props;\n const question = find(this.props.questions, { qid });\n const fields = cloneDeep(question.fields) || [];\n\n const movedItem = fields.splice(oldIndex, 1)[0];\n fields.splice(newIndex, 0, movedItem);\n let start;\n let end;\n let repArr;\n\n if (oldIndex < newIndex) {\n start = oldIndex;\n end = (newIndex - oldIndex) + 1;\n\n repArr = this.moveItems(movedItem, [...fields].splice(start, end));\n } else {\n start = newIndex;\n end = (oldIndex - newIndex) + 1;\n\n repArr = this.moveItems(movedItem, [...fields].splice(start, end).reverse()).reverse();\n }\n\n fields.splice(start, end, ...repArr);\n\n this.props.actions.updateFormQuestion(qid, { fields });\n }\n\n moveItems(movedItem, items) {\n let mItem = { ...movedItem };\n return items.map(item => {\n const returnArr = { ...item, col: mItem.col, row: mItem.row };\n mItem = { ...item };\n return returnArr;\n });\n }\n\n render() {\n const classNames = this.props.className || '';\n return (\n \n {this.props.children}\n \n );\n }\n}\n\nMixedQuestionSortableOptions.propTypes = {\n qid: PropTypes.string,\n children: PropTypes.node,\n questions: PropTypes.arrayOf(PropTypes.shape()),\n className: PropTypes.string,\n actions: PropTypes.shape({\n updateFormQuestion: PropTypes.func\n }),\n};\n\nfunction mapDispatchToProps(dispatch) {\n return {\n actions: bindActionCreators(actions, dispatch)\n };\n}\n\nfunction mapStateToProps(state) {\n return {\n questions: state.questions\n };\n}\nexport default connect(mapStateToProps, mapDispatchToProps)(MixedQuestionSortableOptions);\n","import PropTypes from 'prop-types';\nimport React, { Component } from 'react';\nimport find from 'lodash/find';\nimport cloneDeep from 'lodash/cloneDeep';\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport * as actions from '../../../actions';\n\nclass MixedQuestionSelectedControls extends Component {\n constructor(props) {\n super(props);\n\n this.state = {\n enableDeleteAnimation: false\n };\n }\n\n getRemainingFields(rowHasField) {\n const { qid } = this.props;\n const { fieldID } = this.props;\n const question = find(this.props.questions, { qid });\n const fields = cloneDeep(question.fields);\n\n const deletedField = find(fields, { fieldID });\n\n let newFields = fields.map(f => {\n const fieldRow = parseInt(f.row, 10);\n const fieldCol = parseInt(f.col, 10);\n\n const deletedRow = parseInt(deletedField.row, 10);\n const deletedCol = parseInt(deletedField.col, 10);\n\n if (fieldRow === deletedRow && fieldCol > deletedCol) {\n const field = { ...f };\n field.col = f.col - 1;\n return field;\n }\n\n if (!rowHasField && fieldRow > deletedRow) {\n const field = { ...f };\n field.row = f.row - 1;\n return field;\n }\n\n return f;\n });\n\n newFields = newFields.filter(f => {\n return f.fieldID !== this.props.fieldID;\n });\n\n return newFields;\n }\n\n removeField(qid, _prop) {\n this.props.actions.updateFormQuestion(qid, _prop, true, true, false, true);\n this.props.actions.updateMixedQuestionSelectedField(false);\n }\n\n handleDeleteButtonClick() {\n if (!this.props.isSelected) return;\n const { qid } = this.props;\n const { fieldID } = this.props;\n const question = find(this.props.questions, { qid });\n const fields = [...question.fields];\n const { sublabels } = question;\n\n const deletedField = find(fields, { fieldID });\n\n let rowHasField = fields.filter(f => {\n const deletedRow = parseInt(deletedField.row, 10);\n const deletedCol = parseInt(deletedField.col, 10);\n\n const fRow = parseInt(f.row, 10);\n const fCol = parseInt(f.col, 10);\n\n return fRow === deletedRow && fCol !== deletedCol;\n });\n\n rowHasField = rowHasField.length > 0;\n if (rowHasField && parseInt(deletedField.col, 10) === 1) {\n this.setState({ enableDeleteAnimation: true });\n\n setTimeout(() => {\n const newFields = this.getRemainingFields(rowHasField);\n const newSubLabels = newFields.reduce((accum, currentValue) => {\n Object.assign(accum, { [`field_${currentValue.fieldID}`]: sublabels[`field_${currentValue.fieldID}`] });\n return accum;\n }, {});\n this.removeField(qid, newFields.length > 0 ? { fields: newFields, sublabels: newSubLabels } : { fields: false, sublabels: { field_0: '' } });\n this.setState({ enableDeleteAnimation: false });\n }, 310);\n } else {\n const newFields = this.getRemainingFields(rowHasField);\n const newSubLabels = newFields.reduce((accum, currentValue) => {\n Object.assign(accum, { [`field_${currentValue.fieldID}`]: sublabels[`field_${currentValue.fieldID}`] });\n return accum;\n }, {});\n this.removeField(qid, newFields.length > 0 ? { fields: newFields, sublabels: newSubLabels } : { fields: false, sublabels: { field_0: '' } });\n }\n }\n\n handleEditButtonClick(e) {\n if (!this.props.isSelected) return;\n e.stopPropagation();\n const { rightPanelToggle, updateQuestionPropertiesActiveTab, updateRightPanelMode } = this.props.actions;\n const { fieldID } = this.props;\n\n rightPanelToggle(true);\n updateRightPanelMode('questionsettings', true);\n updateQuestionPropertiesActiveTab('field');\n\n setTimeout(() => {\n const editButton = global.document.querySelector(`[data-editindex=\"${fieldID}\"]`);\n if (editButton) editButton.click();\n }, 10);\n }\n\n renderSelectedFieldControls() {\n return (\n
    \n \n \n { /* */ }\n
    \n );\n }\n\n render() {\n const isAnimated = this.props.ui.isMixedFieldsOpen && this.props.ui.isMixedFieldsOpen.fieldID && this.props.ui.isMixedFieldsOpen.fieldID === this.props.fieldID;\n\n return (\n this.props.actions.updateMixedQuestionSelectedField(this.props.fieldID)}\n >\n {this.props.children}\n {this.renderSelectedFieldControls()}\n \n );\n }\n}\n\nMixedQuestionSelectedControls.propTypes = {\n qid: PropTypes.string,\n isSelected: PropTypes.bool,\n fieldID: PropTypes.string,\n fieldCount: PropTypes.number,\n questions: PropTypes.arrayOf(PropTypes.shape()),\n actions: PropTypes.shape({\n updateFormQuestion: PropTypes.func,\n updateMixedQuestionSelectedRow: PropTypes.func,\n rightPanelToggle: PropTypes.func,\n updateQuestionPropertiesActiveTab: PropTypes.func\n })\n};\n\nfunction mapDispatchToProps(dispatch) {\n return {\n actions: bindActionCreators(actions, dispatch)\n };\n}\n\nfunction mapStateToProps(state) {\n return {\n ui: state.ui,\n questions: state.questions\n };\n}\nexport default connect(mapStateToProps, mapDispatchToProps)(MixedQuestionSelectedControls);\n","/* eslint-disable max-lines */\nimport get from 'lodash/get';\nimport find from 'lodash/find';\nimport React, { Suspense } from 'react';\nimport { t } from '@jotforminc/translation';\nimport isUndefined from 'lodash/isUndefined';\nimport { safeLazy } from '@jotforminc/safe-lazy-import';\nimport { BGColorLightness, TextEditor } from '@jotforminc/jotform-common';\nimport { ImageUpload, RichTextEditor } from '@jotforminc/builder-components';\n\nimport HipaaWarnings from '../components/HipaaWarnings';\nimport InlineWarnings from '../components/InlineWarnings';\nimport InlineEditor from '../components/form/InlineEditor';\nimport HiddenIndicator from '../components/HiddenIndicator';\nimport AddOtherOption from '../components/form/AddOtherOption';\nimport SortableOptions from '../components/form/SortableOptions';\nimport EditOptionImage from '../components/form/EditOptionImage';\nimport CardQuestionWrapper from '../components/CardQuestionWrapper';\nimport manageDropdownOptions from '../components/form/EditDropdown';\nimport RemoveOtherOption from '../components/form/RemoveOtherOption';\nimport { mergeInlineOptions } from '../actions/normalizeInlineOptions';\nimport manageMatrixOptions from '../components/form/EditMatrixOptions';\nimport SalesforceInformation from '../components/SalesforceInformation';\nimport LegacyQuestionWrapper from '../components/LegacyQuestionWrapper';\nimport editEmailVerification from '../components/form/EditEmailVerification';\nimport AddCheckboxRadioOption from '../components/form/AddCheckboxRadioOption';\nimport RemoveCheckboxRadioOption from '../components/form/RemoveCheckboxRadioOption';\nimport addFieldToMixed from '../components/form/multilinequestioncontrols/AddFieldToMixed';\nimport MixedQuestionSortableOptions from '../components/form/multilinequestioncontrols/MixedQuestionSortableOptions';\nimport mixedQuestionSelectedControls from '../components/form/multilinequestioncontrols/MixedQuestionSelectedControls';\n\nimport {\n makeQuestionName,\n correctProductsData,\n prepareFormFieldsOptions,\n logJotFormEvents\n} from './Utils';\n\nimport PaymentTypes from '../constants/payment_types';\nimport { NoCurtainWidgets } from '../constants/widgets';\nimport { IGNORED_FIELDS, IGNORED_WIDGETS_SELECTED_FIELDS } from '../constants/cardFormFields';\n\nconst NoLabelQuestionTypes = [\n 'control_head',\n 'control_collapse',\n 'control_button',\n 'control_pagebreak',\n 'control_text',\n 'control_image',\n 'control_clear',\n 'control_separator',\n 'control_divider',\n 'control_inline'\n];\n\nconst LazyCardFormField = safeLazy(() => import(/* webpackChunkName: \"LazyCardFormField\" */ '../components/lazyComponents/LazyCardField'));\nconst LazyLegacyFormField = safeLazy(() => import(/* webpackChunkName: \"LazyLegacyFormField\" */ '../components/lazyComponents/LazyLegacyField'));\n\nexport const objectToKeyValuePair = ({ question, hasOnlyMultiplePayment }) => {\n const newQuestion = {};\n Object.keys(question).forEach(k => { newQuestion[k] = { value: question[k] }; });\n\n // Change all uploads to multiple if form has paypalpro or authnet for pci requirements\n if (question.type === 'control_fileupload' && hasOnlyMultiplePayment && newQuestion.allowMultiple && newQuestion.allowMultiple.value !== 'Yes') {\n newQuestion.allowMultiple.value = 'Yes';\n }\n\n return newQuestion;\n};\n\nexport const isIgnoredQuestion = (question, isCardForm) => {\n if (isCardForm) {\n if (IGNORED_FIELDS.indexOf(question.type) !== -1) { return true; }\n if (question.type === 'control_widget' && IGNORED_WIDGETS_SELECTED_FIELDS.indexOf(question.selectedField) !== -1) { return true; }\n } else {\n const legacyIgnoredQuestions = ['control_imagechoice', 'control_mixed', 'control_textarea2', 'control_yesno', 'control_emojislider'];\n if (legacyIgnoredQuestions.indexOf(question.type) > -1) {\n return true;\n }\n }\n return false;\n};\n\nconst replaceQuotes = content => {\n return content.replace(/(href=\")[^\"]*(?=\")/g, match => {\n return match.replace(/"/g, '');\n });\n};\n\nexport const findComparePaymentFormVersion = () => {\n return global.window.location.search.includes('comparePaymentForm=v1') ? 'v1' : '';\n};\n\nexport const prepareInputWrapperClassName = ({\n question,\n formAlignment,\n isNewPaymentUI,\n defaultThemeVersion,\n}) => {\n let inputWrapperClassName = '';\n const inputWideQuestionTypeList = ['control_text', 'control_head', 'control_button', 'control_collapse', 'control_divider', 'control_image'];\n const isTermsAndConditionsV2 = defaultThemeVersion === 'v2' && question.type === 'control_widget' && question.selectedField === '52948fb29322cd302b00000c';\n\n switch (true) {\n case question.labelAlign === 'Top':\n case formAlignment === 'Top' && question.labelAlign === 'Auto':\n case defaultThemeVersion === 'v2' && question.shrink === 'Yes':\n case defaultThemeVersion === 'v2' && question.type === 'control_fullname' && (question.suffix === 'Yes' || question.prefix === 'Yes' || question.middle === 'Yes'):\n case inputWideQuestionTypeList.includes(question.type):\n case (defaultThemeVersion === 'v2' || isNewPaymentUI) && PaymentTypes.includes(question.type):\n inputWrapperClassName = 'form-input-wide';\n break;\n default:\n inputWrapperClassName = 'form-input';\n break;\n }\n\n if (isTermsAndConditionsV2) {\n return `${inputWrapperClassName} termsAndConditionsV2`;\n }\n\n return inputWrapperClassName;\n};\n\nconst prepareFieldComponentPropsForButton = ({\n useNewSCL,\n isEncrypted,\n isFirstPage,\n isLastPage,\n useJotformSign,\n continueLaterButtonText,\n fieldComponentProps,\n question,\n paypalSPBProps\n}) => {\n const fieldComponentPropsTmp = {};\n fieldComponentPropsTmp.useJotformSign = useJotformSign;\n fieldComponentPropsTmp.encryptIcon = { value: isEncrypted };\n fieldComponentPropsTmp.continueLaterButtonText = { value: continueLaterButtonText };\n\n if (typeof question.pageBreak !== 'undefined') {\n fieldComponentPropsTmp.pageBreak = objectToKeyValuePair({ question: question.pageBreak });\n fieldComponentPropsTmp.pageBreak.isFirstPage = isFirstPage;\n fieldComponentPropsTmp.pageBreak.isLastPage = isLastPage;\n fieldComponentPropsTmp.pageBreak.continueLaterButtonText = { value: continueLaterButtonText };\n if (useNewSCL) {\n fieldComponentPropsTmp.pageBreak.useNewContinueLater = { value: 'Yes' };\n }\n }\n\n if (useNewSCL) {\n fieldComponentPropsTmp.useNewContinueLater = { value: 'Yes' };\n }\n\n fieldComponentPropsTmp.payLaterEnabled = paypalSPBProps && paypalSPBProps.payLaterEnabled === 'Yes' && paypalSPBProps.paymentType === 'product' ? true : undefined;\n\n return { ...fieldComponentProps, ...fieldComponentPropsTmp };\n};\n\nexport const prepareFieldComponentPropsForMixed = ({\n fields,\n isMobile,\n selectedField,\n fieldComponentProps\n}) => {\n return {\n ...fieldComponentProps,\n selectedField,\n addField: addFieldToMixed,\n showWarning: !fields || fields.length <= 0,\n selectedControls: mixedQuestionSelectedControls,\n sortableOptions: isMobile ? MixedQuestionSortableOptions : undefined\n };\n};\n\nexport const prepareQuestionPropsWithStore = ({\n question,\n questions,\n focusedInlineQid,\n selectedQuestionId\n}) => {\n const {\n qid,\n type\n } = question;\n\n return {\n isSelectedQuestion: selectedQuestionId === qid,\n isLastCreatedQuestion: focusedInlineQid === qid,\n isFirstHeader: type === 'control_head' && find(questions, q => q.type === 'control_head').qid === qid\n };\n};\n\nexport const prepareQuestionProps = ({\n question,\n questions,\n hasOnlyMultiplePayment\n}) => {\n const isHidden = question.hidden === 'Yes';\n const hiddenClass = isHidden ? 'question-wrapper isHidden' : 'question-wrapper questionWrapper ';\n const questionKeyValuePair = objectToKeyValuePair({\n question: {\n ...question,\n id: question.qid,\n qid: `input_${question.qid}`,\n qname: `q${question.qid}_${makeQuestionName(question.text || '', question.qid, questions)}`\n },\n hasOnlyMultiplePayment\n });\n\n return {\n isHidden,\n hiddenClass,\n questionKeyValuePair\n };\n};\n\nexport const prepareFieldComponentProps = ({\n question,\n cdnconfig,\n isCardForm,\n formStrings,\n useJotformSign,\n isPreviewModOn,\n isSelectedQuestion,\n isOfflineModeEnabled,\n isLastCreatedQuestion,\n isQuestionInMultiSelect,\n defaultThemeVersion\n}) => {\n const fieldComponentProps = {\n cdnconfig,\n passive: true,\n inlineEditIsQuestionSelected: true,\n isOfflineModeEnabled: isOfflineModeEnabled,\n inlineEditFocusToElement: isLastCreatedQuestion,\n inlineEditClass: (isPreviewModOn || isQuestionInMultiSelect) ? undefined : InlineEditor,\n themeVersion: (defaultThemeVersion === 'v2') || global.location.href.indexOf('?ndt=1') > -1 ? 'v2' : 'v1'\n };\n\n if (!isCardForm) {\n return fieldComponentProps;\n }\n\n return {\n ...fieldComponentProps,\n ...prepareFieldComponentPropsForCardForm({\n question,\n formStrings,\n useJotformSign,\n isSelectedQuestion,\n fieldComponentProps\n })\n };\n};\n\nexport const prepareFieldComponentPropsForHead = ({\n title,\n isMobile,\n question,\n isCardForm,\n formQuestions,\n isFirstHeader,\n fieldComponentProps\n}) => {\n const fieldComponentPropsTmp = {};\n fieldComponentPropsTmp.isMobile = isMobile;\n fieldComponentPropsTmp.inlineEditPageTitle = title;\n fieldComponentPropsTmp.inlineEditPageTitle = title;\n fieldComponentPropsTmp.inlineEditIsFirstHeader = isFirstHeader;\n if (!isCardForm) {\n return { ...fieldComponentProps, ...fieldComponentPropsTmp };\n }\n\n const headers = formQuestions.map((props, index) => ({\n props, index\n })).filter(p => p.props.type === 'control_head');\n\n headers.forEach((_section, index) => {\n const section = _section;\n section.index = section.index - index;\n });\n\n const currHeaderIndex = headers.map(q => { return q.props.qid; }).indexOf(question.qid);\n const nextHeaderID = headers[currHeaderIndex + 1] ? headers[currHeaderIndex + 1].props.qid.toString() : false;\n // hide previous button if there is no previous question\n const currentHeader = headers.filter(header => header.props.qid === question.qid)[0];\n fieldComponentPropsTmp.isPrevButtonVisible = currentHeader && currentHeader.index !== 0;\n\n const list = formQuestions.map(q => { return q.qid; });\n\n const currentHeaderIndex = list.indexOf(question.qid.toString());\n const nextHeaderIndex = nextHeaderID ? list.indexOf(nextHeaderID) : false;\n const sectionQuestions = nextHeaderIndex ? formQuestions.slice(currentHeaderIndex + 1, nextHeaderIndex) : formQuestions.slice(currentHeaderIndex + 1);\n fieldComponentPropsTmp.questionCount = sectionQuestions.filter(q => q.hidden !== 'Yes' && !isIgnoredQuestion(q, true)).length;\n return { ...fieldComponentProps, ...fieldComponentPropsTmp };\n};\n\nexport const prepareFieldComponentPropsForInline = ({\n actions,\n question,\n inlineFormFields,\n updateFormQuestion,\n deleteInlineQuestionFields,\n updateInlineQuestionField,\n updateFITBFieldsIndex,\n updateSelectedFITBFieldId,\n isSelectedQuestion,\n isRightPanelOpen,\n accountType,\n background,\n fieldComponentProps\n}) => {\n const fieldComponentPropsTmp = {};\n fieldComponentPropsTmp.TextEditor = TextEditor;\n fieldComponentPropsTmp.ImageUpload = ImageUpload;\n fieldComponentPropsTmp.onCreateBlots = blots => (\n actions.createInlineQuestionField(blots, question.qid)\n );\n fieldComponentPropsTmp.onChangeText = template => updateFormQuestion(question.qid, { template });\n fieldComponentPropsTmp.onDeleteBlots = blots => deleteInlineQuestionFields(blots, question.qid);\n fieldComponentPropsTmp.fields = mergeInlineOptions(question.fields);\n fieldComponentPropsTmp.onBlotUpdate = ({ id: blotId, prop }) => (\n updateInlineQuestionField(question.qid, blotId, prop)\n );\n fieldComponentPropsTmp.updateBlotsIndex = blots => (\n updateFITBFieldsIndex(question.qid, blots)\n );\n fieldComponentPropsTmp.onClickBlot = id => (\n updateSelectedFITBFieldId(id)\n );\n fieldComponentPropsTmp.actions = actions;\n fieldComponentPropsTmp.template = question.template;\n fieldComponentPropsTmp.isSelected = isSelectedQuestion;\n fieldComponentPropsTmp.isRightPanelOpen = isRightPanelOpen;\n fieldComponentPropsTmp.formFields = prepareFormFieldsOptions(inlineFormFields);\n fieldComponentPropsTmp.isAdmin = accountType === 'ADMIN' && global.JOTFORM_ENV !== 'ENTERPRISE';\n fieldComponentPropsTmp.darkMode = background && BGColorLightness(background);\n return { ...fieldComponentProps, ...fieldComponentPropsTmp };\n};\n\nexport const prepareFieldComponentPropsForText = ({\n language,\n isMobile,\n question,\n formQuestions,\n editorHeight,\n addNotification,\n openRichTextFor,\n isSelectedQuestion,\n updateFormQuestion,\n fieldComponentProps,\n toggleRichTextEditorForQuestion\n}) => {\n const fieldComponentPropsTmp = {};\n fieldComponentPropsTmp.toggleRichTextEditorForQuestion = toggleRichTextEditorForQuestion;\n const userLanguage = !language ? 'en-US' : language;\n const languageUrl = `//${global.location.hostname}/js/rich-text-editor/langs/${userLanguage}.js`;\n fieldComponentPropsTmp.richTextEditor = {\n type: RichTextEditor,\n questions: formQuestions,\n editorHeight,\n languageUrl,\n onInit: () => {\n const editor = getTinyMCE();\n if (!editor) {\n console.error('Editor instance not found');\n return;\n }\n if (editor.plugins.charactercount.isMaxBytesExceeded()) {\n richTextMaxBytesNotification({ addNotification });\n }\n },\n onSave: () => {\n saveRichTextEditor({\n question,\n addNotification,\n updateFormQuestion,\n toggleRichTextEditorForQuestion,\n });\n }\n };\n\n fieldComponentPropsTmp.isEditing = openRichTextFor === question.qid && isSelectedQuestion;\n fieldComponentPropsTmp.isMobile = isMobile;\n const emptyText = isMobile\n ? 'Tap to edit this text...'\n : 'Click to edit this text...';\n fieldComponentPropsTmp.emptyText = `

    ${t(emptyText)}

    `;\n return { ...fieldComponentProps, ...fieldComponentPropsTmp };\n};\n\nconst getTinyMCE = () => {\n if (global.tinyMCE.editors.length === 0) {\n return;\n }\n return global.tinyMCE.editors[global.tinyMCE.editors.length - 1];\n};\n\nconst richTextMaxBytesNotification = ({\n addNotification\n}) => {\n addNotification({\n message: t(\"You've reached the maximum character limit for this field. Please reduce your text to save your changes. Any additional text will be truncated.\"),\n autoDismiss: 5,\n level: 'warning'\n });\n};\n\nexport const saveRichTextEditor = ({\n question,\n addNotification,\n updateFormQuestion,\n toggleRichTextEditorForQuestion,\n}) => {\n toggleRichTextEditorForQuestion(false);\n const editor = getTinyMCE();\n if (!editor) {\n return;\n }\n if (editor.plugins.charactercount?.isMaxBytesExceeded()) {\n richTextMaxBytesNotification({ addNotification });\n }\n const getContent = () => {\n try {\n return editor.getContent();\n } catch {\n console.warn('Error while getting content from editor');\n return null;\n }\n };\n\n let content = getContent();\n if (content !== null) {\n content = replaceQuotes(content);\n updateFormQuestion(question.qid, { text: content });\n }\n};\n\nexport const prepareFieldComponentPropsForMultiChoices = ({\n isMobile,\n focusedInline,\n isSelectedQuestion,\n fieldComponentProps,\n isLastCreatedQuestion\n}) => {\n const fieldComponentPropsTmp = {};\n fieldComponentPropsTmp.addOtherOptionClass = AddOtherOption;\n fieldComponentPropsTmp.editOptionImageClass = EditOptionImage;\n fieldComponentPropsTmp.addOptionClass = AddCheckboxRadioOption;\n fieldComponentPropsTmp.removeOtherOptionClass = RemoveOtherOption;\n fieldComponentPropsTmp.removeOptionClass = RemoveCheckboxRadioOption;\n\n if (isSelectedQuestion && isLastCreatedQuestion) {\n fieldComponentPropsTmp.focusedPosition = { options: focusedInline.options };\n }\n\n if (!isMobile) {\n fieldComponentPropsTmp.sortableOptions = SortableOptions;\n }\n\n return { ...fieldComponentProps, ...fieldComponentPropsTmp };\n};\n\nexport const prepareFieldComponentPropsForDropdown = ({\n fieldComponentProps,\n updateFormQuestion\n}) => {\n return {\n ...fieldComponentProps,\n manageDropdownOptions,\n updateMethod: updateFormQuestion\n };\n};\n\nexport const prepareFieldComponentPropsForWidgets = ({\n formID,\n background,\n font,\n formWidth,\n labelWidth,\n useJotformSign,\n fieldComponentProps\n}) => {\n const fieldComponentPropsTmp = {};\n fieldComponentPropsTmp.formID = formID;\n fieldComponentPropsTmp.formBackground = background;\n fieldComponentPropsTmp.formFont = font;\n fieldComponentPropsTmp.formWidth = formWidth;\n fieldComponentPropsTmp.labelWidth = labelWidth;\n fieldComponentPropsTmp.useJotformSign = useJotformSign;\n return { ...fieldComponentProps, ...fieldComponentPropsTmp };\n};\n\nexport const prepareFieldComponentPropsForPaymentMethods = ({\n rightPanelToggle,\n activePaymentQuestion,\n fieldComponentProps\n}) => {\n const fieldComponentPropsTmp = {\n inlineEditClass: false,\n disableInlineEdit: true,\n actions: { rightPanelToggle }\n };\n if (!activePaymentQuestion) {\n return { ...fieldComponentProps, ...fieldComponentPropsTmp };\n }\n\n fieldComponentPropsTmp.activePaymentQuestion = {\n ...objectToKeyValuePair({\n question: {\n id: activePaymentQuestion.qid,\n qid: `input_${activePaymentQuestion.qid}`,\n qname: `q${activePaymentQuestion.qid}_${makeQuestionName(activePaymentQuestion.text || '', activePaymentQuestion.qid, [])}`\n }\n }),\n ...objectToKeyValuePair({ question: activePaymentQuestion }),\n ...fieldComponentProps\n };\n return { ...fieldComponentProps, ...fieldComponentPropsTmp };\n};\n\nexport const prepareFieldComponentPropsForPayments = ({\n taxes,\n coupons,\n highlightLine,\n paymentStrings,\n useStripeCoupons,\n paymentListSettings,\n isPaymentStoreInBasicFields,\n newPaymentUIForNewCreatedForms,\n products,\n updateFormQuestion,\n openPaymentWizard,\n rightPanelToggle,\n updateRightPanelMode,\n toggleCategoryWrapper,\n addProduct,\n deleteProductInline,\n deleteProductInlineTest,\n confirm,\n removeNotification,\n removeFromSingleCategory,\n uploadProductImageInline,\n hackweekFeats,\n formID,\n owner,\n isSelectedQuestion,\n username,\n accountType,\n productStock,\n fieldComponentProps,\n question,\n mappedEmail,\n mappedAddress,\n paypalSubmitButton,\n isReusableConnectionEnabled,\n openPaymentConnectionModal,\n isPaymentGatewayConfigured\n}) => {\n const fieldComponentPropsTmp = {\n formProperties: {\n taxes,\n coupons,\n highlightLine,\n paymentStrings,\n useStripeCoupons,\n paymentListSettings,\n isPaymentStoreInBasicFields,\n newPaymentUIForNewCreatedForms,\n products: correctProductsData(products),\n updateQuestionProperties: updateFormQuestion,\n openPaymentWizard,\n rightPanelToggle,\n updateRightPanelMode,\n toggleCategoryWrapper,\n addProduct,\n deleteProductInline,\n deleteProductInlineTest,\n confirm,\n removeNotification,\n removeFromSingleCategory,\n uploadProductImageInline,\n comparePaymentForm: findComparePaymentFormVersion(),\n hackweekFeats: { value: hackweekFeats && hackweekFeats === 'enable' ? 'enable' : 'disabled' },\n id: formID,\n owner,\n ...fieldComponentProps?.formProperties\n },\n openPaymentConnectionModal,\n logJotFormEvents,\n isSelectedQuestion,\n username,\n accountType,\n stocks: Array.isArray(productStock) && productStock.length > 0 ? productStock : undefined,\n isReusableConnectionEnabled: isReusableConnectionEnabled && isReusableConnectionEnabled(),\n paymentConnectionID: question.paymentConnectionID,\n isPaymentGatewayConfigured\n };\n\n switch (question.type) {\n case 'control_cybersource':\n fieldComponentPropsTmp.showBillingError = !(mappedEmail && mappedAddress);\n break;\n case 'control_paypalSPB':\n if (question.paypalButton === 'Yes') {\n if (paypalSubmitButton) {\n fieldComponentPropsTmp.submitButtonOrder = { value: paypalSubmitButton.order };\n }\n } else {\n fieldComponentPropsTmp.submitButtonOrder = { value: '-1' };\n }\n break;\n default:\n break;\n }\n\n return { ...fieldComponentProps, ...fieldComponentPropsTmp };\n};\n\nexport const prepareFieldComponentPropsForPageBreak = ({\n isFirstPage,\n isLastPage,\n continueLaterButtonText,\n useNewSCL,\n fieldComponentProps\n}) => {\n const fieldComponentPropsTmp = {};\n fieldComponentPropsTmp.isFirstPage = isFirstPage;\n fieldComponentPropsTmp.isLastPage = isLastPage;\n fieldComponentPropsTmp.continueLaterButtonText = { value: continueLaterButtonText };\n if (useNewSCL) {\n fieldComponentPropsTmp.useNewContinueLater = { value: 'Yes' };\n }\n\n return { ...fieldComponentProps, ...fieldComponentPropsTmp };\n};\n\nexport const prepareFieldComponentPropsForMatrix = ({\n mrows,\n mcolumns,\n fieldComponentProps,\n isSelectedQuestion,\n isLastCreatedQuestion\n}) => {\n if (!isSelectedQuestion || !isLastCreatedQuestion) {\n return fieldComponentProps;\n }\n\n return {\n ...fieldComponentProps,\n manageMatrixOptions,\n focusedPosition: { mrows, mcolumns }\n };\n};\n\nconst prepareFieldComponentPropsForCardEmail = ({ fieldComponentProps }) => {\n return {\n ...fieldComponentProps,\n editEmailVerification\n };\n};\n\nexport const prepareFieldComponentPropsForSignature = ({ fieldComponentProps, useJotformSign }) => {\n return {\n ...fieldComponentProps,\n useJotformSign\n };\n};\n\nexport const prepareFieldComponentPropsForCardForm = ({\n question,\n formStrings,\n useJotformSign,\n isSelectedQuestion,\n fieldComponentProps\n}) => {\n return {\n ...fieldComponentProps,\n isSelectedQuestion,\n formProperties: {\n ...fieldComponentProps?.formProperties,\n formStrings,\n useJotformSign,\n displayCurtain: (question.type === 'control_widget' && NoCurtainWidgets.indexOf(question.selectedField) === -1)\n }\n };\n};\n\n// eslint-disable-next-line complexity\nexport const convertFieldComponentPropsByQuestionType = ({\n actions,\n language,\n isMobile,\n question,\n username,\n useNewSCL,\n isCardForm,\n isLastPage,\n isFirstPage,\n accountType,\n mappedEmail,\n productStock,\n editorHeight,\n focusedInline,\n selectedField,\n isFirstHeader,\n mappedAddress,\n formQuestions,\n formProperties,\n paypalSPBProps,\n openRichTextFor,\n isRightPanelOpen,\n inlineFormFields,\n paypalSubmitButton,\n isSelectedQuestion,\n fieldComponentProps,\n isLastCreatedQuestion,\n activePaymentQuestion,\n isPaymentGatewayConfigured\n}) => {\n const {\n addNotification,\n updateFormQuestion,\n updateFITBFieldsIndex,\n updateInlineQuestionField,\n updateSelectedFITBFieldId,\n deleteInlineQuestionFields,\n toggleRichTextEditorForQuestion\n } = actions;\n\n const {\n title,\n background,\n id: formID,\n font,\n formWidth,\n labelWidth,\n useJotformSign\n } = formProperties;\n\n let fieldComponentPropsTmp = fieldComponentProps;\n switch (true) {\n case question.type === 'control_head': {\n fieldComponentPropsTmp = prepareFieldComponentPropsForHead({\n title,\n isMobile,\n question,\n isCardForm,\n formQuestions,\n isFirstHeader,\n fieldComponentProps\n });\n break;\n }\n case question.type === 'control_inline': {\n fieldComponentPropsTmp = prepareFieldComponentPropsForInline({\n actions,\n question,\n inlineFormFields,\n updateFormQuestion,\n deleteInlineQuestionFields,\n updateInlineQuestionField,\n updateFITBFieldsIndex,\n updateSelectedFITBFieldId,\n isSelectedQuestion,\n isRightPanelOpen,\n accountType,\n background,\n fieldComponentProps\n });\n break;\n }\n case question.type === 'control_text': {\n fieldComponentPropsTmp = prepareFieldComponentPropsForText({\n language,\n question,\n isMobile,\n editorHeight,\n formQuestions,\n addNotification,\n openRichTextFor,\n updateFormQuestion,\n isSelectedQuestion,\n fieldComponentProps,\n toggleRichTextEditorForQuestion\n });\n break;\n }\n case question.type === 'control_widget': {\n fieldComponentPropsTmp = prepareFieldComponentPropsForWidgets({\n background,\n formID,\n font,\n formWidth,\n labelWidth,\n useJotformSign,\n fieldComponentProps\n });\n break;\n }\n case question.type === 'control_paymentmethods': {\n const { rightPanelToggle } = actions;\n fieldComponentPropsTmp = prepareFieldComponentPropsForPaymentMethods({\n rightPanelToggle,\n fieldComponentProps,\n activePaymentQuestion\n });\n break;\n }\n case question.type === 'control_pagebreak': {\n const { continueLaterButtonText } = formProperties;\n fieldComponentPropsTmp = prepareFieldComponentPropsForPageBreak({\n useNewSCL,\n isLastPage,\n isFirstPage,\n fieldComponentProps,\n continueLaterButtonText\n });\n break;\n }\n case question.type === 'control_signature': {\n fieldComponentPropsTmp = prepareFieldComponentPropsForSignature({ fieldComponentProps, useJotformSign });\n break;\n }\n case question.type === 'control_button': {\n const { isEncrypted, continueLaterButtonText } = formProperties;\n fieldComponentPropsTmp = prepareFieldComponentPropsForButton({\n useNewSCL,\n isEncrypted,\n useJotformSign,\n continueLaterButtonText,\n isFirstPage,\n isLastPage,\n question,\n paypalSPBProps,\n fieldComponentProps\n });\n break;\n }\n case question.type === 'control_mixed': {\n fieldComponentPropsTmp = prepareFieldComponentPropsForMixed({\n isMobile,\n selectedField,\n fieldComponentProps,\n fields: question.fields\n });\n break;\n }\n case isSelectedQuestion && (question.type === 'control_checkbox' || question.type === 'control_radio' || question.type === 'control_imagechoice'): {\n fieldComponentPropsTmp = prepareFieldComponentPropsForMultiChoices({\n focusedInline,\n isMobile,\n isSelectedQuestion,\n isLastCreatedQuestion,\n fieldComponentProps\n });\n break;\n }\n case isSelectedQuestion && (question.type === 'control_dropdown') && (!question.special || question.special === 'None'): {\n fieldComponentPropsTmp = prepareFieldComponentPropsForDropdown({\n updateFormQuestion,\n fieldComponentProps\n });\n break;\n }\n case isSelectedQuestion && question.type === 'control_matrix': {\n const { mcolumns, mrows } = focusedInline;\n fieldComponentPropsTmp = prepareFieldComponentPropsForMatrix({\n mrows,\n mcolumns,\n fieldComponentProps,\n isSelectedQuestion,\n isLastCreatedQuestion,\n });\n break;\n }\n case isCardForm && question.type === 'control_email': {\n fieldComponentPropsTmp = prepareFieldComponentPropsForCardEmail({ fieldComponentProps });\n break;\n }\n case PaymentTypes.indexOf(question.type) !== -1: {\n const {\n owner,\n taxes,\n coupons,\n products,\n hackweekFeats,\n highlightLine,\n paymentStrings,\n useStripeCoupons,\n paymentListSettings,\n isPaymentStoreInBasicFields,\n newPaymentUIForNewCreatedForms\n } = formProperties;\n const {\n confirm,\n addProduct,\n rightPanelToggle,\n openPaymentWizard,\n removeNotification,\n deleteProductInline,\n updateRightPanelMode,\n toggleCategoryWrapper,\n deleteProductInlineTest,\n removeFromSingleCategory,\n uploadProductImageInline,\n isReusableConnectionEnabled,\n openPaymentConnectionModal\n } = actions;\n\n fieldComponentPropsTmp = prepareFieldComponentPropsForPayments({\n taxes,\n coupons,\n highlightLine,\n paymentStrings,\n useStripeCoupons,\n paymentListSettings,\n isPaymentStoreInBasicFields,\n newPaymentUIForNewCreatedForms,\n products,\n updateFormQuestion,\n openPaymentWizard,\n rightPanelToggle,\n updateRightPanelMode,\n toggleCategoryWrapper,\n addProduct,\n deleteProductInline,\n deleteProductInlineTest,\n confirm,\n removeNotification,\n removeFromSingleCategory,\n uploadProductImageInline,\n hackweekFeats,\n formID,\n owner,\n isSelectedQuestion,\n username,\n accountType,\n productStock,\n fieldComponentProps,\n question,\n mappedEmail,\n mappedAddress,\n paypalSubmitButton,\n isReusableConnectionEnabled,\n openPaymentConnectionModal,\n isPaymentGatewayConfigured\n });\n break;\n }\n default:\n break;\n }\n return fieldComponentPropsTmp;\n};\n\n// eslint-disable-next-line complexity\nexport const convertQuestionPropsToElement = ({\n actions,\n isHipaa,\n isHidden,\n language,\n isMobile,\n question,\n username,\n useNewSCL,\n isCardForm,\n isLastPage,\n isFirstPage,\n hiddenClass,\n accountType,\n description,\n mappedEmail,\n productStock,\n editorHeight,\n focusedInline,\n questionCount,\n selectedField,\n questionIndex,\n isFirstHeader,\n mappedAddress,\n formQuestions,\n formProperties,\n paypalSPBProps,\n openRichTextFor,\n isRightPanelOpen,\n inlineFormFields,\n isNewDefaultTheme,\n paypalSubmitButton,\n isSelectedQuestion,\n hideProtectedToggle,\n fieldComponentProps,\n questionKeyValuePair,\n inputWrapperClassName,\n isLastCreatedQuestion,\n activePaymentQuestion,\n isQuestionInMultiSelect,\n salesForceMappedObjects,\n isWorkflowBuilder,\n isPaymentGatewayConfigured\n}) => {\n const fieldComponentPropsTmp = convertFieldComponentPropsByQuestionType({\n actions,\n language,\n isMobile,\n question,\n username,\n useNewSCL,\n isCardForm,\n isLastPage,\n isFirstPage,\n accountType,\n mappedEmail,\n productStock,\n editorHeight,\n focusedInline,\n selectedField,\n isFirstHeader,\n mappedAddress,\n formQuestions,\n formProperties,\n paypalSPBProps,\n openRichTextFor,\n isRightPanelOpen,\n inlineFormFields,\n paypalSubmitButton,\n isSelectedQuestion,\n fieldComponentProps,\n isLastCreatedQuestion,\n activePaymentQuestion,\n isPaymentGatewayConfigured\n });\n\n const FormField = isCardForm ? LazyCardFormField : LazyLegacyFormField;\n let questionEl = (\n \n \n \n );\n\n // not set widgets\n if (question.type === 'control_widget') {\n if (question.widgetType === 'field') {\n if (isUndefined(question.frameSrc) || question.frameSrc.length === 0) {\n questionEl = (\n
    {t('Please run wizard')}
    \n );\n }\n }\n }\n\n const isLabelAvailable = !(NoLabelQuestionTypes.indexOf(question.type) > -1 || (question.type === 'control_widget' && question.label === 'No'));\n\n const wrapperStyle = {};\n\n let inlineEditTouchBlockLayer = null;\n if (isMobile && !isSelectedQuestion) {\n wrapperStyle.position = 'relative';\n inlineEditTouchBlockLayer = (\n
    \n );\n }\n\n if (isCardForm) {\n return (\n \n {salesForceMappedObjects.length > 0 && }\n {isHidden && }\n {fieldComponentPropsTmp.showWarning && }\n {isHipaa && }\n \n );\n }\n\n const isCategoryEnabled = get(formProperties, 'paymentListSettings[0].showCategory') === 'Yes';\n const isPaymentSearchEnabled = get(formProperties, 'paymentListSettings[0].showSearch') === 'Yes';\n const isPaymentSortingEnabled = get(formProperties, 'paymentListSettings[0].showSorting') === 'Yes';\n\n return (\n \n {salesForceMappedObjects.length > 0 && }\n {isHidden && !isNewDefaultTheme && }\n {fieldComponentProps.showWarning && }\n {isHipaa && }\n {isHidden && isNewDefaultTheme && }\n \n );\n};\n","import React from 'react';\n\nimport { handleCustomNavigation } from '@jotforminc/utils';\n\n/**\n * Plan is to use this also on the buildSource, form.\n */\n\nconst FormPageFooterStatic = ({\n showHIPAA = false,\n showA11y = false,\n showEncryptedForm = false,\n onHIPAAClick = () => handleCustomNavigation('https://www.jotform.com/hipaa', '_blank', true),\n onA11yClick = () => handleCustomNavigation('https://www.jotform.com/accessible-forms', '_blank', true),\n onEncrpytedFormClick = () => handleCustomNavigation('https://www.jotform.com/encrypted-forms/', '_blank', true),\n children = null\n}) => {\n return (\n
    \n {showHIPAA && (\n \n \n \n )}\n {showEncryptedForm && (\n \n \n \n )}\n {showA11y && (\n \n \n
    \n
    ACCESSIBILITY
    \n
    ENABLED FORM
    \n
    \n \n )}\n {children}\n
    \n );\n};\n\nexport default FormPageFooterStatic;\n","import React, {\n useState, forwardRef, useImperativeHandle, useRef, useEffect, useCallback\n} from 'react';\nimport { t } from '@jotforminc/translation';\n\nconst initialState = {\n open: false, info: {}, style: {}, arrowPosition: 'top-left'\n};\n\nconst Popper = forwardRef(({ onClick }, ref) => {\n const [popperInfo, setPopperInfo] = useState(initialState);\n const popoverRef = useRef(null);\n\n const listener = useCallback(e => {\n if (popoverRef.current && !popoverRef.current.contains(e.target)) {\n setPopperInfo(initialState);\n }\n }, []);\n\n useEffect(() => {\n document.addEventListener('wheel', listener);\n document.addEventListener('mousedown', listener);\n return () => {\n document.removeEventListener('whell', listener);\n document.removeEventListener('mousedown', listener);\n };\n }, [listener]);\n\n useImperativeHandle(ref, () => ({\n open: ({ hint, style, arrowPosition }) => {\n setPopperInfo({\n open: true,\n info: { hint },\n style,\n arrowPosition\n });\n },\n close: () => {\n setPopperInfo(initialState);\n },\n isOpen: popperInfo.open\n }));\n\n return popperInfo.open && (\n \n
    {t(popperInfo.info?.hint)}
    \n

    \n \n {t('Go to Settings')}\n \n

    \n
    \n );\n});\n\nexport default Popper;\n","import React, { useRef } from 'react';\nimport { withRouter } from 'react-router-dom';\nimport FormPageFooterStatic from './FormPageFooterStatic';\nimport Popper from './Popper';\n\nconst BANNERS = {\n a11y: {\n propKey: 'accessibility',\n hint: 'Want to hide this?'\n },\n hipaa: {\n propKey: 'showHIPAABadge',\n hint: 'Want to hide this?',\n }\n};\n\nconst FormPageFooter = ({\n history,\n formID,\n showHIPAA = false,\n showA11y = false,\n showEncryptedForm = false,\n actionLogger = () => {}\n}) => {\n const popper = useRef(null);\n const bannerType = useRef(null);\n\n const onSettingsClick = () => {\n actionLogger(bannerType.current?.propKey);\n setTimeout(() => {\n history.push(`/${global.__BASE_ROUTE_PATH}/${formID}/settings/general/${bannerType.current?.propKey}`);\n });\n };\n\n const onBannerClick = type => e => {\n const {\n left, right, top, height\n } = e.currentTarget.getBoundingClientRect();\n bannerType.current = BANNERS[type];\n const isRightAligned = window.innerWidth - left < 284;\n const isMobile = window.innerWidth < 480;\n\n popper.current.open({\n hint: BANNERS[type].hint,\n style: {\n left: isRightAligned ? '' : left,\n right: (!isMobile && isRightAligned) ? window.innerWidth - right : '',\n top: top + height + 30\n },\n arrowPosition: isRightAligned ? 'top-right' : 'top-left'\n });\n };\n\n return (\n \n \n \n );\n};\n\nexport default withRouter(FormPageFooter);\n","import FormPageFooter from './FormPageFooter';\n\nexport default FormPageFooter;\n","// Returns first questionWrapper if it is possible\nexport default function getDragTarget(targ) {\n let target = targ;\n const questionWrapperClass = global.buildermode === 'card' ? 'jfCard' : 'questionWrapper';\n if (targ && targ.getElementsByClassName) {\n const wrappers = targ.getElementsByClassName(questionWrapperClass);\n if (wrappers.length > 0) {\n target = wrappers[0];\n }\n }\n return target;\n}\n","import PropTypes from 'prop-types';\nimport React from 'react';\n\nconst PureLine = props => {\n return (\n
  • \n {props.children}\n
  • \n );\n};\n\nPureLine.propTypes = {\n children: PropTypes.node,\n};\n\nexport default PureLine;\n","/* eslint-disable camelcase */\nconst Controls = {\n control_textbox: {\n primaryLeft: ['order'],\n primaryRight: ['conditions', 'properties', 'remove'],\n secondaryLeft: [],\n secondaryRight: []\n },\n control_number: {\n primaryLeft: ['order'],\n primaryRight: ['conditions', 'properties', 'remove'],\n secondaryLeft: [],\n secondaryRight: []\n },\n control_checkbox: {\n primaryLeft: ['order'],\n primaryRight: ['conditions', 'properties', 'remove'],\n secondaryLeft: [],\n secondaryRight: []\n },\n control_radio: {\n primaryLeft: ['order'],\n primaryRight: ['conditions', 'properties', 'remove'],\n secondaryLeft: [],\n secondaryRight: []\n },\n control_dropdown: {\n primaryLeft: ['order'],\n primaryRight: ['conditions', 'properties', 'remove'],\n secondaryLeft: [],\n secondaryRight: []\n },\n control_spinner: {\n primaryLeft: ['order'],\n primaryRight: ['conditions', 'properties', 'remove'],\n secondaryLeft: [],\n secondaryRight: []\n },\n control_rating: {\n primaryLeft: ['order'],\n primaryRight: ['conditions', 'properties', 'remove'],\n secondaryLeft: [],\n secondaryRight: []\n },\n control_phone: {\n primaryLeft: ['order'],\n primaryRight: ['conditions', 'properties', 'remove'],\n secondaryLeft: [],\n secondaryRight: []\n },\n control_head: {\n primaryLeft: ['order'],\n primaryRight: ['conditions', 'properties', 'remove'],\n secondaryLeft: [],\n secondaryRight: []\n },\n control_fullname: {\n primaryLeft: ['order'],\n primaryRight: ['conditions', 'properties', 'remove'],\n secondaryLeft: [],\n secondaryRight: []\n },\n control_button: {\n primaryLeft: ['order'],\n primaryRight: ['conditions', 'properties', 'remove'],\n secondaryLeft: [],\n secondaryRight: []\n },\n control_textarea: {\n primaryLeft: ['order'],\n primaryRight: ['conditions', 'properties', 'remove'],\n secondaryLeft: ['visibility'],\n secondaryRight: ['order']\n },\n control_email: {\n primaryLeft: ['order'],\n primaryRight: ['conditions', 'properties', 'remove'],\n secondaryLeft: [],\n secondaryRight: []\n },\n control_text: {\n primaryLeft: ['richtext', 'order'],\n primaryRight: ['conditions', 'properties', 'remove'],\n secondaryLeft: [],\n secondaryRight: []\n },\n control_image: {\n primaryLeft: ['order'],\n primaryRight: ['conditions', 'properties', 'remove'], /* 'imagesettings', for image wizard */\n secondaryLeft: [],\n secondaryRight: []\n },\n control_captcha: {\n primaryLeft: [],\n primaryRight: ['conditions', 'properties', 'remove'],\n secondaryLeft: [],\n secondaryRight: []\n },\n control_pagebreak: {\n primaryLeft: ['order'],\n primaryRight: ['conditions', 'properties', 'remove'],\n secondaryLeft: [],\n secondaryRight: []\n },\n control_collapse: {\n primaryLeft: ['order'],\n primaryRight: ['conditions', 'properties', 'remove'],\n secondaryLeft: [],\n secondaryRight: []\n },\n control_time: {\n primaryLeft: ['order'],\n primaryRight: ['conditions', 'properties', 'remove'],\n secondaryLeft: [],\n secondaryRight: []\n },\n control_timev2: {\n primaryLeft: ['order'],\n primaryRight: ['conditions', 'properties', 'remove'],\n secondaryLeft: [],\n secondaryRight: []\n },\n control_address: {\n primaryLeft: ['order'],\n primaryRight: ['conditions', 'properties', 'remove'],\n secondaryLeft: [],\n secondaryRight: []\n },\n control_fileupload: {\n primaryLeft: ['order'],\n primaryRight: ['conditions', 'properties', 'remove'],\n secondaryLeft: [],\n secondaryRight: []\n },\n control_fileuploadv2: {\n primaryLeft: ['order'],\n primaryRight: ['conditions', 'properties', 'remove'],\n secondaryLeft: [],\n secondaryRight: []\n },\n control_datetime: {\n primaryLeft: ['order'],\n primaryRight: ['conditions', 'properties', 'remove'],\n secondaryLeft: [],\n secondaryRight: []\n },\n control_scale: {\n primaryLeft: ['order'],\n primaryRight: ['conditions', 'properties', 'remove'],\n secondaryLeft: [],\n secondaryRight: []\n },\n control_matrix: {\n primaryLeft: ['order'],\n primaryRight: ['conditions', 'properties', 'remove'],\n secondaryLeft: [],\n secondaryRight: []\n },\n control_widget: {\n primaryLeft: ['order'],\n primaryRight: ['signAutomationSettings', 'conditions', 'widgetSettings', 'properties', 'remove'],\n secondaryLeft: [],\n secondaryRight: []\n },\n control_native_widget: {\n primaryLeft: ['order'],\n primaryRight: ['conditions', 'widgetSettings', 'properties', 'remove'],\n secondaryLeft: [],\n secondaryRight: []\n },\n control_calculation: {\n primaryLeft: ['order'],\n primaryRight: ['conditions', 'widgetSettings', 'properties', 'remove'],\n secondaryLeft: [],\n secondaryRight: []\n },\n control_signature: {\n primaryLeft: ['order'],\n primaryRight: ['signAutomationSettings', 'conditions', 'properties', 'remove'],\n secondaryLeft: [],\n secondaryRight: []\n },\n control_range: {\n primaryLeft: ['order'],\n primaryRight: ['widgetSettings', 'properties', 'remove'],\n secondaryLeft: [],\n secondaryRight: []\n },\n control_slider: {\n primaryLeft: ['order'],\n primaryRight: ['conditions', 'widgetSettings', 'properties', 'remove'],\n secondaryLeft: [],\n secondaryRight: []\n },\n control_hidden: {\n primaryLeft: ['order'],\n primaryRight: ['properties', 'remove'],\n secondaryLeft: [],\n secondaryRight: []\n },\n control_2co: {\n primaryLeft: ['order'],\n primaryRight: ['conditions', 'paymentSettings', 'productList', 'subscriptionList', 'payments', 'properties', 'addAndRemovePaymentIntegration', 'remove'],\n secondaryLeft: [],\n secondaryRight: []\n },\n control_authnet: {\n primaryLeft: ['order'],\n primaryRight: ['conditions', 'paymentSettings', 'productList', 'subscriptionList', 'payments', 'properties', 'addAndRemovePaymentIntegration', 'remove'],\n secondaryLeft: [],\n secondaryRight: []\n },\n control_bluepay: {\n primaryLeft: ['order'],\n primaryRight: ['conditions', 'paymentSettings', 'productList', 'subscriptionList', 'payments', 'properties', 'addAndRemovePaymentIntegration', 'remove'],\n secondaryLeft: [],\n secondaryRight: []\n },\n control_bluesnap: {\n primaryLeft: ['order'],\n primaryRight: ['conditions', 'paymentSettings', 'productList', 'subscriptionList', 'payments', 'properties', 'addAndRemovePaymentIntegration', 'remove'],\n secondaryLeft: [],\n secondaryRight: []\n },\n control_firstdata: {\n primaryLeft: ['order'],\n primaryRight: ['conditions', 'paymentSettings', 'productList', 'subscriptionList', 'payments', 'properties', 'addAndRemovePaymentIntegration', 'remove'],\n secondaryLeft: [],\n secondaryRight: []\n },\n control_paypalInvoicing: {\n primaryLeft: ['order'],\n primaryRight: ['conditions', 'paymentSettings', 'productList', 'subscriptionList', 'payments', 'properties', 'addAndRemovePaymentIntegration', 'remove'],\n secondaryLeft: [],\n secondaryRight: []\n },\n control_payu: {\n primaryLeft: ['order'],\n primaryRight: ['conditions', 'paymentSettings', 'productList', 'subscriptionList', 'payments', 'properties', 'addAndRemovePaymentIntegration', 'remove'],\n secondaryLeft: [],\n secondaryRight: []\n },\n control_payuMoney: {\n primaryLeft: ['order'],\n primaryRight: ['conditions', 'paymentSettings', 'productList', 'subscriptionList', 'payments', 'properties', 'addAndRemovePaymentIntegration', 'remove'],\n secondaryLeft: [],\n secondaryRight: []\n },\n control_pagseguro: {\n primaryLeft: ['order'],\n primaryRight: ['conditions', 'paymentSettings', 'productList', 'subscriptionList', 'payments', 'properties', 'addAndRemovePaymentIntegration', 'remove'],\n secondaryLeft: [],\n secondaryRight: []\n },\n control_moneris: {\n primaryLeft: ['order'],\n primaryRight: ['conditions', 'paymentSettings', 'productList', 'subscriptionList', 'payments', 'properties', 'addAndRemovePaymentIntegration', 'remove'],\n secondaryLeft: [],\n secondaryRight: []\n },\n control_sofort: {\n primaryLeft: ['order'],\n primaryRight: ['conditions', 'paymentSettings', 'productList', 'subscriptionList', 'payments', 'properties', 'addAndRemovePaymentIntegration', 'remove'],\n secondaryLeft: [],\n secondaryRight: []\n },\n control_sensepass: {\n primaryLeft: ['order'],\n primaryRight: ['conditions', 'paymentSettings', 'productList', 'subscriptionList', 'payments', 'properties', 'addAndRemovePaymentIntegration', 'remove'],\n secondaryLeft: [],\n secondaryRight: []\n },\n control_paysafe: {\n primaryLeft: ['order'],\n primaryRight: ['conditions', 'paymentSettings', 'productList', 'subscriptionList', 'payments', 'properties', 'addAndRemovePaymentIntegration', 'remove'],\n secondaryLeft: [],\n secondaryRight: []\n },\n control_iyzico: {\n primaryLeft: ['order'],\n primaryRight: ['conditions', 'paymentSettings', 'productList', 'subscriptionList', 'payments', 'properties', 'addAndRemovePaymentIntegration', 'remove'],\n secondaryLeft: [],\n secondaryRight: []\n },\n control_payjunction: {\n primaryLeft: ['order'],\n primaryRight: ['conditions', 'paymentSettings', 'productList', 'subscriptionList', 'payments', 'properties', 'addAndRemovePaymentIntegration', 'remove'],\n secondaryLeft: [],\n secondaryRight: []\n },\n control_chargify: {\n primaryLeft: ['order'],\n primaryRight: ['conditions', 'paymentSettings', 'productList', 'subscriptionList', 'payments', 'properties', 'addAndRemovePaymentIntegration', 'remove'],\n secondaryLeft: [],\n secondaryRight: []\n },\n control_braintree: {\n primaryLeft: ['order'],\n primaryRight: ['conditions', 'paymentSettings', 'productList', 'subscriptionList', 'payments', 'properties', 'addAndRemovePaymentIntegration', 'remove'],\n secondaryLeft: [],\n secondaryRight: []\n },\n control_cardconnect: {\n primaryLeft: ['order'],\n primaryRight: ['conditions', 'paymentSettings', 'productList', 'subscriptionList', 'payments', 'properties', 'addAndRemovePaymentIntegration', 'remove'],\n secondaryLeft: [],\n secondaryRight: []\n },\n control_clickbank: {\n primaryLeft: ['order'],\n primaryRight: ['conditions', 'paymentSettings', 'productList', 'subscriptionList', 'payments', 'properties', 'addAndRemovePaymentIntegration', 'remove'],\n secondaryLeft: [],\n secondaryRight: []\n },\n control_dwolla: {\n primaryLeft: ['order'],\n primaryRight: ['conditions', 'paymentSettings', 'productList', 'subscriptionList', 'payments', 'properties', 'addAndRemovePaymentIntegration', 'remove'],\n secondaryLeft: [],\n secondaryRight: []\n },\n control_echeck: {\n primaryLeft: ['order'],\n primaryRight: ['conditions', 'paymentSettings', 'productList', 'subscriptionList', 'payments', 'properties', 'addAndRemovePaymentIntegration', 'remove'],\n secondaryLeft: [],\n secondaryRight: []\n },\n control_eway: {\n primaryLeft: ['order'],\n primaryRight: ['conditions', 'paymentSettings', 'productList', 'subscriptionList', 'payments', 'properties', 'addAndRemovePaymentIntegration', 'remove'],\n secondaryLeft: [],\n secondaryRight: []\n },\n control_googleco: {\n primaryLeft: ['order'],\n primaryRight: ['conditions', 'payments', 'properties', 'remove'],\n secondaryLeft: ['order'],\n secondaryRight: []\n },\n control_gocardless: {\n primaryLeft: ['order'],\n primaryRight: ['conditions', 'paymentSettings', 'productList', 'subscriptionList', 'payments', 'properties', 'addAndRemovePaymentIntegration', 'remove'],\n secondaryLeft: [],\n secondaryRight: []\n },\n control_mollie: {\n primaryLeft: ['order'],\n primaryRight: ['conditions', 'paymentSettings', 'productList', 'subscriptionList', 'payments', 'properties', 'addAndRemovePaymentIntegration', 'remove'],\n secondaryLeft: [],\n secondaryRight: []\n },\n control_paypalSPB: {\n primaryLeft: ['order'],\n primaryRight: ['conditions', 'paymentSettings', 'productList', 'subscriptionList', 'payments', 'properties', 'addAndRemovePaymentIntegration', 'remove'],\n secondaryLeft: [],\n secondaryRight: []\n },\n control_onebip: {\n primaryLeft: ['order'],\n primaryRight: ['conditions', 'paymentSettings', 'productList', 'subscriptionList', 'payments', 'properties', 'addAndRemovePaymentIntegration', 'remove'],\n secondaryLeft: [],\n secondaryRight: []\n },\n control_payment: {\n primaryLeft: ['order'],\n primaryRight: ['conditions', 'paymentSettings', 'productList', 'subscriptionList', 'payments', 'properties', 'addAndRemovePaymentIntegration', 'remove'],\n secondaryLeft: [],\n secondaryRight: []\n },\n control_paymentwall: {\n primaryLeft: ['order'],\n primaryRight: ['conditions', 'paymentSettings', 'productList', 'subscriptionList', 'payments', 'properties', 'addAndRemovePaymentIntegration', 'remove'],\n secondaryLeft: [],\n secondaryRight: []\n },\n control_paypal: {\n primaryLeft: ['order'],\n primaryRight: ['conditions', 'paymentSettings', 'productList', 'subscriptionList', 'payments', 'properties', 'addAndRemovePaymentIntegration', 'remove'],\n secondaryLeft: [],\n secondaryRight: []\n },\n control_paypalexpress: {\n primaryLeft: ['order'],\n primaryRight: ['conditions', 'paymentSettings', 'productList', 'subscriptionList', 'payments', 'properties', 'addAndRemovePaymentIntegration', 'remove'],\n secondaryLeft: [],\n secondaryRight: []\n },\n control_paypalpro: {\n primaryLeft: ['order'],\n primaryRight: ['conditions', 'paymentSettings', 'productList', 'subscriptionList', 'payments', 'properties', 'addAndRemovePaymentIntegration', 'remove'],\n secondaryLeft: [],\n secondaryRight: []\n },\n control_paypalcomplete: {\n primaryLeft: ['order'],\n primaryRight: ['conditions', 'paymentSettings', 'productList', 'subscriptionList', 'payments', 'properties', 'addAndRemovePaymentIntegration', 'remove'],\n secondaryLeft: [],\n secondaryRight: []\n },\n control_payfast: {\n primaryLeft: ['order'],\n primaryRight: ['conditions', 'paymentSettings', 'productList', 'subscriptionList', 'payments', 'properties', 'addAndRemovePaymentIntegration', 'remove'],\n secondaryLeft: [],\n secondaryRight: []\n },\n control_cybersource: {\n primaryLeft: ['order'],\n primaryRight: ['conditions', 'paymentSettings', 'productList', 'subscriptionList', 'payments', 'properties', 'addAndRemovePaymentIntegration', 'remove'],\n secondaryLeft: [],\n secondaryRight: []\n },\n control_square: {\n primaryLeft: ['order'],\n primaryRight: ['conditions', 'paymentSettings', 'productList', 'subscriptionList', 'payments', 'properties', 'addAndRemovePaymentIntegration', 'remove'],\n secondaryLeft: [],\n secondaryRight: []\n },\n control_stripe: {\n primaryLeft: ['order'],\n primaryRight: ['conditions', 'paymentSettings', 'productList', 'subscriptionList', 'payments', 'properties', 'addAndRemovePaymentIntegration', 'remove'],\n secondaryLeft: [],\n secondaryRight: []\n },\n control_stripeCheckout: {\n primaryLeft: ['order'],\n primaryRight: ['conditions', 'paymentSettings', 'productList', 'subscriptionList', 'payments', 'properties', 'addAndRemovePaymentIntegration', 'remove'],\n secondaryLeft: [],\n secondaryRight: []\n },\n control_stripeACH: {\n primaryLeft: ['order'],\n primaryRight: ['conditions', 'paymentSettings', 'productList', 'subscriptionList', 'payments', 'properties', 'addAndRemovePaymentIntegration', 'remove'],\n secondaryLeft: [],\n secondaryRight: []\n },\n control_stripeACHManual: {\n primaryLeft: ['order'],\n primaryRight: ['conditions', 'paymentSettings', 'productList', 'subscriptionList', 'payments', 'properties', 'addAndRemovePaymentIntegration', 'remove'],\n secondaryLeft: [],\n secondaryRight: []\n },\n control_skrill: {\n primaryLeft: ['order'],\n primaryRight: ['conditions', 'paymentSettings', 'productList', 'subscriptionList', 'payments', 'properties', 'addAndRemovePaymentIntegration', 'remove'],\n secondaryLeft: [],\n secondaryRight: []\n },\n control_wepay: {\n primaryLeft: ['order'],\n primaryRight: ['conditions', 'paymentSettings', 'productList', 'subscriptionList', 'payments', 'addAndRemovePaymentIntegration', 'properties', 'remove'],\n secondaryLeft: [],\n secondaryRight: []\n },\n control_worldpay: {\n primaryLeft: ['order'],\n primaryRight: ['conditions', 'paymentSettings', 'productList', 'subscriptionList', 'payments', 'properties', 'addAndRemovePaymentIntegration', 'remove'],\n secondaryLeft: [],\n secondaryRight: []\n },\n control_worldpayus: {\n primaryLeft: ['order'],\n primaryRight: ['conditions', 'paymentSettings', 'productList', 'subscriptionList', 'payments', 'properties', 'addAndRemovePaymentIntegration', 'remove'],\n secondaryLeft: [],\n secondaryRight: []\n },\n control_separator: {\n primaryLeft: ['order'],\n primaryRight: ['properties', 'remove'],\n secondaryLeft: [],\n secondaryRight: []\n },\n control_autoincrement: {\n primaryLeft: ['order'],\n primaryRight: ['properties', 'remove'],\n secondaryLeft: [],\n secondaryRight: [],\n }\n};\n\nexport default Controls;\n","import PropTypes from 'prop-types';\nimport React, { Component } from 'react';\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport { t } from '@jotforminc/translation';\nimport { Button } from '@jotforminc/magnet';\nimport { IconTrashFilled } from '@jotforminc/svg-icons';\nimport { PaymentFields } from '../../../constants/Fields';\nimport { logJotFormEvents } from '../../../libs/Utils';\nimport * as actions from '../../../actions';\n\nexport class Remove extends Component {\n constructor(props) {\n super(props);\n this.handleOnClick = this.handleOnClick.bind(this);\n }\n\n handleOnClick(e) {\n e.stopPropagation();\n const {\n question: {\n qid,\n type,\n isPaymentStoreInBasicFields,\n nameAPM\n },\n actions: {\n updateFormProperty,\n deleteFormQuestion\n },\n user: {\n username,\n accountType\n }\n } = this.props;\n\n if (typeof isPaymentStoreInBasicFields !== 'undefined' && isPaymentStoreInBasicFields === true) {\n updateFormProperty({ isPaymentStoreInBasicFields: false });\n }\n\n if (PaymentFields.find(item => item.type === type)) {\n let target = { gateway: type };\n if (nameAPM) { target = { ...target, nameAPM }; }\n target = JSON.stringify(target);\n\n logJotFormEvents('addOrRemoveGatewayActions', {\n actor: username,\n action: 'remove-gateway',\n target: target\n }, accountType);\n }\n\n deleteFormQuestion(qid);\n }\n\n render() {\n return (\n \n {t('Remove')}\n \n );\n }\n}\n\nRemove.propTypes = {\n question: PropTypes.shape(),\n actions: PropTypes.shape({\n deleteFormQuestion: PropTypes.func,\n })\n};\n\nfunction mapDispatchToProps(dispatch) {\n return {\n actions: bindActionCreators(actions, dispatch)\n };\n}\n\nfunction mapStateToProps(state) {\n return {\n form: state.form\n };\n}\nexport default connect(mapStateToProps, mapDispatchToProps)(Remove);\n","import PropTypes from 'prop-types';\nimport React, { Component } from 'react';\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport { t } from '@jotforminc/translation';\n\nimport * as actions from '../../../actions';\n\nexport class Duplicate extends Component {\n constructor(props) {\n super(props);\n this.state = {\n isTooltipOpen: false\n };\n this.handleOnClick = this.handleOnClick.bind(this);\n }\n\n handleOnClick() {\n const question = { ...this.props.question };\n delete question.qid;\n delete question.order;\n this.props.actions.addNewQuestion(question, undefined, true);\n }\n\n render() {\n return (\n \n \n {t('Duplicate')}\n \n );\n }\n}\n\nDuplicate.propTypes = {\n question: PropTypes.shape(),\n actions: PropTypes.shape({\n addNewQuestion: PropTypes.func\n })\n};\n\nfunction mapDispatchToProps(dispatch) {\n return {\n actions: bindActionCreators(actions, dispatch)\n };\n}\n\nfunction mapStateToProps() {\n return { };\n}\nexport default connect(mapStateToProps, mapDispatchToProps)(Duplicate);\n","export default function generateAlignmentRule(value, extended) {\n const topRules = `\n display: block;\n float: none;\n text-align: left;\n width: 100%;\n `;\n const leftRightRules = `\n display: inline-block;\n float: left;\n text-align: ${value === 'Left' ? 'left' : 'right'};\n `;\n const alignmentRule = `\n ${extended ? '#stage' : ''} .form-label.form-label-auto {\n ${value === 'Top' ? topRules : leftRightRules}\n }\n `;\n return alignmentRule;\n}\n","import PropTypes from 'prop-types';\nimport React, { Component } from 'react';\nimport TetheredObject from 'react-tether';\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport { t } from '@jotforminc/translation';\n\nimport * as actions from '../../../actions';\nimport generateAlignmentRule from '../../../libs/generate_label_align_rules';\n\nexport class LabelAlign extends Component {\n constructor(props) {\n super(props);\n\n this.state = {\n isOpen: false\n };\n\n this.handleFormAlign = this.handleFormAlign.bind(this);\n this.renderDropDown = this.renderDropDown.bind(this);\n this.handleAlignClick = this.handleAlignClick.bind(this);\n this.handleMouseEnter = this.handleMouseEnter.bind(this);\n this.handleMouseLeave = this.handleMouseLeave.bind(this);\n this.generateAlignmentCSS = this.generateAlignmentCSS.bind(this);\n }\n\n handleMouseEnter() {\n this.setState({ isOpen: true });\n }\n\n handleMouseLeave() {\n this.setState({ isOpen: false });\n }\n\n handleAlignClick(e) {\n const newAlign = e.currentTarget.readAttribute('data-target');\n const { qid, labelAlign } = this.props.question;\n if (labelAlign === 'Auto') {\n const { injectCSS } = this.props.formProperties;\n const appendCSS = this.generateAlignmentCSS(newAlign);\n const selector = '.form-label.form-label-auto';\n // eslint-disable-next-line\n const pattern = new RegExp(selector.replace(/\\./g, '\\\\.') + '\\\\s*{[^}]*?}', 'gim');\n const newCSS = (appendCSS + injectCSS.replace(pattern, '')).replace('\\n \\n \\n', '\\n');\n this.props.actions.updateFormProperty({ alignment: newAlign, injectCSS: newCSS });\n } else {\n this.props.actions.updateFormQuestion(qid, { labelAlign: newAlign });\n }\n }\n\n handleFormAlign() {\n const { question } = this.props;\n const newAlign = question.labelAlign === 'Auto' ? this.props.formProperties.alignment : 'Auto';\n this.props.actions.updateFormQuestion(question.qid, { labelAlign: newAlign });\n }\n\n generateAlignmentCSS(alignment) {\n const generatedRule = generateAlignmentRule(alignment);\n const ruleBreak = ' /*APPEND RULE*/';\n const ruleString = [ruleBreak, generatedRule].join('\\n');\n const formStyleObj = global.document.getElementById('form-styles');\n formStyleObj.innerHTML = formStyleObj.innerHTML.split(ruleBreak)[0] + ruleString;\n return generatedRule;\n }\n\n renderDropDown() {\n let { labelAlign } = this.props.question;\n if (labelAlign === 'Auto') {\n labelAlign = this.props.formProperties.alignment;\n }\n\n return (\n \n {this.renderLeftAlign(labelAlign === 'Left')}\n {this.renderRightAlign(labelAlign === 'Right')}\n {this.renderTopAlign(labelAlign === 'Top')}\n {this.renderFormAlign()}\n \n );\n }\n\n renderLeftAlign(isSelected) {\n return (\n \n \n {t('Left Aligned')}\n \n );\n }\n\n renderRightAlign(isSelected) {\n return (\n \n \n {t('Right Aligned')}\n \n );\n }\n\n renderTopAlign(isSelected) {\n return (\n \n \n {t('Top Aligned')}\n \n );\n }\n\n renderFormAlign() {\n // ☐ ☐ Unchecked entity\n // ☑ ☑ Checked entity\n\n const { labelAlign } = this.props.question;\n // const alignIcon = labelAlign !== 'Auto' ? '☐' : '☑'; // This is temporary.\n const alignIcon2 = labelAlign !== 'Auto' ? 'ji ji-FW_other' : 'ji ji-FW_validation';\n return (\n \n \n \n {t('Use Form Default')}\n \n \n );\n }\n\n render() {\n const { isOpen } = this.state;\n let { labelAlign } = this.props.question;\n if (labelAlign === 'Auto') {\n labelAlign = this.props.formProperties.alignment;\n }\n const temp = labelAlign === 'Auto' ? 'ji ji-jif_align' : `ji ji-jif_align${labelAlign}`;\n return (\n \n { this.setState({ isOpen: !isOpen }); }}\n onMouseEnter={() => { this.setState({ isOpen }); }}\n onMouseLeave={() => { this.setState({ isOpen: false }); }}\n aria-label={t('Label Alignment')}\n >\n \n {t('Label Alignment')}\n \n {\n isOpen && this.renderDropDown()\n }\n \n );\n }\n}\n\nLabelAlign.propTypes = {\n question: PropTypes.shape(),\n actions: PropTypes.shape({\n updateFormQuestion: PropTypes.func,\n updateFormProperty: PropTypes.func\n }),\n formProperties: PropTypes.shape()\n};\n\nfunction mapDispatchToProps(dispatch) {\n return {\n actions: bindActionCreators(actions, dispatch)\n };\n}\n\nfunction mapStateToProps(state) {\n return {\n questions: state.questions,\n ui: state.ui,\n formProperties: state.formProperties\n };\n}\n\nexport default connect(mapStateToProps, mapDispatchToProps)(LabelAlign);\n","import PropTypes from 'prop-types';\nimport React, { Component } from 'react';\nimport TetheredObject from 'react-tether';\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport { t } from '@jotforminc/translation';\n\nimport * as actions from '../../../actions';\nimport IconSVG from '../../IconSVG';\n\nexport class TextAlign extends Component {\n constructor(props) {\n super(props);\n\n this.state = {\n isOpen: false\n };\n\n this.renderDropDown = this.renderDropDown.bind(this);\n this.handleAlignClick = this.handleAlignClick.bind(this);\n this.handleMouseEnter = this.handleMouseEnter.bind(this);\n this.handleMouseLeave = this.handleMouseLeave.bind(this);\n }\n\n handleMouseEnter() {\n this.setState({ isOpen: true });\n }\n\n handleMouseLeave() {\n this.setState({ isOpen: false });\n }\n\n handleAlignClick(e) {\n const newAlign = e.currentTarget.readAttribute('data-target');\n const { qid } = this.props.question;\n this.props.actions.updateFormQuestion(qid, { textAlign: newAlign });\n }\n\n renderDropDown() {\n const { textAlign } = this.props.question;\n\n return (\n \n {this.renderLeftAlign(textAlign === 'Left')}\n {this.renderCenterAlign(textAlign === 'Center')}\n {this.renderRightAlign(textAlign === 'Right')}\n \n );\n }\n\n renderLeftAlign(isSelected) {\n return (\n \n \n {' '}\n {t('Left Aligned')}\n \n );\n }\n\n renderCenterAlign(isSelected) {\n return (\n \n \n {' '}\n {t('Center Aligned')}\n \n );\n }\n\n renderRightAlign(isSelected) {\n return (\n \n \n {' '}\n {t('Right Aligned')}\n \n );\n }\n\n renderToolTip() {\n return (\n \n \n \n {t('Text Alignment')}\n \n \n \n );\n }\n /* eslint-enable */\n\n render() {\n const { isOpen } = this.state;\n // const { isOpen } = 1;\n const { textAlign } = this.props.question;\n const temp = (textAlign === 'Center') ? 'textAlignCenter' : `textAlign${textAlign}`;\n return (\n \n { this.setState({ isOpen: !isOpen }); }}\n onMouseEnter={() => { this.setState({ isOpen }); }}\n // onMouseLeave={() => { this.setState({ isOpen: false }); }}\n aria-label={t('Text Alignment')}\n >\n \n {t('Text Alignment')}\n \n {\n isOpen && this.renderDropDown()\n }\n \n );\n }\n}\n\nTextAlign.propTypes = {\n question: PropTypes.shape(),\n actions: PropTypes.shape({\n updateFormQuestion: PropTypes.func,\n })\n};\n\nfunction mapDispatchToProps(dispatch) {\n return {\n actions: bindActionCreators(actions, dispatch)\n };\n}\n\nfunction mapStateToProps(state) {\n return {\n questions: state.questions,\n ui: state.ui,\n formProperties: state.formProperties\n };\n}\n\nexport default connect(mapStateToProps, mapDispatchToProps)(TextAlign);\n","import PropTypes from 'prop-types';\nimport React, { Component } from 'react';\nimport TetheredObject from 'react-tether';\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport { t } from '@jotforminc/translation';\n\nimport * as actions from '../../../actions';\nimport IconSVG from '../../IconSVG';\n\nexport class ButtonAlign extends Component {\n constructor(props) {\n super(props);\n\n this.state = {\n isOpen: false,\n isTooltipOpen: false\n };\n\n this.renderDropDown = this.renderDropDown.bind(this);\n this.handleAlignClick = this.handleAlignClick.bind(this);\n this.handleMouseEnter = this.handleMouseEnter.bind(this);\n this.handleMouseLeave = this.handleMouseLeave.bind(this);\n }\n\n handleMouseEnter() {\n this.setState({ isOpen: true });\n }\n\n handleMouseLeave() {\n this.setState({ isOpen: false });\n }\n\n handleAlignClick(e) {\n const newAlign = e.currentTarget.readAttribute('data-target');\n const { qid } = this.props.question;\n this.props.actions.updateFormQuestion(qid, { buttonAlign: newAlign });\n }\n\n renderDropDown() {\n const { buttonAlign } = this.props.question;\n\n return (\n \n {this.renderAutoAlign(buttonAlign === 'Auto')}\n {this.renderLeftAlign(buttonAlign === 'Left')}\n {this.renderCenterAlign(buttonAlign === 'Center')}\n {this.renderRightAlign(buttonAlign === 'Right')}\n \n );\n }\n\n renderLeftAlign(isSelected) {\n return (\n \n \n {' '}\n {t('Left Aligned')}\n \n );\n }\n\n renderCenterAlign(isSelected) {\n return (\n \n \n {' '}\n {t('Center Aligned')}\n \n );\n }\n\n renderRightAlign(isSelected) {\n return (\n \n \n {' '}\n {t('Right Aligned')}\n \n );\n }\n\n renderAutoAlign(isSelected) {\n return (\n \n \n {' '}\n {t('Auto Aligned')}\n \n );\n }\n\n render() {\n const { isOpen } = this.state;\n const { buttonAlign } = this.props.question;\n const temp = (buttonAlign === 'Center') ? 'textAlignCenter' : `textAlign${buttonAlign}`;\n return (\n \n { this.setState({ isOpen: !isOpen }); }}\n onMouseEnter={() => { this.setState({ isOpen }); }}\n onMouseLeave={() => { this.setState({ isOpen: false }); }}\n aria-label={t('Button Alignment')}\n >\n {\n buttonAlign === 'Auto' ? : \n }\n {t('Button Alignment')}\n \n {\n isOpen && this.renderDropDown()\n }\n \n );\n }\n}\n\nButtonAlign.propTypes = {\n question: PropTypes.shape(),\n actions: PropTypes.shape({\n updateFormQuestion: PropTypes.func,\n })\n};\n\nfunction mapDispatchToProps(dispatch) {\n return {\n actions: bindActionCreators(actions, dispatch)\n };\n}\n\nfunction mapStateToProps(state) {\n return {\n questions: state.questions,\n ui: state.ui,\n formProperties: state.formProperties\n };\n}\n\nexport default connect(mapStateToProps, mapDispatchToProps)(ButtonAlign);\n","import PropTypes from 'prop-types';\nimport React, { Component } from 'react';\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport { t } from '@jotforminc/translation';\n\nimport * as actions from '../../../actions';\n\nexport class Required extends Component {\n constructor(props) {\n super(props);\n this.handleOnClick = this.handleOnClick.bind(this);\n }\n\n handleOnClick(e) {\n e.stopPropagation();\n const { qid, required } = this.props.question;\n const newValue = required === 'No' ? 'Yes' : 'No';\n this.props.actions.updateFormQuestion(qid, { required: newValue });\n }\n\n render() {\n const { required } = this.props.question;\n\n return (\n \n \n {t('Required')}\n \n );\n }\n}\n\nRequired.propTypes = {\n question: PropTypes.shape(),\n actions: PropTypes.shape({\n updateFormQuestion: PropTypes.func,\n }),\n};\n\nfunction mapDispatchToProps(dispatch) {\n return {\n actions: bindActionCreators(actions, dispatch)\n };\n}\n\nfunction mapStateToProps() {\n return {};\n}\nexport default connect(mapStateToProps, mapDispatchToProps)(Required);\n","import PropTypes from 'prop-types';\nimport React, { Component } from 'react';\nimport { withRouter } from 'react-router-dom';\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport { t } from '@jotforminc/translation';\nimport { Button } from '@jotforminc/magnet';\nimport { IconConditionalBranchFilled } from '@jotforminc/svg-icons';\n\nimport * as actions from '../../../actions';\n\nexport class Conditions extends Component {\n constructor(props) {\n super(props);\n this.state = {\n isTooltipOpen: false\n };\n this.handleClick = this.handleClick.bind(this);\n }\n\n handleClick() {\n const route = `/${global.__BASE_ROUTE_PATH}/${this.props.form.id}/settings/conditions/${this.props.question.qid}`;\n this.props.history.push(route);\n }\n\n render() {\n return (\n \n {t('Conditions')}\n \n );\n }\n}\n\nConditions.propTypes = {\n question: PropTypes.shape(),\n form: PropTypes.shape()\n};\n\nfunction mapDispatchToProps(dispatch) {\n return {\n actions: bindActionCreators(actions, dispatch)\n };\n}\n\nfunction mapStateToProps(state) {\n return {\n form: state.form\n };\n}\nexport default connect(mapStateToProps, mapDispatchToProps)(withRouter(Conditions));\n","import PropTypes from 'prop-types';\nimport React, { Component } from 'react';\nimport { connect } from 'react-redux';\nimport { bindActionCreators } from 'redux';\nimport { t } from '@jotforminc/translation';\n\nimport * as actions from '../../../actions';\n\nexport class Shrink extends Component {\n constructor(props) {\n super(props);\n this.state = {\n isTooltipOpen: false\n };\n this.toggleShrink = this.toggleShrink.bind(this);\n }\n\n handleMouseEnter() {\n this.setState({ isTooltipOpen: true });\n }\n\n handleMouseLeave() {\n this.setState({ isTooltipOpen: false });\n }\n\n toggleShrink() {\n const { question } = this.props;\n const shrink = question.shrink === 'Yes' ? 'No' : 'Yes';\n const labelAlign = shrink === 'Yes' ? 'Top' : 'Auto';\n this.props.actions.updateFormQuestion(question.qid, { shrink, labelAlign });\n }\n\n render() {\n const iconClass = this.props.question.shrink === 'Yes' ? 'ji ji-jif_expand' : 'ji ji-jif_shrink';\n return (\n \n \n {t('Shrink')}\n \n );\n }\n}\n\nShrink.propTypes = {\n question: PropTypes.shape(),\n actions: PropTypes.shape({\n updateFormQuestion: PropTypes.func\n })\n};\n\nfunction mapDispatchToProps(dispatch) {\n return {\n actions: bindActionCreators(actions, dispatch)\n };\n}\n\nfunction mapStateToProps() {\n return {};\n}\n\nexport default connect(mapStateToProps, mapDispatchToProps)(Shrink);\n","import PropTypes from 'prop-types';\nimport React, { Component } from 'react';\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport { t } from '@jotforminc/translation';\nimport { Button } from '@jotforminc/magnet';\nimport {\n IconGearFilled,\n IconCoinsFilled,\n IconHeartFilled\n} from '@jotforminc/svg-icons';\nimport PAYMENT_TYPES from '../../../constants/payment_types';\n\nimport * as actions from '../../../actions';\n\nexport class Properties extends Component {\n constructor(props) {\n super(props);\n this.handleClick = this.handleClick.bind(this);\n }\n\n handleClick(e) {\n const {\n ui: { rightPanelMode, isRightPanelOpen },\n actions: { updateQuestionPropertiesActiveTab, rightPanelToggle, updateRightPanelMode }\n } = this.props;\n if (rightPanelMode === 'questionsettings') {\n rightPanelToggle(!isRightPanelOpen);\n } else if (rightPanelMode === 'paymentproperties') {\n updateRightPanelMode('questionsettings', true);\n rightPanelToggle(true);\n updateQuestionPropertiesActiveTab('paymentGeneral');\n } else {\n updateRightPanelMode('questionsettings', true);\n rightPanelToggle(true);\n }\n\n e.stopPropagation();\n }\n\n getPaymentDonationProperty(propertyType) {\n const {\n actions: { isReusableConnectionEnabled },\n question\n } = this.props;\n\n if (!isReusableConnectionEnabled()) { return false; }\n\n if (PAYMENT_TYPES.includes(question.type) && question.paymentType === 'donation') {\n const donationProperties = {\n donation: {\n label: 'Donation',\n icon: IconHeartFilled\n },\n custom: {\n label: 'User Defined Amount',\n icon: IconCoinsFilled\n }\n };\n return question.nonprofit === 'Yes' ? donationProperties.donation[propertyType] : donationProperties.custom[propertyType];\n }\n\n return false;\n }\n\n getLabelText() {\n const donationLabel = this.getPaymentDonationProperty('label');\n if (donationLabel) { return donationLabel; }\n\n return 'Properties';\n }\n\n getCn() {\n const donationIcon = this.getPaymentDonationProperty('icon');\n if (donationIcon) { return donationIcon; }\n\n return IconGearFilled;\n }\n\n render() {\n return (\n \n {t(this.getLabelText())}\n \n );\n }\n}\n\nProperties.propTypes = {\n actions: PropTypes.shape({\n rightPanelToggle: PropTypes.func,\n updateRightPanelMode: PropTypes.func,\n }),\n ui: PropTypes.shape()\n};\n\nfunction mapDispatchToProps(dispatch) {\n return {\n actions: bindActionCreators(actions, dispatch)\n };\n}\n\nfunction mapStateToProps(state) {\n return {\n ui: state.ui,\n questions: state.questions\n };\n}\n\nexport default connect(mapStateToProps, mapDispatchToProps)(Properties);\n","import PropTypes from 'prop-types';\nimport React, { Component } from 'react';\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport { t } from '@jotforminc/translation';\nimport { Button } from '@jotforminc/magnet';\nimport { IconWandMagicFilled } from '@jotforminc/svg-icons';\n\nimport * as actions from '../../../actions';\n\nexport class Payments extends Component {\n constructor(props) {\n super(props);\n this.state = {\n isTooltipOpen: false\n };\n this.isFormTypeLegacy = this.isFormTypeLegacy.bind(this);\n this.isPaypalGateway = this.isPaypalGateway.bind(this);\n this.getPaypalGatewayQuestionID = this.getPaypalGatewayQuestionID.bind(this);\n this.handleClick = this.handleClick.bind(this);\n }\n\n getPaypalGatewayQuestionID() {\n const { questions } = this.props;\n\n for (let i = 0; questions.length; i++) {\n if (questions[i] && questions[i].type === 'control_paypalSPB') {\n return questions[i].qid;\n }\n }\n\n return null;\n }\n\n isPaypalGateway() {\n const { questions } = this.props;\n return questions.find(q => q.type === 'control_paypalSPB');\n }\n\n isFormTypeLegacy() {\n const { formType } = this.props;\n return formType !== 'cardForm';\n }\n\n handleClick() {\n const { rightPanelMode } = this.props.ui;\n\n setTimeout(() => {\n if (this.isPaypalGateway() && this.isFormTypeLegacy()) {\n this.props.actions.updateSelectedQuestion(this.getPaypalGatewayQuestionID());\n this.props.actions.updateRightPanelMode('paymentsettings');\n this.props.actions.rightPanelToggle(true);\n return;\n }\n }, 0);\n\n if (rightPanelMode === 'paymentsettings') {\n this.props.actions.rightPanelToggle(!this.props.ui.isRightPanelOpen);\n } else {\n this.props.actions.openPaymentWizard('', '', true);\n }\n }\n\n render() {\n return (\n \n {t('Payment Settings')}\n \n );\n }\n}\n\nPayments.propTypes = {\n actions: PropTypes.shape({\n rightPanelToggle: PropTypes.func,\n openPaymentWizard: PropTypes.func,\n updateSelectedQuestion: PropTypes.func\n }),\n ui: PropTypes.shape(),\n questions: PropTypes.arrayOf(PropTypes.shape())\n};\n\nfunction mapDispatchToProps(dispatch) {\n return {\n actions: bindActionCreators(actions, dispatch)\n };\n}\n\nfunction mapStateToProps(state) {\n return {\n ui: state.ui,\n questions: state.questions,\n users: state.users,\n formType: state.formProperties.formType\n };\n}\n\nexport default connect(mapStateToProps, mapDispatchToProps)(Payments);\n","import PropTypes from 'prop-types';\nimport React, { Component } from 'react';\nimport { bindActionCreators } from 'redux';\nimport isUndefined from 'lodash/isUndefined';\nimport { connect } from 'react-redux';\nimport { PaymentActions } from '@jotforminc/builder-components';\nimport { t } from '@jotforminc/translation';\nimport { Button } from '@jotforminc/magnet';\nimport { IconCreditCardPlusFilled, IconCreditCardXmarkFilled } from '@jotforminc/svg-icons';\nimport * as actions from '../../../actions';\n\nexport class AddAndRemovePaymentIntegration extends Component {\n constructor(props) {\n super(props);\n this.state = {\n isTooltipOpen: false\n };\n this.isFormTypeLegacy = this.isFormTypeLegacy.bind(this);\n this.followPaymentStoreProp = this.followPaymentStoreProp.bind(this);\n this.paymentStoreAddedFromInBasicFields = this.paymentStoreAddedFromInBasicFields.bind(this);\n this.handleRemoveIntegrationClick = this.handleRemoveIntegrationClick.bind(this);\n this.handleAddPaymentIntegrationClick = this.handleAddPaymentIntegrationClick.bind(this);\n }\n\n followPaymentStoreProp() {\n const { question } = this.props;\n return !isUndefined(question.isPaymentStoreInBasicFields) && (question.isPaymentStoreInBasicFields === true || question.isPaymentStoreInBasicFields === '1');\n }\n\n paymentStoreAddedFromInBasicFields() {\n const { questions } = this.props;\n return questions.find(q => q.type === 'control_payment');\n }\n\n isFormTypeLegacy() {\n const { formType } = this.props;\n return formType !== 'cardForm';\n }\n\n handleRemoveIntegrationClick(e) {\n e.stopPropagation();\n const { qid } = this.props.question;\n this.props.actions.deleteFormQuestion(qid, undefined, true);\n this.props.actions.addNewQuestion({ type: 'control_payment', isPaymentStoreInBasicFieldsRemoveAction: true });\n }\n\n handleAddPaymentIntegrationClick(e) {\n e.stopPropagation();\n const { question: { type, nameAPM }, actions: { openPaymentWizard, setPaymentProductList } } = this.props;\n if (type === 'control_payment' && nameAPM) {\n openPaymentWizard('', '');\n PaymentActions.changeMode('gatewayselectioneditor');\n } else {\n setPaymentProductList(true);\n }\n }\n\n render() {\n let addRemoveIntegrationListButtons = null;\n\n if (this.followPaymentStoreProp()) {\n if (this.paymentStoreAddedFromInBasicFields()) {\n addRemoveIntegrationListButtons = (\n \n {t('Add Integration')}\n \n );\n } else {\n addRemoveIntegrationListButtons = (\n \n {t('Remove Integration')}\n \n );\n }\n }\n\n return (\n \n { addRemoveIntegrationListButtons }\n \n );\n }\n}\n\nAddAndRemovePaymentIntegration.propTypes = {\n actions: PropTypes.shape({\n rightPanelToggle: PropTypes.func,\n openPaymentWizard: PropTypes.func,\n updateSelectedQuestion: PropTypes.func,\n setSwitchAnotherGateway: PropTypes.func,\n setPaymentProductList: PropTypes.func\n }),\n questions: PropTypes.arrayOf(PropTypes.shape({\n type: PropTypes.string,\n nameAPM: PropTypes.string\n }))\n};\n\nfunction mapDispatchToProps(dispatch) {\n return {\n actions: bindActionCreators(actions, dispatch)\n };\n}\n\nfunction mapStateToProps(state) {\n return {\n ui: state.ui,\n questions: state.questions,\n users: state.users,\n formType: state.formProperties.formType\n };\n}\n\nexport default connect(mapStateToProps, mapDispatchToProps)(AddAndRemovePaymentIntegration);\n","import PropTypes from 'prop-types';\nimport React, { Component } from 'react';\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport { PaymentActions } from '@jotforminc/builder-components';\nimport { t } from '@jotforminc/translation';\nimport { Button } from '@jotforminc/magnet';\nimport { IconCartShoppingFilled } from '@jotforminc/svg-icons';\n\nimport * as actions from '../../../actions';\n\nexport class ProductList extends Component {\n constructor(props) {\n super(props);\n this.state = {\n isTooltipOpen: false\n };\n this.handleClick = this.handleClick.bind(this);\n }\n\n handleClick() {\n this.props.actions.openPaymentWizard('', '');\n try {\n setTimeout(() => {\n PaymentActions.changeMode('launcher');\n }, 0);\n } catch (err) {\n // Nothing\n }\n }\n\n render() {\n let productListButton = null;\n\n productListButton = (\n \n {t('Product List')}\n \n );\n\n return (\n \n { productListButton }\n \n );\n }\n}\n\nProductList.propTypes = {\n actions: PropTypes.shape({\n rightPanelToggle: PropTypes.func,\n openPaymentWizard: PropTypes.func,\n updateSelectedQuestion: PropTypes.func\n })\n // questions: PropTypes.arrayOf(PropTypes.shape())\n};\n\nfunction mapDispatchToProps(dispatch) {\n return {\n actions: bindActionCreators(actions, dispatch)\n };\n}\n\nfunction mapStateToProps(state) {\n return {\n ui: state.ui,\n questions: state.questions,\n users: state.users,\n formType: state.formProperties.formType\n };\n}\n\nexport default connect(mapStateToProps, mapDispatchToProps)(ProductList);\n","import PropTypes from 'prop-types';\nimport React, { Component } from 'react';\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport { IconCoinsStackedFilled } from '@jotforminc/svg-icons';\nimport { t } from '@jotforminc/translation';\nimport { Button } from '@jotforminc/magnet';\n\nimport * as actions from '../../../actions';\n\nexport class SubscriptionList extends Component {\n constructor(props) {\n super(props);\n this.handleClick = this.handleClick.bind(this);\n }\n\n handleClick() {\n const { actions: { openPaymentWizard } } = this.props;\n openPaymentWizard('', '');\n }\n\n render() {\n return (\n \n {t('Subscription List')}\n \n );\n }\n}\n\nSubscriptionList.propTypes = {\n actions: PropTypes.shape({ openPaymentWizard: PropTypes.func })\n};\n\nfunction mapDispatchToProps(dispatch) {\n return {\n actions: bindActionCreators(actions, dispatch)\n };\n}\n\nexport default connect(null, mapDispatchToProps)(SubscriptionList);\n","import PropTypes from 'prop-types';\nimport React, { Component } from 'react';\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport { t } from '@jotforminc/translation';\nimport {\n IconCreditCardFilled,\n IconExclamation\n} from '@jotforminc/svg-icons';\nimport { Button, Badge } from '@jotforminc/magnet';\nimport * as actions from '../../../actions';\n\nconst BADGE_BG_CLASS = {\n warning: 'bg-yellow-600',\n error: 'bg-red-400'\n};\n\nexport class PaymentSettings extends Component {\n constructor(props) {\n super(props);\n this.handleClick = this.handleClick.bind(this);\n this.endIcon = this.endIcon.bind(this);\n }\n\n handleClick() {\n const { actions: { updateRightPanelMode, rightPanelToggle } } = this.props;\n updateRightPanelMode('paymentproperties', true);\n rightPanelToggle(true);\n }\n\n endIcon() {\n const { ui: { paymentConnectionBuilderBtnStatus } } = this.props;\n if (!['warning', 'error'].includes(paymentConnectionBuilderBtnStatus)) {\n return null;\n }\n return (\n ()}\n />\n );\n }\n\n render() {\n return (\n \n {t('Payment Properties')}\n \n );\n }\n}\n\nPaymentSettings.propTypes = {\n actions: PropTypes.shape({\n rightPanelToggle: PropTypes.func,\n openPaymentWizard: PropTypes.func,\n updateSelectedQuestion: PropTypes.func\n })\n};\n\nfunction mapDispatchToProps(dispatch) {\n return {\n actions: bindActionCreators(actions, dispatch)\n };\n}\n\nfunction mapStateToProps(state) {\n return {\n ui: state.ui,\n questions: state.questions,\n users: state.users,\n formType: state.formProperties.formType\n };\n}\n\nexport default connect(mapStateToProps, mapDispatchToProps)(PaymentSettings);\n","import PropTypes from 'prop-types';\nimport React, { Component } from 'react';\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport { t } from '@jotforminc/translation';\n\nimport * as actions from '../../../actions';\n\nexport class Visibility extends Component {\n constructor(props) {\n super(props);\n this.state = {\n isTooltipOpen: false\n };\n this.toggleVisibility = this.toggleVisibility.bind(this);\n }\n\n toggleVisibility() {\n const { question } = this.props;\n const hidden = question.hidden === 'Yes' ? 'No' : 'Yes';\n this.props.actions.updateFormQuestion(question.qid, { hidden });\n }\n\n render() {\n const { question } = this.props;\n const iconClass = question.hidden === 'Yes' ? 'ji ji-jif_show' : 'ji ji-jif_hide';\n const visibilityText = this.props.question.hidden === 'Yes' ? 'Show question' : 'Hide question';\n\n return (\n \n \n {t(visibilityText)}\n \n );\n }\n}\n\nVisibility.propTypes = {\n question: PropTypes.shape(),\n actions: PropTypes.shape({\n updateFormQuestion: PropTypes.func\n })\n};\n\nfunction mapDispatchToProps(dispatch) {\n return {\n actions: bindActionCreators(actions, dispatch)\n };\n}\n\nfunction mapStateToProps() {\n return { };\n}\n\nexport default connect(mapStateToProps, mapDispatchToProps)(Visibility);\n","import PropTypes from 'prop-types';\nimport React, { Component } from 'react';\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport { t } from '@jotforminc/translation';\nimport { Button } from '@jotforminc/magnet';\nimport { IconChevronDown, IconChevronUp } from '@jotforminc/svg-icons';\nimport * as actions from '../../../actions';\n\nexport class Order extends Component {\n constructor(props) {\n super(props);\n\n this.state = {\n isOpen: false\n };\n }\n\n updateQuestionOrder(type) {\n const { question } = this.props;\n const { order } = question;\n const { questions } = this.props;\n const firstPart = questions.slice(0, (order - 1));\n const lastPart = questions.slice(order, questions.length);\n const newQuestions = [...firstPart, ...lastPart]; // remove question from questions array\n const newOrderIndex = type === 'increase' ? order : (order - 2);\n newQuestions.splice(newOrderIndex, 0, question); // add question to array with new order\n\n // There shouldn't be a question under paymentmethods question.\n if (type === 'increase' && lastPart[0] && lastPart[0].type === 'control_paymentmethods') {\n return;\n }\n\n // Re assign orders\n const data = newQuestions.map((q, idx) => {\n return {\n qid: q.qid,\n order: idx + 1,\n type: q.type\n };\n }, {});\n\n // update orders\n this.props.actions.updateMultipleFormQuestions(data);\n\n this.setState({ isOpen: false });\n }\n\n render() {\n const { questions, question } = this.props;\n const isFirstQuestion = questions.indexOf(question) === 0;\n const isLastQuestion = questions.indexOf(question) === (questions.length - 1);\n return (\n
    \n { !isFirstQuestion\n && (\n { this.updateQuestionOrder('decrease'); }}\n aria-label={t('Decrease order of the question')}\n />\n )}\n { !isLastQuestion\n && (\n { this.updateQuestionOrder('increase'); }}\n aria-label={t('Increase order of the question')}\n />\n )}\n
    \n );\n }\n}\n\nOrder.propTypes = {\n question: PropTypes.shape(),\n questions: PropTypes.arrayOf(PropTypes.shape()),\n actions: PropTypes.shape({\n updateMultipleFormQuestions: PropTypes.func\n })\n};\n\nfunction mapDispatchToProps(dispatch) {\n return {\n actions: bindActionCreators(actions, dispatch)\n };\n}\n\nfunction mapStateToProps(state) {\n return {\n questions: state.questions\n };\n}\n\nexport default connect(mapStateToProps, mapDispatchToProps)(Order);\n","import PropTypes from 'prop-types';\nimport React, { Component } from 'react';\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport find from 'lodash/find';\nimport { t } from '@jotforminc/translation';\nimport { Button } from '@jotforminc/magnet';\nimport { IconWandMagicFilled } from '@jotforminc/svg-icons';\n\nimport * as actions from '../../../actions';\nimport { nativeWidgets } from '../../../constants/Fields';\n\nexport class Settings extends Component {\n constructor(props) {\n super(props);\n this.state = {\n isTooltipOpen: false\n };\n this.handleClick = this.handleClick.bind(this);\n }\n\n handleClick(e) {\n const { rightPanelMode } = this.props.ui;\n if (rightPanelMode === 'widgetsettings') {\n this.props.actions.rightPanelToggle(!this.props.ui.isRightPanelOpen);\n } else {\n this.props.actions.updateRightPanelMode('widgetsettings', true);\n this.props.actions.rightPanelToggle(true);\n }\n e.stopPropagation();\n }\n\n render() {\n const { question } = this.props;\n const hasCustomCSS = question.settingNames && question.settingNames.indexOf('customCSS') > -1;\n\n let widgetButton = (\n \n {t('Widget Settings')}\n \n );\n\n if (\n (question.fieldParameters && question.fieldParameters.length > 0)\n || (!nativeWidgets.some(widget => widget.type === question.type) && question.selectedField)\n || question.widgetType === 'widget'\n || question.type === 'control_calculation'\n || hasCustomCSS\n ) {\n return widgetButton;\n } if (question.type === 'control_widget' && question.selectedField) {\n const widget = find(this.props.widgets, w => w.client_id === question.selectedField);\n if (!(widget && widget.fieldParameters && widget.fieldParameters.length > 0)) {\n widgetButton = null;\n }\n } else if (!question.selectedField || nativeWidgets.some(widget => widget.type === question.type)) {\n widgetButton = null;\n }\n\n return widgetButton;\n }\n}\n\nSettings.propTypes = {\n actions: PropTypes.shape({\n rightPanelToggle: PropTypes.func,\n updateRightPanelMode: PropTypes.func,\n }),\n ui: PropTypes.shape(),\n widgets: PropTypes.arrayOf(PropTypes.shape()),\n question: PropTypes.shape(),\n};\n\nfunction mapDispatchToProps(dispatch) {\n return {\n actions: bindActionCreators(actions, dispatch)\n };\n}\n\nfunction mapStateToProps(state) {\n return {\n ui: state.ui,\n widgets: state.widgets,\n questions: state.questions\n };\n}\n\nexport default connect(mapStateToProps, mapDispatchToProps)(Settings);\n","import PropTypes from 'prop-types';\nimport React, { Component } from 'react';\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport { t } from '@jotforminc/translation';\nimport { Button } from '@jotforminc/magnet';\nimport { IconWandMagicFilled } from '@jotforminc/svg-icons';\n\nimport * as actions from '../../../actions';\n\nexport class ImageSettings extends Component {\n constructor(props) {\n super(props);\n this.state = {\n isTooltipOpen: false\n };\n this.handleClick = this.handleClick.bind(this);\n }\n\n handleClick(e) {\n const { rightPanelMode } = this.props.ui;\n if (rightPanelMode === 'imagesettings') {\n this.props.actions.rightPanelToggle(!this.props.ui.isRightPanelOpen);\n } else {\n this.props.actions.updateRightPanelMode('imagesettings', true);\n this.props.actions.rightPanelToggle(true);\n }\n e.stopPropagation();\n }\n\n render() {\n return (\n \n {t('Image Settings')}\n \n );\n }\n}\n\nImageSettings.propTypes = {\n actions: PropTypes.shape({\n rightPanelToggle: PropTypes.func,\n updateRightPanelMode: PropTypes.func,\n }),\n ui: PropTypes.shape()\n};\n\nfunction mapDispatchToProps(dispatch) {\n return {\n actions: bindActionCreators(actions, dispatch)\n };\n}\n\nfunction mapStateToProps(state) {\n return {\n ui: state.ui\n };\n}\n\nexport default connect(mapStateToProps, mapDispatchToProps)(ImageSettings);\n","import PropTypes from 'prop-types';\nimport React, { Component } from 'react';\nimport { connect } from 'react-redux';\nimport { bindActionCreators } from 'redux';\nimport { t } from '@jotforminc/translation';\nimport { Button } from '@jotforminc/magnet';\nimport { IconPencilFilled, IconCheckCircleFilled } from '@jotforminc/svg-icons';\n\nimport * as actions from '../../../actions';\nimport { saveRichTextEditor } from '../../../libs/FormPageUtils';\n\nexport class RichText extends Component {\n constructor(props) {\n super(props);\n this.state = {\n isTooltipOpen: false\n };\n this.toggleEditor = this.toggleEditor.bind(this);\n }\n\n toggleEditor() {\n const { openRichTextFor } = this.props.ui;\n const { question } = this.props;\n const { updateFormQuestion, addNotification, toggleRichTextEditorForQuestion, } = this.props.actions;\n\n if (openRichTextFor === question.qid) { // close\n try {\n saveRichTextEditor({\n question,\n addNotification,\n updateFormQuestion,\n toggleRichTextEditorForQuestion\n });\n } catch (E) {\n /* eslint-disable no-console */\n console.error('An error occured while saving richText', E);\n /* eslint-enable no-console */\n }\n } else {\n setTimeout(() => {\n toggleRichTextEditorForQuestion(question.qid, true);\n }, 100);\n }\n }\n\n render() {\n const richTextOpened = this.props.ui.openRichTextFor === this.props.question.qid;\n let innerEl = 'Edit Text';\n let richTextIcon = IconPencilFilled;\n if (richTextOpened) {\n innerEl = 'Save';\n richTextIcon = IconCheckCircleFilled;\n }\n\n return (\n \n {t(innerEl)}\n \n );\n }\n}\n\nRichText.propTypes = {\n question: PropTypes.shape(),\n actions: PropTypes.shape({\n updateFormQuestion: PropTypes.func,\n toggleRichTextEditorForQuestion: PropTypes.func\n }),\n ui: PropTypes.shape()\n};\n\nfunction mapDispatchToProps(dispatch) {\n return {\n actions: bindActionCreators(actions, dispatch),\n };\n}\n\nfunction mapStateToProps(state) {\n return {\n ui: state.ui\n };\n}\n\nexport default connect(mapStateToProps, mapDispatchToProps)(RichText);\n","import React from 'react';\nimport { connect } from 'react-redux';\nimport { withRouter } from 'react-router-dom';\nimport { t } from '@jotforminc/translation';\nimport { Button } from '@jotforminc/magnet';\nimport { IconPenSignFilled } from '@jotforminc/svg-icons';\nimport { func, shape, string } from 'prop-types';\n\nconst SignAutomationSettings = ({ form: { id: formID }, history }) => {\n const handleButtonClick = () => history.push(`/${global.__BASE_ROUTE_PATH}/${formID}/settings/sign`);\n\n return (\n \n {t('Sign Automation')}\n \n );\n};\n\nSignAutomationSettings.propTypes = {\n form: shape({ id: string.isRequired }).isRequired,\n history: shape({ push: func.isRequired }).isRequired\n};\n\nconst mapStateToProps = state => ({ form: state.form });\n\nexport default connect(mapStateToProps)(withRouter(SignAutomationSettings));\n","// for development purposes of left menu of selected field\n// will be removed after impelementation completed\n/* eslint-disable */\nimport tmpRemove from '../selectedcontrolsvertical/Remove';\nimport tmpDuplicate from '../selectedcontrolsvertical/Duplicate';\nimport tmpLabelAlign from '../selectedcontrolsvertical/LabelAlign';\nimport tmpTextAlign from '../selectedcontrolsvertical/TextAlign';\nimport tmpButtonAlign from '../selectedcontrolsvertical/ButtonAlign';\nimport tmpRequired from '../selectedcontrolsvertical/Required';\nimport tmpConditions from '../selectedcontrolsvertical/Conditions';\nimport tmpShrink from '../selectedcontrolsvertical/Shrink';\nimport tmpProperties from '../selectedcontrolsvertical/Properties';\nimport tmpPayments from '../selectedcontrolsvertical/Payments';\nimport tmpAddAndRemovePaymentIntegration from '../selectedcontrolsvertical/AddAndRemovePaymentIntegration';\nimport tmpproductList from '../selectedcontrolsvertical/ProductList';\nimport tmpsubscriptionList from '../selectedcontrolsvertical/SubscriptionList';\nimport tmppaymentSettings from '../selectedcontrolsvertical/PaymentSettings';\nimport tmpVisibility from '../selectedcontrolsvertical/Visibility';\nimport tmpOrder from '../selectedcontrolsvertical/Order';\nimport tmpWidgetSettings from '../selectedcontrolsvertical/WidgetSettings';\nimport imageSettings from '../selectedcontrolsvertical/ImageSettings';\nimport tmpRichText from '../selectedcontrolsvertical/RichText';\nimport tmpSignAutomationSettings from '../selectedcontrolsvertical/SignAutomationSettings';\n\nlet exp = {\n remove: tmpRemove,\n duplicate: tmpDuplicate,\n labelAlign: tmpLabelAlign,\n textAlign: tmpTextAlign,\n buttonAlign: tmpButtonAlign,\n required: tmpRequired,\n conditions: tmpConditions,\n shrink: tmpShrink,\n properties: tmpProperties,\n visibility: tmpVisibility,\n order: tmpOrder,\n widgetSettings: tmpWidgetSettings,\n payments: tmpPayments,\n addAndRemovePaymentIntegration: tmpAddAndRemovePaymentIntegration,\n productList: tmpproductList,\n subscriptionList: tmpsubscriptionList,\n paymentSettings: tmppaymentSettings,\n imagesettings: imageSettings,\n richtext: tmpRichText,\n signAutomationSettings: tmpSignAutomationSettings,\n}\n\nexport default exp\n","import React from 'react';\nimport { connect } from 'react-redux';\nimport { t } from '@jotforminc/translation';\n\nimport { updateFormQuestion } from '../../actions';\nimport IconSVG from '../IconSVG';\n\nclass ProtectedToggle extends React.Component {\n constructor(props) {\n super(props);\n this.handleChange = this.handleChange.bind(this);\n this.handleLabelDblClick = this.handleLabelDblClick.bind(this);\n }\n\n handleChange(e) {\n const { qid } = this.props.question;\n const { checked } = e.currentTarget;\n const nextProtected = checked ? 'Yes' : 'No';\n\n this.props.dispatch(updateFormQuestion(qid, { protected: nextProtected }));\n }\n\n handleLabelDblClick(e) {\n // this prevents opening the right panel.\n e.stopPropagation();\n }\n\n render() {\n const { protected: protectedField = 'No' } = this.props.question;\n const isChecked = protectedField === 'Yes';\n\n return (\n \n );\n }\n}\n\nfunction mapStateToProps(state) {\n return {\n user: state.user,\n questions: state.questions,\n };\n}\n\nexport default connect(mapStateToProps)(ProtectedToggle);\n","import PropTypes from 'prop-types';\nimport React, { Component } from 'react';\nimport { t } from '@jotforminc/translation';\nimport { default as Controls } from './selectedcontrols/index'; // eslint-disable-line\nimport ProtectedToggle from './ProtectedToggle';\n\nexport default class SelectedControlMenu extends Component {\n constructor(props) {\n super(props);\n this.handleModeChange = this.handleModeChange.bind(this);\n this.handleScroll = this.handleScroll.bind(this);\n this.calculateViewState = this.calculateViewState.bind(this);\n this.calculateViewStateMargin = props.isWorkflowForm ? 30 : 120;\n this.state = {\n position: 'normal'\n };\n }\n\n componentDidMount() {\n this.rect = this.container.getBoundingClientRect();\n const stageElement = global.document.getElementById('stage');\n\n if (stageElement) {\n this.initialScroll = stageElement.scrollTop;\n\n this.setState({ // eslint-disable-line\n position: this.calculateViewState(this.rect, this.initialScroll, this.calculateViewStateMargin)\n });\n stageElement.addEventListener('scroll', this.handleScroll, true);\n }\n }\n\n UNSAFE_componentWillReceiveProps() {\n this.setState({\n mode: 'primary'\n });\n }\n\n componentWillUnmount() {\n const stageElem = global.document.getElementById('stage');\n if (stageElem) {\n stageElem.removeEventListener('scroll', this.handleScroll, true);\n }\n }\n\n handleScroll(e) {\n const position = this.calculateViewState(this.rect, e.target.scrollTop, this.calculateViewStateMargin);\n if (position !== this.state.position) {\n this.setState({\n position\n });\n }\n }\n\n calculateViewState(rect, currentScroll, topMargin) {\n const currentTop = rect.top - (currentScroll - this.initialScroll);\n const currentBottom = global.innerHeight - (rect.bottom) - (this.initialScroll - currentScroll);\n // console.log(`topMargin: ${currentTop}, bottomMargin: ${currentBottom}`);\n\n if (currentTop > topMargin && currentBottom > 0) {\n return 'normal';\n }\n\n if (currentTop < topMargin && currentBottom < 0) {\n return 'normal';\n }\n\n if (currentTop < topMargin) {\n return 'bottom';\n }\n\n if (currentBottom < 0) {\n return 'top';\n }\n\n return 'normal';\n }\n\n handleModeChange() {\n const { mode } = this.state;\n this.setState({\n mode: mode === 'secondary' ? 'primary' : 'secondary'\n });\n }\n\n /* eslint-disable complexity */\n createControlElements(config, prefix, isThereCondition, isPaymentStoreInBasicFields) {\n const {\n question,\n user,\n isReusableConnectionEnabled,\n isWorkflowForm\n } = this.props;\n const { paymentType, name } = question;\n const newPaymentFlow = isReusableConnectionEnabled;\n const notAllowedControlElementsForWorkflow = {\n heading: ['remove'],\n submit: ['remove'],\n outcomeID: ['remove', 'conditions'],\n signature: ['signAutomationSettings', 'conditions', 'remove']\n };\n\n return config.map((key, idx) => {\n const hideOldPaymentSettings = key === 'payments' && (isPaymentStoreInBasicFields || newPaymentFlow);\n const hideNewPaymentSettings = key === 'paymentSettings' && !newPaymentFlow;\n const hideProductListInNewFlow = key === 'productList' && newPaymentFlow && !['product'].includes(paymentType);\n const hideProductListInOldFlow = key === 'productList' && !newPaymentFlow && !isPaymentStoreInBasicFields;\n const hideSubscriptionListInNewFlow = key === 'subscriptionList' && newPaymentFlow && !['subscription'].includes(paymentType);\n const hideSubscriptionListInOldFlow = key === 'subscriptionList' && !newPaymentFlow;\n\n // Sorry for that but we need to do it here for stateless using.\n if (key === 'conditions' && !isThereCondition) {\n return null;\n }\n\n if (key === 'addAndRemovePaymentIntegration' && (!isPaymentStoreInBasicFields || newPaymentFlow)) { // we won't need this in new flow\n return null;\n }\n\n if (isWorkflowForm && notAllowedControlElementsForWorkflow?.[name]?.includes(key)) {\n return null;\n }\n\n if (\n hideProductListInOldFlow\n || hideProductListInNewFlow\n || hideOldPaymentSettings\n || hideNewPaymentSettings\n || hideSubscriptionListInNewFlow\n || hideSubscriptionListInOldFlow\n ) {\n return null;\n }\n\n if (\n key === 'signAutomationSettings'\n && (!user.allowSign\n || (question.type !== 'control_signature'\n && question.selectedField !== '529467003477f3512000001f' // smooth signature widget\n && question.selectedField !== '533a8c19a3f5fec35d00009a' // initials widget\n )\n )\n ) {\n return null;\n }\n\n const ControlClass = Controls[key];\n return (\n \n );\n });\n }\n /* eslint-enable complexity */\n\n render() {\n const {\n elements = {}, isSelected, isThereCondition, question, user, showProtectedToggle\n } = this.props;\n if (!isSelected) {\n return null;\n }\n\n let isPaymentStoreInBasicFields = false;\n if (question.isPaymentStoreInBasicFields === true || question.isPaymentStoreInBasicFields === '1') {\n isPaymentStoreInBasicFields = true;\n }\n const {\n primaryRight = [],\n primaryLeft = []\n } = elements;\n\n const primaryLeftEl = this.createControlElements(primaryLeft, 'pl', isThereCondition, isPaymentStoreInBasicFields);\n const primaryRightEl = this.createControlElements(primaryRight, 'pr', isThereCondition, isPaymentStoreInBasicFields);\n const positionClass = this.state.position !== 'normal' ? this.state.position : '';\n return (\n { this.container = ref; }}\n id=\"app_wizards\"\n className={`selectedControls ${positionClass}`}\n >\n \n {showProtectedToggle && (\n
    \n \n
    \n )}\n {primaryLeftEl}\n {primaryRightEl}\n \n \n );\n }\n}\n\nSelectedControlMenu.propTypes = {\n elements: PropTypes.shape(),\n question: PropTypes.shape(),\n isSelected: PropTypes.bool,\n isThereCondition: PropTypes.bool\n};\n","import PropTypes from 'prop-types';\nimport React from 'react';\n\nimport { t } from '@jotforminc/translation';\nimport { IconGridDotsVertical, IconExclamationCircleFilled, IconCheck } from '@jotforminc/svg-icons';\nimport Controls from '../../constants/primary_question_controls';\nimport { NonInputFields } from '../../constants/Fields';\nimport SelectedControlMenu from './SelectedControlMenu';\nimport IconSVG from '../IconSVG';\n\nconst MakeHighlightable = Component => {\n const Highlightable = props => {\n const {\n users,\n question,\n putControls,\n showMultiSelectCheckboxes,\n accessibility,\n accessibilityErrors,\n isHIPAAForm,\n isPDFImporter,\n calculationError,\n lineProps,\n isSelected,\n multiSelectQuestionFn,\n isThereCondition,\n user,\n disableDragHandle,\n children,\n isReusableConnectionEnabled,\n isWorkflowForm\n } = props;\n\n const { isCSICollaborator } = user;\n const isInput = NonInputFields.indexOf(question.type) < 0;\n const customizedConfigs = global.JOTFORM_ENV === 'ENTERPRISE' && typeof global.CUSTOMIZED_CONFIGS === 'object' && global.CUSTOMIZED_CONFIGS;\n const hideProtectedToggle = customizedConfigs && customizedConfigs.HIDE_HIPAA_PHI_INDICATORS === true;\n const showProtectedToggle = !hideProtectedToggle && isHIPAAForm && isInput && !isCSICollaborator;\n const showA11yWarning = accessibility === '1' && accessibilityErrors && accessibilityErrors.length > 0;\n const gravatars = users.map((collaborator, i) => {\n const { username, name } = collaborator;\n\n return (\n \n
    {name || username || 'n/a'}
    \n \n );\n });\n\n return (\n \n {showMultiSelectCheckboxes\n && (\n
    \n \n
    \n \n
    \n
    \n )}\n {putControls && question.type !== 'control_clear'\n && (\n \n )}\n {children}\n {(disableDragHandle === undefined || disableDragHandle === false)\n && (\n
    \n \n
    \n )}\n {showA11yWarning\n && accessibilityErrors.map((error, id) => (\n
    \n
    \n \n
    \n
    \n {`${t('Accessibility Warning:')} `}\n {t(error)}\n
    \n
    \n ))}\n {user?.allowConditionsV2 && calculationError ? (\n
    \n
    \n \n
    \n
    \n {`${t('Missing Fields:')} `}\n {t('One or more fields have been deleted which are required by this widget.')}\n
    \n
    \n ) : null}\n
    \n {gravatars}\n
    \n
    \n );\n };\n\n Highlightable.propTypes = {\n isSelected: PropTypes.bool,\n lineProps: PropTypes.shape(),\n isThereCondition: PropTypes.bool,\n question: PropTypes.shape({\n type: PropTypes.string.isRequired,\n qid: PropTypes.string.isRequired\n }),\n disableDragHandle: PropTypes.bool,\n putControls: PropTypes.bool,\n users: PropTypes.arrayOf(PropTypes.shape()),\n user: PropTypes.shape(),\n children: PropTypes.node,\n multiSelectQuestionFn: PropTypes.func,\n showMultiSelectCheckboxes: PropTypes.bool,\n isPDFImporter: PropTypes.bool\n };\n\n return Highlightable;\n};\n\nexport default MakeHighlightable;\n","import React from 'react';\nimport classNames from 'classnames';\nimport getOr from 'lodash/fp/getOr';\n\nimport { t } from '@jotforminc/translation';\nimport {\n getRect,\n supportedField,\n findField,\n isFieldMapped,\n normalizeFieldName,\n unselectFieldByTarget,\n normalizeTarget,\n isOrderable,\n handleMappingButtonPosition,\n handleMappingOrderNumber,\n calculateOrder,\n matrixIndexesByFieldId,\n getFieldType\n} from './helpers';\nimport IconSVG from '../IconSVG';\nimport { logJotFormEvents } from '../../libs/Utils';\n\nconst startConnection = (selectedFormField, setSelectedField) => {\n if (!selectedFormField) return;\n setSelectedField({\n connectField: true\n });\n};\n\nconst logEvent = info => {\n const { username, accountType, target } = info;\n\n logJotFormEvents('pdf-import', {\n actor: username,\n action: 'Click',\n target: target\n }, accountType);\n};\n\nconst renderButton = (classname, onclick, text, connectField) => (\n
    \n \n \n {t(text)}\n {connectField && }\n \n
    \n);\n\n// TODO: apply prop check for unnecessary rendering\nconst Mappable = ({\n children,\n question,\n // states\n accountType,\n username,\n selectedQuestionId,\n selectedFormField,\n isCardForm,\n isNewDefaultTheme,\n // actions\n setSelectedField,\n clearPinnedAnnotations,\n setSelectionSource,\n formFieldMappedAnnotations,\n withDuplicateAnnotations,\n disconnectField\n}) => {\n // TODO: refactor this function\n const onMappableClick = e => {\n const { target: originalTarget } = e;\n const target = normalizeTarget(originalTarget, question.type);\n const { type: questionType, qid, selectedField: widgetID } = question;\n\n // when clicked on a button do not try to select any form form field\n const excludedElements = ['btn-barebone', 'FITB-button', 'FITB-list-button', 'FITB-dropdown-listItem'];\n const targetClassnames = getOr('', 'target.className', e);\n const isExcluded = excludedElements.some(el => targetClassnames.indexOf(el) !== -1);\n\n if (!supportedField(questionType) || isExcluded) return;\n\n const field = findField(global.document)(target, questionType, qid, widgetID, selectedFormField);\n const label = field ? global.document.getElementById(`label_${field.id}`) : null;\n const fieldName = field ? field.name : null;\n const fieldValue = field ? field.value : null;\n const fieldId = field ? field.id : null;\n const labelId = label ? label.id : null;\n const timeFormat = (questionType === 'control_time' || questionType === 'control_datetime') ? question.timeFormat : null;\n\n if (!field) {\n return unselectFieldByTarget(target)\n && setSelectedField({\n rect: [],\n fieldName: null,\n fieldId: null,\n labelId: null,\n fieldValue: null,\n qid: null,\n questionType: null,\n fieldType: null,\n mappedAnnotations: [],\n pinnedAnnotations: [],\n connectField: false,\n order: null,\n timeFormat: null\n });\n }\n\n const order = isOrderable(field, questionType)\n ? calculateOrder(global.document)(field, question)\n : null;\n // The user selected a new form field, so clear the previously pinned annotations\n clearPinnedAnnotations(selectedFormField ? selectedFormField.pinnedAnnotations : []);\n // Because of the card enlarging animation on field selection,\n // delay which equal to the animation duration(300ms) is needed to find latest position of the input(CARD FORM ONLY)\n const shouldDelay = isCardForm || question.type === 'control_inline';\n setTimeout(() => {\n setSelectedField({\n rect: [...getRect(global.document)(question, field, label)], // eslint-disable-line\n fieldName: fieldName || null,\n fieldId,\n labelId,\n fieldValue,\n qid: question.qid,\n questionType: questionType,\n widgetId: question.selectedField,\n fieldType: getFieldType(field),\n mappedAnnotations: withDuplicateAnnotations(formFieldMappedAnnotations(\n normalizeFieldName(questionType)(fieldName)(widgetID),\n fieldValue,\n question,\n order,\n matrixIndexesByFieldId(questionType)(fieldId),\n fieldId,\n )),\n pinnedAnnotations: [],\n connectField: false,\n order,\n timeFormat\n });\n }, shouldDelay ? 300 : 0);\n // Set selection source as 'form' on clicks on form side\n setSelectionSource('form');\n };\n\n // a field in this question is selected and already mapped\n const isMapped = isFieldMapped(selectedFormField, selectedQuestionId);\n const isSelected = (selectedFormField && selectedFormField.qid === question.qid && selectedQuestionId === question.qid);\n\n // TODO: move this function outside of the component\n const onMappingButtonClick = e => {\n // We stop propagation because we don't want to fire onMappableClick with the connect/disconnect button click,\n e.stopPropagation();\n // Log connect/disconnect event\n logEvent({\n username,\n accountType,\n target: `Click to ${isMapped ? 'disconnect' : 'connect'} field - (questionType: ${selectedFormField.questionType}, fieldType: ${selectedFormField.fieldType})`\n });\n\n return isMapped\n ? disconnectField(selectedFormField.mappedAnnotations)\n : startConnection(selectedFormField, setSelectedField);\n };\n\n return (\n { }}\n >\n {isSelected && selectedFormField.order\n && (\n \n {selectedFormField.order}\n \n )}\n {children}\n {isSelected && (\n \n {renderButton(\n isMapped ? 'disc' : 'conn',\n onMappingButtonClick,\n isMapped ? 'Remove from PDF' : 'Add to PDF',\n selectedFormField.connectField\n )}\n \n )}\n \n );\n};\n\nexport default Mappable;\n","import React, { Component } from 'react';\nimport { connect } from 'react-redux';\nimport getOr from 'lodash/fp/getOr';\n\nimport {\n setSelectedField,\n disconnectField,\n clearPinnedAnnotations,\n setAnnotationCreatedStatus,\n setSelectionSource,\n formFieldMappedAnnotations,\n withDuplicateAnnotations\n} from '../../actions/pdfImport';\nimport { getSelectedFormField } from '../../reducers/pdfImport';\nimport Mappable from '../../components/pdfImporter/Mappable';\nimport {\n shouldMappableUpdate,\n addSubLabelClasses,\n} from '../../components/pdfImporter/helpers';\n\n// TODO: remove connected component into a container, when we decide how the Mappable component will be structured\nconst mapStateToProps = state => ({\n selectedFormField: getSelectedFormField(state),\n accountType: state.user.accountType,\n username: state.user.username,\n selectedQuestionId: getOr(null, 'ui.selectedQuestionId', state),\n selectedQuestions: getOr([], 'ui.selectedQuestions', state),\n isCardForm: getOr(false, 'formProperties.formType', state) === 'cardForm',\n isNewDefaultTheme: getOr(false, 'formProperties.defaultTheme', state) === 'v2'\n});\n\nconst mapDispatchToProps = {\n setSelectedField,\n disconnectField,\n clearPinnedAnnotations,\n setAnnotationCreatedStatus,\n setSelectionSource,\n formFieldMappedAnnotations,\n withDuplicateAnnotations\n};\n\nclass MappableContainer extends Component {\n shouldComponentUpdate(nextProps) {\n return shouldMappableUpdate({ prev: this.props, next: nextProps });\n }\n\n componentDidUpdate() {\n // We don't use componentDidMount because if an option is created with \"add option\" button, we cannot do the changes\n this.makeInputsClickable();\n // we distinctly need to catch sub-label clicks, so add 'sub-label' class to them\n addSubLabelClasses(global.document);\n }\n\n // Make other input elements clickable for checkbox and radio buttons that are under the current question\n makeInputsClickable() {\n const qid = this.props.question.qid || '';\n const otherInput = global.document.querySelector(\n `#id_${qid} .form-checkbox-other-input, #id_${qid} .form-radio-other-input`\n );\n if (otherInput) {\n otherInput.disabled = 'true';\n }\n\n const dropdown = global.document.querySelector(\n `#id_${qid} .form-dropdown`\n );\n\n if (dropdown) {\n const regex = /^q(\\d+)_(\\w+)\\[(\\d+)\\]\\[(\\d+)\\]$/;\n const isDropdownInInputTable = !!dropdown.name.match(regex);\n const dropdownExcludedClassList = ['time-dropdown', 'form-address-country'];\n if (!dropdownExcludedClassList.some(className => dropdown.classList.contains(className)) && !isDropdownInInputTable) {\n dropdown.style.pointerEvents = 'auto';\n }\n }\n }\n\n render() {\n return ();\n }\n}\n\nexport default connect(mapStateToProps, mapDispatchToProps)(MappableContainer);\n","import isUndefined from 'lodash/isUndefined';\nimport isArray from 'lodash/isArray';\nimport isString from 'lodash/isString';\nimport PropTypes from 'prop-types';\nimport React, { Component } from 'react';\nimport Tracking from '@jotforminc/tracking';\nimport { IconFlowForkHorizontalRadiusLine, IconArrowRight } from '@jotforminc/svg-icons';\nimport { t, translationRenderer } from '@jotforminc/translation';\nimport { isQuestionRequired, isFITBText, parseJSON } from '../../libs/Utils';\nimport PureLine from './PureLine';\nimport makeHighlightable from './makeHighlightable';\nimport Mappable from '../../containers/PDFImporter/MappableContainer';\nimport PAYMENT_TYPES from '../../constants/payment_types';\nimport { AllFields } from '../../constants/Fields';\nimport { getAddAndFormQuestionDropdown } from '../../libs/PaymentUtils';\n\nconst Highlightable = makeHighlightable(PureLine);\n\nclass Line extends Component {\n constructor(props) {\n super(props);\n this.state = {\n error: false,\n errorCount: 0,\n aiAnimationEnded: false,\n };\n this.handleSelect = this.handleSelect.bind(this);\n this.handleKeyUp = this.handleKeyUp.bind(this);\n this.handleContextMenu = this.handleContextMenu.bind(this);\n this.onDoubleClick = this.onDoubleClick.bind(this);\n this.changeAIAnimationVisibility = this.changeAIAnimationVisibility.bind(this);\n this.paymentMappedFieldIndicator = this.paymentMappedFieldIndicator.bind(this);\n }\n\n UNSAFE_componentWillReceiveProps(nextProps) {\n const { question, relatedConditions, isThereCondition } = this.props;\n if (!isThereCondition || !isArray(relatedConditions) || isUndefined(question) || isUndefined(nextProps.question) || isUndefined(question.options) || isUndefined(nextProps.question.options)) {\n return;\n }\n\n if (question.options !== nextProps.question.options) {\n let nextPropsOptions = [];\n let fieldOptions = [];\n\n switch (question.type) {\n case 'control_imagechoice':\n fieldOptions = isArray(question.options) ? question.options.map(opt => opt.text) : [];\n nextPropsOptions = isArray(nextProps.question.options) ? nextProps.question.options.map(opt => opt.text) : [];\n break;\n case 'control_checkbox':\n case 'control_radio':\n case 'control_dropdown':\n case 'control_yesno':\n fieldOptions = isString(question.options) ? question.options.split('|') : [];\n nextPropsOptions = isString(nextProps.question.options) ? nextProps.question.options.split('|') : [];\n break;\n default:\n break;\n }\n\n const changedOption = this.findChangedOption(fieldOptions, nextPropsOptions);\n if (changedOption) {\n this.updateCondition(relatedConditions, changedOption, question.type);\n }\n }\n }\n\n // Double click event\n onDoubleClick(e) {\n e.stopPropagation();\n const { onDoubleClick, question } = this.props;\n // Prevent default action when double-click on the text in the FITB(control_inline) text editor\n if (isFITBText(question, e.target)) return;\n if (onDoubleClick) {\n onDoubleClick(question);\n }\n }\n\n updateCondition(relatedConds, opt, type) {\n if (!isString(opt.curr) || !isString(opt.next)) {\n return;\n }\n relatedConds.forEach(cond => {\n if (type === 'control_imagechoice') {\n const condValue = isString(cond.value) ? cond.value.split('|') : [];\n if (condValue.length > 1 && condValue[0] === opt.curr) {\n const newValue = opt.next.concat('|', condValue[1]);\n this.props.updateRelatedCondition(cond.conditionID, cond.termID, newValue);\n }\n } else if (cond.value === opt.curr) {\n this.props.updateRelatedCondition(cond.conditionID, cond.termID, opt.next);\n }\n });\n }\n\n findChangedOption(currOpts, nextOpts) {\n if (!isArray(currOpts) || !isArray(nextOpts) || currOpts.length === 0 || nextOpts.length === 0 || currOpts.length !== nextOpts.length) {\n return;\n }\n const difference = [...currOpts.filter(opt => !nextOpts.includes(opt)), ...nextOpts.filter(opt => !currOpts.includes(opt))];\n if (!difference.length) {\n // it means this is swap operation, don't update condition\n return;\n }\n for (let i = 0; i < currOpts.length; i++) {\n if (currOpts[i] !== nextOpts[i]) {\n return { curr: currOpts[i], next: nextOpts[i] };\n }\n }\n }\n\n handleSelect(e) {\n e.stopPropagation();\n this.props.onSelect(this.props.question, !this.props.isSelected, e);\n }\n\n handleKeyUp(e) {\n // focus form-line element if it is not selected\n if (!this.props.isSelected && document?.activeElement?.className.includes('form-line')) {\n this.handleSelect(e);\n }\n }\n\n handleContextMenu(e) {\n e.nativeEvent.questionId = this.props.question.qid; // eslint-disable-line\n }\n\n componentDidCatch(error, stack) {\n const { question } = this.props;\n const qid = question ? question.qid : '';\n const type = question ? question.type : '';\n if (type !== 'control_text' && type !== 'control_widget') { // temporarily ignore outsourced errors like tinymce\n /* eslint-disable no-console */\n console.error('Unexpected error', stack, error);\n /* eslint-enable no-console */\n Tracking.configureScope(scope => {\n scope.addBreadcrumb({\n message: `Line caught an error for question ${type} qid ${qid}`,\n category: 'editor',\n level: 'error',\n data: {\n error: error\n }\n });\n });\n Tracking.captureException(`line error for ${type} : ${error}`, { extra: stack });\n this.setState({\n error: true,\n errorCount: this.state.errorCount + 1\n });\n }\n }\n\n // Disable shrink class for some cases for NEW theme -> If (Date-picker : time || time : range || control-radio spread to columns val>2 || full name middle/prefix/suffix options are enabled )\n disableShrinkNewThemeV2(question) {\n if (question && question.type && ((question.type === 'control_time' && question.range === 'Yes')\n || (question.type === 'control_fullname' && (question.prefix === 'Yes' || question.suffix === 'Yes' || question.middle === 'Yes'))\n || (question.type === 'control_datetime' && question.allowTime === 'Yes')\n || (((question.type === 'control_radio' || question.type === 'control_checkbox') && (question.spreadCols && question.spreadCols > 2)))\n )) {\n return true;\n }\n return false;\n }\n\n checklineAlignmentNewThemeV2(props) {\n const {\n isShrinked, question: {\n buttonAlign, textAlign, type, ...questionRest\n }\n } = props;\n let { formLabelAlign, question: { labelAlign } } = props;\n\n const forceLabelTop = (\n isShrinked\n || (type === 'control_fullname' && (questionRest.suffix === 'Yes' || questionRest.prefix === 'Yes' || questionRest.middle === 'Yes'))\n );\n\n if (forceLabelTop) {\n formLabelAlign = 'Top';\n labelAlign = labelAlign === 'Auto' ? 'Auto' : 'Top';\n }\n return `lineAlignment-${textAlign || buttonAlign || (labelAlign === 'Auto' ? `${labelAlign}-${formLabelAlign}` : labelAlign) || 'None'}`;\n }\n\n getFieldName = type => {\n return AllFields.find(field => field.type === type)?.name || '';\n };\n\n changeAIAnimationVisibility() {\n this.setState(prevState => ({ ...prevState, aiAnimationEnded: !prevState.aiAnimationEnded }));\n }\n\n paymentMappedFieldIndicator() {\n const {\n question,\n paymentQuestion,\n isSelected,\n isReusableConnectionEnabled\n } = this.props;\n\n if (\n !isReusableConnectionEnabled\n || !isSelected\n || question.paymentType\n || !paymentQuestion\n ) { return null; }\n\n const mappedProps = getAddAndFormQuestionDropdown(paymentQuestion);\n const mappedPropKey = Object.keys(mappedProps).find(key => paymentQuestion[key] === question.qid);\n if (!mappedPropKey) { return null; }\n\n return (\n
    \n \n \n {translationRenderer('This field is mapped to [1[{gateway}]] [2[Properties]]')({\n renderer1: () => {paymentQuestion.builderLabel || 'Payment'},\n renderer2: text => {text}\n })}\n \n \n {mappedProps[mappedPropKey].title}\n
    \n );\n }\n\n render() {\n const { error, errorCount } = this.state;\n if (error && errorCount < 3) {\n return (\n
    \n Unexpected error occured\n {this.props.question && this.props.question.type}\n
    \n );\n }\n const { question, isPreviewModOn } = this.props;\n if (isUndefined(question)) {\n return false;\n }\n try {\n const {\n isShrinked,\n isFixedWidth,\n isSelected,\n newLine,\n selectedQuestionCount,\n multiDragStartQid,\n shrinkClass,\n isCardForm,\n shouldWrapPDFMappable,\n defaultThemeVersion,\n isNewPaymentUIForNewForms,\n isUniqueByType,\n isWorkflowForm\n } = this.props;\n const shrinkableClass = isShrinked ? 'form-line-column' : '';\n const fixedWidthClass = defaultThemeVersion === 'v2' && isFixedWidth ? 'fixed-width' : '';\n const {\n textAlign, buttonAlign, labelAlign, appendClass, isAICreated, isAIUpdated\n } = this.props.question;\n let lineAlignment = defaultThemeVersion === 'v2' ? this.checklineAlignmentNewThemeV2(this.props) : `lineAlignment-${textAlign || buttonAlign || labelAlign || 'None'}`;\n const wideClass = this.props.isWideLine ? 'form-input-wide form-input-wide-line-fix' : '';\n const allowOtherClass = question.allowOther === 'Yes' ? 'allowOtherEnabled' : '';\n let shrinkState = (defaultThemeVersion === 'v2' && isShrinked && this.disableShrinkNewThemeV2(this.props.question)) ? '' : shrinkableClass;\n const newLineState = newLine ? 'form-line-column-clear' : '';\n const selectedState = isSelected ? 'isSelected' : 'isNotSelected';\n const requiredState = isQuestionRequired(question) ? 'isRequired' : '';\n const disableDragClass = this.props.disableDraggable === true ? 'disable-drag' : '';\n\n if (PAYMENT_TYPES.includes(question.type) && (defaultThemeVersion === 'v2' || isNewPaymentUIForNewForms)) {\n lineAlignment = 'lineAlignment-Auto-Top';\n shrinkState = '';\n }\n\n if (defaultThemeVersion === 'v2' && (typeof this.props.question.type === 'string') && this.props.question.type === 'control_autoincrement') {\n lineAlignment += ` line-Alignment-${this.props.formLabelAlign}-NDT`;\n }\n\n const classString = [\n selectedState,\n wideClass,\n allowOtherClass,\n shrinkState,\n fixedWidthClass,\n newLineState,\n lineAlignment,\n requiredState,\n disableDragClass,\n appendClass ? appendClass : null,\n multiDragStartQid ? '' : shrinkClass\n ].filter(a => a).join(' ');\n\n const lineProps = {\n id: multiDragStartQid ? `inner_line_${question.qid}` : `id_${question.qid}`,\n 'data-css-selector': `id_${question.qid}`,\n 'data-type': multiDragStartQid ? '' : question.type,\n 'data-inputtype': question.inputType ? question.inputType : undefined,\n 'data-shrinked': question.shrink === 'Yes' ? true : undefined,\n 'data-qid': question.qid,\n 'data-order': question.order,\n 'data-selectioncount': selectedQuestionCount,\n 'data-start': multiDragStartQid,\n 'data-payment': PAYMENT_TYPES.indexOf(question.type) > -1 ? true : undefined,\n className: `form-line ${multiDragStartQid ? 'isSelected selectionLineMulti' : `clearfix ${classString}`}`,\n onClick: (multiDragStartQid || this.props.disableTouch) ? undefined : this.handleSelect,\n onDoubleClick: (multiDragStartQid || this.props.disableTouch) ? undefined : this.onDoubleClick,\n onContextMenu: ((this.props.isTouch && this.props.isMobile) || this.props.disableTouch) ? undefined : this.handleContextMenu,\n style: {\n zIndex: this.props.isSelected ? 2 : 1,\n boxShadow: this.props.outline ? `0px 0px 0px 2px ${this.props.outline}` : undefined,\n borderRadius: (this.props.outline && isCardForm) ? '4px' : undefined\n },\n tabIndex: '0',\n 'aria-label': `${this.getFieldName(question.type)} Field${isQuestionRequired(question) ? ` ${t('Required')}` : ''} `,\n onKeyUp: this.handleKeyUp,\n };\n\n if (this.props.isDuplicated) { // for animation\n lineProps.className += ' isDuplicated';\n }\n\n if (this.props.isNew) { // for animation\n lineProps.className += ' isBrandNew';\n }\n\n if ((this.props.isComparePaymentv1 || this.props.isNewPaymentUIForNewForms || defaultThemeVersion === 'v2') && question.paymentType) {\n switch (question.paymentType) {\n case 'subscription':\n lineProps.className += ' subscription_cont';\n break;\n case 'donation':\n lineProps.className += ' donation_cont';\n break;\n default:\n break;\n }\n }\n\n if (this.props.productLayout && question.paymentType) {\n switch (this.props.productLayout) {\n case 'HR':\n lineProps.className += ' card-1col';\n break;\n case 'V2C':\n lineProps.className += ' card-2col';\n break;\n case 'V3C':\n lineProps.className += ' card-3col';\n break;\n default:\n break;\n }\n }\n\n if (question.type === 'control_button' && this.props.isOnePageForm && isUniqueByType) {\n lineProps.className += ' lastOne';\n }\n\n const formLineWrapper = multiDragStartQid ? (
      {this.props.children}
    ) : this.props.children;\n if (isPreviewModOn) {\n delete lineProps.onClick;\n delete lineProps.style;\n return (\n \n {this.props.children}\n \n );\n }\n\n if (question.type === 'control_inline' && !Array.isArray(question.fields)) {\n question.fields = Array.isArray(parseJSON(question.fields)) ? parseJSON(question.fields) : [];\n }\n\n const disableDragHandle = () => {\n if (multiDragStartQid) return true;\n if (isWorkflowForm && ['heading', 'submit'].includes(question.name)) return true;\n return false;\n };\n\n // Show multiSelectCheckboxes if, we are in mobile or many questions selected\n const showMultiSelectCheckBoxes = (this.props.showMultiSelectCheckboxes || this.props.isMobile || this.props.isTouch) && this.props.isAnyQuestionSelected;\n return (\n \n {shouldWrapPDFMappable\n ? (\n \n {formLineWrapper}\n \n )\n : formLineWrapper}\n {this.paymentMappedFieldIndicator()}\n {(isAICreated || isAIUpdated) && !this.state.aiAnimationEnded &&
    }\n \n );\n } catch (e) {\n return false;\n }\n }\n}\n\nLine.propTypes = {\n children: PropTypes.node.isRequired,\n onSelect: PropTypes.func.isRequired,\n question: PropTypes.shape(),\n isDuplicated: PropTypes.bool,\n isSelected: PropTypes.bool,\n isPreviewModOn: PropTypes.bool,\n isShrinked: PropTypes.bool,\n isWideLine: PropTypes.bool,\n newLine: PropTypes.bool,\n isMobile: PropTypes.bool,\n isTouch: PropTypes.bool,\n disableTouch: PropTypes.bool,\n isCardForm: PropTypes.bool,\n isThereCondition: PropTypes.bool,\n textAlign: PropTypes.string,\n buttonAlign: PropTypes.string,\n labelAlign: PropTypes.string,\n defaultThemeVersion: PropTypes.string,\n disableDraggable: PropTypes.bool,\n users: PropTypes.arrayOf(PropTypes.shape()),\n user: PropTypes.shape(),\n outline: PropTypes.string,\n putControls: PropTypes.bool,\n multiSelectQuestionFn: PropTypes.func,\n isAnyQuestionSelected: PropTypes.bool,\n shrinkClass: PropTypes.string,\n selectedQuestionCount: PropTypes.number,\n multiDragStartQid: PropTypes.oneOfType([\n PropTypes.number,\n PropTypes.string\n ]),\n shouldWrapPDFMappable: PropTypes.bool,\n relatedConditions: PropTypes.arrayOf(PropTypes.shape()),\n updateRelatedCondition: PropTypes.func,\n isHIPAAForm: PropTypes.bool,\n isUniqueByType: PropTypes.bool,\n isPDFImporter: PropTypes.bool,\n isOnePageForm: PropTypes.bool,\n isWorkflowForm: PropTypes.bool,\n};\nexport default Line;\n","import React, { useRef } from 'react';\nimport { useDispatch } from 'react-redux';\nimport { Button } from '@jotforminc/magnet';\nimport { Hooks } from '@jotforminc/uikit';\nimport { t } from '@jotforminc/translation';\nimport { IconPlusCircleFilled } from '@jotforminc/svg-icons';\nimport { addNewQuestion } from '../actions';\nimport '../assets/styles/addField.less';\n\n/* eslint-disable @jotforminc/no-native-button */\n\nconst AddField = ({ fields, showCategoryName = false }) => {\n const ref = useRef();\n const [isVisible, setVisibility] = Hooks.useClickOutsideState(false, [ref]);\n const workflowFieldsList = fields.reduce((result, current) => {\n // IN CASE OF NEEDS CATEGORY NAME INSIDE CURRENT THEN YOU HAVE IT\n const { categoryFields } = current;\n const workflowFields = categoryFields?.filter(field => field?.additionalParams?.workflow);\n return [...result, ...workflowFields];\n }, []);\n const sortedWorkflowFieldsList = workflowFieldsList.sort((a, b) => a.additionalParams.workflow.order - b.additionalParams.workflow.order);\n const toggleVisibility = () => setVisibility(!isVisible);\n const dispatch = useDispatch();\n const handleFieldClick = type => {\n dispatch(addNewQuestion({ type }));\n setVisibility(false);\n };\n return (\n
    \n \n {t('Add Field')}\n \n
    \n {showCategoryName &&
    Category Name
    }\n {sortedWorkflowFieldsList.map(field => {\n const { iconNew, name } = field;\n\n return (\n \n );\n })}\n
    \n
    \n );\n};\n\nexport default AddField;\n","import React, { memo } from 'react';\nimport isEqual from 'lodash/isEqual';\nimport Line from './form/Line';\nimport EmptyLine from './form/EmptyLine';\nimport AddField from './AddField';\nimport { FormFields } from '../constants/Fields';\n\nconst WideQuestionTypes = [\n 'control_head'\n];\n\nconst QuestionLine = ({\n question,\n handleQuestionSelect,\n handleFocus,\n isSelected,\n putControls,\n disableTouch,\n disableDraggable,\n index,\n collaborativeUsers,\n user,\n multipleSelectedQuestionCount,\n multiSelectStartQid,\n isAnyQuestionSelected,\n handleQuestionDoubleClick,\n showMultiSelectCheckboxes,\n handleMobileMultiselect,\n updateRelatedCondition,\n isHIPAAForm,\n shrinkCount,\n appendClass,\n isDuplicated,\n isNew,\n children,\n isUniqueByType,\n isComparePaymentv1,\n isNewPaymentUIForNewForms,\n questionInA11yErrors,\n shouldWrapPDFMappable,\n productLayout,\n accessibility,\n alignment,\n defaultTheme,\n isPDFImporter,\n isMobile,\n isCardForm,\n isTouch,\n isThereCondition,\n relatedConditions,\n calculationError,\n isReusableConnectionEnabled,\n isOnePageForm,\n isWorkflowForm,\n paymentQuestion\n}) => {\n if (question.type === 'empty_form') {\n return (\n \n );\n }\n if (question.type === 'add_field') {\n return (\n \n );\n }\n const isShrinked = question.shrink === 'Yes';\n const isFixedWidth = question?.autoFixed === 'Yes';\n const newLine = question.newLine === 'Yes';\n const outlineColor = collaborativeUsers.length > 0 ? collaborativeUsers[0].color || 'magenta' : null;\n const isWideLine = WideQuestionTypes.indexOf(question.type) > -1; // If anything needs wide line fix, add theme here.\n const disableDrag = (disableDraggable || (children.length === 1 && multipleSelectedQuestionCount > 1));\n const accessibilityErrors = questionInA11yErrors?.accessibilityErrors ? questionInA11yErrors.accessibilityErrors : [];\n return (\n \n {children}\n \n );\n};\n\nconst propsAreEqual = (prev, next) => {\n return isEqual(prev, next);\n};\n\nexport default memo(QuestionLine, propsAreEqual);\n","export const formPageSelector = state => {\n const {\n builderType,\n focusedInline,\n isPreviewModOn,\n isRightPanelOpen,\n selectedQuestionId,\n isOfflineModeEnabled,\n openRichTextFor,\n device,\n deviceType,\n selectedQuestions,\n rightPanelMode,\n selectedField,\n questionAddCounter,\n showMultiSelectCheckboxes,\n duplicatedQuestionIds,\n newQuestionIds,\n showUpgradePopover,\n cardWidth,\n questionAccessibilityErrors,\n isPDFImporter,\n lastBulkUpdatedQuestions,\n calculationErrors,\n currentLocation,\n isPaymentGatewayConfigured\n } = state;\n return {\n builderType,\n focusedInline,\n isPreviewModOn,\n isRightPanelOpen,\n selectedQuestionId,\n isOfflineModeEnabled,\n openRichTextFor,\n device,\n deviceType,\n selectedQuestions,\n rightPanelMode,\n selectedField,\n questionAddCounter,\n showMultiSelectCheckboxes,\n duplicatedQuestionIds,\n newQuestionIds,\n showUpgradePopover,\n cardWidth,\n questionAccessibilityErrors,\n isPDFImporter,\n lastBulkUpdatedQuestions,\n calculationErrors,\n currentLocation,\n isPaymentGatewayConfigured\n };\n};\n\nexport const stageSelector = state => {\n const {\n builderType,\n questionAddCounter,\n isRightPanelOpen,\n rightPanelMode,\n showThankYouPage,\n cardWidth,\n formAccessibilityErrors,\n questionAccessibilityErrors,\n selectedQuestions,\n device,\n scale,\n showWelcomePage,\n isPreviewModOn,\n limitLevel\n } = state;\n return {\n isPreviewModOn,\n showWelcomePage,\n builderType,\n questionAddCounter,\n isRightPanelOpen,\n rightPanelMode,\n showThankYouPage,\n cardWidth,\n formAccessibilityErrors,\n questionAccessibilityErrors,\n selectedQuestions,\n device,\n scale,\n limitLevel\n };\n};\n","/* eslint\n max-lines: [\"error\", {\"max\": 2000, \"skipBlankLines\": true}],\n complexity: [\"error\", 170],\n max-statements: [\"error\", 250],\n max-len: [\"error\", 300],\n react/destructuring-assignment: 0,\n jsx-a11y/alt-text: 0\n*/\nimport PropTypes from 'prop-types';\nimport React, { Component, Suspense } from 'react';\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport isUndefined from 'lodash/isUndefined';\nimport find from 'lodash/find';\nimport findIndex from 'lodash/findIndex';\nimport isArray from 'lodash/isArray';\nimport filter from 'lodash/filter';\nimport isEqual from 'lodash/isEqual';\nimport scrollIntoView from 'scroll-into-view';\nimport { JFSortable as ReactSortable } from '@jotforminc/builder-components';\nimport { featureFlag } from '@jotforminc/feature-flag';\nimport { t } from '@jotforminc/translation';\nimport { getUrlParameter } from '@jotforminc/utils';\nimport { BrandingRemoveButton } from '@jotforminc/limit-assets';\nimport { safeLazy } from '@jotforminc/safe-lazy-import';\nimport { Loading } from '@jotforminc/loading';\n\nimport * as reducerActions from '../actions';\n\nimport {\n isNewSCLAvailable,\n isNewPaymentConnection,\n findActivePaymentConnection,\n logJotFormEvents,\n getMappedSalesforceObjects,\n isLiteMode,\n injectAddFieldElement,\n isAIBuilder\n} from '../libs/Utils';\nimport {\n isIgnoredQuestion,\n objectToKeyValuePair,\n prepareQuestionProps,\n prepareFieldComponentProps,\n prepareInputWrapperClassName,\n prepareQuestionPropsWithStore,\n findComparePaymentFormVersion,\n convertQuestionPropsToElement\n} from '../libs/FormPageUtils';\n\nimport FormPageFooter from './form/FormPageFooter';\nimport PaymentTypes, { ConnectionReferences } from '../constants/payment_types';\nimport { nativeWidgets } from '../constants/Fields';\nimport getDragTarget from '../libs/get_drag_target';\nimport { isMappable } from './pdfImporter/helpers';\nimport { IGNORED_TYPE_NAMES } from '../constants/cardFormFields';\nimport QuestionLine from './QuestionLine';\nimport { formPageSelector } from '../selectors/uiSelectors';\n\nconst EmptyLine = safeLazy(() => import(/* webpackChunkName: \"EmptyLine\" */ './form/EmptyLine'));\nconst JotformPowered = safeLazy(() => import(/* webpackChunkName: \"JotformPowered\" */ './JotformPowered'));\nconst LazyFeatureBadge = safeLazy(() => import(/* webpackChunkName: \"LazyFeatureBadge\" */ './lazyComponents/LazyFeatureBadge'));\n\nconst isNewSCLOpen = ({ autoFill }) => {\n if (!isNewSCLAvailable()) {\n return false;\n }\n return !!(autoFill && autoFill[0] && autoFill[0].menu !== 'disable');\n};\n\nclass FormPage extends Component {\n constructor(props) {\n super(props);\n this.handleQuestionSelect = this.handleQuestionSelect.bind(this);\n this.renderQuestions = this.renderQuestions.bind(this);\n this.renderEmptyStage = this.renderEmptyStage.bind(this);\n this.handleFocus = this.handleFocus.bind(this);\n this.handleAddNewPage = this.handleAddNewPage.bind(this);\n this.handleRemovePage = this.handleRemovePage.bind(this);\n this.handleSingleMove = this.handleSingleMove.bind(this);\n this.handleMultipleMove = this.handleMultipleMove.bind(this);\n this.handleSortableChange = this.handleSortableChange.bind(this);\n this.handleSortableFilter = this.handleSortableFilter.bind(this);\n this.handleSortableEnd = this.handleSortableEnd.bind(this);\n this.handleMobileMultiselect = this.handleMobileMultiselect.bind(this);\n this.showUpgradePopover = this.showUpgradePopover.bind(this);\n this.handleQuestionDoubleClick = this.handleQuestionDoubleClick.bind(this);\n this.handleSortableMove = this.handleSortableMove.bind(this);\n this.updateRelatedCondition = this.updateRelatedCondition.bind(this);\n this.handleGetPageConditions = this.handleGetPageConditions.bind(this);\n this.updatePageConditions = this.updatePageConditions.bind(this);\n const customizedConfigs = global.JOTFORM_ENV === 'ENTERPRISE' && typeof global.CUSTOMIZED_CONFIGS === 'object' && global.CUSTOMIZED_CONFIGS;\n this.hideProtectedToggle = customizedConfigs && customizedConfigs.HIDE_HIPAA_PHI_INDICATORS === true;\n this.state = {\n forceUpdate: false\n };\n this.anySortChange = false;\n this.isWorkflowForm = this.props.ui.currentLocation === 'workflow';\n }\n\n componentDidMount() {\n // Product Stock Management\n const {\n productStock,\n formProperties,\n formQuestions,\n actions: { updateFormQuestion }\n } = this.props;\n if ((productStock && Array.isArray(productStock) && productStock.length === 0)\n && (formProperties && formProperties.products && Array.isArray(formProperties.products) && formProperties.products.length > 0)) {\n let isOneOfTheProductHasStock = false;\n for (let i = 0; i < formProperties.products.length; i++) {\n if (formProperties.products[i].isStockControlEnabled && formProperties.products[i].isStockControlEnabled === 'Yes') {\n isOneOfTheProductHasStock = true;\n break;\n }\n }\n\n if (isOneOfTheProductHasStock) {\n this.props.actions.fetchAllPaymentStock();\n }\n }\n\n // Croatia adopts EUR on 1.1.23\n const paymentQuestion = formQuestions.find(q => PaymentTypes.includes(q.type));\n const migrateToEURList = ['HRK', 'EEK', 'LTL', 'LVL', 'SKK'];\n if (paymentQuestion && migrateToEURList.includes(paymentQuestion.currency)) {\n updateFormQuestion(paymentQuestion.qid, { currency: 'EUR' });\n }\n\n // to use by injecting custom css into widgets\n global.window.newDefaultTheme = this.props.formProperties.defaultTheme || '';\n }\n\n shouldComponentUpdate(nextProps) {\n if (!isEqual(nextProps, this.props)) {\n if (this.state.forceUpdate || this.props.questions?.length !== nextProps.questions?.length) {\n this.setState({\n forceUpdate: false\n });\n return true;\n }\n if (nextProps.ui.selectedQuestionId) {\n const qids = nextProps.questions?.map(q => q.qid);\n return (\n qids.includes(this.props.ui.selectedQuestionId)\n || qids.includes(nextProps.ui.selectedQuestionId)\n );\n }\n return true;\n }\n return false;\n }\n\n get formPageFooter() {\n const {\n isHIPAAForm = false,\n formProperties: {\n showHIPAABadge = 'Yes',\n showA11yBadge = 'No',\n isEncrypted = 'No',\n accessibility = '0',\n id,\n formType = 'legacyForm',\n },\n user: {\n username,\n accountType,\n }\n } = this.props;\n\n const showHIPAA = isHIPAAForm && showHIPAABadge === 'Yes';\n const showA11y = accessibility === '1' && showA11yBadge === 'Yes';\n const showEncrypted = isEncrypted === 'Yes';\n\n return {\n show: formType !== 'cardForm' && (showHIPAA || showA11y || showEncrypted),\n showHIPAA,\n showA11y,\n showEncrypted,\n actionLogger: propKey => logJotFormEvents(\n 'formFooterWysiwyg',\n {\n actor: username,\n action: propKey,\n target: id,\n },\n accountType,\n ),\n };\n }\n\n showUpgradePopover() {\n if (['FREE', 'GUEST'].indexOf(this.props.formProperties.formOwnerAccountType) === -1) {\n this.props.actions.updateShowJotFormPowered();\n } else {\n this.props.actions.showUpgradePopover(true);\n }\n }\n\n /*\n * @param question: you can get question if necessary\n */\n // eslint-disable-next-line react/sort-comp\n handleQuestionDoubleClick(question) {\n const isPaymentProperties = PaymentTypes.indexOf(question.type) > -1 && this.props.actions.isReusableConnectionEnabled();\n const workflowNotAllowedQuestions = ['heading'];\n const preventDoubleClickForWorkflowBuilderProperties = this.isWorkflowForm && workflowNotAllowedQuestions.includes(question.name);\n const preventDoubleClick = isPaymentProperties || preventDoubleClickForWorkflowBuilderProperties;\n\n if (preventDoubleClick) { return; }\n\n // Open right panel, don't need to set right panel mode. Because question will be selected.\n let openRightPanelFor = 'questionsettings';\n if (question.type === 'control_widget' || nativeWidgets.some(widget => widget.type === question.type)) { // if question is widget set rightPanelMode\n openRightPanelFor = 'questionsettings';\n } else if (PaymentTypes.indexOf(question.type) > -1) {\n openRightPanelFor = 'paymentsettings';\n }\n this.props.actions.updateRightPanelMode(openRightPanelFor);\n this.props.actions.rightPanelToggle(true);\n }\n\n handleQuestionSelect(question, setSelected, originalEvent, isContextTriggered) {\n const {\n qid, type, widgetType, fieldParameters\n } = question;\n const { selectedQuestions } = this.props.ui;\n const { pageNumber, isFirstPage, isLastPage } = this.props;\n\n if ((isContextTriggered && selectedQuestions && selectedQuestions.indexOf(question.qid) > -1) || type === 'control_clear') {\n // context menu is triggered. if right clicked question is inside multiple selected questions; stop selecting step and let the editor handle oncontext event;\n return;\n }\n\n if (type === 'control_pagebreak' && pageNumber > 1 && !isFirstPage && isLastPage) {\n this.scrollToQuestion(qid);\n }\n // Check if starting multi select\n if (originalEvent && (originalEvent.ctrlKey || originalEvent.metaKey || originalEvent.shiftKey)) {\n this.selectMultipleQuestions(qid, originalEvent.shiftKey);\n } else { // Or select single line\n this.props.actions.updateSelectedQuestion(qid);\n }\n this.updateRightPanelModeForQuestion(type, widgetType, fieldParameters);\n if (originalEvent && originalEvent.stopPropagation) {\n originalEvent.stopPropagation();\n }\n }\n\n selectMultipleQuestions(qid, selectRange = false) {\n if (this.isWorkflowForm) return;\n if (selectRange) {\n this.props.actions.selectQuestionRange(qid, undefined); // EndQid - StartQid\n } else {\n this.props.actions.updateMultipleSelectedQuestions(qid);\n }\n }\n\n scrollToQuestion(qid) {\n setTimeout(() => {\n const newQuestion = global.document.querySelectorAll(`li[data-qid=\"${qid}\"]`)[1];\n scrollIntoView(newQuestion);\n });\n }\n\n updateRightPanelModeForQuestion(type, widgetType, fieldParameters) {\n const widgetWithFields = type === 'control_widget' && ((fieldParameters && fieldParameters.length) || widgetType === 'embed' || widgetType === 'widget' || widgetType === 'native');\n if ((type === 'control_widget'\n || type === 'control_calculation' || !isUndefined(widgetType))\n && this.props.ui.rightPanelMode !== 'questionsettings' && widgetWithFields) {\n this.props.actions.updateRightPanelMode('widgetsettings');\n } else if (PaymentTypes.indexOf(type) >= 0) {\n if (!this.props.actions.isReusableConnectionEnabled()) {\n this.props.actions.updateRightPanelMode('paymentsettings');\n }\n } else if (this.props.ui.rightPanelMode === 'paymentsettings' || this.props.ui.rightPanelMode === 'widgetsettings') {\n this.props.actions.rightPanelToggle(false);\n } else {\n this.props.actions.updateRightPanelMode('questionsettings');\n }\n }\n\n handleMobileMultiselect(event) {\n event.stopPropagation();\n const { qid } = event.target.dataset;\n // Simulate click event\n this.handleQuestionSelect({ qid }, false, { ctrlKey: true });\n }\n\n handleSortableEnd(e) {\n const qid = e && e.item && e.item.getAttribute ? e.item.getAttribute('data-qid') : undefined;\n const selectionCount = e && e.item && e.item.getAttribute ? e.item.getAttribute('data-selectioncount') : undefined;\n if ((qid && !selectionCount) || (qid && selectionCount && selectionCount === '0')) {\n this.props.actions.updateSelectedQuestion(qid);\n }\n if (this.props.ui.builderType === 'card') {\n const newQuestion = global.document.querySelector(`li[data-qid=\"${qid}\"]`);\n scrollIntoView(newQuestion, {\n time: 0,\n align: {\n top: 0.25,\n left: -0.25\n }\n });\n } else {\n const {\n questions, actions, newPageOrder, formProperties\n } = this.props;\n const elementType = e && e.item && e.item.getAttribute ? e.item.getAttribute('data-type') : undefined;\n const elementOrder = e && e.item && e.item.getAttribute ? parseInt(e.item.getAttribute('data-order'), 10) : undefined;\n const paypalSPB = questions.find(q => q.type === 'control_paypalSPB' && q.paypalButton === 'Yes');\n const isLegacyForm = formProperties && formProperties.formType !== 'cardForm';\n\n if (isLegacyForm && elementType === 'control_button' && paypalSPB && paypalSPB.qid && parseInt(newPageOrder, 10) === elementOrder) {\n actions.updateFormQuestion(paypalSPB.qid, { render: String(Math.random()) }, true, true, false);\n }\n }\n\n // If any changes is not exists after sorting, the iframe source is not visible\n // Iframe should reload again for this case.\n const question = this.props.questions.find(_question => _question.qid === qid);\n if (question && question.type === 'control_widget' && !this.anySortChange) {\n const iframe = document.querySelector(`li[data-qid=\"${qid}\"].form-line iframe`);\n iframe.setAttribute('src', iframe.src); // reload\n }\n }\n\n handleAddNewPage(e) {\n e.stopPropagation();\n const { formQuestions } = this.props;\n const button = find(formQuestions, { type: 'control_button' });\n const buttonStyle = isUndefined(button) ? 'None' : button.buttonStyle;\n\n let order = this.props.questions.reduce((max, q) => {\n return max > Number(q.order) ? max : Number(q.order);\n }, -1);\n\n const isEmptyLastPage = this.props.isLastPage && this.props.questions.length === 1;\n\n if (formQuestions.slice(-2)[0] && formQuestions.slice(-2)[0].type === 'control_paymentmethods') {\n order = formQuestions.slice(-2)[0].order;\n }\n\n this.props.actions.addNewQuestion({ type: 'control_pagebreak', buttonStyle: buttonStyle }, !isEmptyLastPage ? Number(order) : 'last');\n if (this.props.formProperties.formType === 'legacyForm') {\n this.updatePageConditions(this.props.pageNumber, 'addNewPage');\n }\n }\n\n handleRemovePage() {\n // will be enabled with the notification system\n // this.props.actions.deleteMultipleQuestion(this.props.questions);\n let pageBreakElement = find(this.props.questions, { type: 'control_pagebreak' });\n if (this.props.isLastPage) {\n const pageElements = this.props.formQuestions.filter(q => q.type === 'control_pagebreak');\n pageBreakElement = pageElements[pageElements.length - 1];\n }\n this.props.actions.deleteFormQuestion(pageBreakElement.qid);\n\n if (this.props.formProperties.formType === 'legacyForm') {\n this.updatePageConditions(this.props.pageNumber, 'removePage');\n }\n }\n\n handleFocus(props) {\n this.props.actions.updateSelectedQuestion(props.question.qid);\n }\n\n updateRelatedCondition(conditionID, termID, updatedVal) {\n const { conditions } = this.props.formProperties;\n if (!isArray(conditions)) {\n return;\n }\n const updatedConditions = conditions;\n const relatedCondition = updatedConditions.find(cond => cond.id === conditionID);\n const relatedTerm = relatedCondition && relatedCondition.terms && relatedCondition.terms.find(term => term.id === termID);\n if (relatedTerm) {\n relatedTerm.value = updatedVal;\n this.props.actions.updateFormProperty({ conditions: updatedConditions });\n }\n }\n\n updatePageConditions(newPageOrder, status) {\n const { conditions } = this.props.formProperties;\n const droppedPageConditions = conditions ? conditions.filter(condition => condition.type !== 'page') : null;\n const updatedPageConditions = this.handleUpdateConditionAfterPageProcess(newPageOrder, status);\n if (updatedPageConditions) {\n this.props.actions.updateFormProperty({\n conditions: [...droppedPageConditions, ...updatedPageConditions]\n });\n }\n }\n\n handleGetPageConditions() {\n const { conditions } = this.props.formProperties;\n return conditions && conditions.length > 0 ? conditions.filter(condition => condition.type === 'page') : null;\n }\n\n handleUpdateConditionAfterPageProcess(newPageOrder, status) {\n const pageConditions = this.handleGetPageConditions();\n return pageConditions ? pageConditions.map(condition => {\n const cond = condition;\n /* eslint-disable no-param-reassign, arrow-parens */\n cond.action.forEach((action) => {\n const pageNumber = action.skipTo.split('page-')[1];\n if (status === 'addNewPage' && Number(pageNumber) > Number(newPageOrder)) {\n action.skipTo = `page-${Number(pageNumber) + 1}`;\n } else if (status === 'removePage' && Number(pageNumber) >= Number(newPageOrder) && Number(pageNumber) > 1) {\n action.skipTo = `page-${Number(pageNumber) - 1}`;\n }\n });\n /* eslint-enable no-param-reassign, arrow-parens */\n return cond;\n }) : null;\n }\n\n checkConditions(qid, conditions) {\n let isConditionFound = false;\n const relatedConditions = [];\n conditions.forEach(condition => {\n const { action, terms } = condition;\n if (isArray(terms)) {\n const filteredTerms = terms.filter(q => q.field === qid); // maybe string,int\n if (filteredTerms.length > 0) {\n filteredTerms.forEach(term => {\n const relatedCondition = {\n conditionID: condition.id,\n termID: term.id,\n value: term.value\n };\n relatedConditions.push(relatedCondition);\n });\n isConditionFound = true;\n return;\n }\n }\n if (!isUndefined(action)) {\n const filteredAction = find(action, q => (q.operands && q.operands.split(',').includes(qid)) || (q.field === qid) || (q.resultField && q.resultField === qid) || (q.fields && find(q.fields, fid => (fid === qid)))); // maybe string, int\n if (!isUndefined(filteredAction)) {\n isConditionFound = true;\n return;\n }\n }\n });\n return { isThereCondition: isConditionFound, relatedConditions: relatedConditions };\n }\n\n handleSingleMove(oldIndex, newIndex, fromPage, toPage, currentPage, qid) {\n /* eslint-disable eqeqeq */\n if (this.isWorkflowForm) {\n const { questions } = this.props;\n const getUpdatedIndex = () => {\n if (newIndex === 0) return 1;\n if (newIndex === questions.length - 1) return newIndex - 1;\n return newIndex;\n };\n if (newIndex === 0 || newIndex === questions.length - 1) {\n this.props.actions.draggingExistingQuestion(oldIndex, getUpdatedIndex(), fromPage, toPage, qid);\n return;\n }\n }\n if (currentPage == toPage) {\n /* eslint-enable eqeqeq */\n this.props.actions.draggingExistingQuestion(oldIndex, newIndex, fromPage, toPage, qid);\n }\n }\n\n handleMultipleMove(oldIndex, newIndex, fromPage, toPage, currentPage, startingQid, selectedQuestionCount) {\n /* eslint-disable eqeqeq */\n if (currentPage == toPage) {\n /* eslint-enable eqeqeq */\n this.props.actions.draggingExistingMultipleQuestions(oldIndex, newIndex, fromPage, toPage, startingQid, selectedQuestionCount);\n }\n }\n\n handleSortableChange(order, sortable, evt) {\n this.anySortChange = true;\n this.setState({\n forceUpdate: true\n });\n const fromPageArray = evt.from.className.match(/page_(\\d+)/);\n if (isUndefined(fromPageArray) || fromPageArray === null || !fromPageArray) {\n return;\n }\n const fromPage = fromPageArray[1];\n const toPage = evt.to.className.match(/page_(\\d+)/)[1];\n const { qid } = evt.item.dataset;\n const selectionCount = evt.item.dataset.selectioncount ? parseInt(evt.item.dataset.selectioncount, 10) : 0;\n const selectionStartQid = evt.item.dataset.start;\n // if it is not question !\n if (isUndefined(qid)) {\n return;\n }\n if (selectionCount === 0) { // actually this means just one question is selected.\n this.handleSingleMove(evt.oldIndex, evt.newIndex, fromPage, toPage, this.props.pageNumber, qid);\n } else { // Dragging multiple questions\n this.handleMultipleMove(evt.oldIndex, evt.newIndex, fromPage, toPage, this.props.pageNumber, selectionStartQid, selectionCount);\n }\n this.props.actions.existingQuestionDropped(true);\n }\n\n handleSortableFilter(evt) {\n let el = evt.target;\n let isEditor = false;\n let isSelectedControls = false;\n let isEditableArea = false;\n let isTinyMCE = false;\n let disableDrag = false;\n let contentEditableArea = false;\n\n const selector = '.isSelected';\n const editorSelector = '.editor-container';\n const controlsSelector = '.selectedControlsLine';\n const editableAreaSelector = '.dropdownOptionsEditable';\n const optionsRemove = '.forDeleteOption';\n const disabledDragSelector = '.disable-drag';\n const tinyMCESeletor = '.mce-tinymce';\n const matchesSelector = el.matches || el.webkitMatchesSelector || el.mozMatchesSelector || el.msMatchesSelector;\n while (el) {\n if (matchesSelector.call(el, disabledDragSelector)) {\n disableDrag = true;\n }\n if (matchesSelector.call(el, editableAreaSelector)) {\n isEditableArea = true;\n }\n if (matchesSelector.call(el, optionsRemove)) {\n isEditableArea = true;\n }\n if (matchesSelector.call(el, editorSelector)) {\n isEditor = true;\n }\n if (matchesSelector.call(el, '.editDropdownOptionsButton')) {\n isEditor = true;\n }\n if (matchesSelector.call(el, '.removeJotFormPower')) {\n isEditor = true;\n }\n if (matchesSelector.call(el, controlsSelector)) {\n isSelectedControls = true;\n }\n if (matchesSelector.call(el, tinyMCESeletor)) {\n isTinyMCE = true;\n }\n if (matchesSelector.call(el, selector)) {\n break;\n }\n el = el.parentElement;\n }\n\n try {\n contentEditableArea = evt.target.getAttribute('contenteditable') === 'true';\n } catch (e) { /* nothing */ }\n\n return ((el && isEditor) || isSelectedControls || isEditableArea || disableDrag || contentEditableArea || isTinyMCE) || false;\n }\n\n appendEmptyFormIfNecessary(_questions) {\n let questions = _questions;\n if (questions.length === 2) {\n // this is a duplicate condition, if you change here you need to change Stage/ canUserDrag function.\n if (questions[0].type === 'control_head' && questions[1].type === 'control_button' && this.props.ui.questionAddCounter < 1) {\n questions[0].appendClass = 'isEmptyFormHeader';\n questions = [questions[0], { type: 'empty_form' }, questions[1]];\n }\n } else if (questions && questions[0]) {\n questions[0].appendClass = '';\n }\n return questions;\n }\n\n appendAddField(_questions) {\n const isAssignTask = getUrlParameter('isAssignTask') === 'true';\n if (isAssignTask && this.isWorkflowForm) {\n return injectAddFieldElement(_questions);\n }\n return _questions;\n }\n\n handleSortableScroll(scrollOffsetX, scrollOffsetY, item, scrollContainer) {\n if (scrollOffsetY !== 0) {\n scrollContainer.scrollTop += scrollOffsetY; // eslint-disable-line no-param-reassign\n const transformY = scrollContainer.scrollTop;\n global.document.querySelector('.formPage-container').style.transformOrigin = `center ${transformY}px`;\n }\n scrollContainer.scrollLeft += scrollOffsetX; // eslint-disable-line no-param-reassign\n }\n\n // Calculate item's direction, up or down;\n handleSortableMove(sortable, evt) {\n const target = getDragTarget(evt.target); // Gets drag target (questionWrapperElement)\n const isFirstTarget = target && target.getAttribute('data-order') == 1; // eslint-disable-line eqeqeq\n const actualHeightOffset = isFirstTarget && global.buildermode === 'card' ? 25 : 0;\n const { top, bottom } = target.getBoundingClientRect();\n const actualHeight = bottom - top - actualHeightOffset;\n if (!global.lastClientY) {\n global.lastClientY = evt.clientY;\n }\n const direction = global.lastClientY >= evt.clientY ? 'UP' : 'DOWN';\n global.lastClientY = evt.clientY;\n const sensitivityPercent = direction !== 'DOWN' ? 0.1 : 0.70;\n const sensitivity = actualHeight * sensitivityPercent; // px (65% of height)\n const BEFORE = 1;\n const AFTER = -1;\n const retVal = ((evt.clientY - actualHeight) + sensitivity >= top) ? BEFORE : AFTER;\n return retVal;\n }\n\n findQuestionTypeName(type) {\n return IGNORED_TYPE_NAMES[type] ? IGNORED_TYPE_NAMES[type] : 'This form';\n }\n\n renderCardFormIgnoredMessage(question) {\n const typeName = this.findQuestionTypeName(question.type);\n return (
    {t('{typeName} element is not available for this form layout.', { typeName: typeName.locale() })}
    );\n }\n\n renderQuestions(pageQuestions, enableDrag) {\n let questions = Object.assign([], pageQuestions);\n questions = this.appendEmptyFormIfNecessary(questions);\n questions = this.appendAddField(questions);\n const { selectedQuestionId, selectedQuestions } = this.props.ui;\n let isAnyQuestionSelected = !isUndefined(selectedQuestionId) || selectedQuestions.length > 0;\n let lastPageBackButtonQid;\n if (this.props.pageNumber > 1 && this.props.isLastPage) {\n lastPageBackButtonQid = find(questions, q => q.type === 'control_pagebreak').qid;\n }\n\n const { defaultTheme } = this.props.formProperties;\n\n if (defaultTheme === 'v2') {\n const pageBreakElement = find(questions, { type: 'control_pagebreak' });\n const submitElement = find(questions, { type: 'control_button' });\n if (submitElement && pageBreakElement) {\n const submitOrder = parseInt(submitElement.order, 10);\n const pageBreakOrder = parseInt(pageBreakElement.order, 10);\n\n // when submit buttons and page breaks are consecutive or it is last page we will merge two elements into one\n if (Math.abs(submitOrder - pageBreakOrder) === 1 || lastPageBackButtonQid) {\n questions = questions.reduce((acc, q) => {\n // pass pagebreak props to button\n if (q.qid === submitElement.qid) {\n acc.push({ ...q, pageBreak: pageBreakElement });\n return acc;\n }\n // ignore pagebreak element\n if (q.qid === pageBreakElement.qid) {\n return acc;\n }\n\n acc.push(q);\n return acc;\n }, []);\n }\n }\n }\n\n const Lines = [];\n let shrinkCount = false; // For adding shrink class to form\n for (let i = 0; i < questions.length; i++) {\n let question = questions[i];\n let isSelected = (selectedQuestionId && selectedQuestionId === question.qid) || selectedQuestions.indexOf(question.qid) > -1;\n let putControls = selectedQuestionId && selectedQuestionId === question.qid;\n if (question.type === 'empty_form' && isLiteMode()) {\n Lines.push(null);\n continue;\n }\n let disableTouch = false;\n if (question.shrink === 'Yes') {\n if (shrinkCount) {\n shrinkCount += 1;\n } else {\n shrinkCount = 1;\n }\n } else {\n shrinkCount = false;\n }\n let disableDragable = !enableDrag ? false : question.qid === lastPageBackButtonQid || ['control_clear', 'add_field'].indexOf(question.type) !== -1 || (['control_head', 'control_button'].indexOf(question.type) !== -1 && this.isWorkflowForm);\n const multipleSelectedQuestionCount = selectedQuestions.length;\n let multiSelectStartQid;\n const childs = []; // Line children ex : control_fullname\n if (enableDrag && selectedQuestions.length > 0) { // If multiple questions are selected\n if (selectedQuestions.indexOf(question.qid) !== -1) { // And current question is rendered question\n multiSelectStartQid = question.qid; // We need to know where are we trying to move.\n let z = i;\n let subLineShrinkCount = false;\n const selectedQuestionsArray = selectedQuestions.map((s, index) => { // Render all selected questions inside a Line\n question = questions[i + index];\n if (question.shrink === 'Yes') {\n if (subLineShrinkCount) {\n subLineShrinkCount += 1;\n } else {\n subLineShrinkCount = 1;\n }\n } else {\n subLineShrinkCount = false;\n }\n z++;\n return this.renderPureQuestionComponent(question, true, subLineShrinkCount);\n });\n i = z - 1; // And set iterator\n childs.push(selectedQuestionsArray);\n } else {\n childs.push(this.renderPureQuestionComponent(question));\n }\n } else { // If multi select is not available, render question in a Line as expected\n childs.push(this.renderPureQuestionComponent(question));\n }\n\n if (question.type === 'control_paymentmethods') {\n isSelected = false;\n putControls = false;\n disableDragable = true;\n isAnyQuestionSelected = false;\n disableTouch = true;\n }\n const renderedLine = this.renderQuestionLine(\n question, // question\n i, // index\n childs, // childrens\n isSelected, // selection state\n putControls, // put selection controls statse,\n disableDragable, // dragable state\n isAnyQuestionSelected, // any question selected check\n multipleSelectedQuestionCount, // multi select count\n multiSelectStartQid, // multiple select start\n undefined, // append class\n shrinkCount,\n disableTouch // Disable touch, click and double click for specific line\n );\n Lines.push(renderedLine);\n }\n return Lines;\n }\n\n renderQuestionLine(question, index, child, isSelected, putControls, disableDragable, isAnyQuestionSelected, multipleSelectedQuestionCount, multiSelectStartQid, appendClass, shrinkCount, disableTouch) {\n const {\n formProperties: {\n conditions, accessibility, newPaymentUIForNewCreatedForms, importedPdfIsConnected, paymentListSettings, alignment, defaultTheme\n },\n ui: {\n device, deviceType, isPDFImporter, isRightPanelOpen, questionAccessibilityErrors, builderType, calculationErrors\n },\n users, questions,\n actions,\n pageNumber,\n isFirstPage,\n isLastPage,\n formQuestions\n } = this.props;\n const collabrativeUsers = filter(users, u => u.selectedQuestionId === question.qid) || [];\n const isUniqueByType = questions.filter(q => q.qid !== question.qid && q.type === question.type).length === 0;\n const questionInA11yErrors = questionAccessibilityErrors ? questionAccessibilityErrors.find(q => q.qid === question.qid) : null;\n const shouldWrapPDFMappable = isMappable(isPDFImporter, importedPdfIsConnected, question.type, isRightPanelOpen, device);\n const productLayout = paymentListSettings ? paymentListSettings[0].productListLayout : 'HR';\n const isMobile = device === 'isMobile' || device === 'isTablet';\n const isCardForm = builderType === 'card';\n const isTouch = deviceType === 'touchOnly' || deviceType === 'hybrid';\n const { isThereCondition, relatedConditions } = (isUndefined(conditions) || !isArray(conditions)) ? { isThereCondition: false, relatedConditions: [] } : this.checkConditions(question.qid, conditions);\n const isReusableConnectionEnabled = actions.isReusableConnectionEnabled();\n return (\n -1}\n isNew={this.props.ui.newQuestionIds.indexOf(question.qid) > -1}\n isUniqueByType={isUniqueByType}\n device={device}\n deviceType={deviceType}\n conditions={conditions}\n isComparePaymentv1={findComparePaymentFormVersion() === 'v1'}\n isNewPaymentUIForNewForms={newPaymentUIForNewCreatedForms === 'yes'}\n paymentQuestion={formQuestions.find(q => PaymentTypes.includes(q.type))}\n questionInA11yErrors={questionInA11yErrors}\n builderType={this.props.ui.builderType}\n shouldWrapPDFMappable={shouldWrapPDFMappable}\n productLayout={productLayout}\n accessibility={accessibility}\n alignment={alignment}\n defaultTheme={defaultTheme}\n isPDFImporter={isPDFImporter}\n isMobile={isMobile}\n isCardForm={isCardForm}\n isTouch={isTouch}\n isThereCondition={isThereCondition}\n relatedConditions={relatedConditions}\n calculationError={calculationErrors?.[question.qid]}\n isReusableConnectionEnabled={isReusableConnectionEnabled}\n isOnePageForm={!isFirstPage && isLastPage && pageNumber === 1}\n isWorkflowForm={this.isWorkflowForm}\n >\n {child}\n \n );\n }\n\n renderPureQuestionComponent(question, putOuterLine = false, shrinkCount) {\n const {\n ui: {\n device,\n deviceType,\n builderType,\n focusedInline,\n selectedField,\n isPreviewModOn,\n openRichTextFor,\n isRightPanelOpen,\n selectedQuestions,\n selectedQuestionId,\n showUpgradePopover,\n isOfflineModeEnabled,\n currentLocation\n },\n user: {\n language,\n accountType,\n username\n },\n actions,\n isHipaa,\n cdnconfig,\n questions,\n salesforce,\n isLastPage,\n isFirstPage,\n description,\n productStock,\n formQuestions,\n formProperties,\n paymentConnection,\n hasOnlyMultiplePayment\n } = this.props;\n\n const isCardForm = builderType === 'card';\n const useNewSCL = isNewSCLOpen(formProperties);\n const isNewDefaultTheme = formProperties.defaultTheme === 'v2';\n const questionIndex = findIndex(questions, q => { return question.qid === q.qid; });\n const isMobile = device === 'isMobile' || device === 'isTablet' || deviceType !== 'mouseOnly';\n const isQuestionInMultiSelect = (selectedQuestions && selectedQuestions.indexOf(question.qid) > -1) || question.type === 'control_paymentmethods';\n\n if (question.type === 'control_widget') {\n if (question.widgetType === 'Unset') {\n return null;\n }\n }\n\n if (question.type === 'empty_form') { // return empty div for empty_form type.\n return
    ;\n }\n\n if (isIgnoredQuestion(question, isCardForm)) {\n return this.renderCardFormIgnoredMessage(question);\n }\n\n const {\n isFirstHeader,\n isSelectedQuestion,\n isLastCreatedQuestion\n } = prepareQuestionPropsWithStore({\n question,\n questions,\n selectedQuestionId,\n focusedInlineQid: focusedInline?.qid,\n });\n\n const inputWrapperClassName = prepareInputWrapperClassName({\n question,\n formAlignment: formProperties.alignment,\n defaultThemeVersion: formProperties.defaultTheme,\n isNewPaymentUI: formProperties.newPaymentUIForNewCreatedForms === 'Yes'\n });\n\n const {\n isHidden,\n hiddenClass,\n questionKeyValuePair\n } = prepareQuestionProps({ question, questions, hasOnlyMultiplePayment });\n\n if (isNewPaymentConnection({ isNewPaymentConnectionFlow: formProperties.isNewPaymentConnectionFlow }, question.type)) {\n const activePaymentConnection = findActivePaymentConnection(paymentConnection, question.type, formProperties.id);\n\n if (activePaymentConnection && (Array.isArray(ConnectionReferences[question.type]) || question.type === 'control_payu')) {\n const connectionData = objectToKeyValuePair({ question: activePaymentConnection });\n\n if (question.type === 'control_payu') {\n const subControlType = global.window.PAYUisTURKEY ? 'control_payuTurkey' : 'control_payuDefault';\n ConnectionReferences[question.type][subControlType].forEach(reference => {\n questionKeyValuePair[reference.prop] = connectionData[reference.prop];\n });\n } else {\n ConnectionReferences[question.type].forEach(reference => {\n questionKeyValuePair[reference.prop] = connectionData[reference.prop];\n });\n }\n }\n }\n\n const fieldComponentProps = prepareFieldComponentProps({\n question,\n cdnconfig,\n isCardForm,\n isPreviewModOn,\n isSelectedQuestion,\n isOfflineModeEnabled,\n isLastCreatedQuestion,\n isQuestionInMultiSelect,\n formStrings: formProperties.formStrings,\n useJotformSign: formProperties.useJotformSign,\n defaultThemeVersion: formProperties.defaultTheme\n });\n\n const isSalesforceBadgeVisible = (\n featureFlag.getFeature(featureFlag.getList().SALESFORCE_BUILDER_INTEGRATION)\n && (isSelectedQuestion || isQuestionInMultiSelect)\n && formProperties.integrations\n && formProperties.integrations.salesforceV2\n );\n const salesForceMappedObjects = isSalesforceBadgeVisible ? getMappedSalesforceObjects(salesforce.objects, salesforce.fields, formProperties.integrations.salesforceV2.actionMap, question.qid) : [];\n\n const calculateEditorHeight = () => {\n const isTextQuestion = question.type === 'control_text';\n const htmlNode = global.document.querySelector(`#id_${question.qid}`);\n if (!isTextQuestion || !htmlNode || htmlNode.offsetHeight <= 80) return 200;\n const maxHeight = 600;\n const height = htmlNode.offsetHeight - 80;\n return height < maxHeight ? height : maxHeight;\n };\n\n const editorHeight = calculateEditorHeight();\n\n const isPaypalSPB = question.type === 'control_paypalSPB';\n const isCyberSource = question.type === 'control_cybersource';\n const emailQid = isCyberSource && questionKeyValuePair.email ? questionKeyValuePair.email.value : undefined;\n const addressQid = isCyberSource && questionKeyValuePair.billToAddress ? questionKeyValuePair.billToAddress.value : undefined;\n\n let component = convertQuestionPropsToElement({\n username,\n actions,\n isHipaa,\n isHidden,\n isMobile,\n question,\n language,\n useNewSCL,\n isCardForm,\n isLastPage,\n description,\n isFirstPage,\n hiddenClass,\n accountType,\n editorHeight,\n productStock,\n questionIndex,\n isFirstHeader,\n formProperties,\n openRichTextFor,\n isRightPanelOpen,\n isSelectedQuestion,\n fieldComponentProps,\n questionKeyValuePair,\n inputWrapperClassName,\n isLastCreatedQuestion,\n isQuestionInMultiSelect,\n salesForceMappedObjects,\n isNewDefaultTheme,\n questionCount: questions.length,\n hideProtectedToggle: this.hideProtectedToggle,\n selectedField: question.type === 'control_mixed' ? selectedField : undefined,\n activePaymentQuestion: formQuestions.find(q => PaymentTypes.includes(q.type)),\n focusedInline,\n formQuestions: ['control_head', 'control_text'].indexOf(question.type) > -1 ? formQuestions : undefined,\n paypalSPBProps: question.paypalBt === 'Yes' ? find(formQuestions, { type: 'control_paypalSPB' }) : undefined,\n paypalSubmitButton: isPaypalSPB ? find(formQuestions, { type: 'control_button', qid: question.paypalButtonQid }) : undefined,\n mappedEmail: isCyberSource && emailQid ? formQuestions.find(q => q.type === 'control_email' && q.qid === emailQid) : undefined,\n mappedAddress: isCyberSource && addressQid ? formQuestions.find(q => q.type === 'control_address' && q.qid === addressQid) : undefined,\n inlineFormFields: question.type === 'control_inline' ? formQuestions.filter(q => q.qid === question.qid || q.type !== 'control_inline') : [],\n isWorkflowBuilder: currentLocation === 'workflow',\n isPaymentGatewayConfigured: this.props.ui.isPaymentGatewayConfigured\n });\n\n if (!isCardForm && question.type === 'control_button' && this.props.user.showJotFormPowered && this.props.user.showJotFormPowered !== '0') {\n const submitElement = find(this.props.questions, { type: 'control_button' });\n\n // A/B Test :: builderRemovePoweredBtn\n component = (\n \n \n \n );\n }\n if (putOuterLine) {\n // sorry this function has too much params, it will be fixed immediately.\n component = this.renderQuestionLine(question, 0, component, true, false, false, true, 0, 0, 'form-inner-line', shrinkCount, false);\n }\n\n return component;\n }\n\n renderEmptyStage(pageNumber) {\n let message;\n if (pageNumber && pageNumber > 1) {\n switch (pageNumber) {\n case 2:\n message = t('Drag your question to second page from the left panel.');\n break;\n case 3:\n message = t('Drag your question to third page from the left panel.');\n break;\n default:\n message = t('Drag your question to {{pageNumber}}. page from the left panel.');\n message = message.replace('{{pageNumber}}', pageNumber);\n break;\n }\n }\n return (\n }>\n this.handleHoverByNewQuestion(args)}\n key=\"line_emptyline\"\n message={message}\n isMobile={this.props.ui.device === 'isMobile'}\n isCardForm={this.props.ui.builderType === 'card'}\n />\n \n );\n }\n\n renderAddNewPageButton(formWidth, newPageOrder) {\n const { builderType, cardWidth } = this.props.ui;\n const isCardForm = builderType === 'card';\n\n return (\n \n \n {`+ ${t('ADD NEW PAGE HERE')}`}\n \n
    \n );\n }\n\n renderPageStuff(formWidth, pageNumber, onePageForm, isCardForm) {\n const { cardWidth } = this.props.ui;\n const rendered = !isCardForm ? (\n
    \n {onePageForm ? '' : (\n \n {t('Page')}\n {' '}\n {pageNumber}\n \n )}\n {!onePageForm\n ? (\n this.handleRemovePage()}\n className=\"formPage-removePage\"\n type=\"button\"\n aria-label={`${t('Remove Page')} ${pageNumber}`}\n >\n {t('Remove Page')}\n \n ) : null}\n
    \n ) : null;\n return rendered;\n }\n\n renderFormFooter(formWidth, isLastPage) {\n const campaignStatus = false; // this.props.user.campaign.status; // campaign status\n const assetsAvailable = false; // this.props.user.campaign.assetsAvailable; // show campaign assets for campaign users\n const isFree = ['GUEST', 'FREE'].indexOf(this.props.formProperties.formOwnerAccountType) !== -1;\n const showJotFormPowered = this.props.user.showJotFormPowered && this.props.user.showJotFormPowered !== '0';\n const showJotFormLogo = this.props.ui.builderType === 'card' && this.props.user.showJotFormLogo && this.props.user.showJotFormPowered !== '0';\n const showNewCardFooter = this.props.formProperties.cfFooterType && this.props.formProperties.cfFooterType === '1';\n const { builderType, cardWidth } = this.props.ui;\n const username = this.props.user?.username;\n const formId = this.props.formProperties?.id;\n\n const isCardForm = builderType === 'card';\n\n const isMobileApp = typeof global.sendMessageToJFMobile === 'function';\n if (isMobileApp) { return; }\n\n if (\n (showJotFormLogo || (isFree && showJotFormPowered))\n && isLastPage\n && !this.props.user?.csiCollaborator\n ) {\n const campaign = this.props.ui.builderType === 'card' ? 'powered-by-jotform-remove-label_cf' : 'powered-by-jotform-remove-label';\n\n return (\n
    \n \n
    \n {(!campaignStatus && !assetsAvailable) && (\n
    \n
    \n \n \n \n
    \n
    \n {!showNewCardFooter\n && (\n \n {`${t('Now create your own JotForm -', { branding21: true })} ${t(\"It's Free\")}`}\n \n )}\n \n {t(`Create your own Jotform${showNewCardFooter ? ' - It\\'s free!' : ''}`, { branding21: true })}\n \n
    \n
    \n )}\n
    \n
    \n );\n }\n\n return;\n }\n\n render() {\n const {\n questions, pageNumber, formProperties, activePage, newPageOrder, pageQid, isLastPage, isFirstPage, ui\n } = this.props;\n const { selectedQuestions, builderType, cardWidth } = ui;\n const isCardForm = builderType === 'card';\n const {\n fontsize, fontcolor, font, formWidth\n } = formProperties;\n // const isMobile = (this.props.ui.device === 'isMobile' || this.props.ui.device === 'isTablet');\n const renderedQuestions = this.renderQuestions(questions, this.props.enableDrag, selectedQuestions);\n const sortDelay = this.props.ui.deviceType === 'mouseOnly' ? 0 : 175;\n const onePageForm = !isFirstPage && isLastPage && pageNumber === 1;\n const isEmptyForm = questions && questions.length === 0;\n const showHIPAA = this.formPageFooter?.showHIPAA;\n const showEncrypted = this.formPageFooter?.showEncrypted;\n\n const enabledWelcomeBadges = {\n accessibility: this.formPageFooter?.showA11y,\n encrypted: this.formPageFooter?.showEncrypted,\n government: this.formPageFooter?.showGovernment,\n hipaa: this.formPageFooter?.showHIPAA,\n };\n\n const hasEnabledBadge = Object.values(enabledWelcomeBadges).some(Boolean);\n\n return (\n <>\n \n {this.renderPageStuff(formWidth, pageNumber, onePageForm, isCardForm)}\n \n 1) ? '>*' : 'li', // If multi drag is enabled change drag selector to all childs\n fallbackOnBody: true,\n forceFallback: true,\n cloneOnBody: true, // Mofidifed Line (Added)\n ghostClass: 'stage-Invisible',\n fallbackClass: 'isDragging-Fallback',\n chosenClass: 'isDragging-Chosen',\n dragClass: 'isDragging-Drag',\n fallbackTolerance: 1,\n preventOnEmptyDrop: true, // Mofidifed Line (Added)\n scroll: true,\n scrollSpeed: 15,\n scrollSensitivity: 100,\n scrollElementSelector: '.stageScroller',\n group: { name: 'shared', pull: true, put: true },\n lockAxisX: !isCardForm,\n delay: sortDelay,\n onlyTransForm: isCardForm,\n addIsDraggingClass: true,\n scrollFn: isCardForm ? this.handleSortableScroll : null,\n filter: this.handleSortableFilter,\n onMove: isCardForm ? this.handleSortableMove : null,\n ghostWrapper: isCardForm ? 'dummyPageSection' : 'page-section', // Wrapper class\n onStart: () => {\n try {\n global.document.activeElement.blur();\n this.anySortChange = false;\n } catch (e) {\n // Nothing.\n }\n },\n onEnd: this.handleSortableEnd\n }}\n className={`clearfix form-section page-section page_${pageNumber}`}\n style={{\n margin: 0,\n fontSize: `${fontsize}px`,\n color: fontcolor,\n fontFamily: !isCardForm ? `${font}, \"Lucida Grande\", \"Lucida Sans Unicode\", \"Lucida Sans\", Verdana, sans-serif` : null,\n }}\n onChange={this.handleSortableChange}\n >\n {pageNumber > 1 && isLastPage && renderedQuestions.length === 1\n && !isLiteMode() && this.renderEmptyStage(pageNumber)}\n {pageNumber === 1 && renderedQuestions.length === 0\n && !isLiteMode() && this.renderEmptyStage()}\n {renderedQuestions}\n \n {this.formPageFooter?.show && (\n \n )}\n
    \n {!isLiteMode() && !isCardForm && this.renderAddNewPageButton(formWidth, newPageOrder)}\n {!isAIBuilder() && this.renderFormFooter(formWidth, isLastPage)}\n \n {isCardForm && hasEnabledBadge ? (\n \n \n \n ) : null}\n \n );\n }\n}\n\nFormPage.propTypes = {\n questions: PropTypes.arrayOf(PropTypes.shape()),\n pageNumber: PropTypes.number,\n pageQid: PropTypes.string,\n formProperties: PropTypes.shape(),\n ui: PropTypes.shape(),\n actions: PropTypes.shape({\n updateFormProperty: PropTypes.func,\n }),\n cdnconfig: PropTypes.shape(),\n activePage: PropTypes.bool,\n newPageOrder: PropTypes.number,\n isFirstPage: PropTypes.bool,\n isLastPage: PropTypes.bool,\n formQuestions: PropTypes.arrayOf(PropTypes.shape()),\n users: PropTypes.arrayOf(PropTypes.shape()),\n user: PropTypes.shape(),\n enableDrag: PropTypes.bool,\n hasOnlyMultiplePayment: PropTypes.bool,\n paymentConnection: PropTypes.arrayOf(PropTypes.shape()),\n productStock: PropTypes.arrayOf(PropTypes.shape()),\n isHIPAAForm: PropTypes.bool,\n handleQuestionDeselect: PropTypes.func\n};\n\nfunction mapDispatchToProps(dispatch) {\n return {\n actions: bindActionCreators(reducerActions, dispatch)\n };\n}\n\nfunction mapStateToProps(state) {\n const ui = formPageSelector(state.ui);\n return {\n productStock: state.productStock,\n formQuestions: state.questions,\n cdnconfig: state.cdnconfig,\n ui: ui,\n user: state.user,\n salesforce: state.salesforce\n };\n}\n\nexport default connect(mapStateToProps, mapDispatchToProps)(FormPage);\n","import React from 'react';\nimport { connect } from 'react-redux';\nimport { t, translationRenderer } from '@jotforminc/translation';\nimport { isEnterprise } from '@jotforminc/enterprise-utils';\n\nconst HIPAAWarning = ({ formWidth, HIPAAStatus }) => {\n if (!HIPAAStatus) return null;\n\n const upgradeLink = '/pricing?utm_source=hipaa-account-warning&utm_medium=banner&utm_content=v4builder&utm_campaign=hipaa';\n const disableLink = '/myaccount/data?utm_source=hipaa-account-warning&utm_medium=banner&utm_content=v4builder&utm_campaign=hipaa';\n\n return (\n
    \n
    \n
    \n
    \n \n \n \n
    \n \n {translationRenderer('Your plan is not HIPAA-enabled! [1[Upgrade your plan]] or [2[remove HIPAA-related features]] to continue using your forms without interruption.')({\n renderer1: upgradeText => {upgradeText},\n renderer2: removeText => {removeText}\n })}\n \n
    \n \n
    \n
    \n );\n};\n\nconst mapStateToProps = state => {\n // TODO: move HIPAAStatus to a selector\n const { user: { accountType, isHIPAA } } = state;\n const isHIPAAEnabled = isHIPAA && isHIPAA === '1';\n const isAccountDowngraded = ['GOLD', 'SILVER', 'ECONOMY', 'PROFESSIONAL', 'PLATINUM'].indexOf(accountType) === -1;\n const HIPAAStatus = !isEnterprise() && (isHIPAAEnabled && isAccountDowngraded);\n\n const { formWidth } = state.formProperties;\n\n return {\n formWidth,\n HIPAAStatus\n };\n};\n\nexport default connect(mapStateToProps)(HIPAAWarning);\n","import React from 'react';\nimport { connect } from 'react-redux';\nimport { t } from '@jotforminc/translation';\nimport IconSVG from '../IconSVG';\n\nconst MobileAccessibilityErrorCountWrapper = ({ hasAccessibility, problemCount }) => {\n if (!hasAccessibility) return null;\n\n if (problemCount === 0) return null;\n\n return (\n
    \n \n {(problemCount > 1 ? t('{number} Accessibility Problems') : t('{number} Accessibility Problem')).replace('{number}', problemCount)}\n
    \n );\n};\n\nconst mapStateToProps = state => {\n const { accessibility } = state.formProperties;\n const hasAccessibility = accessibility === '1';\n\n const { questionAccessibilityErrors, formAccessibilityErrors } = state.ui;\n\n let problemCount = questionAccessibilityErrors ? questionAccessibilityErrors.reduce(\n (currentValue, question) => {\n return question.accessibilityErrors ? (question.accessibilityErrors.length + currentValue) : currentValue;\n }, 0\n ) : 0;\n problemCount += formAccessibilityErrors ? formAccessibilityErrors.length : 0;\n\n return {\n hasAccessibility,\n problemCount\n };\n};\n\nexport default connect(mapStateToProps)(MobileAccessibilityErrorCountWrapper);\n","import React from 'react';\nimport { connect } from 'react-redux';\nimport { t } from '@jotforminc/translation';\nimport { withRouter } from 'react-router-dom';\nimport { bindActionCreators } from 'redux';\nimport IconSVG from '../IconSVG';\nimport * as _actions from '../../actions';\nimport { logJotFormEvents } from '../../libs/Utils';\n\nconst FormAccessibilityWrapper = ({\n accountType,\n actions,\n formAccessibilityErrors,\n formId,\n hasAccessibility,\n history,\n username\n}) => {\n if (!hasAccessibility) return null;\n if (!formAccessibilityErrors) return null;\n\n const fixAccessibilityError = e => {\n e.stopPropagation();\n const errorName = e.currentTarget.dataset.value;\n switch (errorName) {\n case 'hasSubmit':\n actions.addNewQuestion({ type: 'control_button' });\n break;\n case 'hasEnhancer':\n actions.addNewQuestion({ type: 'control_widget', selectedField: '591bfab2b81b39d90500089b' });\n break;\n case 'hasSufficientColorContrast':\n case 'hasSufficientInputColorContrast':\n case 'hasAccessibleTheme':\n actions.updateSelectedQuestion(undefined);\n actions.rightPanelToggle(true);\n actions.updateRightPanelMode('design');\n break;\n case 'hasFormTexts':\n history.push(`/${global.__BASE_ROUTE_PATH}/${formId}/settings/`);\n break;\n default:\n break;\n }\n logJotFormEvents('form-accessibility', {\n actor: username,\n action: 'FixFormAccessibilityErrorClick',\n target: `${errorName} | ${formId}`\n }, accountType);\n };\n\n return (\n
    \n
      \n {\n formAccessibilityErrors.map((errorCase, id) => (\n \n \n
      \n {`${t('Accessibility Warning:')} `}\n {t(errorCase.errorText)}\n
      \n \n ))\n }\n
    \n
    \n );\n};\n\nconst mapStateToProps = state => {\n const { accessibility } = state.formProperties;\n const hasAccessibility = accessibility === '1';\n\n const { formAccessibilityErrors } = state.ui;\n const formId = state.formProperties.id;\n const { username } = state.user;\n const { accountType } = state.user;\n\n return {\n accountType,\n formAccessibilityErrors,\n formId,\n hasAccessibility,\n username,\n };\n};\n\nfunction mapDispatchToProps(dispatch) {\n return {\n actions: bindActionCreators(_actions, dispatch)\n };\n}\n\nexport default connect(mapStateToProps, mapDispatchToProps)(withRouter(FormAccessibilityWrapper));\n","import React from 'react';\nimport { t, translationRenderer } from '@jotforminc/translation';\nimport { handleCustomNavigation } from '@jotforminc/utils';\nimport { connect } from 'react-redux';\nimport { IconExclamationTriangleFilled } from '@jotforminc/svg-icons';\nimport { LIMIT_LEVELS } from '../../constants/limitDefaults';\n\nconst FieldsLimitMessage = ({\n formId,\n limitLevel,\n isFormOwner\n}) => {\n const appEl = document.querySelector('#app');\n if (limitLevel !== LIMIT_LEVELS.DANGER) {\n if (appEl) {\n appEl.classList.remove('limitationStageActive');\n }\n return null;\n }\n\n if (appEl) {\n document.querySelector('#app').classList.add('limitationStageActive');\n }\n\n const limitMessageText = isFormOwner ? (\n translationRenderer('[1[Upgrade your plan]] to increase your limit.')({\n renderer1: text => (\n \n {text}\n \n )\n })\n ) : (\n translationRenderer('[1[Contact the form owner]] to increase your limit so you can add more form elements.')({\n renderer1: text => (\n \n \n {text}\n \n \n )\n })\n );\n\n return (\n
    \n
    \n \n \n \n

    \n {t('You have reached your limits!')}\n {' '}\n {limitMessageText}\n

    \n
    \n {isFormOwner && (\n {\n handleCustomNavigation(\n `/pricing?utm_source=builder&utm_medium=banner&utm_campaign=form-element-limitation&utm_term=form-top-button&utm_content=${formId}`,\n '_blank'\n );\n }}\n >\n {t('Upgrade Your Plan')}\n \n )}\n
    \n );\n};\n\nconst mapStateToProps = state => {\n const { limitLevel } = state.ui;\n const formId = state.form.id;\n const { user: { isFormOwner } } = state;\n\n return {\n formId,\n isFormOwner,\n limitLevel\n };\n};\n\nexport default connect(mapStateToProps)(FieldsLimitMessage);\n","import { logJotFormEvents } from '../../libs/Utils';\n\nconst NEWLY_CREATED_USER_TIMESTAMP = 1654549200000;\n\nexport const isNewUser = (created_at, id) => {\n const isNewAccount = new Date(created_at)?.getTime() > NEWLY_CREATED_USER_TIMESTAMP;\n const isNewForm = Number(id) > NEWLY_CREATED_USER_TIMESTAMP;\n return isNewForm && isNewAccount;\n};\n\nexport const recordLogoVariant = (action, username, accountType) => {\n const isTestWin = isNewUser();\n if (isTestWin) {\n logJotFormEvents('organizationLogo', {\n actor: username,\n action,\n target: 'form'\n }, accountType);\n }\n};\n","import React from 'react';\nimport { connect } from 'react-redux';\nimport { bindActionCreators } from 'redux';\nimport { FormLogo } from '@jotforminc/form-common';\nimport { t } from '@jotforminc/translation';\nimport * as _actions from '../../actions';\nimport { recordLogoVariant } from './stageUtils';\nimport { isLiteMode } from '../../libs/Utils';\n\nconst FormLogoWrapper = ({\n accountType,\n actions,\n builderType,\n formWidth,\n showFormCoverArea,\n styleJSON,\n username,\n formLogoProperties\n}) => {\n // Card Forms Don't have form cover.\n if (builderType === 'card') {\n return null;\n }\n\n const handleQuestionDeselect = () => {\n actions.updateSelectedQuestion(undefined);\n };\n\n const handleAddFormLogo = e => {\n actions.updateRightPanelMode('coverimage', true);\n actions.rightPanelToggle(true, false);\n e.stopPropagation();\n if (styleJSON?.['@formCover'] !== '1') {\n recordLogoVariant('addlogo-clicked', username, accountType);\n }\n };\n\n const AddLogoButton = () => {\n const logoSelectionActive = showFormCoverArea ? 'logo-selection-active' : '';\n return (\n
    \n \n {t('+ ADD YOUR LOGO')}\n \n
    \n );\n };\n\n const isFormLogoAvailable = !!formLogoProperties?.image?.url;\n return (\n isFormLogoAvailable ? (\n \n ) : (\n
    \n {isLiteMode() ? null : }\n
    \n )\n\n );\n};\n\nconst mapStateToProps = state => {\n const { builderType } = state.ui;\n const { formWidth, styleJSON } = state.formProperties;\n const showFormCoverArea = state.ui.rightPanelMode === 'coverimage' && state.ui.isRightPanelOpen;\n const { username, accountType } = state.user;\n\n return {\n accountType,\n builderType,\n formWidth,\n showFormCoverArea,\n styleJSON,\n username,\n formLogoProperties: getFormLogoProperties(state),\n };\n};\n\nfunction mapDispatchToProps(dispatch) {\n return {\n actions: bindActionCreators(_actions, dispatch)\n };\n}\n\nconst getFormLogoProperties = state => {\n const { formCover, styleJSON } = state.formProperties;\n\n if (styleJSON?.['@formCover'] !== '1' || typeof styleJSON['@formCoverImg'] === 'undefined') {\n // if the old formCover prop exist, just use it\n if (formCover && formCover !== 'null') {\n return formCover;\n }\n\n return null;\n }\n\n return {\n topPosition: styleJSON['@formCoverTopPosition']?.toLowerCase(),\n bottomMargin: parseInt(styleJSON['@formCoverBottomMargin'], 10),\n image: {\n url: styleJSON['@formCoverImg'],\n width: styleJSON['@formCoverImgWidth'],\n height: styleJSON['@formCoverImgHeight'],\n },\n };\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(FormLogoWrapper);\n","import PropTypes from 'prop-types';\nimport React, { Component } from 'react';\n\nimport IconSVG from '../../components/IconSVG';\nimport { translate } from '../../mixins/Translation';\n\nclass CardWelcome extends Component {\n constructor(props) {\n super(props);\n if (this.props.passive === true) {\n this.onWelcomeImageClick = this.onWelcomeImageClick.bind(this);\n this.handleQuestionCountClick = this.handleQuestionCountClick.bind(this);\n }\n }\n\n onWelcomeImageClick(e) {\n this.props.wizardMethod();\n e.stopPropagation();\n this.props.recordLogoVariant('addlogo-clicked');\n }\n\n renderWelcomeImage() {\n const imageSrc = this.props.imageSrc.value;\n const logoLoaded = !!imageSrc;\n\n const isJotFormsSvg = /\\/icon-sets\\/|\\/icon-sets-v2\\//.test(imageSrc);\n\n return (\n
    \n { logoLoaded && isJotFormsSvg\n && (\n \n )}\n { logoLoaded && !isJotFormsSvg\n && (\n \n )}\n { !logoLoaded\n && (\n \n {translate('Click to add logo')}\n
    \n )}\n \n );\n }\n\n renderSectionInfo() {\n let sectionInfo = '';\n const questionCount = this.props.questionCount;\n if (this.props.showQuestionCount && this.props.showQuestionCount.value === 'Yes') {\n sectionInfo = translate('{number} Questions').replace('{number}', questionCount.toString());\n return (\n
    \n

    \n {sectionInfo}\n \n

    \n
    \n );\n }\n return (\n
    \n \n {translate('Click to add question count')}\n
    \n \n );\n }\n\n renderPdfPreview = () => {\n const { importedPdfEnableThumbnail, importedPdfWelcomeThumbnail } = this.props;\n\n if (importedPdfEnableThumbnail === 'Yes') {\n return (\n
    \n
    \n \n \n
    \n
    \n );\n }\n\n return (\n
    \n \n {translate('Click to add PDF preview')}\n
    \n \n );\n };\n\n render() {\n const { showAsHeading, importedPdfEnableThumbnail, passive } = this.props;\n\n return (\n
    \n
    \n {showAsHeading !== false && this.renderWelcomeImage()}\n {this.createHeaderTag()}\n {showAsHeading !== false && this.createSubHeader()}\n {(showAsHeading !== false && importedPdfEnableThumbnail) && this.renderPdfPreview()}\n {showAsHeading !== false && this.renderSectionInfo()}\n {showAsHeading !== false && this.createButton()}\n
    \n
    \n );\n }\n\n handleQuestionCountClick(e) {\n this.props.questionCountClick();\n e.stopPropagation();\n }\n\n createHeaderTag() {\n const headerProps = {\n id: `header_${this.props.id.value}`,\n className: 'jfWelcome-header form-header',\n 'data-component': 'header'\n };\n\n let inline;\n if (this.props.inlineEditClass) {\n inline = React.createElement(this.props.inlineEditClass, {\n id: 'Form',\n propPath: 'welcomePage[0].title',\n // text: htmlDecode(sanitize(this.props.text.value)) || '',\n text: this.props.text.value || '',\n defaultValue: 'Default value not found',\n placeholder: translate('Type a header'),\n focusToElement: this.props.inlineEditFocusToElement ? this.props.inlineEditFocusToElement : null,\n isFirstHeader: this.props.inlineEditIsFirstHeader || false,\n pageTitle: this.props.inlineEditPageTitle || '',\n isMobile: this.props.isMobile || false\n });\n }\n\n return (\n
    \n {/* inline || htmlDecode(sanitize(this.props.text.value)) */}\n {inline || this.props.text.value}\n
    \n );\n }\n\n createSubHeader() {\n let inline;\n if (this.props.inlineEditClass) {\n inline = React.createElement(this.props.inlineEditClass, {\n id: 'Form',\n propPath: 'welcomePage[0].subTitle',\n // text: htmlDecode(sanitize(this.props.subHeader.value)) || '',\n text: this.props.subHeader.value || '',\n defaultValue: translate('Default Sub Header'),\n placeholder: translate('Type a subheader'),\n isMobile: this.props.isMobile || false\n });\n }\n\n if (this.props.inlineEditClass || (this.props.subHeader && this.props.subHeader.value && this.props.subHeader.value !== 'Click to edit sub heading...')) {\n return (\n \n {/* inline || htmlDecode(sanitize(this.props.subHeader.value)) */}\n {inline || this.props.subHeader.value}\n \n );\n }\n return null;\n }\n\n createButton() {\n if (this.props.inlineEditClass) {\n const inline = React.createElement(this.props.inlineEditClass, {\n id: 'Form',\n propPath: 'welcomePage[0].buttonText',\n // text: htmlDecode(sanitize(this.props.buttonText.value)) || '',\n text: this.props.buttonText.value || '',\n defaultValue: 'Start Answering',\n placeholder: translate('Type a \"Start\" button text'),\n isMobile: this.props.isMobile || false\n });\n\n return (\n
    \n
    \n {/* inline || htmlDecode(sanitize(this.props.buttonText.value)) */}\n {inline}\n
    \n
    \n );\n }\n return (\n
    \n \n
    \n );\n }\n\n handlePreviewPDF = () => {\n const { importedPdfEnableThumbnail, updateMethod } = this.props;\n\n updateMethod({ importedPdfEnableThumbnail: importedPdfEnableThumbnail === 'Yes' ? 'No' : 'Yes' });\n };\n}\n\nCardWelcome.defaultProps = {\n recordLogoVariant: f => f\n};\n\nCardWelcome.propTypes = {\n id: PropTypes.shape({\n value: PropTypes.string\n }),\n text: PropTypes.shape({\n value: PropTypes.string\n }),\n subHeader: PropTypes.shape({\n value: PropTypes.string\n }),\n imageSrc: PropTypes.shape({\n value: PropTypes.string\n }),\n buttonText: PropTypes.shape({\n value: PropTypes.string\n }),\n showQuestionCount: PropTypes.shape({\n value: PropTypes.string\n }),\n questionCount: PropTypes.number,\n passive: PropTypes.bool,\n onButtonClick: PropTypes.func,\n inlineEditClass: PropTypes.elementType,\n questionCountClick: PropTypes.func,\n wizardMethod: PropTypes.func,\n inlineEditFocusToElement: PropTypes.bool,\n inlineEditPageTitle: PropTypes.string,\n inlineEditIsFirstHeader: PropTypes.bool,\n isMobile: PropTypes.bool,\n showAsHeading: PropTypes.bool,\n importedPdfEnableThumbnail: PropTypes.string,\n importedPdfWelcomeThumbnail: PropTypes.string,\n updateMethod: PropTypes.func,\n recordLogoVariant: PropTypes.func\n};\n\nexport default CardWelcome;\n","import PropTypes from 'prop-types';\nimport React, { Component } from 'react';\nimport { CardWelcome } from '@jotforminc/builder-components';\nimport { t } from '@jotforminc/translation';\nimport { closest } from '@jotforminc/utils';\n\nimport InlineEditor from '../form/InlineEditor';\nimport { clickedOnScrollbar, isBrightColor } from '../../libs/Utils';\n\nclass WelcomePage extends Component {\n constructor(props) {\n super(props);\n this.renderWelcomePage = this.renderWelcomePage.bind(this);\n this.handleWelcomePageButtonClick = this.handleWelcomePageButtonClick.bind(this);\n this.handleRemoveWelcomePage = this.handleRemoveWelcomePage.bind(this);\n this.listenOutsideClick = this.listenOutsideClick.bind(this);\n this.handleQuestionCountClick = this.handleQuestionCountClick.bind(this);\n this.eventListenerStatus = false;\n }\n\n UNSAFE_componentWillReceiveProps(nextProps) {\n if (nextProps.showWelcomePage && !this.eventListenerStatus) {\n global.addEventListener('mousedown', this.listenOutsideClick);\n this.eventListenerStatus = true;\n }\n }\n\n listenOutsideClick(e) {\n if (this.props.showWelcomePage\n && !closest(e.target, '.jfWelcome')\n && !closest(e.target, '.welcome-close-btn-text')\n && !closest(e.target, '.welcomepagewizard')\n && !closest(e.target, '.formPage-removePage')\n && !closest(e.target, '.forDesigner')\n && !(this.props.isRightPanelOpen && this.props.rightPanelMode === 'design')\n && !clickedOnScrollbar(e.clientX)\n ) {\n e.stopPropagation();\n global.document.activeElement.blur();\n this.props.toggleVisibilityMethod();\n global.removeEventListener('mousedown', this.listenOutsideClick);\n this.eventListenerStatus = false;\n }\n }\n\n handleQuestionCountClick() {\n const currentVal = this.props.formProperties.welcomePage[0].showQuestionCount ? this.props.formProperties.welcomePage[0].showQuestionCount : 'No';\n const newVal = currentVal === 'Yes' ? 'No' : 'Yes';\n this.props.updateFormPropertyMethod({ welcomePage: [{ showQuestionCount: newVal }] });\n }\n\n handleWelcomePageButtonClick() {\n this.props.toggleVisibilityMethod(!this.props.showWelcomePage);\n // If welcome page is not active, lets active it\n if (this.props.formProperties.welcomePage && this.props.formProperties.welcomePage[0].isActive == '0') { // eslint-disable-line\n this.props.updateFormPropertyMethod({ welcomePage: [{ isActive: '1' }] });\n }\n }\n\n handleRemoveWelcomePage(e) {\n e.stopPropagation();\n this.props.updateFormPropertyMethod({ welcomePage: [{ isActive: '0' }] });\n this.props.toggleVisibilityMethod(false);\n }\n\n renderRemoveButton() {\n return (\n \n \n { t('Remove Welcome Page') }\n \n \n );\n }\n\n renderWelcomePage() {\n if (!WelcomePage) { return (
    {t('Welcome page not found.')}
    ); }\n const {\n formProperties: {\n welcomePage, importedPDF, importedPdfEnableThumbnail, importedPdfWelcomeThumbnail, formStrings\n },\n updateFormPropertyMethod, toggleOwnWizard, questionCount,\n recordLogoVariant = f => f\n } = this.props;\n const { showQuestionCount } = welcomePage[0];\n const buttonText = formStrings[0]?.startButtonText;\n\n const welcomeProps = {\n id: { value: 'welcome_page' },\n text: { value: welcomePage[0].title },\n subHeader: { value: welcomePage[0].subTitle },\n imageSrc: { value: welcomePage[0].logo },\n showQuestionCount: { value: showQuestionCount ? showQuestionCount : 'No' },\n buttonText: { value: buttonText || welcomePage[0].buttonText },\n updateMethod: updateFormPropertyMethod,\n wizardMethod: toggleOwnWizard,\n passive: true,\n questionCount: questionCount,\n questionCountClick: this.handleQuestionCountClick,\n recordLogoVariant,\n ...(importedPDF ? {\n importedPdfEnableThumbnail,\n importedPdfWelcomeThumbnail\n } : {})\n };\n const inlineEditProps = {\n inlineEditClass: InlineEditor,\n };\n\n const removeButton = this.renderRemoveButton();\n const rendered = (\n \n );\n const { formWidth } = this.props.formProperties;\n const { builderType, cardWidth } = this.props;\n const isCardForm = builderType === 'card';\n\n return (\n \n
    \n \n {removeButton}\n
    \n \n \n {rendered}\n \n \n );\n }\n\n render() {\n const { welcomePage, formWidth, styleJSON } = this.props.formProperties;\n const isWelcomePageExists = welcomePage && welcomePage[0].isActive == true; //eslint-disable-line\n const { showWelcomePage } = this.props;\n const text = isWelcomePageExists ? 'EDIT WELCOME PAGE' : `+ ${'ADD WELCOME PAGE'}`;\n const brightColor = styleJSON ? isBrightColor(styleJSON['pageBg-colorBegin'], 0.8) : true;\n let rendered;\n if (!showWelcomePage) {\n rendered = (\n \n \n {t(text)}\n \n \n );\n } else {\n rendered = this.renderWelcomePage();\n }\n return (\n \n {rendered}\n \n );\n }\n}\n\nWelcomePage.propTypes = {\n showWelcomePage: PropTypes.bool,\n isRightPanelOpen: PropTypes.bool,\n rightPanelMode: PropTypes.string,\n formProperties: PropTypes.shape(),\n toggleVisibilityMethod: PropTypes.func,\n updateFormPropertyMethod: PropTypes.func,\n recordLogoVariant: PropTypes.func,\n questionCount: PropTypes.number\n};\n\nexport default WelcomePage;\n","import React from 'react';\nimport { connect } from 'react-redux';\nimport { bindActionCreators } from 'redux';\nimport * as _actions from '../../actions';\nimport { IGNORED_FIELDS } from '../../constants/cardFormFields';\nimport WelcomePage from '../welcomePage';\nimport { recordLogoVariant } from './stageUtils';\n\nconst WelcomePageWrapper = ({\n actions,\n builderType,\n cardWidth,\n formProperties,\n isRightPanelOpen,\n rightPanelMode,\n showWelcomePage,\n user,\n visibleQuestionCount\n}) => {\n const _recordLogoVariant = action => {\n recordLogoVariant(action, user.username, user.accountType);\n };\n\n return (\n \n );\n};\n\nconst mapStateToProps = state => {\n const visibleQuestionCount = state.questions.filter(p => p.hidden !== 'Yes' && p.type !== 'control_head' && IGNORED_FIELDS.indexOf(p.type) === -1).length;\n const {\n builderType,\n cardWidth,\n isRightPanelOpen,\n rightPanelMode,\n showWelcomePage,\n\n } = state.ui;\n const { formProperties, user } = state;\n return {\n builderType,\n cardWidth,\n formProperties,\n isRightPanelOpen,\n rightPanelMode,\n showWelcomePage,\n user,\n visibleQuestionCount\n };\n};\n\nfunction mapDispatchToProps(dispatch) {\n return {\n actions: bindActionCreators(_actions, dispatch)\n };\n}\n\nexport default connect(mapStateToProps, mapDispatchToProps)(WelcomePageWrapper);\n","import React from 'react';\nimport { connect } from 'react-redux';\nimport { bindActionCreators } from 'redux';\nimport * as _actions from '../../actions';\nimport ThankYouPage from '../thankYouPage';\nimport { logJotFormEvents } from '../../libs/Utils';\n\nconst ThankYouPageWrapper = ({\n actions,\n allowNewThankYouPage,\n builderType,\n cardWidth,\n formProperties,\n isRightPanelOpen,\n rightPanelMode,\n showThankYouPage,\n accountType,\n username,\n hideActionButtons\n}) => {\n const sendAnalytics = action => {\n logJotFormEvents('form-builder', {\n actor: username,\n action,\n target: `card-${formProperties.id}`\n }, accountType);\n };\n\n return (\n \n );\n};\n\nconst mapStateToProps = state => {\n const {\n builderType,\n cardWidth,\n isRightPanelOpen,\n rightPanelMode,\n showThankYouPage,\n } = state.ui;\n const { formProperties } = state;\n const {\n allowNewThankYouPage,\n accountType,\n username,\n isCSICollaborator\n } = state.user;\n return {\n allowNewThankYouPage,\n builderType,\n cardWidth,\n formProperties,\n isRightPanelOpen,\n rightPanelMode,\n showThankYouPage,\n accountType,\n username,\n hideActionButtons: isCSICollaborator\n };\n};\n\nfunction mapDispatchToProps(dispatch) {\n return {\n actions: bindActionCreators(_actions, dispatch)\n };\n}\n\nexport default connect(mapStateToProps, mapDispatchToProps)(ThankYouPageWrapper);\n","import React from 'react';\nimport ReactDOM from 'react-dom';\nimport { getRootElement } from './utils';\n\nconst renderAsset = ({ Asset, rootElementId, ...props }) => {\n const rootEl = getRootElement(rootElementId);\n\n const handleClose = () => {\n ReactDOM.unmountComponentAtNode(rootEl);\n };\n\n ReactDOM.render(\n ,\n rootEl\n );\n};\n\nexport default renderAsset;\n","/* eslint-disable max-len */\n/* global HTMLElement */\nimport React, { useEffect, useRef } from 'react';\nimport { t } from '@jotforminc/translation';\nimport { func, instanceOf } from 'prop-types';\nimport { Popover } from '@jotforminc/uikit';\nimport { setCookie } from '@jotforminc/utils';\nimport {\n ALL_TEXTS, ASSET_IDENTIFIER, CTA_URLS,\n GA_SUFFIXES, createGaAttributes, gaDataLayerPushClose,\n setEPActions\n} from '@jotforminc/ep-utils';\nimport '../../../styles/whiteLabelingTooltip.scss';\n\nconst WhiteLabelingTooltip = ({ portalEl, onClose, logAbTestAction }) => {\n const popoverRef = useRef();\n const { AB_TEST: { MYFORMS_WHITE_LABELING_TOOLTIP_BANNER: target } } = ASSET_IDENTIFIER;\n const {\n MYFORMS_WHITE_LABELING_TOOLTIP_BANNER: {\n LEARN_MORE_URL\n }\n } = CTA_URLS;\n\n const gaAttributes = createGaAttributes(target);\n const gaAttributesCs = createGaAttributes(target, GA_SUFFIXES.CONTACT_SALES);\n const gaAttributesDm = createGaAttributes(target, GA_SUFFIXES.DISMISS);\n\n useEffect(() => {\n const actionData = { action: 'seen', target };\n\n logAbTestAction(actionData);\n setEPActions({ asset: target, ...actionData });\n }, [logAbTestAction]);\n\n const handleLearnMoreClick = () => {\n logAbTestAction({ target: `learnMoreButton-${target}`, action: 'click' });\n setEPActions({ asset: target, target: 'learnMoreButton', action: 'click' });\n setCookie('abNote', 'epBuilderTooltipFirstLogoUpload-test', 30);\n\n onClose();\n };\n\n const handleDismissClick = () => {\n gaDataLayerPushClose(gaAttributes);\n\n logAbTestAction({ target: `dismissButton-${target}`, action: 'click' });\n setEPActions({ asset: target, target: 'dismissButton', action: 'click' });\n\n onClose();\n };\n\n const popoverOptions = {\n placement: 'bottom-start',\n modifiers: [\n {\n name: 'offset',\n options: {\n offset: [-8, 12]\n }\n }]\n };\n\n return (\n \n
    \n
    \n

    {t(ALL_TEXTS.WHITE_LABEL_TITLE)}

    \n
    \n \n {t(ALL_TEXTS.WHITE_LABEL_LOGO_PLACEMENT_ANIMATION)}\n
    \n \n

    {t(ALL_TEXTS.WHITE_LABEL_CONTENT)}

    \n
    \n {/* dismiss */}\n \n {t(ALL_TEXTS.DISMISS)}\n \n {/* contact sales */}\n \n {t(ALL_TEXTS.LEARN_MORE)}\n \n
    \n \n \n \n );\n};\n\nWhiteLabelingTooltip.propTypes = {\n portalEl: instanceOf(HTMLElement).isRequired,\n logAbTestAction: func,\n onClose: func\n};\n\nWhiteLabelingTooltip.defaultProps = {\n logAbTestAction: f => f,\n onClose: f => f\n};\n\nexport default WhiteLabelingTooltip;\n","import { isHTMLElement, renderAsset } from '@jotforminc/ep-utils';\nimport { WhiteLabelingTooltip } from '../components';\n\nconst renderEnterpriseLogoTooltip = ({\n portalElSelector,\n ...props\n}) => {\n const portalEl = document.querySelector(portalElSelector);\n if (!isHTMLElement(portalEl)) {\n throw new Error('Portal element not found!');\n }\n\n renderAsset({\n Asset: WhiteLabelingTooltip,\n rootElementId: 'white-labeling-tooltip',\n portalEl,\n ...props\n });\n};\n\nexport default renderEnterpriseLogoTooltip;\n","import { ABTestManager } from '@jotforminc/abtest-manager';\nimport renderEnterpriseLogoTooltip from './renderEnterpriseLogoTooltip';\n\n// A/B: epBuilderTooltipFirstLogoUpload\nconst initEpBuilderTooltipFirstLogoUpload = async (user, alreadyUploadedCompanyLogo) => {\n const URL_PARAM = 'epbtflu';\n\n const urlParams = new URLSearchParams(window.location.search);\n const shouldBypass = urlParams.get(URL_PARAM) === 'true';\n\n if (alreadyUploadedCompanyLogo && !shouldBypass) return;\n\n const abTestManager = new ABTestManager({\n user,\n isTestEnabled: true,\n testName: 'epBuilderTooltipFirstLogoUpload',\n controlVariantCode: '27812',\n testVariantCode: '27822',\n cacheVariantCodeAtLocalStorage: true,\n urlParam: URL_PARAM\n // debugMode: {\n // logTestState: true,\n // forceUserEligible: true,\n // forceTestVariant: true\n // }\n });\n\n const logAbTestAction = abTestManager.registerABTestAction;\n\n try {\n const isTestVariant = await abTestManager.isTestVariant();\n if (!isTestVariant) return;\n\n renderEnterpriseLogoTooltip({\n portalElSelector: '.jfLogo',\n logAbTestAction\n });\n } catch (error) {\n console.log(`Error on isTestVariant of initEpBuilderTooltipFirstLogoUpload: ${error}`);\n }\n};\n\nexport default initEpBuilderTooltipFirstLogoUpload;\n","/* eslint-disable no-nested-ternary */\n/* eslint-disable max-len */\nimport { func } from 'prop-types';\nimport React, { useRef, useEffect, useState } from 'react';\nimport { formatBytes } from '@jotforminc/utils';\nimport { IconExclamationCircleFilled } from '@jotforminc/svg-icons';\n\nimport '../../assets/styles/addLogoModal.less';\nimport { t } from '@jotforminc/translation';\n\nconst AddNewLogo = ({\n onChange,\n user: {\n company,\n company_logo\n },\n recordLogoVariant\n}) => {\n const dropAreaRef = useRef(null);\n const hiddenInputRef = useRef(null);\n\n const [isDragging, setIsDragging] = useState(false);\n const [imgObj, setImgObj] = useState({ file: '', value: company, dimensions: {} });\n\n useEffect(() => {\n ['dragenter', 'dragover', 'dragleave'].forEach(eventName => {\n dropAreaRef?.current?.addEventListener(eventName, e => {\n if (eventName === 'dragover') setIsDragging(true);\n if (eventName === 'dragleave') setIsDragging(false);\n e.preventDefault();\n e.stopPropagation();\n });\n });\n }, []);\n\n useEffect(() => {\n onChange(imgObj);\n }, [imgObj]);\n\n const prepareFile = file => {\n const reader = new global.FileReader();\n\n reader.readAsDataURL(file);\n reader.onload = function readerOnLoadFn(e) {\n const image = new global.Image();\n image.src = e.target.result;\n\n image.onload = function imageOnLoadFn() {\n const { height, width } = this;\n\n setImgObj({\n ...imgObj,\n file: file,\n dimensions: {\n width,\n height\n }\n });\n };\n\n recordLogoVariant('fileuploaded');\n };\n };\n const handleFileDrop = e => {\n e.preventDefault();\n e.stopPropagation();\n const files = e.target.files || e.dataTransfer.files;\n\n prepareFile(files[0]);\n };\n\n const removeLogo = e => {\n e.stopPropagation();\n setImgObj({ ...imgObj, file: '' });\n recordLogoVariant('orglogo-removed');\n };\n\n return (\n
    \n
    \n
    {t('Upload Organization Logo')}
    \n hiddenInputRef?.current?.click()}\n >\n {imgObj.file ? (\n <>\n
    \n \n
    \n \n

    {imgObj.file.name}

    \n \n {formatBytes(imgObj.file.size)}\n \n
    \n X\n \n ) : (\n <>\n
    \n {\n company_logo ? (\n \n ) : (\n \n \n \n )\n }\n
    \n \n

    {t('Drag logo image file or click here to upload')}

    \n {t('Max. file size 10 MB')}\n
    \n \n )}\n
    \n {\n imgObj?.file?.size > 10000000 && (\n \n \n {t('Maximum file size is 10 MB.')}\n \n )\n }\n
    \n
    \n
    {t('Organization Name')}
    \n setImgObj({ ...imgObj, value: e.target.value })}\n value={imgObj.value}\n placeholder={t('Your Company Logo Name')}\n className=\"add-logo-input\"\n onBlur={() => recordLogoVariant('orgname-clicked')}\n />\n
    \n \n \n );\n};\n\nAddNewLogo.propTypes = {\n onChange: func.isRequired,\n recordLogoVariant: func.isRequired\n};\n\nexport default AddNewLogo;\n","import React, { useEffect, useState } from 'react';\nimport { connect } from 'react-redux';\nimport { bindActionCreators } from 'redux';\nimport { withRouter } from 'react-router-dom';\nimport { isEnterprise } from '@jotforminc/enterprise-utils';\nimport { TwoButtonPopup as Modal } from '@jotforminc/two-button-popup';\nimport { t, translationRenderer } from '@jotforminc/translation';\nimport { IconGearFilled } from '@jotforminc/svg-icons';\nimport { initEpBuilderTooltipFirstLogoUpload } from '@jotforminc/enterprise-promotions';\nimport * as _actions from '../../actions';\nimport AddNewLogo from '../form/AddNewLogo';\nimport { isNewUser, recordLogoVariant } from './stageUtils';\nimport { endpoints } from '../../libs/api';\n\nconst renderDontShowCheckbox = setModalCookie => {\n return (\n \n \n \n );\n};\n\nconst AddNewLogoModalWrapper = ({\n actions,\n builderType,\n formProperties,\n location,\n user,\n}) => {\n const [dontShowModal, setDontShowModal] = useState(false);\n const [isModalVisible, setIsModalVisible] = useState(false);\n const [organizationSettings, setOrganizationSettings] = useState({});\n const isSaveButtonDisabled = organizationSettings?.company_logo?.size > 10000000 || (!organizationSettings?.company_logo && organizationSettings?.company === user?.company);\n\n useEffect(() => {\n const isCardBuilder = builderType === 'card';\n const isClassicBuilder = builderType === 'form';\n\n const { dontShowOrgModal, company_logo, created_at } = user;\n const _isNewUser = isNewUser(created_at, formProperties.id);\n\n const isAddWidgetStage = (location?.pathname || '').indexOf('/widget/add') !== -1;\n const isMobileApp = global.navigator.userAgent.indexOf('JotForm Mobile') > -1 || global.navigator.userAgent.indexOf('JFCEMobile') > -1;\n\n if (\n !isEnterprise()\n && _isNewUser\n && !company_logo\n && !formProperties.isOrganizationSettingModalClosed\n && !dontShowOrgModal\n && !isAddWidgetStage\n && (isClassicBuilder || isCardBuilder)\n && !isMobileApp) {\n setIsModalVisible(true);\n recordLogoVariant('orglogomodal-seen', user.username, user.accountType);\n }\n }, []);\n\n if (!isModalVisible) return null;\n const setModalCookie = e => {\n e.stopPropagation();\n setDontShowModal(e.target.checked);\n };\n\n const dontShowCheckbox = renderDontShowCheckbox(setModalCookie);\n\n const onCloseModal = e => {\n setIsModalVisible(!isModalVisible);\n\n if (!formProperties.isOrganizationSettingModalClosed) {\n actions.updateFormProperty({ isOrganizationSettingModalClosed: true });\n }\n\n if (dontShowModal) {\n endpoints.updateUserSettings({ dontShowOrgModal: true });\n }\n\n if (!e) {\n recordLogoVariant('outsideOfModal-clicked', user.username, user.accountType);\n } else {\n recordLogoVariant('modalClose-clicked', user.username, user.accountType);\n }\n };\n\n const handleFormLogoSettings = (url, dimensions) => {\n const { styleJSON } = formProperties;\n const expectedImgHeight = 140;\n let imgHeight = parseInt(dimensions.height, 10);\n let imgWidth = parseInt(dimensions.width, 10);\n const formWidth = styleJSON['@formWidth'] || formProperties.formWidth;\n let parsedFormWidth = formWidth ? formWidth.match(/\\d+/) : '';\n if (parsedFormWidth && parsedFormWidth[0]) {\n parsedFormWidth = parseInt(parsedFormWidth[0], 10);\n }\n if (imgHeight > expectedImgHeight) {\n const proportion = expectedImgHeight / imgHeight;\n imgWidth = Math.round(imgWidth * proportion);\n if (imgWidth.length === 0) {\n imgWidth = 0;\n }\n imgHeight = expectedImgHeight;\n }\n if (imgWidth > parsedFormWidth) { // if imgWidth is greater than form width, lets fix it to form width\n const proportion = parsedFormWidth / imgWidth;\n imgHeight = Math.round(imgHeight * proportion);\n if (imgHeight.length === 0) {\n imgHeight = 0;\n }\n imgWidth = parsedFormWidth;\n }\n styleJSON['@formCover'] = '1';\n styleJSON['@formCoverImg'] = url;\n styleJSON['@formCoverImgWidth'] = imgWidth;\n styleJSON['@formCoverImgHeight'] = imgHeight;\n styleJSON['@formCoverPosition'] = 'Top';\n styleJSON['@formCoverTopPosition'] = 'Center';\n styleJSON['@formCoverBottomMargin'] = 32;\n actions.updateFormProperty({ styleJSON: JSON.stringify(styleJSON) });\n };\n\n const saveOrganizationSettings = async () => {\n const { company, company_logo: companyLogo, dimensions } = organizationSettings;\n\n // A/B: epBuilderTooltipFirstLogoUpload\n const alreadyUploadedCompanyLogo = user.company_logo !== undefined;\n initEpBuilderTooltipFirstLogoUpload(user, alreadyUploadedCompanyLogo);\n\n try {\n const settings = {};\n if (companyLogo) {\n const { message } = await endpoints.uploadImageS3(companyLogo, companyLogo.name);\n if (message) {\n settings.company_logo = message;\n }\n if (builderType === 'card') {\n const prop = { welcomePage: [{ logo: message }] };\n actions.updateFormProperty(prop);\n } else {\n handleFormLogoSettings(message, dimensions);\n }\n }\n\n if (company) {\n settings.company = company;\n }\n\n if (dontShowModal) {\n settings.dontShowOrgModal = true;\n }\n\n setIsModalVisible(false);\n\n if (Object.keys(settings).length) {\n actions.updateUserSettings(settings);\n }\n\n if (companyLogo) {\n recordLogoVariant('orglogo-saved', user.username, user.accountType);\n }\n\n if (company) {\n recordLogoVariant('orgname-saved', user.username, user.accountType);\n }\n\n if (company !== user.company) {\n recordLogoVariant('orgname-updated', user.username, user.accountType);\n }\n\n recordLogoVariant('modalsaved', user.username, user.accountType);\n } catch (err) {\n console.log(err);\n }\n };\n\n const handleOrganizationSettingChange = ({ file, value, dimensions }) => {\n setOrganizationSettings({\n company: value,\n company_logo: file,\n dimensions\n });\n };\n\n return (\n <>\n {\n user.accountType !== 'GUEST' && (\n }\n title={
    {t('Organization Settings')}
    }\n subtitle={
    {t('Set your organization logo and name to use it in your forms.')}
    }\n className=\"forAddNewLogo\"\n modalContainer={global.document.querySelector('#portal-root')}\n footerContent={dontShowCheckbox}\n saveText={t('SAVE')}\n onSave={saveOrganizationSettings}\n onClose={onCloseModal}\n saveButtonDisabled={isSaveButtonDisabled}\n modalAutoFocus={true}\n modalTabIndex={0}\n buttonsTabIndex={0}\n modalAriaLabel={t('Organization Settings')}\n >\n recordLogoVariant(action, user.username, user.accountType)}\n />\n \n )\n }\n \n );\n};\n\nconst mapStateToProps = state => {\n const { formProperties, user } = state;\n const { builderType } = state.ui;\n return {\n builderType,\n formProperties,\n user\n };\n};\n\nfunction mapDispatchToProps(dispatch) {\n return {\n actions: bindActionCreators(_actions, dispatch)\n };\n}\n\nexport default connect(mapStateToProps, mapDispatchToProps)(withRouter(AddNewLogoModalWrapper));\n","import React from 'react';\nimport { t, translationRenderer } from '@jotforminc/translation';\nimport { handleCustomNavigation } from '@jotforminc/utils';\nimport { connect } from 'react-redux';\nimport { IconExclamationCircleFilled, IconExclamationTriangleFilled } from '@jotforminc/svg-icons';\nimport { LIMIT_LEVELS } from '../../constants/limitDefaults';\n\nconst FieldsLimitMessageNew = ({\n formId,\n limitLevel,\n isFormOwner\n}) => {\n const appEl = document.querySelector('#app');\n if (limitLevel !== LIMIT_LEVELS.DANGER && limitLevel !== LIMIT_LEVELS.WARNING && limitLevel !== LIMIT_LEVELS.NORMAL) {\n if (appEl) {\n appEl.classList.remove('limitationStageActive');\n }\n return null;\n }\n if (appEl) {\n document.querySelector('#app').classList.add('limitationStageActive');\n }\n\n const limitMessageText = isFormOwner ? (\n translationRenderer('[1[Upgrade your plan]] to increase your limit.')({\n renderer1: text => (\n \n {text}\n \n )\n })\n ) : (\n translationRenderer('[1[Contact the form owner]] to increase your limit so you can add more form elements.')({\n renderer1: text => (\n \n \n {text}\n \n \n )\n })\n );\n\n const limitClass = limitLevel !== LIMIT_LEVELS.DANGER ? 'warning' : 'danger';\n\n return (\n
    \n
    \n \n {limitLevel !== LIMIT_LEVELS.DANGER ? : }\n \n

    \n {limitLevel !== LIMIT_LEVELS.DANGER ? t('You have almost reached your limits!') : t('You have reached your limits!')}\n  \n {limitMessageText}\n

    \n
    \n {isFormOwner && (\n {\n handleCustomNavigation(\n `/pricing?utm_source=builder&utm_medium=banner&utm_campaign=form-element-limitation-new${limitLevel !== LIMIT_LEVELS.DANGER ? '-almostfull' : ''}&utm_term=form-top-button&utm_content=${formId}`,\n '_blank'\n );\n }}\n >\n {t('Upgrade Your Plan')}\n \n )}\n
    \n );\n};\n\nconst mapStateToProps = state => {\n const { limitLevel } = state.ui;\n const formId = state.form.id;\n const { user: { isFormOwner } } = state;\n\n return {\n formId,\n isFormOwner,\n limitLevel\n };\n};\n\nexport default connect(mapStateToProps)(FieldsLimitMessageNew);\n","import PropTypes from 'prop-types';\nimport React, { Component } from 'react';\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport findLast from 'lodash/findLast';\nimport sortBy from 'lodash/sortBy';\nimport find from 'lodash/find';\nimport filter from 'lodash/filter';\n\nimport { ABTestManager, getTestStartDate } from '@jotforminc/abtest-manager';\nimport { getUrlParameter } from '@jotforminc/utils';\n// import { WhatsNewModalDialogue } from '@jotforminc/jotform-common';\nimport { StorageHelper } from '@jotforminc/storage-helper';\nimport * as actions from '../../actions';\nimport { ONLY_MULTIPLE_UPLOAD_PAYMENT_TYPES } from '../../constants/payment_types';\nimport FormPage from '../FormPage';\nimport generateAlignmentRule from '../../libs/generate_label_align_rules';\nimport { logJotFormEvents, isLiteMode, isAIBuilder } from '../../libs/Utils';\nimport { stageSelector } from '../../selectors/uiSelectors';\nimport HIPAAWarning from './HIPAAWarning';\nimport MobileAccessibilityErrorCountWrapper from './MobileAccessibilityErrorCountWrapper';\nimport FormAccessibilityWrapper from './FormAccessibilityWrapper';\nimport FieldsLimitMessage from './FieldsLimitMessage';\nimport FormLogoWrapper from './FormLogoWrapper';\nimport WelcomePageWrapper from './WelcomePageWrapper';\nimport ThankYouPageWrapper from './ThankYouPageWrapper';\nimport AddNewLogoModalWrapper from './AddNewLogoModalWrapper';\nimport { isNewUser } from './stageUtils';\nimport FieldsLimitMessageNew from './FieldsLimitMessageNew';\nimport { LIMIT_LEVELS } from '../../constants/limitDefaults';\n\nclass Stage extends Component {\n constructor(props) {\n super(props);\n this.renderPage = this.renderPage.bind(this);\n this.handleQuestionDeselect = this.handleQuestionDeselect.bind(this);\n this.distributeFormFieldLimitABTest = this.distributeFormFieldLimitABTest.bind(this);\n this.handleWhatsNewModalClose = this.handleWhatsNewModalClose.bind(this);\n\n this.state = {\n showFieldLimitAlmostFull: false,\n isSquareModalHidden: false\n };\n }\n\n componentDidMount() {\n const {\n user: { created_at }, ui: { builderType }, formProperties: { alignment, id }\n } = this.props;\n const isCardBuilder = builderType === 'card';\n const isClassicBuilder = builderType === 'form';\n\n if (!isCardBuilder) {\n this.generateAlignmentCSS(alignment);\n }\n\n const _isNewUser = isNewUser(created_at, id);\n\n if (isCardBuilder || isClassicBuilder) {\n window.isNewUser = _isNewUser;\n }\n\n if (_isNewUser) {\n logJotFormEvents('organizationLogo', {\n actor: this.props.user.username,\n action: 'initial_landing',\n target: 'form'\n }, this.props.user.accountType);\n }\n\n (async () => {\n const getTestVariant = await this.distributeFormFieldLimitABTest();\n this.setState({\n showFieldLimitAlmostFull: getTestVariant\n });\n })();\n }\n\n shouldComponentUpdate(nextProps) {\n // Don't re-render if we are going to preview mod\n // It fixes, flashing widgets and flashing buttons after clicking preview.\n if (nextProps.ui.isPreviewModOn === true) {\n return false;\n }\n return true;\n }\n\n async distributeFormFieldLimitABTest() {\n try {\n const urlParam = 'fbflaf';\n if (getUrlParameter(urlParam)) return true;\n\n const { user, limitLevel } = this.props;\n\n if (user?.account_type?.name !== 'FREE' || !Object.keys(LIMIT_LEVELS).includes(limitLevel) || window.JOTFORM_ENV !== 'PRODUCTION') return false;\n\n const testName = 'formBuilderFieldLimitAlmostFull';\n const startDate = await getTestStartDate({ testName });\n\n if (typeof startDate === 'object' || !startDate || (new Date(startDate) - new Date(user?.created_at) > -1)) return false;\n\n const abTestManager = new ABTestManager({\n user: user,\n isTestEnabled: true,\n testName: testName,\n testVariantCode: '14551',\n controlVariantCode: '14541',\n urlParam: urlParam,\n cacheVariantCodeAtLocalStorage: true\n });\n\n const getTestVariant = await abTestManager.isTestVariant();\n if (getTestVariant) return true;\n } catch (error) {\n return false;\n }\n }\n\n /**\n * Unselect any question that is selected in the form page.\n */\n handleQuestionDeselect() {\n this.props.actions.updateSelectedQuestion(undefined);\n }\n\n handleWhatsNewModalClose() {\n if (StorageHelper.getLocalStorageItem({ key: 'whatsNewPaymentModalShown' }) === null) {\n StorageHelper.setLocalStorageItem({ key: 'whatsNewPaymentModalShown', value: true });\n this.setState({ isSquareModalHidden: true });\n }\n }\n\n getNewPageOrder(questions, pageQuestions, pageBreakQuestion) {\n const LastButton = findLast(pageQuestions, q => q.type === 'control_button');\n let newPageOrder;\n if (LastButton) {\n newPageOrder = questions.indexOf(LastButton) + 2;\n } else if (pageBreakQuestion) {\n newPageOrder = questions.indexOf(pageBreakQuestion) + 2;\n } else {\n newPageOrder = pageQuestions.length;\n }\n return newPageOrder;\n }\n\n // TO DO : If user is trying to move non-Consecutive questions disable user select.\n canUserDrag(questions, selectedQuestions, pabeBreaks) {\n if (selectedQuestions.length > 0) {\n const isPageBreakSelected = pabeBreaks.filter(q => selectedQuestions.indexOf(q.qid) !== -1).length !== 0;\n if (isPageBreakSelected) {\n return false;\n }\n // Check if empty_form is in the form sorry for using this here.\n // this is a duplicate condition, if you change here you need to change FormPage/ renderEmptyLine function.\n if (questions.length === 2) {\n if (questions[0].type === 'control_head' && questions[1].type === 'control_button' && this.props.ui.questionAddCounter < 1) {\n return false;\n }\n }\n\n const allQuestionIDList = questions.map(q => { return parseInt(q.qid, 10); });\n const selectedQidList = selectedQuestions.map(q => { return parseInt(q, 10); });\n const selectedQuestionIndexes = sortBy(selectedQidList.map(q => { return allQuestionIDList.indexOf(q); }));\n const isConsecutiveQuestions = selectedQuestionIndexes.length === (Math.max(...selectedQuestionIndexes) - Math.min(...selectedQuestionIndexes)) + 1;\n return isConsecutiveQuestions;\n }\n return true;\n }\n\n generateAlignmentCSS(alignment) {\n const generatedRule = generateAlignmentRule(alignment, true);\n const ruleBreak = ' /*APPEND RULE*/';\n const ruleString = [ruleBreak, generatedRule].join('\\n');\n const formStyleObj = global.document.getElementById('form-styles');\n\n if (formStyleObj) {\n formStyleObj.innerHTML = formStyleObj.innerHTML.split(ruleBreak)[0] + ruleString;\n }\n }\n\n renderPage(questions, pageNumber, newPageOrder, isFirstPage, isLastPage, pageQid, enableDrag = true, hasOnlyMultiplePayment = false) {\n let _questions;\n // Lets render \"back button\" for last page if we have multiple pages.\n if (pageNumber > 1 && isLastPage) {\n _questions = [...questions, findLast(this.props.questions, q => q.type === 'control_pagebreak')];\n } else {\n _questions = questions;\n }\n const {\n formProperties, ui, users, user, paymentConnection, productStock\n } = this.props;\n const collabrativeUsersWithoutMe = filter(users, q => q.username !== user.username);\n const isHIPAAForm = formProperties && formProperties.isHIPAA === '1';\n return (\n \n );\n }\n\n render() {\n const isCardBuilder = this.props.ui.builderType === 'card';\n let hasOnlyMultiplePayment = false;\n const { questions } = this.props;\n const pages = [];\n const pageBreakIndexes = [];\n for (let q = 0; q < questions.length; q++) {\n const question = questions[q];\n if (!isCardBuilder && question.type === 'control_pagebreak') { // Disables pagination on card builder\n pageBreakIndexes.push({ index: q + 1, qid: question.qid });\n }\n if (ONLY_MULTIPLE_UPLOAD_PAYMENT_TYPES.indexOf(question.type) > -1) {\n hasOnlyMultiplePayment = true;\n }\n }\n const canUserDrag = this.canUserDrag(questions, this.props.ui.selectedQuestions, pageBreakIndexes);\n\n // Lets render questions for every page\n for (let index = 0; index < pageBreakIndexes.length; index++) {\n const begin = index === 0 ? 0 : pageBreakIndexes[index - 1].index;\n const pageBreakQid = pageBreakIndexes[index].qid;\n const pageQuestions = questions.slice(begin, pageBreakIndexes[index].index);\n const pageBreakQuestion = find(questions, q => q.qid == pageBreakQid); // eslint-disable-line\n const newPageOrder = this.getNewPageOrder(questions, pageQuestions, pageBreakQuestion);\n const isFirstPage = index === 0;\n const renderedPage = this.renderPage(pageQuestions, (pageBreakIndexes.indexOf(pageBreakIndexes[index]) + 1), newPageOrder, isFirstPage, false, pageBreakQid, canUserDrag);\n pages.push(renderedPage);\n }\n // lets render questions for last page\n let pageBreakQid;\n if (pageBreakIndexes.length > 0) {\n pageBreakQid = pageBreakIndexes[pageBreakIndexes.length - 1].qid;\n } else {\n pageBreakQid = (questions[questions.length - 1] ? questions[questions.length - 1].qid : undefined);\n }\n const pageBreakQuestion = find(questions, q => q.qid == pageBreakQid); // eslint-disable-line\n const lastPageQuestions = pageBreakIndexes.length > 0 ? questions.slice(pageBreakIndexes[pageBreakIndexes.length - 1].index, questions.length) : questions;\n const newPageOrder = this.getNewPageOrder(questions, lastPageQuestions, pageBreakQuestion);\n const renderedPage = this.renderPage(lastPageQuestions, (pageBreakIndexes.length + 1), newPageOrder - 1, false, true, pageBreakQid, canUserDrag, hasOnlyMultiplePayment);\n const disableEffects = global.disableEffects === true; // temporarily\n pages.push(renderedPage);\n const aiBuilderStyles = isAIBuilder() ? { pointerEvents: 'none' } : {};\n // const isSquareQuestion = this.props.questions.find(q => q.type === 'control_square');\n // const isSquareWhatsNewModalOpened = isSquareQuestion?.builderLabel === 'Square' && StorageHelper.getLocalStorageItem({ key: 'whatsNewPaymentModalShown' });\n\n return (\n <>\n \n {/* {isSquareWhatsNewModalOpened === null && !this.state.isSquareModalHidden\n && (\n \n )} */}\n \n \n \n {this.state.showFieldLimitAlmostFull ? (\n \n ) : (\n \n )}\n {!isCardBuilder && }\n {isCardBuilder && }\n {pages}\n {isCardBuilder && }\n \n {/** Bypass the modal for AI builder, templates and also if the current user isn't the form owner (collab) */}\n {!isLiteMode() && !window.location.href.includes('s=templates') && !window.csiCollaborator && }\n \n );\n }\n}\n\nStage.propTypes = {\n questions: PropTypes.arrayOf(PropTypes.shape()),\n formProperties: PropTypes.shape().isRequired,\n ui: PropTypes.shape().isRequired,\n actions: PropTypes.shape().isRequired,\n users: PropTypes.arrayOf(PropTypes.shape()),\n user: PropTypes.shape().isRequired,\n paymentConnection: PropTypes.arrayOf(PropTypes.shape()),\n productStock: PropTypes.arrayOf(PropTypes.shape()),\n};\n\nfunction mapDispatchToProps(dispatch) {\n return {\n actions: bindActionCreators(actions, dispatch)\n };\n}\n\nfunction mapStateToProps(state) {\n const ui = stageSelector(state.ui);\n return {\n formProperties: state.formProperties,\n questions: state.questions,\n ui: ui,\n users: state.users,\n user: state.user,\n stagedQuestions: state.stagedQuestions,\n widgets: state.widgets,\n notifications: state.notifications,\n paymentConnection: state.paymentConnection,\n productStock: state.productStock,\n form: state.form,\n limitLevel: ui.limitLevel\n };\n}\n\nexport default connect(mapStateToProps, mapDispatchToProps)(Stage);\n","import Stage from './Stage';\n\nexport default Stage;\n","import PropTypes from 'prop-types';\nimport React, { Component } from 'react';\nimport { t } from '@jotforminc/translation';\n\nclass RevisionFrame extends Component {\n constructor(props) {\n super(props);\n this.handleIframeLoaded = this.handleIframeLoaded.bind(this);\n this.state = {\n loaded: false,\n };\n }\n\n UNSAFE_componentWillReceiveProps(nextProps) {\n if (nextProps.revision !== this.props.revision) {\n this.setState({ loaded: false });\n }\n }\n\n handleIframeLoaded() {\n this.setState({ loaded: true });\n }\n\n render() {\n const revURL = `${global.JOTFORM_ENV !== 'PRODUCTION' ? global.window.location.origin : 'https://www.jotform.com'}/form/${this.props.formID}/${this.props.revision}?preview=true&revisionMode=true`;\n const { loaded } = this.state;\n\n return (\n
    \n {!loaded && (\n
    \n
    \n
    \n )}\n
    \n \n
    \n
    \n );\n }\n}\n\nRevisionFrame.propTypes = {\n // style: PropTypes.shape(),\n formID: PropTypes.string,\n revision: PropTypes.string,\n};\n\nexport default RevisionFrame;\n","import PropTypes from 'prop-types';\nimport React, { Component } from 'react';\nimport KeyHandler, { KEYDOWN } from 'react-key-handler';\n\nclass KeyEventHandler extends Component {\n constructor(props) {\n super(props);\n this.keyCodes = ['KeyZ', 'KeyY', 'KeyD', 'KeyC', 'KeyA', 'Delete', 'Escape', 'ArrowDown', 'ArrowUp', 'ArrowLeft', 'ArrowRight', 'KeyV', 'Space'];\n this.handleKeyEvents = this.handleKeyEvents.bind(this);\n this.renderHandler = this.renderHandler.bind(this);\n }\n\n onDownArrowPressed(e) {\n if (this.props.isPDFImporter && this.props.questionSelectionSource === 'pdf') {\n e.preventDefault();\n this.props.moveSelectedAnnotation(0, -1);\n } else if (document?.activeElement?.className?.includes('form-line')) {\n this.props.actions.moveSelectedQuestion('down', e.shiftKey);\n }\n }\n\n onUpArrowPressed(e) {\n if (this.props.isPDFImporter && this.props.questionSelectionSource === 'pdf') {\n e.preventDefault();\n this.props.moveSelectedAnnotation(0, 1);\n } else if (document?.activeElement?.className?.includes('form-line')) {\n this.props.actions.moveSelectedQuestion('up', e.shiftKey);\n }\n }\n\n onLeftArrowPressed(e) {\n if (this.props.isPDFImporter && this.props.questionSelectionSource === 'pdf') {\n e.preventDefault();\n this.props.moveSelectedAnnotation(-1, 0);\n }\n }\n\n onRightArrowPressed(e) {\n if (this.props.isPDFImporter && this.props.questionSelectionSource === 'pdf') {\n e.preventDefault();\n this.props.moveSelectedAnnotation(1, 0);\n }\n }\n\n onEscapePressed() {\n this.props.actions.updateSelectedQuestion();\n }\n\n onDeletePressed() {\n this.props.actions.deleteSelectedQuestions();\n }\n\n // Selects all questions and starts multiselect wizards when called.\n selectAllQuestions() {\n this.props.actions.selectAllQuestions();\n }\n\n openQuickSearch() {\n this.props.actions.toggleQuickSearchPanel();\n }\n\n addQuestionsToClipboard() {\n\n }\n\n handleUndoRedo(evt) {\n if (evt.shiftKey && evt.metaKey) {\n this.props.actions.handleRedo();\n } else if (evt.ctrlKey || evt.metaKey) {\n this.props.actions.handleUndo();\n evt.preventDefault();\n }\n }\n\n handleKeyEvents(evt) {\n const key = evt.keyCode;\n switch (key) {\n case 32:\n if (evt.altKey || evt.crtlKey) {\n this.openQuickSearch(evt);\n }\n break;\n case 37: // left\n this.onLeftArrowPressed(evt);\n break;\n case 38: // up\n this.onUpArrowPressed(evt);\n break;\n case 39: // right\n this.onRightArrowPressed(evt);\n break;\n case 40: // down\n this.onDownArrowPressed(evt);\n break;\n case 27: // escape\n this.onEscapePressed();\n break;\n case 46: // delete\n if (this.props.isPDFImporter && this.props.selectedQuestion && this.props.selectedQuestion.type === 'control_button') { return; } // Don't allow submit button deletion on pdf import mode\n this.onDeletePressed();\n break;\n case 65:\n if (evt.ctrlKey || evt.metaKey) {\n this.selectAllQuestions();\n evt.preventDefault();\n }\n break;\n case 67: // 'C' key\n if (this.props.isPDFImporter && !this.props.selectedQuestion) { return; } // Use default when only text selected from PDF\n if ((evt.ctrlKey || evt.metaKey) && !evt.shiftKey) {\n if (!window?.getSelection().toString()) {\n this.props.actions.addSelectedQuestionsToClipboard();\n evt.preventDefault();\n }\n }\n break;\n case 68: // 'D' key\n if (evt.ctrlKey || evt.metaKey) { // 'D' key\n if (this.props.isPDFImporter && this.props.questionSelectionSource === 'pdf') {\n this.props.duplicateWithShortcut();\n return;\n }\n this.props.actions.duplicateSelectedQuestions();\n evt.preventDefault();\n }\n break;\n case 86: // 'V' key\n if (evt.ctrlKey || evt.metaKey) {\n if (this.props.isPDFImporter && this.props.questionSelectionSource === 'pdf') {\n this.props.duplicateWithShortcut();\n return;\n }\n this.props.actions.pasteQuestionsFromClipboard();\n evt.preventDefault();\n }\n break;\n case 89: // 'Y' key\n if (evt.ctrlKey || evt.metaKey) {\n this.props.actions.handleRedo();\n evt.preventDefault();\n }\n break;\n case 90: // 'Z' key\n if (evt.shiftKey && evt.metaKey) {\n this.props.actions.handleRedo();\n evt.preventDefault();\n } else if (evt.ctrlKey || evt.metaKey) {\n this.props.actions.handleUndo();\n evt.preventDefault();\n }\n break;\n default:\n break;\n }\n }\n\n renderHandler() {\n return this.keyCodes.map(code => {\n return (\n \n );\n });\n }\n\n render() {\n const handler = this.renderHandler();\n return (\n
    \n {handler}\n
    \n );\n }\n}\n\nKeyEventHandler.propTypes = {\n actions: PropTypes.shape(),\n isPDFImporter: PropTypes.bool\n};\n\nexport default KeyEventHandler;\n","/* eslint-disable react/sort-comp */\nimport PropTypes from 'prop-types';\nimport React, { Component, Suspense } from 'react';\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport { getAppPath } from '@jotforminc/router-bridge';\nimport isString from 'lodash/isString';\nimport isEmpty from 'lodash/isEmpty';\nimport find from 'lodash/find';\nimport isArray from 'lodash/isArray';\nimport Tracking from '@jotforminc/tracking';\nimport { safeLazy } from '@jotforminc/safe-lazy-import';\nimport { PaymentActions, PaymentStore } from '@jotforminc/builder-components';\nimport Stage from '../components/Stage';\nimport RevisionFrame from '../components/revisionhistory/RevisionFrame';\n// import sendMessageToWorker from '../libs/send_message_to_worker';\nimport { parseJSON } from '../libs/Utils';\nimport PaymentDataCollector from '../libs/paymentDataCollector';\nimport KeyEventHandler from '../components/KeyEventHandler';\nimport * as actions from '../actions';\nimport PaymentTypes from '../constants/payment_types';\nimport { duplicateWithShortcut, moveSelectedAnnotation } from '../actions/pdfImport';\n\nconst LazyVideoBackground = safeLazy(() => import(/* webpackChunkName: \"LazyBackgroundVideo\" */ '../components/lazyComponents/LazyBackgroundVideo'));\n\nclass Builder extends Component {\n constructor(props) {\n super(props);\n this.handleStageClick = this.handleStageClick.bind(this);\n this.mergeOldForms = this.mergeOldForms.bind(this);\n this.checkCustomRoutes = this.checkCustomRoutes.bind(this);\n this.checkFormTypeChange = this.checkFormTypeChange.bind(this);\n this.renderVideoBackground = this.renderVideoBackground.bind(this);\n this.initPaymentRightPanelStore = this.initPaymentRightPanelStore.bind(this);\n this.PaymentStoreInstance = PaymentStore; // needs to be initialized\n this.state = {};\n }\n\n UNSAFE_componentWillMount() {\n // if user came with certain url like /${global.__BASE_ROUTE_PATH}/formid/preview we need to open preview mode\n if (this.props.location.pathname.indexOf('preview') !== -1 && !this.props.ui.isPreviewModOpen) {\n this.props.history.push(`/${global.__BASE_ROUTE_PATH}/${this.props.formProperties.id}#preview`);\n }\n const { builderType } = this.props.ui;\n const isCardBuilder = builderType === 'card' || global.buildermode === 'card';\n if (!isCardBuilder && global.isStyleMerged !== true) { // We need to do it for just once\n this.mergeOldForms();\n global.isStyleMerged = true;\n }\n\n // Force user to upload a document first\n if (this.props.ui.isPDFImporter && !this.props.formProperties.importedPDF) {\n const pdfURL = global.location.href.split('#importPDF');\n const basePath = getAppPath();\n\n if (pdfURL[1]) {\n // pass random pdf url sent by random tool to upload step\n this.props.history.push(`${basePath}/${this.props.formProperties.id}/upload#importPDF${pdfURL[1]}`);\n } else {\n this.props.history.push(`${basePath}/${this.props.formProperties.id}/upload`);\n }\n }\n\n if (this.props.ui.isPDFImporter) {\n this.props.actions.setImportedPdfDefaultProps();\n }\n if (this.props.location.pathname.indexOf('revisionhistory') !== -1) {\n if (this.props.ui.isRightPanelOpen && this.props.ui.rightPanelMode === 'revisionhistory') {\n return;\n }\n this.props.actions.fetchRevisionHistory(this.props.formProperties.id);\n this.props.actions.rightPanelToggle(true);\n this.props.actions.updateRightPanelMode('revisionhistory', true);\n this.props.history.replace(`/${global.__BASE_ROUTE_PATH}/${this.props.formProperties.id}`);\n }\n }\n\n componentDidMount() {\n // Remove old worker registrations for v4 beta users if still exists\n this.checkCustomRoutes();\n this.paymentRouteHandler();\n this.checkFormTypeChange();\n this.props.actions.handleFormHeightChange();\n PaymentDataCollector.setUserName(this.props.user.username);\n try {\n if (window.JOTFORM_ENV === 'PRODUCTION' && //eslint-disable-line\n global.navigator\n && global.navigator.serviceWorker\n && global.navigator.serviceWorker.getRegistrations) {\n global.navigator.serviceWorker.getRegistrations().then(registrations => {\n for (const registration of registrations) {\n if (registration && registration.scope\n && typeof registration.scope === typeof 'string'\n && registration.scope.indexOf('build') > -1) {\n if (registration.unregister) {\n registration.unregister();\n }\n }\n }\n });\n }\n } catch (e) {\n // Nothing\n }\n\n if (this.props.actions.isReusableConnectionEnabled()) {\n this.initPaymentRightPanelStore();\n }\n }\n\n initPaymentRightPanelStore() {\n try {\n const {\n user,\n questions,\n defaultMode,\n formProperties: {\n products,\n coupons,\n id,\n taxes,\n disabledShippingInfo,\n paymentStrings,\n paymentListSettings\n }\n } = this.props;\n const initParams = {\n user,\n questions,\n defaultMode,\n products,\n coupons,\n tax: taxes && taxes.length ? taxes[0] : null,\n formId: id,\n disabledShippingInfo,\n shippingText: paymentStrings && paymentStrings.length ? paymentStrings[0].shippingShipping : '',\n paymentListSettings\n };\n\n PaymentActions.initPayments(initParams);\n } catch (e) {\n // Nothing\n }\n }\n\n get isCardBuilder() {\n return this.props.ui.builderType === 'card';\n }\n\n get containerClassList() {\n const { formProperties, ui } = this.props;\n const wrapperClass = this.isCardBuilder ? ' jfForm-wrapper' : '';\n const imageClass = this.isCardBuilder && ui.backgroundImageLoadStatus === 'loaded' ? ' backgroundImageReady' : '';\n const colorSchemeClass = formProperties?.statelessColorScheme ? ` ${formProperties.statelessColorScheme}` : '';\n return `stageScroller supernova${wrapperClass}${imageClass}${colorSchemeClass}`;\n }\n\n componentDidCatch(error) {\n Tracking.configureScope(scope => {\n scope.addBreadcrumb({\n message: 'builder caught an error',\n category: 'app',\n level: 'error',\n data: {\n error: error\n }\n });\n });\n // this.setState({ error });\n }\n\n // Check form type, and reload page if necessary.\n checkFormTypeChange() {\n let isFormTypeChanged = false;\n // let oldToCard = global.document.readCookie('feedBackOldToCard') ? global.document.readCookie('feedBackOldToCard') : 0;\n // let cardToOld = global.document.readCookie('feedBackCardToOld') ? global.document.readCookie('feedBackCardToOld') : 0;\n if (global.buildermode === 'card' && this.props.formProperties.formType && this.props.formProperties.formType !== 'cardForm') {\n isFormTypeChanged = true;\n // cardToOld++;\n // global.document.createCookie('feedBackCardToOld', cardToOld, 2200);\n } else if (global.buildermode !== 'card' && this.props.formProperties.formType && this.props.formProperties.formType === 'cardForm') {\n isFormTypeChanged = true;\n // oldToCard++;\n // global.document.createCookie('feedBackOldToCard', oldToCard, 2200);\n }\n\n if (isFormTypeChanged) {\n global.location.reload();\n }\n }\n\n // FIXME: berkay..\n\n checkCustomRoutes() {\n const path = this.props.location.pathname.split('/').filter(a => a);\n if (path.indexOf('add') !== -1 && path.indexOf('widget') !== -1) { // add widget (url /build/:formId:widget/add/:widgetId)\n const { widgetId } = this.props.match.params;\n // this function gets and adds selected widget, we need to do it recursive because widget reducer is async!\n const addSelectedWidget = (_widgetId, remainingTryCount) => {\n if (remainingTryCount > 0) {\n const selectedWidget = find(this.props.widgets, w => w.client_id === _widgetId);\n const tryCount = remainingTryCount - 1;\n if (!selectedWidget) {\n setTimeout(() => {\n addSelectedWidget(_widgetId, tryCount);\n }, 250);\n } else {\n // do not add widget if the form is HIPAA compliant and the widget is unsecure\n const isHIPAA = this.props.formProperties.isHIPAA && this.props.formProperties.isHIPAA === '1';\n const isSecureWidget = selectedWidget.secure && selectedWidget.secure === 'Yes';\n if (isHIPAA && !isSecureWidget) {\n return false;\n }\n\n this.props.actions.addNewWidget(selectedWidget);\n this.props.history.replace(`/${global.__BASE_ROUTE_PATH}/${this.props.formProperties.id}`);\n }\n }\n };\n addSelectedWidget(widgetId, 10); // try for 10 times, for each 250ms because widgets is loading async\n }\n\n if (path.indexOf('cardthemes') >= 0) {\n this.props.actions.rightPanelToggle(true);\n this.props.actions.updateRightPanelMode('design');\n }\n }\n\n paymentRouteHandler() {\n const { hash } = this.props.location.hash && this.props.location;\n\n if (!this.props.questions || this.props.questions.length === 0) {\n return;\n }\n const paymentQuestion = this.props.questions.find(p => PaymentTypes.indexOf(p.type) > -1);\n const paypalOAuthGateways = ['control_paypalcomplete', 'control_paypalSPB', 'control_paypalInvoicing'];\n if (paymentQuestion && hash) {\n if (hash.indexOf('#selectPaymentQuestion') > -1 || (paypalOAuthGateways.includes(paymentQuestion.type) && hash.indexOf('#paypalConnection') > -1)) {\n this.props.actions.updateSelectedQuestion(paymentQuestion.qid);\n this.props.actions.rightPanelToggle(true);\n this.props.actions.updateRightPanelMode('paymentsettings');\n }\n }\n }\n\n mergeOldForms() {\n /* Merge Old styles to New Themes */\n const { formProperties } = this.props;\n const { isAIForm } = formProperties;\n const updatedFormProperties = {};\n const oldStlye2NewTheme = {\n form: '566a91c2977cdfcd478b4567', // Default theme\n nova: '566a91c2977cdfcd478b4567', // Default theme\n big: '54be8eef700cc415378b456a',\n industrial_dark: '54be8e68700cc40e378b4567',\n jottheme: '54be8ecb700cc443378b4568',\n solid: '54be8f18700cc4e0368b4568',\n pastel: '54be8d1c700cc4d5368b4567',\n post_it_yellow: '54be8d80700cc415378b4567',\n baby_blue: '54be8dc0700cc445378b4567',\n paper_grey: '54be8e8e700cc401378b4567',\n OldPaper: '54be8e34700cc4de368b4567',\n denimjeans: '54be8de7700cc4e1368b4567'\n };\n if (formProperties.styles && !formProperties.themeID && oldStlye2NewTheme[formProperties.styles]) {\n const themeID = oldStlye2NewTheme[formProperties.styles]; // or default theme;\n updatedFormProperties.themeID = themeID;\n updatedFormProperties.styles = '';\n } else if (!formProperties.themeID) {\n updatedFormProperties.themeID = '566a91c2977cdfcd478b4567';\n }\n\n // Fix stylejson for old forms.\n let { styleJSON } = formProperties;\n const props = [\n { name: 'pageColor', styleName: '@clrBg' },\n { name: 'inputColor', styleName: '@clrTextInputBg' },\n // { name: 'background', styleName: '@clrFrame' },\n { name: 'fontcolor', styleName: '@clrText' },\n { name: 'alignment', styleName: '@labelAlign' },\n { name: 'formWidth', styleName: '@formWidth' },\n { name: 'labelWidth', styleName: '@labelWidth' },\n { name: 'pageBackgroundImage', styleName: '@bgURL' },\n { name: 'formBackgroundImage', styleName: '@frameBgURL' }];\n let update = false;\n if (!styleJSON || typeof styleJSON !== typeof {} || (isArray(styleJSON) && styleJSON.length === 0)) {\n styleJSON = { };\n }\n // Fix Background !!!\n // if styleJSON->@clrFrame is different thand formProperties->background we need to parse it.\n if (formProperties.background\n && (!styleJSON['@clrFrame'] || (styleJSON['@clrFrame'] && styleJSON['@clrFrame'] !== formProperties.background))) {\n const { background } = formProperties;\n let bgUrl;\n let bgColor;\n const rgbSelector = /rgb\\((\\d{1,3}),\\s*(\\d{1,3}),\\s*(\\d{1,3})\\s*\\)/;\n const rgbaSelector = /rgba\\((\\d{1,3}),\\s*(\\d{1,3}),\\s*(\\d{1,3})\\s*,\\s*(\\d(?:\\.\\d+)?)\\s*\\)/;\n const hexSelector = /^#[0-9a-f]{3,6}/;\n const bgUrlSelector = /url(?:\\(['\"]?)(.*?)(?:['\"]?\\))/;\n const repeatSelector = /(repeat-x | repeat | repeat-y )/i;\n if (rgbSelector.test(background)) { // If background has RGB Color, we need to extract it\n bgColor = rgbSelector.exec(background)[0];\n updatedFormProperties.background = bgColor;\n styleJSON['@clrFrame'] = bgColor;\n update = true;\n } else if (rgbaSelector.test(background)) { // Or Rgba\n bgColor = rgbaSelector.exec(background)[0];\n updatedFormProperties.background = bgColor;\n styleJSON['@clrFrame'] = bgColor;\n update = true;\n } else if (hexSelector.test(background)) { // Or hex color\n bgColor = hexSelector.exec(background)[0];\n updatedFormProperties.background = bgColor;\n styleJSON['@clrFrame'] = bgColor;\n update = true;\n }\n if (bgUrlSelector.test(background)) { // If background has url extract and write to stylejson\n bgUrl = bgUrlSelector.exec(background)[1];\n updatedFormProperties.bgUrl = bgUrl;\n styleJSON['@bgUrl'] = bgUrl;\n updatedFormProperties.pageBackgroundImage = bgUrl;\n if (!styleJSON['@frameBgURL']) {\n styleJSON['@frameBgURL'] = bgUrl;\n updatedFormProperties.formBackgroundImage = bgUrl;\n }\n update = true;\n }\n if (repeatSelector.test(background)) { // Extract repeat parameter\n update = true;\n styleJSON['@bgRepeat'] = true;\n }\n }\n const loggedProps = {};\n props.forEach(p => {\n if (isAIForm && typeof styleJSON[p.styleName] === 'number') {\n styleJSON[p.styleName] = `${styleJSON[p.styleName]}`;\n }\n\n if (formProperties[p.name] && !styleJSON[p.styleName]) {\n update = true;\n styleJSON[p.styleName] = formProperties[p.name];\n loggedProps[p.name] = styleJSON[p.styleName];\n } else if (styleJSON[p.styleName] && !formProperties[p.name] && ['inputColor', 'pageColor', 'fontcolor'].indexOf(p.name) === -1) {\n update = true;\n loggedProps[p.name] = styleJSON[p.styleName];\n updatedFormProperties[p.name] = styleJSON[p.styleName];\n // formProperties[p.name] = styleJSON[p.styleName];\n } else if (formProperties[p.name] && styleJSON[p.styleName] && styleJSON[p.styleName] !== formProperties[p.name] && ['inputColor', 'pageColor', 'fontcolor'].indexOf(p.name) === -1) {\n update = true;\n loggedProps[p.name] = styleJSON[p.styleName];\n updatedFormProperties[p.name] = styleJSON[p.styleName];\n }\n });\n if (update) {\n this.props.actions.updateFormProperty({ styleJSON: JSON.stringify(styleJSON), ...updatedFormProperties }, false);\n this.props.actions.initializeInjectCss(true);\n this.props.actions.updateRightPanelMode('design');\n this.props.actions.rightPanelToggle(true, true);\n }\n }\n\n handleStageClick(e) {\n // if target is not a page, do it!\n if (!(e.target && e.target.classList && e.target.classList.contains('page-section'))) {\n this.props.actions.updateSelectedQuestion();\n this.props.actions.rightPanelToggle(false);\n }\n }\n\n renderDummyContainer() {\n return (\n \n
    \n
    \n
    \n
    \n );\n }\n\n renderVideoBackground() {\n const { themes, formProperties } = this.props;\n return (\n
    \n \n \n \n
    \n );\n }\n\n render() {\n if (this.state.error) {\n return (\n
    \n Something went wrong, we have reported this to our development team.\n {' '}\n
    \n Please refresh the page and try again.\n
    \n );\n }\n const {\n ui: {\n isPreviewModReady, selectedQuestionId, isPDFImporter, currentLocation\n }\n } = this.props;\n const isWorkflowForm = currentLocation === 'workflow';\n let { styleJSON } = this.props.formProperties;\n // After formproperty update, API returns JSONString we need to parse it.\n if (isString(styleJSON) && !isEmpty(styleJSON)) {\n styleJSON = parseJSON(styleJSON);\n }\n // this.applyFormStyles();\n return (\n \n {this.isCardBuilder && this.renderVideoBackground()}\n {this.isCardBuilder &&
    }\n {this.isCardBuilder &&
    }\n {this.props.ui.showRevisionPreview\n ? (\n \n )\n : }\n {!isWorkflowForm && (\n a.qid === selectedQuestionId),\n questionSelectionSource: this.props.questionSelectionSource,\n duplicateWithShortcut: this.props.duplicateWithShortcut,\n moveSelectedAnnotation: this.props.moveSelectedAnnotation,\n } : {})}\n />\n )}\n {this.isCardBuilder && this.renderDummyContainer()}\n
    \n );\n }\n}\n\nBuilder.propTypes = {\n formProperties: PropTypes.shape(),\n ui: PropTypes.shape(),\n themes: PropTypes.shape(),\n actions: PropTypes.shape(),\n user: PropTypes.shape(),\n form: PropTypes.shape(),\n widgets: PropTypes.arrayOf(PropTypes.shape({})),\n};\n\nfunction mapDispatchToProps(dispatch) {\n return {\n actions: bindActionCreators(actions, dispatch),\n duplicateWithShortcut: bindActionCreators(duplicateWithShortcut, dispatch),\n moveSelectedAnnotation: bindActionCreators(moveSelectedAnnotation, dispatch)\n };\n}\n\nfunction mapStateToProps(state) {\n return {\n formProperties: state.formProperties,\n questions: state.questions,\n themes: state.themes,\n ui: state.ui,\n user: state.user,\n form: state.form,\n widgets: state.widgets,\n questionSelectionSource: state.pdfImport.ui.questionSelectionSource\n };\n}\n\nexport default connect(mapStateToProps, mapDispatchToProps)(Builder);\n","import { func } from 'prop-types';\nimport React, { useEffect } from 'react';\nimport { t } from '@jotforminc/translation';\nimport { handleCustomNavigation } from '@jotforminc/utils';\nimport { IconRocketSquareBrokenFilled } from '@jotforminc/svg-icons';\nimport {\n ALL_TEXTS, ASSET_IDENTIFIER, CTA_URLS, SDR_SOURCES,\n GA_SUFFIXES, createGaAttributes, saveCustomerAsHubspotFormByUsername, setEPActions\n} from '@jotforminc/ep-utils';\nimport WhiteLabelVisual from '../../../assets/svg/approvalWhiteLabelingBanner/visual.svg';\n\nconst ApprovalWhiteLabelingBanner = ({ onContactSalesClick, onLearnMoreClick }) => {\n const { PRODUCT: { APPROVAL_WHITE_LABELING_BANNER: target } } = ASSET_IDENTIFIER;\n\n const gaAttributes = createGaAttributes(target);\n const gaAttributesCs = createGaAttributes(target, GA_SUFFIXES.UPGRADE);\n const gaAttributesLm = createGaAttributes(target, GA_SUFFIXES.LEARN_MORE);\n\n const {\n APPROVAL_WHITE_LABELING_BANNER: {\n UPGRADE_URL,\n LEARN_MORE_URL\n }\n } = CTA_URLS;\n\n useEffect(() => {\n setEPActions({ asset: target, target, action: 'seen' });\n }, []);\n\n const handleUpgradeClick = () => {\n setEPActions({ asset: target, target: 'contactSalesButton', action: 'click' });\n saveCustomerAsHubspotFormByUsername({ lastProductAssetInteraction: SDR_SOURCES.APPROVAL_WHITE_LABEL });\n onContactSalesClick();\n handleCustomNavigation(UPGRADE_URL, '_blank');\n };\n\n const handleLearnMoreClick = () => {\n setEPActions({ asset: target, target: 'learnMoreButton', action: 'click' });\n saveCustomerAsHubspotFormByUsername({ lastProductAssetInteraction: SDR_SOURCES.APPROVAL_WHITE_LABEL });\n onLearnMoreClick();\n handleCustomNavigation(LEARN_MORE_URL, '_blank');\n };\n\n return (\n \n \n
    \n
    \n
    \n \n {t(ALL_TEXTS.JOTFORM_ENTERPRISE)}\n
    \n

    {t(ALL_TEXTS.WANT_TO_CUSTOMIZE_WORKFLOW)}

    \n
    \n {/* upgrade */}\n \n {t(ALL_TEXTS.UPGRADE)}\n \n {/* learn more */}\n \n {t(ALL_TEXTS.LEARN_MORE)}\n \n
    \n
    \n
    \n
    \n
    \n \n \n {t(ALL_TEXTS.YOUR_LOGO)}\n \n
    \n
    \n
    \n
    \n
    \n );\n};\n\nApprovalWhiteLabelingBanner.propTypes = {\n onContactSalesClick: func,\n onLearnMoreClick: func\n};\n\nApprovalWhiteLabelingBanner.defaultProps = {\n onContactSalesClick: f => f,\n onLearnMoreClick: f => f\n};\n\nexport default ApprovalWhiteLabelingBanner;\n","import React from 'react';\n\nconst PreviewImage = () => {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n};\n\nexport default PreviewImage;\n","import React from 'react';\nimport { connect } from 'react-redux';\nimport PropTypes from 'prop-types';\nimport { isEnterprise } from '@jotforminc/enterprise-utils';\nimport { handleCustomNavigation } from '@jotforminc/utils';\nimport { getEnterpriseLogo } from '@jotforminc/request-layer';\nimport { ApprovalWhiteLabelingBanner } from '@jotforminc/enterprise-promotions';\nimport { Button } from '@jotforminc/magnet';\nimport { t } from '@jotforminc/translation';\nimport { IconLockFilled } from '@jotforminc/svg-icons';\nimport PreviewImage from './PreviewImage';\n\nconst WhiteLabelCustomization = () => {\n return (\n
    \n
    \n
    \n {t('White Label Jotform')}\n \n
    \n
    \n \n
    \n );\n};\nconst EnterpriseLabelCustomization = () => {\n return (\n
    \n
    \n
    \n {t('Advanced Customization')}\n
    \n
    \n {t('Customize your action page logo and background')}\n
    \n
    \n handleCustomNavigation('/enterprise-admin/settings', '_blank')}\n variant=\"outline\"\n colorStyle=\"secondary\"\n >\n {t('Customize Header')}\n \n
    \n );\n};\n\nconst ComponentsBySection = {\n enterprise: EnterpriseLabelCustomization,\n bsg: WhiteLabelCustomization,\n};\n\nconst Header = ({ workflowTitle }) => {\n const section = isEnterprise() ? 'enterprise' : 'bsg';\n const Component = ComponentsBySection[section];\n\n return (\n
    \n
    \n \n
    \n
    \n
    \n
    \n {t('Preview')}\n
    \n
    \n
    \n
    \n {isEnterprise() && (\n
    \n \n
    \n )}\n
    \n {workflowTitle}\n
    \n
    \n \n
    \n
    \n
    \n );\n};\n\nHeader.propTypes = {\n workflowTitle: PropTypes.string.isRequired,\n};\n\nfunction mapStateToProps(state) {\n return {\n workflowTitle: state.formProperties?.workflowTitle || 'Workflow'\n };\n}\n\nexport default connect(mapStateToProps)(Header);\n","export const MESSAGE_TYPES = {\n LOADED: '@FORM_BUILDER/LOADED',\n UI_RIGHT_PANEL_TOGGLE: '@FORM_BUILDER/UI_RIGHT_PANEL_TOGGLE',\n UI_UPDATE_SELECTED_QUESTION: '@FORM_BUILDER/UI_UPDATE_SELECTED_QUESTION',\n FORM_QUESTION_UPDATING: '@FORM_BUILDER/FORM_QUESTION_UPDATING',\n CLOSE_FRAME: '@FORM_BUILDER/CLOSE_FRAME'\n};\n\nexport const WORKFLOW_FIELDS = ['outcomeID', 'heading', 'signature'];\n","export const postMessage = message => {\n if (global && global.parent) {\n global.parent.postMessage(message);\n }\n};\n","import { handleWFFetchFormProperties, handleWFFetchFormQuestion, handleWFRightPanelToggle } from './incomingListeners';\nimport {\n handleFormLoaded, handleFormBuilderRightPanelToggle, handleUpdateSelectedQuestion, handleFormQuestionUpdating, handleCloseFrame\n} from './outgoingListeners';\n\nexport const incomingMessages = {\n '@WORKFLOW_BUILDER/RIGHT_PANEL_OPEN': handleWFRightPanelToggle,\n '@WORKFLOW/FETCH_FORM_QUESTIONS': handleWFFetchFormQuestion,\n '@WORKFLOW/FETCH_FORM_PROPERTIES': handleWFFetchFormProperties\n};\n\nexport const outgoingMessages = {\n LOADED: handleFormLoaded,\n UI_RIGHT_PANEL_TOGGLE: handleFormBuilderRightPanelToggle,\n UI_UPDATE_SELECTED_QUESTION: handleUpdateSelectedQuestion,\n FORM_QUESTION_UPDATING: handleFormQuestionUpdating,\n CLOSE_FRAME: handleCloseFrame\n};\n","import { fetchFormProperties, fetchFormQuestions } from '../../actions';\n\nexport const handleWFRightPanelToggle = ({ visibility }, dispatch) => {\n dispatch({ type: 'UI_RIGHT_PANEL_TOGGLE', visible: visibility });\n};\n\nexport const handleWFFetchFormQuestion = (formID, dispatch) => {\n global.__questionProps = null;\n dispatch(fetchFormQuestions(formID));\n};\n\nexport const handleWFFetchFormProperties = (formID, dispatch) => {\n dispatch(fetchFormProperties(formID));\n};\n","import { MESSAGE_TYPES, WORKFLOW_FIELDS } from './constants';\nimport { postMessage } from './utils';\n\nexport const handleFormLoaded = action => {\n postMessage({ type: MESSAGE_TYPES.LOADED, payload: true });\n return action;\n};\n\nexport const handleFormBuilderRightPanelToggle = (action, { getState }) => {\n const { questions, ui: { selectedQuestionId } } = getState();\n const question = questions.find(q => q.qid === selectedQuestionId);\n const isQuestionRelatedToWorkflow = WORKFLOW_FIELDS.indexOf(question?.name) !== -1;\n if (isQuestionRelatedToWorkflow) {\n postMessage({ type: MESSAGE_TYPES.UI_RIGHT_PANEL_TOGGLE });\n return { ...action, visible: false };\n }\n return action;\n};\n\nexport const handleUpdateSelectedQuestion = (action, { getState, dispatch }) => {\n const { questions, ui: { isRightPanelOpen } } = getState();\n const question = questions.find(q => q.qid === action.questionID);\n const isQuestionRelatedToWorkflow = WORKFLOW_FIELDS.indexOf(question?.name) !== -1;\n if (isQuestionRelatedToWorkflow && isRightPanelOpen) {\n dispatch({ type: 'UI_RIGHT_PANEL_TOGGLE', visible: false });\n }\n postMessage({ type: MESSAGE_TYPES.UI_UPDATE_SELECTED_QUESTION, payload: { question, isRightPanelOpen } });\n return action;\n};\n\nexport const handleFormQuestionUpdating = (action, { getState }) => {\n const { questions } = getState();\n const isQuestionHeading = questions.find(q => q.qid === action.qid && q.name === 'heading');\n if (isQuestionHeading) {\n postMessage({ type: MESSAGE_TYPES.FORM_QUESTION_UPDATING, payload: { data: action.question } });\n }\n return action;\n};\n\nexport const handleCloseFrame = () => {\n postMessage({ type: MESSAGE_TYPES.CLOSE_FRAME });\n};\n","import React, { useEffect, useState, useRef } from 'react';\nimport { t } from '@jotforminc/translation';\nimport { useDispatch } from 'react-redux';\nimport Thankyou from './settings/Thankyou';\nimport { Header } from '../components/Workflow';\nimport Builder from './Builder';\nimport { incomingMessages, outgoingMessages } from '../libs/workflow';\nimport '../assets/styles/WorkflowFormBuilder.less';\n/* eslint-disable @jotforminc/no-native-button */\n\nconst ComponentsBySection = {\n form: Builder,\n thankyou: Thankyou,\n header: Header\n};\n\nconst WorkflowFormBuilder = props => {\n const wfFormBuilderRowRef = useRef(null);\n const [section, setSection] = useState('form');\n const dispatch = useDispatch();\n\n useEffect(() => {\n const listener = event => {\n const { data: { type, payload } } = event;\n if (incomingMessages[type]) {\n incomingMessages[type](payload, dispatch);\n }\n };\n window.addEventListener('message', listener);\n return () => window.removeEventListener('message', listener);\n }, []);\n\n const Component = ComponentsBySection[section];\n const onClick = type => {\n dispatch({ type: 'UI_RIGHT_PANEL_TOGGLE', visible: false });\n dispatch({ type: 'UI_UPDATE_SELECTED_QUESTION', questionID: null });\n setSection(type);\n if (wfFormBuilderRowRef?.current) {\n wfFormBuilderRowRef.current.scroll(0, 0);\n }\n };\n useEffect(() => {\n outgoingMessages.LOADED();\n }, []);\n\n const isActive = name => section === name && 'isActive';\n\n return (\n
    \n
    \n onClick('form')}\n >\n {t('BUILD')}\n \n onClick('thankyou')}\n >\n {t('THANK YOU')}\n \n onClick('header')}\n >\n {t('HEADER')}\n \n
    \n
    \n
    \n \n
    \n
    \n
    \n );\n};\n\nexport default WorkflowFormBuilder;\n","import React, { Suspense } from 'react';\nimport PropTypes from 'prop-types';\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport { Loading } from '@jotforminc/loading';\n\nimport * as actions from '../actions';\nimport { SettingsRoutes } from '../routes/Routes';\n\nconst Settings = ({ match, ui, user }) => (\n \n }>\n \n \n
    \n);\n\nSettings.propTypes = {\n ui: PropTypes.shape(),\n user: PropTypes.shape()\n};\n\nfunction mapDispatchToProps(dispatch) {\n return {\n actions: bindActionCreators(actions, dispatch)\n };\n}\n\nfunction mapStateToProps(state) {\n return {\n ui: state.ui,\n user: state.user\n };\n}\n\nexport default connect(mapStateToProps, mapDispatchToProps)(Settings);\n","import React, { useState } from 'react';\nimport PropTypes from 'prop-types';\nimport { t } from '@jotforminc/translation';\nimport { IconTrashExclamationFilled, IconArrowRotateLeft, IconArrowDownToLine } from '@jotforminc/svg-icons';\n\nimport Modal, { ModalContext } from './Modal';\n\nconst handleAction = ({ toggle }, action) => {\n action();\n // close modal\n toggle(false);\n};\n\nconst ActionSelection = ({\n setConfirmMode,\n onUpdate,\n context\n}) => (\n
    \n

    {t('Update PDF')}

    \n

    {t('Select the action you would like to apply to the PDF.')}

    \n
    \n { handleAction(context, onUpdate); }}\n >\n \n

    {t('Re-Upload PDF')}

    \n

    {t('You can upload your PDF without any loss')}

    \n \n { setConfirmMode(true); }}\n >\n \n

    {t('Start Over')}

    \n

    {t('Clear all the form fields and begin again')}

    \n \n
    \n
    \n);\n\nconst Confirmation = ({\n onRemove,\n context,\n setConfirmMode\n}) => (\n
    \n \n

    {t('Do you want to start over?')}

    \n

    {t('You will lose all your form fields and all submission data.')}

    \n
    \n { setConfirmMode(false); }}\n >\n {t('No, Cancel')}\n \n { handleAction(context, onRemove); }}\n >\n {t('Yes, Start over')}\n \n
    \n
    \n);\n\nconst RemovePDFModal = ({\n onRemove,\n onUpdate,\n root\n}) => {\n const [confirmMode, setConfirmMode] = useState(false);\n\n return (\n \n \n {context => (\n confirmMode\n ? \n : \n )}\n \n \n );\n};\n\nRemovePDFModal.propTypes = {\n onRemove: PropTypes.func.isRequired,\n onUpdate: PropTypes.func.isRequired\n};\n\nexport default RemovePDFModal;\n","import React, { useState } from 'react';\nimport PropTypes from 'prop-types';\n\nimport { createRoot } from 'react-dom/client';\nimport PDFNotifier from './PDFNotifier';\nimport RemovePDFModal from './RemovePDFModal';\nimport DocumentViewer from './DocumentViewer';\n\nconst renderSuccessDom = (onUpdate, onRemove) => {\n const portal = global.document.getElementById('portal-root');\n const root = createRoot(portal);\n return (\n {\n root.render(\n \n );\n },\n text: 'Update PDF'\n }}\n />\n );\n};\n\nconst PDFUploaderView = ({\n url,\n onRemove,\n onUpdate,\n accountType // TODO: delete after new doc viewer release\n}) => {\n const [loaded, setLoaded] = useState(false);\n\n return (\n
    \n {loaded && renderSuccessDom(onUpdate, onRemove)}\n setLoaded(true)}\n />\n
    \n );\n};\n\nPDFUploaderView.propTypes = {\n url: PropTypes.string.isRequired,\n onRemove: PropTypes.func.isRequired,\n onUpdate: PropTypes.func.isRequired\n};\n\nexport default PDFUploaderView;\n","import React from 'react';\nimport { connect } from 'react-redux';\nimport { t } from '@jotforminc/translation';\nimport Tracking from '@jotforminc/tracking';\n\nimport '../../assets/styles/pdfImporter.less';\nimport PDFUploader from '../../components/pdfImporter/PDFUploader';\nimport PDFUploaderView from '../../components/pdfImporter/PDFUploaderView';\nimport PDFLoading from '../../components/pdfImporter/PDFLoading';\nimport {\n updateFormProperty,\n importPDF,\n updateTheme,\n setPDFImporter,\n removePDF,\n updateSelectedQuestion\n} from '../../actions';\nimport { importedPDFDefaultThemeId } from '../Themes';\nimport { logJotFormEvents, readCookie } from '../../libs/Utils';\nimport {\n deleteAllAnnotations, setMapperWidth, updateImportedPDF, resetPDFSettings, removeWelcomeThumbnail, setErrorMessage\n} from '../../actions/pdfImport';\nimport { pdfImporterThankYouHTML } from '../../components/pdfImporter/helpers';\nimport { isNonFillablePDF } from '../../reducers/pdfImport';\n\nconst shouldSkipTracking = (accountType, username) => {\n const ignoredUsers = ['sheetse2e', 'testaccnt6'];\n\n return (global.window.JOTFORM_ENV !== 'PRODUCTION' // ignore dev env\n || (accountType === 'ADMIN' || accountType === 'SUPPORT' || accountType === 'INTERN') // ignore specific user types\n || ignoredUsers.indexOf(username) > -1); // ignore users in ignored list\n};\n\nclass Main extends React.Component {\n constructor(props) {\n super(props);\n this.state = {\n ready: false,\n uploading: false,\n isUpdatePDF: false\n };\n // always set isPDFImporter to true to preserve ui state when no pdf is uploaded\n props.setPDFImporter();\n\n this.importPDF = this.importPDF.bind(this);\n this.updatePDF = this.updatePDF.bind(this);\n this.onPDFJSLoaded = this.onPDFJSLoaded.bind(this);\n this.handleDocRemove = this.handleDocRemove.bind(this);\n this.handleDocUpdate = this.handleDocUpdate.bind(this);\n this.handleFSActions = this.handleFSActions.bind(this);\n }\n\n componentDidMount() {\n this.onPDFJSLoaded();\n // Add Fullstory script on start\n // this.handleFSActions();\n }\n\n componentWillUnmount() {\n // when component is unmounted by router, override this method so that the promise created in the constructor\n // resolves nothing. Don't remove this otherwise random import is triggered on every unmount/mount\n this.onPDFJSLoaded = () => {};\n }\n\n handleFSActions(setUserVars) {\n const { accountType, username } = this.props;\n\n if (shouldSkipTracking(accountType, username)) {\n return;\n }\n Tracking.enableFS(setUserVars);\n }\n\n onPDFJSLoaded() {\n const { importedPDFUrl, isHIPAA } = this.props;\n const hasPDF = !!importedPDFUrl;\n const hideTyButtonsOnNewForms = true;\n\n if (!hasPDF) {\n let hideThankYouButtons = false;\n const enterpriseConfigs = global.JOTFORM_ENV === 'ENTERPRISE' && typeof global.CUSTOMIZED_CONFIGS === 'object' && global.CUSTOMIZED_CONFIGS;\n const customImportedPDFSettings = enterpriseConfigs && enterpriseConfigs.CUSTOM_IMPORTED_PDF_SETTINGS;\n if (typeof customImportedPDFSettings === 'object') {\n hideThankYouButtons = customImportedPDFSettings.importedPdfEnableThankYouButtons === 'No';\n }\n\n this.props.updateFormProperty({\n importedPDF: '',\n thanktext: pdfImporterThankYouHTML(t, isHIPAA, hideThankYouButtons, hideTyButtonsOnNewForms) // Set thank you page\n }, false);\n }\n this.setState({ ready: true });\n }\n\n UXActions(username, accountType, formID, file, type) {\n if (shouldSkipTracking(accountType, username)) {\n return;\n }\n\n // Send PDFImport submissions\n const now = new Date();\n const nowGMT = new Date(now.getTime() + (now.getTimezoneOffset() * 60000));\n const formData = new global.FormData();\n\n // Send the tracking data to another spreadsheet if the user is coming from the landing page.\n const destFormID = readCookie('SMART_PDF_TDF') ? '202383155195960' : '91291918890973';\n\n formData.append('formID', destFormID);\n formData.append('q3_username', username);\n formData.append('q4_formId', formID);\n formData.append('q6_createdAt', nowGMT.format('YYYY-MM-DD hh:mm:ss'));\n formData.append('q7_pdfDocument', file);\n formData.append('q8_documentType', type);\n\n const request = new global.XMLHttpRequest();\n\n request.responseType = 'json';\n request.open('post', 'https://www.jotform.com/submit.php');\n request.send(formData);\n\n const isSuccess = type.indexOf('success') > -1;\n // Set FS variable to identify users with proper pdfs\n if (isSuccess) {\n // Tracking.enableFS({ successfullyConvertedPDF_bool: true });\n }\n // Log upload data to JFEvents\n logJotFormEvents('pdf-import', {\n actor: username,\n action: isSuccess ? 'Complete' : 'uploadAttempt - failed',\n target: `PDF Upload${isSuccess ? `ed - ${this.props.importedPDFUrl}` : ` Attempt - ${file.name}`}`,\n }, accountType);\n }\n\n importPDF(file, pdfPassword = '') {\n this.setState({ uploading: true });\n const { accountType, username, formID } = this.props;\n this.props.importPDF(file, pdfPassword).then(() => {\n const { isLegacyForm, isNonFillable, defaultTheme } = this.props;\n // Update theme only on legacy forms\n if (isLegacyForm && defaultTheme === 'v1') {\n this.props.updateTheme(importedPDFDefaultThemeId);\n }\n\n // step onto build step after successful import. Wait a second till questions are posted\n setTimeout(() => {\n this.props.history.push(`/${global.__BASE_ROUTE_PATH}/${formID}`);\n }, 1000);\n this.UXActions(username, accountType, formID, file, `success - ${isNonFillable ? 'non-' : ''}fillable`);\n }).catch(e => {\n const errorMessage = e && e.message ? e.message.split(' - ').pop() : 'An unknown error occurred';\n\n this.setState({ uploading: false });\n // Display an error using errorMessage variable\n this.props.setErrorMessage(errorMessage);\n // Send data to form\n this.UXActions(username, accountType, formID, file, errorMessage);\n });\n }\n\n updatePDF(file, pdfPassword = '') {\n this.setState({ uploading: true });\n this.props.updateImportedPDF(file, pdfPassword).then(() => {\n const { formID } = this.props;\n // step onto build step after successful update.\n this.props.history.push(`/${global.__BASE_ROUTE_PATH}/${formID}`);\n }).catch(e => {\n const errorMessage = e && e.message ? e.message.split(' - ').pop() : 'An unknown error occurred';\n\n this.setState({ uploading: false });\n // Display an error using errorMessage variable\n this.props.setErrorMessage(errorMessage);\n });\n }\n\n handleDocRemove() {\n this.props.deleteAllAnnotations(this.props.formID); // delete annotations from api before discharging redux\n\n let hideThankYouButtons = false;\n const enterpriseConfigs = global.JOTFORM_ENV === 'ENTERPRISE' && typeof global.CUSTOMIZED_CONFIGS === 'object' && global.CUSTOMIZED_CONFIGS;\n const customImportedPDFSettings = enterpriseConfigs && enterpriseConfigs.CUSTOM_IMPORTED_PDF_SETTINGS;\n if (typeof customImportedPDFSettings === 'object') {\n hideThankYouButtons = customImportedPDFSettings.importedPdfEnableThankYouButtons === 'No';\n }\n\n this.props.removePDF().then(() => {\n // Change title value to its defaults and delete current importedPDF value, also reset thank you page\n this.props.updateFormProperty({\n importedPDF: '',\n pagetitle: 'Form',\n title: 'Form',\n thanktext: pdfImporterThankYouHTML(t, this.props.isHIPAA, hideThankYouButtons)\n }, false);\n this.props.resetPDFSettings();\n // Remove formLogo\n this.removeLogo();\n // Remove selectedField on pdf doc remove\n this.props.updateSelectedQuestion(undefined);\n // Reset original splitView size\n this.props.setMapperWidth(null, 'removePDF');\n // Remove previous pdf's thumbnail\n this.props.removeWelcomeThumbnail();\n });\n }\n\n handleDocUpdate() {\n // Enable update mode\n this.setState({ isUpdatePDF: true });\n // Remove selectedField on pdf doc remove\n this.props.updateSelectedQuestion(undefined);\n // Reset original splitView size\n this.props.setMapperWidth(null, 'removePDF');\n }\n\n removeLogo() {\n const { styleJSON } = this.props;\n const tempStyleJSON = {\n '@formCover': '0',\n '@formCoverImg': '',\n '@formCoverImgHeight': '',\n '@formCoverImgWidth': '',\n '@formCoverPosition': '',\n '@formCoverTopPosition': ''\n };\n const newStyleJSON = typeof styleJSON === 'object' ? ({ ...styleJSON, ...tempStyleJSON }) : tempStyleJSON;\n\n this.props.updateFormProperty({\n styleJSON: JSON.stringify(newStyleJSON)\n });\n }\n\n render() {\n const hasPDF = !!this.props.importedPDFUrl;\n const { ready, uploading, isUpdatePDF } = this.state;\n const {\n importedPDFUrl, accountType, username, formID\n } = this.props;\n\n if (!ready || uploading) {\n return (\n \n );\n }\n\n if (!hasPDF || isUpdatePDF) {\n return (\n \n );\n }\n return (\n \n );\n }\n}\n\nconst mapDispatchToProps = {\n updateFormProperty,\n importPDF,\n updateTheme,\n setPDFImporter,\n removePDF,\n updateSelectedQuestion,\n deleteAllAnnotations,\n setMapperWidth,\n updateImportedPDF,\n resetPDFSettings,\n removeWelcomeThumbnail,\n setErrorMessage\n};\n\nconst mapStateToProps = state => ({\n accountType: state.user.accountType,\n username: state.user.username,\n formID: state.formProperties.id,\n styleJSON: state.formProperties.styleJSON,\n importedPDFUrl: state.formProperties.importedPDF ? state.formProperties.importedPDF.replace('www.jotform.com', global.location.hostname) : null, // prevent cors for pdfjs displaying pdf\n isLegacyForm: state.formProperties.formType === 'legacyForm',\n isNonFillable: isNonFillablePDF(state),\n isHIPAA: state.formProperties.isHIPAA === '1',\n defaultTheme: state.formProperties.defaultTheme\n});\n\nexport default connect(mapStateToProps, mapDispatchToProps)(Main);\n","import React from 'react';\nimport { Route } from 'react-router-dom';\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport * as actions from '../actions';\n\nclass RouteWrapper extends React.Component {\n render() {\n return ;\n }\n}\n\nfunction mapDispatchToProps(dispatch) {\n return {\n actions: bindActionCreators(actions, dispatch)\n };\n}\n\nexport default connect(null, mapDispatchToProps)(RouteWrapper);\n","import React from 'react';\nimport { Switch } from 'react-router-dom';\nimport { safeLazy } from '@jotforminc/safe-lazy-import';\n// Editor Route Containers\nimport Builder from '../containers/Builder';\nimport WorkflowFormBuilder from '../containers/WorkflowFormBuilder';\nimport Settings from '../containers/Settings';\nimport PDFImporter from '../containers/PDFImporter/Main';\n\nimport RouteWrapper from './RouteWrapper';\n// Lazy Containers\nconst ThemeStore = safeLazy(() => import(/* webpackChunkName: \"ThemeStore\" */ '../containers/ThemeStore'));\nconst AdvancedDesigner = safeLazy(() => import(/* webpackChunkName: \"AdvancedDesigner\" */ '../containers/AdvancedDesigner'));\nconst Publish = safeLazy(() => import(/* webpackChunkName: \"Publish\" */ '../containers/Publish'));\nconst General = safeLazy(() => import(/* webpackChunkName: \"General\" */ '../containers/settings/General'));\nconst Emails = safeLazy(() => import(/* webpackChunkName: \"Emails\" */ '../containers/settings/Emails'));\nconst ThankYou = safeLazy(() => import(/* webpackChunkName: \"ThankYou\" */ '../containers/settings/Thankyou'));\nconst Approval = safeLazy(() => import(/* webpackChunkName: \"Approval\" */ '../containers/settings/Approval'));\nconst Conditions = safeLazy(() => import(/* webpackChunkName: \"Conditions\" */ '../containers/settings/Conditions'));\nconst Integrations = safeLazy(() => import(/* webpackChunkName: \"Integrations\" */ '../containers/settings/Integrations'));\nconst MobileNotifications = safeLazy(() => import(/* webpackChunkName: \"MobileNotifications\" */ '../containers/settings/MobileNotifications'));\nconst SignSettings = safeLazy(() => import(/* webpackChunkName: \"SignSettings\" */ '../containers/settings/SignSettings'));\n\nexport const EditorRoutes = ({ match }) => (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n);\n\nexport const SettingsRoutes = ({ match, user: { isCSICollaborator } }) => (\n \n \n \n \n \n \n \n \n {!isCSICollaborator && }\n {!isCSICollaborator && }\n \n {!isCSICollaborator && }\n {!isCSICollaborator && }\n \n \n \n \n);\n","import React, { useEffect, useRef } from 'react';\nimport { Tooltip } from '@jotforminc/uikit';\nimport { IconXmark, IconMessageStarFilled } from '@jotforminc/svg-icons';\nimport IconSVG from '../IconSVG';\n\nconst CollapsePanel = ({\n children, defaultIsOpened = false, isOpened, onToggleIsOpened, setAIChatDefaultOpen\n}) => {\n const targetRef = useRef(null);\n const showAIFeedback = () => {\n if (typeof global.sendMessageToJFMobile === 'function') {\n return global.sendMessageToJFMobile({ type: 'showAIFeedbackModal' });\n }\n const AIFeedbackButton = document.querySelector('.jotform-feedback-link');\n\n if (AIFeedbackButton) {\n AIFeedbackButton.click();\n }\n };\n useEffect(() => {\n if (defaultIsOpened) {\n onToggleIsOpened(defaultIsOpened);\n setAIChatDefaultOpen(false);\n }\n }, []);\n return (\n <>\n
    \n
    \n
    \n
    \n {[...Array(15)].map(() => (\n \n ))}\n
    \n
    \n
    \n
    \n \n
    \n \n \n Give Feedback\n \n \n \n onToggleIsOpened(!isOpened)}\n className='duration-300 ease-out flex items-center justify-center cursor-pointer bg-transparent radius-full outline-0 bg-transparent border-0 color-white ai-custom-action-button hover:bg-white'\n >\n \n \n
    \n
    \n
    \n
    \n {children}\n
    \n
    \n
    \n
    \n
    \n \n );\n};\n\nexport default CollapsePanel;\n","import { RequestLayer } from '@jotforminc/request-layer';\n\nconst r = new RequestLayer();\n\nexport const endpoints = {\n getABTestVariation: (testName, data = {}) => r.get(`/API/user/abtest/${testName}/variation`, data, null)\n};\n","import Tracking from '@jotforminc/tracking';\nimport { endpoints } from '../api';\n\nclass WalkthroughManager {\n constructor() {\n this.builderActions = {};\n this.walkthroughActions = {};\n this.currentWalkthroughType = '';\n this.logJotFormEvents = f => f;\n\n this.abTestConfig = {\n TEST_NAME: 'productWalkthroughV5',\n CONTROL_VARIANT: '5881',\n TEST_VARIANT: '5891'\n };\n\n this.type = {\n stepByStep: 'stepByStep',\n stepByStepWithContinue: 'stepByStepWithContinue',\n informative: 'informative',\n informativeWithVisuals: 'informativeWithVisuals'\n };\n }\n\n openPreviewMode(e) {\n const isInPreviewMode = global.location.hash.indexOf('preview') > -1;\n if (!isInPreviewMode) {\n this.builderActions.togglePreview(e);\n }\n }\n\n closePreviewMode(e) {\n const isInPreviewMode = global.location.hash.indexOf('preview') > -1;\n if (isInPreviewMode) {\n this.builderActions.togglePreview(e);\n }\n }\n\n openBuilderTab(e) {\n const pathHasSettings = global.location.pathname.indexOf('settings') > -1;\n const pathHasPublish = global.location.pathname.indexOf('publish') > -1;\n\n // jump to build tab and open the left panel\n if (pathHasSettings || pathHasPublish) {\n this.builderActions.onBuildClicked(e);\n }\n }\n\n openSettingsTab(e) {\n this.builderActions.onSettingsClicked(e);\n }\n\n openPublishTab(e) {\n this.builderActions.onPublishClicked(e);\n }\n\n openRightPanel() {\n this.builderActions.actions.updateSelectedQuestion(undefined);\n this.builderActions.actions.rightPanelToggle(true);\n this.builderActions.actions.updateRightPanelMode('design');\n }\n\n closeRightPanel() {\n this.builderActions.actions.rightPanelToggle(false);\n this.builderActions.actions.updateRightPanelMode('');\n }\n\n openLeftPanel() {\n this.builderActions.actions.leftPanelToggle(true);\n }\n\n closeLeftPanel() {\n this.builderActions.actions.leftPanelToggle(false);\n }\n\n toggleHelpMenu() {\n this.builderActions.toggleHelpMenu();\n }\n\n scrollToTop() {\n this.builderActions.scrollToTop();\n }\n\n createFsCustomEvent({ walkthroughType, eventType }) {\n return ({ step, buttonName }) => {\n if (!Tracking.FSisInitialized()) return;\n Tracking.event(`productWalkthroughV5_${walkthroughType}_${eventType}`, { step, buttonName });\n };\n }\n\n getWalkthroughABTestVariant() {\n return new Promise((resolve, reject) => {\n const { TEST_NAME } = this.abTestConfig;\n endpoints.getABTestVariation(TEST_NAME).then(variationResponse => {\n const { variation } = JSON.parse(variationResponse.response).content;\n resolve(variation);\n }).catch(reject);\n });\n }\n\n logExcludedUser({ userCheckMap, user }) {\n const { accountType } = user;\n const EXPECTED_CHECK_MAP = {\n isEnvProd: true,\n isJotFormer: false,\n isLiveChatActive: false,\n isMobileApp: false,\n isPDFImporter: false,\n isInsideWorkflowBuilder: false,\n isUserHasOneForm: true,\n isScreensizeAvailable: true,\n isUserEn: true\n };\n\n const userData = {\n accountType: accountType || '',\n browserLanguage: global.navigator.language || '',\n resolution: `${global.innerWidth}x${global.innerHeight}` || ''\n };\n\n let excludeReasons = [];\n\n const userDataValues = [...Object.values(userData)];\n\n Object.keys(userCheckMap).forEach(checkKey => {\n if (!userCheckMap[checkKey] !== !EXPECTED_CHECK_MAP[checkKey]) {\n excludeReasons = [...excludeReasons, checkKey];\n }\n });\n\n return this.logExcludedUserWithAction({ user, excludeReasons, userDataValues });\n }\n\n logExcludedUserWithAction(target) {\n const { user: { username, accountType }, excludeReasons, userDataValues } = target;\n this.logJotFormEvents(this.abTestConfig.TEST_NAME, {\n actor: username,\n action: 'exclude',\n target: `reasons:[${excludeReasons}],user:[${userDataValues}]`\n }, accountType);\n }\n}\n\nconst walkthroughManager = new WalkthroughManager();\n\nexport default walkthroughManager;\n","import React from 'react';\nimport { node, string } from 'prop-types';\nimport classNames from 'classnames';\n\nconst SiteNavWrapper = ({\n additionalClasses = null,\n children = null\n}) => {\n return (\n
      \n {children}\n
    \n );\n};\n\nSiteNavWrapper.propTypes = {\n additionalClasses: string,\n children: node\n};\n\nexport default SiteNavWrapper;\n","import React from 'react';\nimport { bool, node, string } from 'prop-types';\nimport classNames from 'classnames';\n\nconst SiteNavListItem = ({\n backgroundColor = true,\n children = null,\n className = null,\n isActive = false,\n isDisabled = false,\n ...props\n}) => {\n return (\n \n {children}\n \n );\n};\n\nSiteNavListItem.propTypes = {\n backgroundColor: bool,\n children: node,\n className: string,\n isActive: bool,\n isDisabled: bool\n};\n\nexport default SiteNavListItem;\n","import React from 'react';\nimport { bool, node, oneOf } from 'prop-types';\nimport classNames from 'classnames';\nimport '../../styles/_previewModeList.scss';\n\nconst PreviewModeSelector = ({\n animated = false,\n children = null,\n hideOn = 'xs'\n}) => {\n return (\n \n {children}\n \n );\n};\n\nPreviewModeSelector.propTypes = {\n animated: bool,\n children: node,\n hideOn: oneOf(['xs', 'sm', 'md', 'lg'])\n};\n\nexport default PreviewModeSelector;\n","import React from 'react';\nimport {\n bool, func, oneOf, string\n} from 'prop-types';\nimport classNames from 'classnames';\nimport { IconDesktop, IconMobile, IconTablet } from '@jotforminc/svg-icons';\n\nconst PreviewModeSelector = ({\n isActive = false,\n isDisabled = false,\n onClick = () => {},\n theme = 'form',\n mode,\n text,\n ...props\n}) => {\n let themeColor = 'form';\n let iconType = null;\n\n switch (theme) {\n case 'form':\n themeColor = isActive ? 'bg-orange-300' : 'hover:bg-orange-300';\n break;\n case 'app':\n themeColor = isActive ? 'bg-purple-300' : 'hover:bg-purple-300';\n break;\n case 'sign':\n themeColor = isActive ? 'bg-sign-light' : 'hover:bg-sign-light';\n break;\n case 'smart-pdf':\n themeColor = isActive ? 'bg-navy-200' : 'hover:bg-navy-200';\n break;\n case 'page-builder':\n themeColor = isActive ? 'bg-pages-light' : 'hover:bg-pages-light';\n break;\n case 'ai-agent-builder':\n themeColor = isActive ? 'bg-blue-400' : 'hover:bg-transparent';\n break;\n default:\n break;\n }\n\n switch (mode) {\n case 'phone':\n iconType = ;\n break;\n case 'mobile':\n iconType = ;\n break;\n case 'tablet':\n iconType = ;\n break;\n case 'desktop':\n iconType = ;\n break;\n default:\n break;\n }\n\n return (\n \n \n {iconType}\n {text}\n \n \n );\n};\n\nPreviewModeSelector.propTypes = {\n isActive: bool,\n isDisabled: bool,\n mode: oneOf(['phone', 'tablet', 'desktop']).isRequired,\n onClick: func,\n text: string.isRequired,\n theme: oneOf(['app', 'form', 'sign'])\n};\n\nexport default PreviewModeSelector;\n","import React from 'react';\nimport {\n bool,\n string\n} from 'prop-types';\nimport { IconEyeFilled } from '@jotforminc/svg-icons';\nimport classNames from 'classnames';\nimport '../../styles/_previewToggle.scss';\n\nconst PreviewToggle = ({\n checked = false,\n colorStyle = 'green',\n disabled = false,\n hideOnMobile = false,\n label = 'Preview',\n loading = false,\n previewToggleId = 'previewSwitch',\n ...rest\n}) => {\n return (\n <>\n \n \n \n \n {label}\n \n \n \n \n \n \n \n \n \n \n \n \n );\n};\n\nPreviewToggle.propTypes = {\n checked: bool,\n colorStyle: string,\n disabled: bool,\n hideOnMobile: bool,\n label: string,\n loading: bool,\n previewToggleId: string\n};\n\nexport default PreviewToggle;\n","import PropTypes from 'prop-types';\nimport React from 'react';\nimport filter from 'lodash/filter';\nimport find from 'lodash/find';\nimport { Button } from '@jotforminc/magnet';\nimport { t } from '@jotforminc/translation';\nimport {\n IconAsterisk, IconEyeFilled, IconEyeSlashFilled, IconTrashFilled, IconCopyFilled\n} from '@jotforminc/svg-icons';\nimport stripTags from '../../../libs/strip_tags';\nimport IconSVG from '../../IconSVG';\nimport { LIMIT_LEVELS, LIMIT_POPOVER_TARGETS } from '../../../constants/limitDefaults';\nimport { NonHideableFields } from '../../../constants/Fields';\n\nexport default class MultiSelectToolbar extends React.Component {\n constructor(props) {\n super(props);\n this.makeRequired = this.makeRequired.bind(this);\n this.deleteQuestions = this.deleteQuestions.bind(this);\n this.duplicateQuestions = this.duplicateQuestions.bind(this);\n this.toggleDuplicateMenu = this.toggleDuplicateMenu.bind(this);\n this.toggleDuplicateAfterMenu = this.toggleDuplicateAfterMenu.bind(this);\n this.renderQuestions = this.renderQuestions.bind(this);\n this.renderDuplicateMenu = this.renderDuplicateMenu.bind(this);\n this.renderDuplicateAfterMenu = this.renderDuplicateAfterMenu.bind(this);\n this.selectedQuestionChange = this.selectedQuestionChange.bind(this);\n this.selectAllQuestions = this.selectAllQuestions.bind(this);\n this.handleMenuClick = this.handleMenuClick.bind(this);\n this.duplicateButtonClick = this.duplicateButtonClick.bind(this);\n this.toggleVisibility = this.toggleVisibility.bind(this);\n this.clearSelection = this.clearSelection.bind(this);\n this.duplicateMenuRef = React.createRef(null);\n this.state = {\n duplicateMenuOpen: false,\n duplicateAfterMenuOpen: false,\n selectedQuestionOrder: 1\n };\n }\n\n handleMenuClick(e) {\n e.stopPropagation();\n }\n\n duplicateButtonClick(e) {\n e.stopPropagation();\n this.duplicateQuestions();\n this.setState({ duplicateMenuOpen: false });\n }\n\n selectAllQuestions() {\n const allQuestions = filter(this.props.questions, q => q.type !== 'control_clear');\n const questionIDList = allQuestions.map(q => {\n return q.qid.toString();\n });\n this.props.actions.updateMultipleSelectedQuestions(undefined, questionIDList);\n }\n\n clearSelection() {\n this.props.actions.updateMultipleSelectedQuestions(undefined, []);\n }\n\n duplicateQuestions(questionOrder) {\n const { selectedQuestionsIDList, questions, ui: { isPDFImporter } } = this.props;\n let selectedQIDs = selectedQuestionsIDList;\n if (isPDFImporter) {\n const submitQuestion = find(questions, q => q.type === 'control_button');\n if (submitQuestion) {\n selectedQIDs = filter(selectedQuestionsIDList, qid => qid !== submitQuestion.qid);\n }\n }\n this.props.actions.duplicateQuestions(selectedQIDs, questionOrder || parseInt(this.state.selectedQuestionOrder, 10) + 1);\n }\n\n makeRequired() {\n const { selectedQuestionsIDList } = this.props;\n this.props.actions.makeRequired(selectedQuestionsIDList, true);\n }\n\n toggleVisibility() {\n const { selectedQuestionsIDList } = this.props;\n this.props.actions.toggleVisibility(selectedQuestionsIDList, true);\n }\n\n deleteQuestions() {\n const { selectedQuestionsIDList } = this.props;\n this.props.actions.deleteQuestions(selectedQuestionsIDList);\n }\n\n toggleDuplicateMenu() {\n const { ui: { limitLevel, isFieldLimitReachedWithSelectedQuestions }, actions: { showLimitMessagePopover } } = this.props;\n if (limitLevel === LIMIT_LEVELS.DANGER || isFieldLimitReachedWithSelectedQuestions) {\n showLimitMessagePopover({ target: LIMIT_POPOVER_TARGETS.HEADER_MENU_MULTISELECT_PANEL_DUPLICATE_ITEM.SELECTOR, placement: 'bottom' });\n return;\n }\n\n this.setState({\n duplicateMenuOpen: !this.state.duplicateMenuOpen\n }, () => {\n if (this.state.duplicateMenuOpen && this.duplicateMenuRef?.current) {\n this.duplicateMenuRef.current.style.opacity = 1;\n this.duplicateMenuRef.current.style.visibility = 'visible';\n }\n });\n\n if (!this.state.duplicateMenuOpen) {\n this.setState({\n duplicateAfterMenuOpen: false\n });\n }\n }\n\n toggleDuplicateAfterMenu() {\n this.setState({\n duplicateAfterMenuOpen: true\n });\n }\n\n selectedQuestionChange(e) {\n this.setState({ selectedQuestionOrder: e.target.value });\n }\n\n renderQuestions(questions) {\n const renderedQuestions = questions.map((q, i) => {\n let text = stripTags((q.text ? q.text : q.name));\n const div = global.document.createElement('div');\n div.innerHTML = text;\n text = div.textContent;\n if (text.length > 30) {\n text = `${text.substr(0, 30)}...`;\n }\n return ();\n });\n const questionsDropdown = (\n
    \n e.stopPropagation()}\n style={{\n fontSize: '14px',\n width: '100%',\n height: '36px'\n }}\n >\n {renderedQuestions}\n \n \n
    \n );\n return questionsDropdown;\n }\n\n renderDuplicateMenu() {\n return (\n \n \n {this.state.duplicateMenuOpen && !this.state.duplicateAfterMenuOpen && this.renderDuplicateMenuItems()}\n {this.state.duplicateAfterMenuOpen && this.renderDuplicateAfterMenu()}\n \n \n );\n }\n\n renderDuplicateMenuItems() {\n return (\n
    \n {\n this.toggleDuplicateMenu();\n this.duplicateQuestions(1);\n }}\n >\n \n \n {t('to Top')}\n \n
    \n {\n this.toggleDuplicateMenu();\n this.duplicateQuestions(this.props.questions[this.props.questions.length - 1].order + 1);\n }}\n >\n \n \n {t('to Bottom')}\n \n \n {\n this.toggleDuplicateAfterMenu();\n }}\n >\n \n \n {t('After Field')}\n \n \n \n );\n }\n\n renderDuplicateAfterMenu() {\n const { questions } = this.props;\n\n return (\n \n
    \n \n {t('Where should the new fields go?')}\n
    \n \n
    \n
    \n
    \n {this.renderQuestions(questions)}\n
    \n
    \n \n {t('Duplicate')}\n \n
    \n
    \n
    \n \n );\n }\n\n render() {\n const { selectedQuestionsIDList, questions } = this.props;\n const allQuestions = filter(questions, q => q.type !== 'control_clear');\n const selectedQuestions = filter(allQuestions, (q => selectedQuestionsIDList.indexOf(q.qid) > -1));\n const selectedQuestionTypes = filter(selectedQuestions.map(q => q.type), (q, i, a) => a.indexOf(q) === i); // Get the unique selected question types\n const shouldRenderHideButton = !selectedQuestionTypes.every(f => NonHideableFields.includes(f)); // Decide if the hide button should be rendered. If the questions are all non-hideable then the button shouldn't render.\n const isRequired = filter(selectedQuestions, (q => q.required !== 'Yes')).length > 0 ? true : false;\n const isHidden = filter(selectedQuestions, (q => q.hidden !== 'Yes')).length > 0 ? true : false;\n const requiredText = isRequired ? t('Require') : t('Unrequire');\n const hiddenText = isHidden ? t('Hide') : t('Show');\n const hiddenIcon = isHidden ? IconEyeSlashFilled : IconEyeFilled;\n const totalSelected = selectedQuestionsIDList.length > questions.length ? questions.length : selectedQuestionsIDList.length;\n const { device, limitLevel, isFieldLimitReachedWithSelectedQuestions } = this.props.ui;\n let selectedText = t('{selected}/{total} selected');\n selectedText = selectedText.replace('{selected}', totalSelected);\n selectedText = selectedText.replace('{total}', allQuestions.length);\n return (\n \n \n {device === 'isDesktop'\n && (\n
    \n {selectedText}\n
    \n )}\n {selectedQuestionsIDList.length < allQuestions.length\n ? (\n \n {t('Select All')}\n \n )\n : (\n \n {t('Deselect')}\n \n )}\n \n \n \n \n {t('Duplicate')}\n \n {this.state.duplicateMenuOpen && this.renderDuplicateMenu()}\n \n \n {requiredText}\n \n {shouldRenderHideButton && (\n \n {hiddenText}\n \n )}\n \n {t('Delete')}\n \n \n \n );\n }\n}\n\nMultiSelectToolbar.propTypes = {\n selectedQuestionsIDList: PropTypes.arrayOf(PropTypes.string),\n ui: PropTypes.shape(),\n questions: PropTypes.arrayOf(PropTypes.shape()),\n};\n","import PropTypes from 'prop-types';\nimport React from 'react';\nimport { NavLink, withRouter } from 'react-router-dom'; // eslint-disable-line\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport { t } from '@jotforminc/translation';\nimport classNames from 'classnames';\nimport { IconArrowUpRightFromSquareSm, IconExclamation } from '@jotforminc/svg-icons';\nimport { formBuilderWalkthroughManager as walkthroughManager } from '@jotforminc/product-walkthrough';\nimport { Button, InputText } from '@jotforminc/magnet';\nimport { a11yListNavigation, handleCustomNavigation, handlePublishPRLink } from '@jotforminc/utils';\nimport {\n PreviewModeListItem, PreviewModeWrapper, PreviewToggle, SiteNavListItem, SiteNavWrapper\n} from '@jotforminc/header-components';\nimport MultiSelectToolbar from './form/multiselect';\nimport { logJotFormEvents, isFormBuilderTabVisible } from '../libs/Utils';\nimport * as actions from '../actions';\n\nclass SecondaryHeader extends React.Component {\n constructor(props) {\n super(props);\n\n this.listenHashChange = this.listenHashChange.bind(this);\n this.onLinkClicked = this.onLinkClicked.bind(this);\n this.openInNewTab = this.openInNewTab.bind(this);\n this.renderMultiSelectToolbar = this.renderMultiSelectToolbar.bind(this);\n this.togglePreview = this.togglePreview.bind(this);\n this.renderPreviewModes = this.renderPreviewModes.bind(this);\n this.checkAdobeSignAuth = this.checkAdobeSignAuth.bind(this);\n\n this.state = {\n showSignupWarning: false\n };\n\n // A/B Test: productWalkthroughV5\n walkthroughManager.builderActions.onBuildClicked = event => {\n this.onLinkClicked(event, `/${global.__BASE_ROUTE_PATH}/${this.props.formID}`);\n };\n\n walkthroughManager.builderActions.onSettingsClicked = event => {\n this.onLinkClicked(event, `/${global.__BASE_ROUTE_PATH}/${this.props.formID}/settings`);\n };\n\n walkthroughManager.builderActions.onPublishClicked = event => {\n this.onLinkClicked(event, `/${global.__BASE_ROUTE_PATH}/${this.props.formID}/publish`);\n };\n\n walkthroughManager.builderActions.togglePreview = event => {\n this.togglePreview(event);\n };\n }\n\n componentDidMount() {\n global.window.addEventListener('hashchange', this.listenHashChange);\n this.readHashState();\n\n const { formProperties: { integrations, id: formID } } = this.props;\n if (integrations && integrations.zendesk) {\n this.props.actions.showErrorIconForIntegrations({\n accountId: integrations.zendesk.integrationAccountID,\n integrationName: 'zendesk',\n formID\n });\n }\n if (integrations && integrations.constantContact) {\n this.props.actions.showErrorIconForIntegrations({\n integrationName: 'constant_contact_integration', // app.slug\n callAPI: false\n });\n }\n }\n\n componentWillUnmount() {\n global.window.removeEventListener('hashchange', this.listenHashChange);\n }\n\n onLinkClicked(e, route) {\n e.preventDefault();\n const {\n userName, formID, history, userAccountType, ui, location,\n } = this.props;\n const { isPDFImporter, isRightPanelOpen } = this.props.ui;\n\n // while tab is changing, panel should be closed because panel is mixed(build - settings).\n if (location?.pathname !== route && isRightPanelOpen) {\n this.props.actions.rightPanelToggle(false);\n }\n\n if (route.indexOf('/publish') > -1) {\n // stops navigation and shows pricing modal for mobile application (tablet only)\n if (global.dontUseNavigationForMobileApp && global.isTabletMobileApp) {\n if (typeof global.sendMessageToJFMobile === 'function') {\n global.sendMessageToJFMobile({ type: 'show_pricing_modal' });\n }\n return;\n }\n\n // stops navigation and shows BAA modal for mobile application (tablet only)\n if (global.showBaaModalForMobileApp && global.isTabletMobileApp) {\n if (typeof global.sendMessageToJFMobile === 'function') {\n global.sendMessageToJFMobile({ type: 'show_baa_modal' });\n }\n return;\n }\n\n if (isPDFImporter) {\n if (!this.checkAdobeSignAuth()) {\n history.push(`/${global.__BASE_ROUTE_PATH}/${formID}`);\n return;\n }\n }\n logJotFormEvents('reminder-emails', {\n actor: userName,\n action: 'Click',\n target: `Publish - ${formID}`,\n }, userAccountType);\n\n if (userAccountType === 'GUEST') {\n const device = ui.device.substring(2).toLowerCase();\n const target = `${device}-header`;\n logJotFormEvents('enforceSignUpOnPublish', { actor: userName, action: 'publish-tab-clicked', target });\n }\n }\n const searchParam = global.location && global.location.search;\n history.push(`${route}${searchParam ? searchParam : ''}`);\n }\n\n togglePreview(evt) {\n const device = this.props.ui.device.substring(2).toLowerCase();\n const urlParamsWithHash = global.location.href.split('?')[1];\n const urlParams = urlParamsWithHash ? urlParamsWithHash.split('#')[0] : false;\n const { metaKey, ctrlKey } = evt?.nativeEvent;\n\n if (metaKey || ctrlKey) {\n this.openInNewTab();\n } else if (this.props.ui.isPreviewModOn) {\n this.props.actions.togglePreview(false);\n // this.props.history.push(global.location.pathname);\n if (urlParams) {\n this.props.history.push(`${global.location.pathname}?${urlParams}`);\n } else {\n this.props.history.push(global.location.pathname);\n }\n\n if (this.props.userAccountType === 'GUEST') {\n const target = `${device}-toggle-preview`;\n logJotFormEvents('enforceSignUpOnPublish', { actor: this.props.userName, action: 'disable-preview', target });\n }\n } else {\n this.props.actions.togglePreview(true);\n // this.props.history.push(`${global.location.pathname}#preview`);\n if (urlParams) {\n this.props.history.push(`${global.location.pathname}?${urlParams}#preview`);\n } else {\n this.props.history.push(`${global.location.pathname}#preview`);\n }\n if (this.props.userAccountType === 'GUEST') {\n const target = `${device}-toggle-preview`;\n logJotFormEvents('enforceSignUpOnPublish', { actor: this.props.userName, action: 'enable-preview', target });\n }\n const { richTextOpened, openRichTextFor } = this.props.ui;\n // Save rich text field if tinyMCE is open\n if (richTextOpened === true && openRichTextFor) {\n try {\n const idx = global.tinyMCE.editors.length - 1;\n this.props.actions.updateFormQuestion(openRichTextFor, { text: global.tinyMCE.editors[idx].getContent() });\n } catch (e) {\n // Nothing.\n }\n }\n }\n\n // discoverabilityTracking\n const { user: { username, accountType } } = this.props;\n logJotFormEvents('discoverabilityTracking', {\n actor: username,\n action: 'click',\n target: '#previewSwitch'\n }, accountType);\n }\n\n // Checks Adobe Sign widget's authentication status and indicate its option\n checkAdobeSignAuth() {\n const { questions, history, formID } = this.props;\n let isAuthenticated = true;\n\n questions.forEach(question => {\n if (question.selectedField && question.selectedField === '53bfd5c2ec70ec9f25000005' && !question.rtoken) {\n history.push(`/${global.__BASE_ROUTE_PATH}/${formID}`);\n this.props.actions.updateSelectedQuestion(question.qid);\n this.props.actions.rightPanelToggle(true);\n this.props.actions.updateRightPanelMode('widgetsettings');\n isAuthenticated = false;\n\n return;\n }\n });\n\n return isAuthenticated;\n }\n\n listenHashChange(evt) {\n const { newURL } = evt;\n\n if (newURL && newURL.endsWith('#preview')) {\n this.props.actions.togglePreview(true);\n } else if (this.props.ui.isPreviewModOn) {\n this.props.actions.togglePreview(false);\n }\n }\n\n readHashState() {\n if (global.location.hash === '#preview') {\n this.props.actions.togglePreview(true);\n }\n }\n\n openInNewTab() {\n if (this.props.userAccountType === 'GUEST') {\n return this.setState({ showSignupWarning: true });\n }\n const { url } = this.props.form;\n const publishLink = (window.location.origin.includes('ooo') && window.JOTFORM_ENV === 'TESTING') ? handlePublishPRLink(window.location.href) : url;\n handleCustomNavigation(publishLink, '_blank', true);\n }\n\n fillForm() {\n const previewFrame = document.getElementById('JF-PreviewFrame');\n if (previewFrame) {\n const currentURL = new URL(previewFrame.src);\n // url params modification\n currentURL.searchParams.set('preview', true);\n currentURL.searchParams.set('filled', true);\n currentURL.searchParams.set('JotFormRev', Date.now());\n currentURL.searchParams.set('_', Math.random().toString().split('.')[1]);\n\n // set src from modified originalSrc\n previewFrame.src = currentURL.toString();\n }\n }\n\n handleNavKeyEvent = event => {\n a11yListNavigation(\n event,\n (_e, nextElement) => this.onLinkClicked(_e, nextElement?.dataset?.route)\n );\n };\n\n renderNavigation() {\n const {\n ui: {\n currentLocation, isPDFImporter, integrationErrors\n },\n formProperties: {\n importedPDF, importedPdfIsConnected\n },\n formID\n } = this.props;\n\n const activeTab = {\n settings: currentLocation === 'settings' ? 'isActive' : '',\n builder: currentLocation === 'builder' ? 'isActive' : '',\n publish: currentLocation === 'publish' ? 'isActive' : '',\n };\n\n if (isPDFImporter) {\n activeTab.pdfImporter = currentLocation === 'upload' ? 'isActive' : '';\n }\n\n const isDisabled = isPDFImporter && !importedPDF;\n\n const showIntegrationErrorIcon = integrationErrors && Object.keys(integrationErrors).some(prop => integrationErrors[prop] === true);\n\n const navTabs = [\n {\n label: 'Upload',\n id: 'siteNav_id_upload',\n to: `/${global.__BASE_ROUTE_PATH}/${formID}/upload`,\n showCondition: isPDFImporter && importedPdfIsConnected !== 'No',\n isActive: !!activeTab.pdfImporter\n },\n {\n label: 'Build',\n id: 'siteNav_id_build',\n to: `/${global.__BASE_ROUTE_PATH}/${formID}`,\n isActive: !!activeTab.builder,\n },\n {\n label: 'Settings',\n id: 'siteNav_id_settings',\n to: `/${global.__BASE_ROUTE_PATH}/${formID}/settings`,\n showError: showIntegrationErrorIcon,\n isActive: !!activeTab.settings\n },\n {\n label: 'Publish',\n id: 'siteNav_id_publish',\n to: `/${global.__BASE_ROUTE_PATH}/${formID}/publish`,\n isActive: !!activeTab.publish\n },\n ];\n\n return (\n \n {navTabs.map(tab => {\n const {\n showCondition = true,\n label,\n showError,\n withBadge,\n isActive,\n ...tabProps\n } = tab;\n if (isFormBuilderTabVisible(label) && showCondition) {\n return (\n \n this.onLinkClicked(e, tabProps.to)}\n {...tabProps}\n >\n {t(label)}\n {showError\n && (\n \n )}\n \n \n );\n }\n return null;\n })}\n \n );\n }\n\n renderMultiSelectToolbar() {\n return (\n \n );\n }\n\n renderSignUpWarning() {\n const { userAccountType, userName, ui } = this.props;\n const warningRef = React.createRef();\n const previewStageEl = global.document.querySelector('.preview-stage');\n const closeWarning = event => {\n if (warningRef && warningRef.current && !warningRef.current.contains(event.target)) {\n this.setState({ showSignupWarning: false });\n previewStageEl.style.pointerEvents = 'auto';\n global.removeEventListener('mouseup', closeWarning);\n }\n };\n\n previewStageEl.style.pointerEvents = 'none';\n global.addEventListener('mouseup', closeWarning);\n\n return userAccountType === 'GUEST' ? (\n
    \n
    \n

    {t('Please sign up to publish your form.')}

    \n {\n this.props.actions.displaySignupPrompt(true, t('Please sign up to start collecting data.'));\n const device = ui.device.substring(2).toLowerCase();\n const target = `${device}-preview`;\n logJotFormEvents('enforceSignUpOnPublish', { actor: userName, action: 'signup-clicked', target });\n global.addEventListener('signup-prompt-closed', () => {\n logJotFormEvents('enforceSignUpOnPublish', { actor: userName, action: 'signup-modal-closed', target });\n }, { once: true });\n }}\n >\n {t('Sign Up Now')}\n {' '}\n \n {' '}\n —\n {t('It’s Free')}\n !\n \n \n
    \n ) : '';\n }\n\n renderFormURL() {\n const {\n form,\n userAccountType,\n userCountryCode = ''\n } = this.props;\n const signUpWarningDisabledCountries = ['DE'];\n const { url } = form;\n const PREnvLink = (window.location.origin.includes('ooo') && window.JOTFORM_ENV === 'TESTING') ? handlePublishPRLink(window.location.href) : url;\n const signupWarningIsVisible = (this.state.showSignupWarning && !signUpWarningDisabledCountries.includes(userCountryCode));\n let FormLink = (\n <>\n \n \n {signupWarningIsVisible && this.renderSignUpWarning()}\n \n );\n if (\n global.JOTFORM_ENV === 'ENTERPRISE'\n && global.CUSTOMIZED_CONFIGS\n && typeof global.CUSTOMIZED_CONFIGS === 'object'\n && global.CUSTOMIZED_CONFIGS.PREVENT_FORM_PUBLISHING === true\n ) {\n FormLink = null;\n }\n return (\n \n
    \n {FormLink}\n \n {t('Fill Form')}\n \n
    \n
    \n );\n }\n\n renderPreviewModes() {\n const { ui: { isPDFImporter } } = this.props;\n const self = this;\n const previewModeList = [\n { text: 'Phone'.locale(), mode: 'mobile' },\n { text: 'Tablet'.locale(), mode: 'tablet' },\n { text: 'Desktop'.locale(), mode: 'desktop' }\n ];\n\n return (\n \n {previewModeList.map(({\n mode, text\n }) => {\n return (\n self.props.actions.setPreviewDeviceType(mode)}\n text={text}\n theme={isPDFImporter ? 'smart-pdf' : 'form'}\n />\n );\n })}\n \n );\n }\n\n skipToContent = e => {\n e.preventDefault();\n document.getElementById(e.target.getAttribute('href').replace('#', ''))?.focus();\n };\n\n renderSkipToContent = () => {\n return (\n {\n if (event.code === 'Space' || event.code === 'Enter') {\n this.skipToContent(event);\n }\n }}\n >\n {t('Skip to main content')}\n \n );\n };\n\n render() {\n const child = (!(this.props.ui.selectedQuestions.length > 1) || this.props.ui.currentLocation !== 'builder') ? this.renderNavigation() : this.renderMultiSelectToolbar();\n const isMultiSelect = this.props.ui.selectedQuestions.length !== 0 && this.props.ui.currentLocation === 'builder';\n return (\n \n {this.props.ui.isPreviewModReady ? this.renderSkipToContent() : null}\n {this.props.ui.isPreviewModReady ? this.renderFormURL() : child}\n
    \n {this.props.ui.isPreviewModReady ? this.renderPreviewModes() : null}\n \n \n \n
    \n
    \n );\n }\n}\n\nSecondaryHeader.propTypes = {\n formID: PropTypes.string,\n questions: PropTypes.arrayOf(PropTypes.shape()),\n actions: PropTypes.shape({\n togglePreview: PropTypes.func,\n updateFormQuestion: PropTypes.func,\n }),\n ui: PropTypes.shape({\n isPreviewModOn: PropTypes.bool,\n isPreviewModReady: PropTypes.bool,\n selectedQuestions: PropTypes.arrayOf(PropTypes.string),\n openRichTextFor: PropTypes.oneOfType([PropTypes.string, PropTypes.bool]),\n richTextOpened: PropTypes.bool,\n screenType: PropTypes.string,\n currentLocation: PropTypes.string\n }),\n form: PropTypes.shape()\n};\n\nfunction mapDispatchToProps(dispatch) {\n return {\n actions: bindActionCreators(actions, dispatch)\n };\n}\n\nfunction mapStateToProps(state) {\n return {\n formProperties: state.formProperties,\n questions: state.questions,\n ui: state.ui,\n form: state.form,\n user: state.user\n };\n}\n\nexport default connect(mapStateToProps, mapDispatchToProps)(withRouter(SecondaryHeader));\n","class ActivityLogger {\n constructor() {\n if (!ActivityLogger.instance) {\n this.logger = null;\n this.username = null;\n this.middlewares = [];\n this.app = null;\n ActivityLogger.instance = this;\n }\n\n return ActivityLogger.instance;\n }\n\n setLogger(logger) {\n this.logger = logger;\n return this;\n }\n\n getLogger() {\n return this.logger;\n }\n\n setMiddleware(middleware) {\n if (Array.isArray(middleware)) {\n this.middlewares = [...this.middlewares, ...middleware];\n } else {\n this.middlewares.push(middleware);\n }\n return this;\n }\n\n runMiddlewares() {\n const middleWareStatus = this.middlewares.reduce((result, middleware) => {\n result.push(!!middleware);\n return result;\n }, []);\n return !(middleWareStatus.indexOf(false) > -1);\n }\n\n setUsername(username) {\n this.username = username;\n return this;\n }\n\n setApp(app) {\n this.app = app;\n return this;\n }\n\n getUsername() {\n return this.username;\n }\n\n getApp() {\n return this.app;\n }\n\n log({ username, action, target }) {\n if (this.runMiddlewares() && this.getLogger() && this.getUsername() && this.getApp()) {\n this.logger.tick({ actor: username || this.username, action: `${action}_${this.getApp()}`, target });\n return true;\n }\n return false;\n }\n}\n\nconst logger = new ActivityLogger();\n\nexport default logger;\n","/**\n * Check whether some DOM node is our Component's node.\n */\nexport function isNodeFound(current, componentNode, ignoreClass) {\n if (current === componentNode) {\n return true;\n }\n // SVG elements do not technically reside in the rendered DOM, so\n // they do not have classList directly, but they offer a link to their\n // corresponding element, which can have classList. This extra check is for\n // that case.\n // See: http://www.w3.org/TR/SVG11/struct.html#InterfaceSVGUseElement\n // Discussion: https://github.com/Pomax/react-onclickoutside/pull/17\n const element = current.correspondingElement || current;\n\n if (!element || !element.className || typeof element.className !== 'string') {\n return false;\n }\n\n return element.className.split(' ').indexOf(ignoreClass) > -1;\n}\n\n/**\n * Try to find our node in a hierarchy of nodes, returning the document\n * node as highest node if our node is not found in the path up.\n */\nexport function findHighest(current, componentNode, ignoreClass) {\n if (current === componentNode) {\n return true;\n }\n\n // If source=local then this event came from 'somewhere'\n // inside and should be ignored. We could handle this with\n // a layered approach, too, but that requires going back to\n // thinking in terms of Dom node nesting, running counter\n // to React's 'you shouldn't care about the DOM' philosophy.\n while (current.parentNode) {\n if (isNodeFound(current, componentNode, ignoreClass)) {\n return true;\n }\n // eslint-disable-next-line no-param-reassign\n current = current.parentNode;\n }\n return current;\n}\n\n/**\n * Check if the browser scrollbar was clicked\n */\nexport function clickedScrollbar(evt) {\n return document.documentElement.clientWidth <= evt.clientX || document.documentElement.clientHeight <= evt.clientY;\n}\n","// ideally will get replaced with external dep\n// when rafrex/detect-passive-events#4 and rafrex/detect-passive-events#5 get merged in\nexport const testPassiveEventSupport = () => {\n if (typeof window === 'undefined' || typeof window.addEventListener !== 'function') {\n return;\n }\n\n let passive = false;\n\n const options = Object.defineProperty({}, 'passive', {\n // eslint-disable-next-line getter-return\n get() {\n passive = true;\n }\n });\n\n const noop = () => {};\n\n window.addEventListener('testPassiveEventSupport', noop, options);\n window.removeEventListener('testPassiveEventSupport', noop, options);\n\n return passive;\n};\n","/* eslint-disable no-param-reassign */\nfunction autoInc(seed = 0) {\n return () => ++seed;\n}\n\nexport default autoInc();\n","/* eslint-disable max-len */\nexport const Texts = {\n SIGN_UP_NOW: 'Sign Up Now!',\n CREATE_MY_ACCOUNT: 'CREATE MY ACCOUNT',\n HELLO_TEXT: 'Hello,',\n LOG_OUT: 'Log out',\n MY_FORMS: 'My Forms',\n PROFILE: 'Profile',\n YOU_HAVE_REACHED_YOUR_LIMIT_ENTERPRISE: '[1[Get rid off all your limits!]] Start using all exclusive Jotform Enterprise features with your team. ',\n YOU_HAVE_REACHED_YOUR_LIMIT_DANGER: 'You have reached your {limitType} limit, please [1[upgrade your plan]] to extend it.',\n YOU_HAVE_REACHED_YOUR_LIMIT_WARNING: 'You are about to reach the {limitType} limit, please [1[upgrade your plan]] to extend it.',\n USAGE_INFO: '[1[{usage}]] of [2[{limit}]] used',\n USAGE_INFO_UNLIMITED: '[1[{usage}]] of unlimited used',\n UPLOAD_SPACE_USAGE_INFO_BYTE: '[1[{usage}]] [2[byte]] of [3[{limit}]] [4[{limitUnit}]] used',\n UPLOAD_SPACE_USAGE_INFO_BYTES: '[1[{usage}]] [2[bytes]] of [3[{limit}]] [4[{limitUnit}]] used',\n UPLOAD_SPACE_USAGE_INFO_DEFAULT: '[1[{usage}]] [2[{usageUnit}]] of [3[{limit}]] [4[{limitUnit}]] used',\n UNLIMITED: 'unlimited',\n UPGRADE_YOUR_PLAN: 'Upgrade Your Plan',\n SALUTE: 'Hello,',\n STARTER: 'STARTER',\n VIEW_ALL: 'View all',\n VIEW_LIMIT_USAGE: 'View limit usage',\n CLOSE_LIMIT_USAGE: 'Close limit usage',\n VIEW_LESS: 'View less',\n SETTINGS: 'Settings',\n ADMIN_CONSOLE: 'Admin Console',\n GET_THE_APP: 'Get the App',\n GET_FIFTY_PERC_OFF: 'GET 50% OFF',\n SAVE_FIFTY_PERC_NOW: 'SAVE 50% Now',\n SAVE_FIFTY_PERCENTAGE: 'SAVE [1[50%]]',\n SWITCH_TO_OLD_VERSION: 'Switch to the Old Version',\n BYTE: 'byte',\n BYTES: 'bytes',\n LOGOUT: 'Logout',\n VIEW_INVOICE: 'View',\n INVOICE_STATUS: 'Invoice [1[{status}]]',\n INVOICE_DUE_DATE: 'Pay Before [1[{date}]]',\n SINCE_RECENTLY_DELETED: 'Due to recent submission deletions, your available upload space will be updated in [1[{predictedTime}]].'\n\n};\n","/* eslint-disable react/prop-types, react/react-in-jsx-scope */\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { t } from '@jotforminc/translation';\nimport { getDomainURL } from '@jotforminc/request-layer';\n\nimport { handleCustomNavigation } from '@jotforminc/utils';\nimport { Utils } from '@jotforminc/uikit';\n\nimport onClickOutsideHOC from './HOCs/OnClickOutside';\nimport { Texts } from '../constants';\nimport '../styles/formUserAccountBox.scss';\n\nclass FormUserAccountBox extends React.Component {\n constructor(props) {\n super(props);\n this.state = {\n isTooltipOpen: false\n };\n }\n\n componentDidMount() {\n const { isTooltipOpen } = this.state;\n const { onTooltipToggle } = this.props;\n onTooltipToggle(isTooltipOpen);\n }\n\n componentDidUpdate(_, prevState) {\n const { isTooltipOpen } = this.state;\n const { onTooltipToggle } = this.props;\n if (isTooltipOpen !== prevState.isTooltipOpen) onTooltipToggle(isTooltipOpen);\n }\n\n handleAvatarBoxClick = () => {\n const { overrideAvatarBoxClick } = this.props;\n if (overrideAvatarBoxClick && overrideAvatarBoxClick instanceof Function) {\n overrideAvatarBoxClick();\n } else {\n const { isTooltipOpen } = this.state;\n this.setState({\n isTooltipOpen: !isTooltipOpen\n });\n }\n };\n\n handleClickOutside() {\n const { isTooltipOpen } = this.state;\n if (isTooltipOpen) {\n this.setState({ isTooltipOpen: false });\n }\n }\n\n get avatarUrl() {\n const { avatarUrl } = this.props;\n return avatarUrl;\n }\n\n render() {\n const {\n name, email, onUserLogout, userType, allowMyForms, isPreview,\n linkTarget, additionalLinks\n } = this.props;\n const { isTooltipOpen } = this.state;\n return (\n
    \n (Utils.isPressedKeyEnter(e) && this.handleAvatarBoxClick(e))}\n onClick={this.handleAvatarBoxClick}\n style={{ backgroundImage: `url(\"${this.avatarUrl}\")` }}\n />\n \n
    \n {t(Texts.HELLO_TEXT)}\n {' '}\n {name || email}\n
    \n {!additionalLinks?.append && additionalLinks?.links?.map(({ text, url, LinkRenderer }) => (\n
    \n \n
    \n ))}\n {allowMyForms && (\n
    \n {\n e.preventDefault();\n handleCustomNavigation(userType === 'USER' ? `${getDomainURL()}/myforms` : `${getDomainURL()}/listings`, linkTarget, true);\n }}\n className=\"fab-link\"\n name=\"See my forms\"\n >\n {t(Texts.MY_FORMS)}\n \n
    \n )}\n
    \n {\n e.preventDefault();\n handleCustomNavigation(`${getDomainURL()}/myaccount`, linkTarget, true);\n }}\n className=\"fab-link\"\n name=\"See my profile\"\n >\n {t(Texts.PROFILE)}\n \n
    \n {additionalLinks?.append && additionalLinks?.links?.map(({ text, url, LinkRenderer }) => (\n
    \n \n
    \n ))}\n
    \n (Utils.isPressedKeyEnter(e) && onUserLogout(e))}\n onClick={onUserLogout}\n >\n {t(Texts.LOG_OUT)}\n
    \n
    \n \n \n );\n }\n}\n\nFormUserAccountBox.propTypes = {\n onUserLogout: PropTypes.func.isRequired,\n allowMyForms: PropTypes.bool,\n userType: PropTypes.string,\n avatarUrl: PropTypes.string,\n isPreview: PropTypes.bool,\n overrideAvatarBoxClick: PropTypes.func,\n linkTarget: PropTypes.string,\n onTooltipToggle: PropTypes.func,\n additionalLinks: PropTypes.shape({\n links: PropTypes.arrayOf(PropTypes.shape({\n text: PropTypes.string,\n url: PropTypes.string,\n LinkRenderer: PropTypes.elementType\n })),\n append: PropTypes.bool\n })\n};\n\nFormUserAccountBox.defaultProps = {\n userType: 'FORM_USER',\n allowMyForms: false,\n avatarUrl: 'JOTFORM_ENV' in window && window.JOTFORM_ENV === 'ENTERPRISE' ? 'https://cdn.jotfor.ms/images/enterprise_empty_avatar.png' : 'https://cdn.jotfor.ms/assets/img/v4/avatar/Podo-Guest.png',\n isPreview: false,\n overrideAvatarBoxClick: null,\n linkTarget: '_self',\n onTooltipToggle: f => f,\n additionalLinks: {\n append: false,\n links: []\n }\n};\n\nexport default onClickOutsideHOC(FormUserAccountBox);\n","export const ACCOUNT_BOX_VIEW_MODE = {\n LOGIN_FLOW: 'loginFlow',\n ACCOUNT_SETTINGS: 'accountSettings'\n};\n\nexport const LIMIT_KEY_MAP = {\n TOTAL_SUBMISSONS: 'totalSubmissions',\n PAYMENTS: 'payments',\n FORMS: 'formCount',\n AI_AGENTS: 'aiAgents',\n AI_CONVERSATIONS: 'aiConversations',\n SIGNED_DOCUMENTS: 'signedDocuments',\n WORKFLOW_RUNS: 'workflowRuns',\n SUBMISSONS: 'submissions',\n UPLOAD_SPACE: 'uploads',\n FORM_VIEWS: 'views'\n};\n\nexport const USAGE_KEY_MAP = {\n TOTAL_SUBMISSONS: 'total_submissions',\n PAYMENTS: 'payments',\n FORMS: 'form_count',\n AI_AGENTS: 'ai_agents',\n AI_CONVERSATIONS: 'ai_conversations',\n SIGNED_DOCUMENTS: 'signed_documents',\n WORKFLOW_RUNS: 'workflow_runs',\n SUBMISSONS: 'submissions',\n UPLOAD_SPACE: 'uploads',\n FORM_VIEWS: 'views'\n};\n\nexport const LIMIT_KEY_TO_USAGE_KEY_MAP = {\n [LIMIT_KEY_MAP.TOTAL_SUBMISSONS]: USAGE_KEY_MAP.TOTAL_SUBMISSONS,\n [LIMIT_KEY_MAP.PAYMENTS]: USAGE_KEY_MAP.PAYMENTS,\n [LIMIT_KEY_MAP.FORMS]: USAGE_KEY_MAP.FORMS,\n [LIMIT_KEY_MAP.SIGNED_DOCUMENTS]: USAGE_KEY_MAP.SIGNED_DOCUMENTS,\n [LIMIT_KEY_MAP.AI_AGENTS]: USAGE_KEY_MAP.AI_AGENTS,\n [LIMIT_KEY_MAP.AI_CONVERSATIONS]: USAGE_KEY_MAP.AI_CONVERSATIONS,\n [LIMIT_KEY_MAP.WORKFLOW_RUNS]: USAGE_KEY_MAP.WORKFLOW_RUNS,\n [LIMIT_KEY_MAP.SUBMISSONS]: USAGE_KEY_MAP.SUBMISSONS,\n [LIMIT_KEY_MAP.UPLOAD_SPACE]: USAGE_KEY_MAP.UPLOAD_SPACE,\n [LIMIT_KEY_MAP.FORM_VIEWS]: USAGE_KEY_MAP.FORM_VIEWS\n};\n\nexport const LIMIT_LABEL_MAP = {\n [LIMIT_KEY_MAP.TOTAL_SUBMISSONS]: 'total submissions',\n [LIMIT_KEY_MAP.PAYMENTS]: 'payment submissions',\n [LIMIT_KEY_MAP.FORMS]: 'forms',\n [LIMIT_KEY_MAP.AI_AGENTS]: 'ai agents',\n [LIMIT_KEY_MAP.AI_CONVERSATIONS]: 'ai conversations',\n [LIMIT_KEY_MAP.SIGNED_DOCUMENTS]: 'signed documents',\n [LIMIT_KEY_MAP.WORKFLOW_RUNS]: 'workflow runs',\n [LIMIT_KEY_MAP.SUBMISSONS]: 'submissions',\n [LIMIT_KEY_MAP.UPLOAD_SPACE]: 'upload space',\n [LIMIT_KEY_MAP.FORM_VIEWS]: 'form views'\n};\n\nexport const BAR_COLORS = {\n GREEN: '#12AF47',\n YELLOW: '#F9A400',\n ORANGE: '#FF6100',\n RED: '#DC2626'\n};\n\nexport const DEFAULT_LANG = 'en-US';\n\nexport const UNLIMITED_DEFAULT_VALUE = 10000000;\n\nexport const PROJECT_NAME = 'accountBox';\n\nexport const INLINE_ALERT_TYPES = {\n ENTERPRISE: 'ENTERPRISE',\n WARNING: 'WARNING',\n DANGER: 'DANGER'\n};\n\nexport const INLINE_LIMIT_ALERT_TRESHOLD = {\n WARNING: 70,\n DANGER: 100\n};\n","/* eslint-disable max-len */\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport cx from 'classnames';\n\nconst Button = ({\n children,\n onClick,\n theme,\n className\n}) => {\n const classList = cx(\n 'flex justify-center items-center radius text-sm z-1 font-medium h-10 text-sm duration-300 transform hover:opacity-80 shrink-0',\n {\n 'px-3 py-2 border border-navy-100 color-teams-default bg-white': theme === '',\n 'px-3 py-2 border-0 bg-white': theme === 'ghost',\n 'px-3 py-2 border-red-600 bg-red-500 color-white': theme === 'danger',\n 'px-3 py-2 border-orange-600 bg-orange-600 color-white': theme === 'warning',\n 'px-3 py-2 border-green-600 bg-green-500 color-white': theme === 'success',\n 'px-3 py-2 border-blue-600 bg-blue-500 color-white': theme === 'primary',\n 'px-3 py-2 border-b border-navy-25 justify-start w-full hover:bg-navy-25': theme === 'dropdown'\n },\n className\n );\n\n return (\n \n );\n};\nButton.propTypes = {\n children: PropTypes.node,\n onClick: PropTypes.node,\n theme: PropTypes.string,\n className: PropTypes.string\n};\n\nButton.defaultProps = {\n children: '',\n onClick: null,\n theme: '',\n className: ''\n};\nexport default Button;\n","import React, { useEffect } from 'react';\nimport PropTypes from 'prop-types';\nimport { t, translationRenderer } from '@jotforminc/translation';\nimport { Button } from '../UI';\n\nimport { ESTIMATION_WARNING, UPGRADE_NOW } from '../../constants/texts';\nimport { actionTracker, bsgUtmCreator, mapLimitType } from '../../utils';\n\nconst LimitEstimationWarning = ({\n user\n}) => {\n const { username = '', account_type: { name: planType = '' }, limitEstimation = {} } = user;\n const assetType = `account-box-${limitEstimation?.type}-estimation-warning`;\n\n useEffect(() => {\n actionTracker({\n username,\n target: assetType,\n action: 'seen'\n });\n }, []);\n\n const handleUpgradeClicked = () => {\n actionTracker({\n username,\n target: assetType,\n action: 'upgrade-btn-clicked'\n });\n\n window.open(`/pricing${bsgUtmCreator({ planType, assetType, campaign: 'estimation' })}`);\n };\n\n return (\n
    \n
    \n

    \n {translationRenderer(ESTIMATION_WARNING)({\n renderer1: () => {mapLimitType(limitEstimation?.type)},\n renderer2: () => {limitEstimation?.estimationDate}\n })}\n

    \n \n
    \n
    \n );\n};\n\nLimitEstimationWarning.propTypes = {\n user: PropTypes.object\n};\n\nLimitEstimationWarning.defaultProps = {\n user: {}\n};\n\nexport default LimitEstimationWarning;\n","import React, { useEffect } from 'react';\nimport PropTypes from 'prop-types';\nimport { t, translationRenderer } from '@jotforminc/translation';\nimport cx from 'classnames';\n\nimport { ALMOST_FULL_WARNING, OVERQUOTA_WARNING, UPGRADE_NOW } from '../../constants/texts';\nimport { actionTracker, bsgUtmCreator, mapLimitType } from '../../utils';\nimport '../../assets/account-box-limit-warnings.scss';\n\nconst AccountBoxLimitWarnings = ({\n user, type, limit\n}) => {\n const { username = '', account_type: { name: planType = '' } } = user;\n const assetType = `account-box-${limit}-${type}-warning`;\n\n useEffect(() => {\n actionTracker({\n username,\n target: assetType,\n action: 'seen'\n });\n }, []);\n\n const handleUpgradeClicked = () => {\n actionTracker({\n username,\n target: assetType,\n action: 'upgrade-btn-clicked'\n });\n\n window.open(`/pricing${bsgUtmCreator({ planType, assetType, campaign: limit })}`);\n };\n\n const quotaBoxClassnames = cx('flex flex-col items-center gap-3 px-5 py-3 radius', {\n 'almostFull-box': type === 'almostFull',\n 'overquota-box': type === 'overquota'\n });\n\n const quotaBtnClassnames = cx('flex justify-center items-center radius text-sm z-1 font-bold w-36 my-0 mx-auto py-2', {\n 'almostFull-upgradeButton': type === 'almostFull',\n 'overquota-upgradeButton': type === 'overquota'\n });\n\n return (\n
    \n
    \n

    \n {type === 'overquota' && (\n <>\n {translationRenderer(OVERQUOTA_WARNING)({\n renderer1: () => {t(mapLimitType(limit))}\n })}\n \n )}\n {type === 'almostFull' && translationRenderer(ALMOST_FULL_WARNING)({\n renderer1: () => {t(mapLimitType(limit))}\n })}\n

    \n handleUpgradeClicked()}\n >\n {t(UPGRADE_NOW)}\n \n
    \n
    \n );\n};\n\nAccountBoxLimitWarnings.propTypes = {\n user: PropTypes.object,\n type: PropTypes.string,\n limit: PropTypes.string\n};\n\nAccountBoxLimitWarnings.defaultProps = {\n user: {},\n type: '',\n limit: ''\n};\n\nexport default AccountBoxLimitWarnings;\n","import { formatBytes, getUrlParameter } from '@jotforminc/utils';\nimport isEmpty from 'lodash/isEmpty';\nimport {\n BAR_COLORS,\n INLINE_LIMIT_ALERT_TRESHOLD,\n LIMIT_KEY_MAP,\n LIMIT_KEY_TO_USAGE_KEY_MAP, LIMIT_LABEL_MAP, Texts, UNLIMITED_DEFAULT_VALUE\n} from '../constants';\n\nexport const isGuest = user => (user?.accountType?.name || user?.accountType || user?.account_type?.name || user?.account_type) === 'GUEST';\nexport const isFree = user => (user?.accountType?.name || user?.accountType || user?.account_type?.name || user?.account_type) === 'FREE';\nexport const isGold = user => (user?.accountType?.name || user?.accountType || user?.account_type?.name || user?.account_type) === 'GOLD';\n\nexport const getCampaignName = campaign => {\n const { status = false, utm_campaign: utmCampaign = '' } = campaign;\n if (status) {\n return utmCampaign;\n }\n return null;\n};\n\nexport const getPercentage = (usage, limit) => {\n let avg = (usage / limit) * 100;\n if (avg >= 100) {\n avg = 100;\n } else if (avg > 0 && avg <= 1) {\n avg = 1;\n }\n return avg;\n};\n\nexport const getColor = percentage => {\n let color = '';\n if (percentage < 40) {\n color = BAR_COLORS.GREEN;\n }\n if (percentage >= 40 && percentage < 60) {\n color = BAR_COLORS.YELLOW;\n }\n if (percentage >= 60 && percentage < 80) {\n color = BAR_COLORS.ORANGE;\n }\n if (percentage >= 80) {\n color = BAR_COLORS.RED;\n }\n return color;\n};\n\nconst capitalizeFirstLetter = (value = '') => (typeof value === 'string' ? `${value.charAt(0).toUpperCase()}${value.substring(1)}` : value);\n\nexport const removeLastCharEndsWith = (value = '', endsWith = '') => {\n if (typeof value !== 'string') return value;\n const { length } = value;\n if (value.charAt(length - 1) !== endsWith) return value;\n return value.substring(0, length - 1);\n};\n\nconst isUsageValid = value => typeof value === 'number' && value > -1;\n\nconst isUnlimited = value => value === null || value === undefined || value === 0 || value === -1 || value === 10000000;\n\nconst transformUnlimitedLimits = value => (isUnlimited(value) ? UNLIMITED_DEFAULT_VALUE : value);\n\nexport const getLimitText = limit => (limit >= UNLIMITED_DEFAULT_VALUE ? Texts.USAGE_INFO_UNLIMITED : Texts.USAGE_INFO);\n\nexport const getUploadLimitText = (usage = 0, limit = 0) => {\n const formattedUsage = formatBytes(usage).split(' ');\n const formattedLimit = formatBytes(limit).split(' ');\n return {\n uploadUsage: formattedUsage?.[0],\n uploadUsageUnit: formattedUsage?.[1],\n uploadLimit: formattedLimit?.[0],\n uploadLimitUnit: formattedLimit?.[1]\n };\n};\n\nexport const findHighestLimit = (usages, limits, tresholdPercentage = INLINE_LIMIT_ALERT_TRESHOLD.WARNING) => {\n const DEFAULT_MAX_LIMIT_PERC = 0;\n const DEFAULT_MAX_LIMIT_TYPE = '';\n const DEFAULT_MAX_USAGE = 0;\n let maxUsage = DEFAULT_MAX_USAGE;\n let maxLimitType = DEFAULT_MAX_LIMIT_TYPE;\n let maxLimitPercentage = DEFAULT_MAX_LIMIT_PERC;\n try {\n Object.values(LIMIT_KEY_MAP).forEach(limitKey => {\n const usageKey = LIMIT_KEY_TO_USAGE_KEY_MAP[limitKey];\n const rawLimit = limits[limitKey];\n const limit = transformUnlimitedLimits(rawLimit);\n const rawUsage = usages[usageKey];\n const usage = parseInt(rawUsage, 10);\n const percentage = isUsageValid(usage) ? getPercentage(usage, limit) : DEFAULT_MAX_LIMIT_PERC;\n if (percentage > maxLimitPercentage) {\n maxLimitType = limitKey;\n maxLimitPercentage = percentage;\n maxUsage = usage;\n }\n });\n } catch (e) {\n return {\n maxUsage,\n maxLimitType: DEFAULT_MAX_LIMIT_TYPE,\n maxLimitPercentage: DEFAULT_MAX_LIMIT_PERC,\n isCloseToLimit: false\n };\n }\n return {\n maxUsage,\n maxLimitType,\n maxLimitPercentage,\n isCloseToLimit: maxLimitPercentage >= tresholdPercentage\n };\n};\n\nconst createLimitItems = (_usages = {}, _limits = {}) => {\n const isAiLimitsEnabled = getUrlParameter('agent-limits') === '1';\n const usages = _usages;\n const limits = _limits;\n if (isAiLimitsEnabled) {\n limits.aiAgents = limits.aiAgents ?? limits.formCount;\n limits.aiConversations = limits.conversations ?? limits.views;\n usages.ai_agents = usages.ai_agents ?? usages.form_count;\n usages.ai_conversations = usages?.ai_conversations ?? usages.views;\n }\n\n return Object.keys(LIMIT_KEY_TO_USAGE_KEY_MAP).reduce((data, limitKey) => {\n const usageKey = LIMIT_KEY_TO_USAGE_KEY_MAP[limitKey];\n const rawLimit = limits[limitKey];\n const limit = transformUnlimitedLimits(rawLimit);\n const rawUsage = usages[usageKey];\n const usage = parseInt(rawUsage, 10);\n const percentage = getPercentage(usage, limit);\n const label = capitalizeFirstLetter(LIMIT_LABEL_MAP[limitKey]);\n\n if (!isUsageValid(usage)) return data;\n\n return [...data, {\n name: limitKey,\n limit,\n usage,\n percentage,\n label\n }];\n }, []);\n};\n\nexport const isArrayHasItem = items => Array.isArray(items) && items.length > 0;\n\nconst sortLimitItemsByLabel = (items = []) => {\n if (!isArrayHasItem(items)) return items;\n return items.sort((a, b) => {\n if (a.label > b.label) return 1;\n if (a.label < b.label) return -1;\n return 0;\n });\n};\n\nconst appendWorkflowRunAfterSign = (items = []) => {\n const workflowRunIndex = items.findIndex(item => item.name === LIMIT_KEY_MAP.WORKFLOW_RUNS);\n if (workflowRunIndex === -1) {\n return items;\n }\n const signedDocumentsIndex = items.findIndex(item => item.name === LIMIT_KEY_MAP.SIGNED_DOCUMENTS);\n const [item] = items.splice(workflowRunIndex, 1);\n items.splice(signedDocumentsIndex + 1, 0, item);\n return items;\n};\n\nconst sortLimitItemsByPercentage = (items = []) => {\n if (!isArrayHasItem(items)) return items;\n return items.sort((a, b) => b.percentage - a.percentage);\n};\n\nconst getLimitItemParts = (items = []) => {\n if (!isArrayHasItem(items)) return [[], []];\n const [firstItem] = items;\n let remainingItems = [];\n remainingItems = items.filter(limitData => limitData.name !== firstItem.name);\n return [[firstItem], remainingItems];\n};\n\nexport const createLimitItemsRenderingData = (usages, limits) => {\n const limitItems = createLimitItems(usages, limits);\n const sortedByLabelItems = sortLimitItemsByLabel(limitItems);\n const result = appendWorkflowRunAfterSign(sortedByLabelItems);\n const sortedItems = sortLimitItemsByPercentage(result);\n return getLimitItemParts(sortedItems);\n};\n\nexport const safeLocalizedNumber = (number, language) => {\n try {\n if (isEmpty(language?.trim())) {\n return number?.toLocaleString('en-US');\n }\n\n return number?.toLocaleString(language);\n } catch (error) {\n console.debug(`Cannot get localized number - ${language}.`, error);\n return number;\n }\n};\n","export const Trackings = {\n ACCOUNT_BOX_SEEN: { action: 'seen', target: 'accountBoxStandalone' },\n HEADER_CLICK: { action: 'click', target: 'headerSection' },\n INLINE_ALERT_SEEN: { action: 'seen', target: 'inlineLimitAlert' },\n INLINE_ALERT_UPGRADE_CLICK: { action: 'click', target: 'inlineLimitAlert_upgradeYourPlan' },\n ENTERPRISE_ALERT_SEEN: { action: 'seen', target: 'enterpriseInlineLimitAlert' },\n ENTERPRISE_ALERT_CS_CLICK: { action: 'click', target: 'enterpriseInlineLimitAlert_contactSalesButton' },\n ENTERPRISE_ALERT_LM_CLICK: { action: 'click', target: 'enterpriseInlineLimitAlert_learnMoreButton' },\n VIEW_ALL_CLICK: { action: 'click', target: 'viewAllButton' },\n UPGRADE_YOUR_PLAN_CLICK: { action: 'click', target: 'upgradeYourPlanButton' },\n ADMIN_CONSOLE_PROMO_CLICK: { action: 'click', target: 'adminConsolePromotionButton' },\n ADMIN_CONSOLE_URL_CLICK: { action: 'click', target: 'adminConsoleURLText' },\n SETTINGS_CLICK: { action: 'click', target: 'settingsButton' },\n SWITCH_TO_OLD_CLICK: { action: 'click', target: 'switchToOldButton' },\n LOGOUT_CLICK: { action: 'click', target: 'logoutButton' }\n};\n","import { t, translationRenderer } from '@jotforminc/translation';\nimport {\n bool, func, number, string\n} from 'prop-types';\nimport React, { useEffect } from 'react';\nimport { IconStarFilled } from '@jotforminc/svg-icons';\nimport {\n GA_SUFFIXES, createGaAttributes, formatNumber, saveCustomerAsHubspotFormByUsername, setEPActions,\n ASSET_IDENTIFIER, ALL_TEXTS, CTA_URLS, SDR_SOURCES\n} from '@jotforminc/ep-utils';\nimport IconEnterprise from '../../assets/iconEnterprise.svg';\nimport './limitBanner.scss';\n\nconst LimitBanner = ({\n usage,\n onSeen,\n limitLabel,\n isTestVariant,\n onPrimaryClick,\n onSecondaryClick\n}) => {\n const {\n ENTERPRISE_ACCOUNTBOX_PROMOTION: {\n CONTACT_SALES_URL,\n LEARN_MORE_URL\n }\n } = CTA_URLS;\n\n const { PRODUCT: { LIMIT_BANNER: target } } = ASSET_IDENTIFIER;\n const gaAttributes = createGaAttributes(target);\n const gaAttributesCs = createGaAttributes(target, GA_SUFFIXES.CONTACT_SALES);\n const gaAttributesLm = createGaAttributes(target, GA_SUFFIXES.LEARN_MORE);\n\n const usagePhrase = `${formatNumber(usage)} ${limitLabel}`;\n\n useEffect(() => {\n onSeen();\n\n setEPActions({ asset: target, target, action: 'seen' });\n }, []);\n\n const handleContactSalesClick = () => {\n onPrimaryClick();\n\n setEPActions({ asset: target, target: 'contactSalesButton', action: 'click' });\n saveCustomerAsHubspotFormByUsername({ lastProductAssetInteraction: SDR_SOURCES.ACCOUNT_BOX_ENTERPRISE_PROMO });\n };\n\n const handleLearnMoreClick = () => {\n onSecondaryClick();\n\n setEPActions({ asset: target, target: 'learnMoreButton', action: 'click' });\n saveCustomerAsHubspotFormByUsername({ lastProductAssetInteraction: SDR_SOURCES.ACCOUNT_BOX_ENTERPRISE_PROMO });\n };\n\n const wrapperClassName = !isTestVariant ? 'jNewHeader-enterprise-promotion' : 'jNewHeader-enterprise-promotion test-variant';\n\n return (\n \n
    \n {/* control variant */}\n {!isTestVariant && (\n <>\n \n
    \n
    {t(ALL_TEXTS.GET_RID_OF_LIMITS)}
    \n

    {t(ALL_TEXTS.EXCLUSIVE_ENTERPRISE_FEATURES)}

    \n
    \n \n )}\n {/* test variant */}\n {isTestVariant && (\n <>\n
    \n \n \n \n
    {t(ALL_TEXTS.CONGRATULATIONS)}
    \n
    \n

    \n {translationRenderer(ALL_TEXTS.YOU_MAY_CONSIDER_UPGRADING)({\n renderer1: () => {usagePhrase},\n renderer2: enterpriseText => {enterpriseText}\n })}\n

    \n \n )}\n
    \n
    \n {/* contact sales */}\n \n {t(ALL_TEXTS.CONTACT_SALES)}\n \n {/* learn more */}\n \n {t(ALL_TEXTS.LEARN_MORE)}\n \n
    \n \n );\n};\n\nLimitBanner.propTypes = {\n usage: number,\n limitLabel: string,\n isTestVariant: bool,\n onSeen: func,\n onPrimaryClick: func,\n onSecondaryClick: func\n};\n\nLimitBanner.defaultProps = {\n usage: 0,\n limitLabel: '',\n isTestVariant: false,\n onSeen: f => f,\n onPrimaryClick: f => f,\n onSecondaryClick: f => f\n};\n\nexport default LimitBanner;\n","import React from 'react';\nimport {\n bool, func, shape, string\n} from 'prop-types';\nimport { LimitBanner } from '@jotforminc/ep-account-box';\nimport { Trackings } from '../../constants';\n\nconst EnterpriseInlineLimitAlert = ({\n user,\n isTestVariant,\n logAbTestAction,\n registerJotformAction,\n ...props\n}) => {\n const handleEnterprisePromoSeen = () => {\n const { ENTERPRISE_ALERT_SEEN } = Trackings;\n registerJotformAction(ENTERPRISE_ALERT_SEEN);\n logAbTestAction({ action: 'seen', target: 'enterpriseInlineLimitAlert' });\n };\n\n const handleEnterprisePromoCsClick = () => {\n const { ENTERPRISE_ALERT_CS_CLICK } = Trackings;\n registerJotformAction(ENTERPRISE_ALERT_CS_CLICK);\n logAbTestAction({ action: 'click', target: 'contactSalesButton' });\n };\n\n const handleEnterprisePromoLmClick = () => {\n const { ENTERPRISE_ALERT_LM_CLICK } = Trackings;\n registerJotformAction(ENTERPRISE_ALERT_LM_CLICK);\n logAbTestAction({ action: 'click', target: 'learnMoreButton' });\n };\n\n return (\n \n );\n};\n\nEnterpriseInlineLimitAlert.propTypes = {\n user: shape({\n account_type: shape({\n name: string,\n limits: shape({})\n }),\n avatarUrl: string,\n username: string,\n usage: shape({}),\n location: shape({}),\n campaign: shape({})\n }).isRequired,\n isTestVariant: bool,\n logAbTestAction: func,\n registerJotformAction: func.isRequired\n};\n\nEnterpriseInlineLimitAlert.defaultProps = {\n isTestVariant: false,\n logAbTestAction: f => f\n};\n\nexport default EnterpriseInlineLimitAlert;\n","import React, { useEffect } from 'react';\nimport {\n bool, elementType, func, number, string\n} from 'prop-types';\nimport { handleCustomNavigation } from '@jotforminc/utils';\nimport { removeLastCharEndsWith } from '../../utils';\nimport {\n Texts, LIMIT_LABEL_MAP, INLINE_ALERT_TYPES, INLINE_LIMIT_ALERT_TRESHOLD\n} from '../../constants';\n\nconst InlineLimitAlert = ({\n text,\n limitType,\n utmContent,\n limitPercentage,\n enterpriseMode,\n AlertRenderer,\n onSeen,\n onCtaClick\n}) => {\n const { DANGER: DANGER_TRESHOLD } = INLINE_LIMIT_ALERT_TRESHOLD;\n\n useEffect(() => {\n onSeen();\n }, []);\n\n const getAlertType = () => {\n if (enterpriseMode) {\n return INLINE_ALERT_TYPES.ENTERPRISE;\n } if (limitPercentage < DANGER_TRESHOLD) {\n return INLINE_ALERT_TYPES.WARNING;\n }\n return INLINE_ALERT_TYPES.DANGER;\n };\n\n const getText = () => {\n if (enterpriseMode) {\n return Texts.YOU_HAVE_REACHED_YOUR_LIMIT_ENTERPRISE;\n } if (limitPercentage < DANGER_TRESHOLD) {\n return Texts.YOU_HAVE_REACHED_YOUR_LIMIT_WARNING;\n }\n return Texts.YOU_HAVE_REACHED_YOUR_LIMIT_DANGER;\n };\n\n const handleUpgradeOptionClick = e => {\n e.preventDefault();\n onCtaClick();\n if (enterpriseMode) {\n handleCustomNavigation(`/enterprise/contact-sales/${utmContent}`, '_blank', true);\n return;\n }\n handleCustomNavigation(`/pricing/${utmContent}`, '_blank', true);\n };\n\n const limitWording = removeLastCharEndsWith(LIMIT_LABEL_MAP[limitType], 's');\n const textWithLimitWording = getText().replace('{limitType}', limitWording);\n\n return (\n \n );\n};\n\nInlineLimitAlert.propTypes = {\n text: string,\n enterpriseMode: bool,\n limitType: string.isRequired,\n utmContent: string,\n limitPercentage: number.isRequired,\n AlertRenderer: elementType,\n onSeen: func,\n onCtaClick: func\n};\n\nInlineLimitAlert.defaultProps = {\n text: '',\n utmContent: '',\n enterpriseMode: false,\n AlertRenderer: null,\n onSeen: f => f,\n onCtaClick: f => f\n};\n\nexport default InlineLimitAlert;\n","import React from 'react';\nimport { func, oneOf, string } from 'prop-types';\nimport { translationRenderer } from '@jotforminc/translation';\nimport { IconExclamationCircleFilled } from '@jotforminc/svg-icons';\nimport { INLINE_ALERT_TYPES } from '../../constants';\n\nconst AlertRenderer = ({ text, alertType, onCtaClick }) => {\n const getClassName = () => `jNewHeader-alert ${alertType === INLINE_ALERT_TYPES.DANGER ? 'danger' : 'warning'}`;\n\n return (\n \n \n

    \n {translationRenderer(text)({\n renderer1: linkText => (\n \n {linkText}\n \n )\n })}\n

    \n \n );\n};\n\nAlertRenderer.propTypes = {\n text: string.isRequired,\n alertType: oneOf([\n INLINE_ALERT_TYPES.ENTERPRISE,\n INLINE_ALERT_TYPES.WARNING,\n INLINE_ALERT_TYPES.DANGER\n ]).isRequired,\n onCtaClick: func.isRequired\n};\n\nexport default AlertRenderer;\n","import React, { useEffect } from 'react';\nimport { func, string } from 'prop-types';\nimport { Trackings } from '../../constants';\nimport InlineLimitAlert from './InlineLimitAlert';\nimport AlertRenderer from './AlertRenderer';\n\nconst InlineLimitAlertWithTrackings = ({\n registerJotformAction,\n builderType,\n ...props\n}) => {\n const utmCampaign = builderType === 'card' ? 'upgrade-from-account-box-editor_cf' : 'upgrade-from-account-box-editor';\n const utmContent = `?utm_source=jNewHeader&utm_medium=banner&utm_campaign=${utmCampaign}&utm_term=Upgrade%20for%20more&utm_content=inline_limit_alert_upgrade_button`;\n\n useEffect(() => {\n const { ENTERPRISE_ALERT_SEEN } = Trackings;\n registerJotformAction(ENTERPRISE_ALERT_SEEN);\n }, []);\n\n const handleUpgradeYourPlanClick = () => {\n const { INLINE_ALERT_UPGRADE_CLICK } = Trackings;\n registerJotformAction(INLINE_ALERT_UPGRADE_CLICK);\n };\n\n return (\n \n );\n};\n\nInlineLimitAlertWithTrackings.propTypes = {\n builderType: string,\n registerJotformAction: func.isRequired\n};\n\nInlineLimitAlertWithTrackings.defaultProps = {\n builderType: ''\n};\n\nexport default InlineLimitAlertWithTrackings;\n","import React, { useMemo } from 'react';\nimport { shape, string } from 'prop-types';\nimport { t, translationRenderer } from '@jotforminc/translation';\nimport { handleCustomNavigation, prettyDate } from '@jotforminc/utils';\nimport { Texts } from '../../constants';\n\nexport function InvoiceWarning(props) {\n const { invoice, invoiceMessageType, adminConsoleLink } = props;\n\n const invoiceFinalDueDate = useMemo(() => {\n const dueDate = new Date(invoice.invoice_due_date);\n // If the status is overdue, push the due date back 33 days which is the maximum grace period we would give\n return new Date(dueDate.setDate(dueDate.getDate() + (invoice.invoice_status === 'Overdue' ? 33 : 0)));\n }, [invoice.invoice_due_date, invoice.invoice_status]);\n\n return (\n \n
    \n

    \n {translationRenderer(Texts.INVOICE_STATUS)({\n renderer1: () => (invoice.invoice_status === 'Overdue' ? 'Overdue' : 'Available')\n })}\n

    \n

    \n {translationRenderer(Texts.INVOICE_DUE_DATE)({\n renderer1: () => prettyDate(invoiceFinalDueDate, false, true, true)\n })}\n

    \n
    \n \n \n );\n}\n\nInvoiceWarning.propTypes = {\n adminConsoleLink: string,\n invoice: shape({}),\n invoiceMessageType: string\n};\n\nInvoiceWarning.defaultProps = {\n adminConsoleLink: '/admin',\n invoice: {},\n invoiceMessageType: undefined\n};\n","import React from 'react';\nimport { func, node } from 'prop-types';\nimport { t } from '@jotforminc/translation';\nimport { IconTagPercentFilled, IconXmark } from '@jotforminc/svg-icons';\nimport { ALL_TEXTS } from '@jotforminc/ep-utils';\n\nexport const DialogRenderer = ({ children }) => (
    {children}
    );\n\nDialogRenderer.propTypes = { children: node };\nDialogRenderer.defaultProps = { children: null };\n\nexport const ContentRenderer = ({ children, ...props }) => (\n
    \n
    \n {children}\n
    \n
    \n);\n\nContentRenderer.propTypes = { children: node };\nContentRenderer.defaultProps = { children: null };\n\nexport const HeaderRenderer = ({ onCloseClick, ...props }) => (\n \n \n \n);\n\nexport const EducationDiscountRenderer = () => (\n
    \n \n {t(ALL_TEXTS.EDUCATION_DISCOUNT_PERCENT)}\n
    \n);\n\nHeaderRenderer.propTypes = { onCloseClick: func };\nHeaderRenderer.defaultProps = { onCloseClick: f => f };\n","import React, { useEffect, useRef } from 'react';\nimport { Modal } from '@jotforminc/uikit';\nimport cx from 'classnames';\nimport {\n bool, func, object, string\n} from 'prop-types';\nimport { t, translationRenderer } from '@jotforminc/translation';\nimport {\n PrefilledLeadFormAside, ASSET_IDENTIFIER,\n ALL_TEXTS, GA_FORM_TRACKING_ITEMS, userPropType, GA_AD_FORM_TRACKING_ITEMS,\n GA_SUFFIXES, createGaAttributes, gaDataLayerPushClose, getDevFormID, getLiveFormID, hasAdwordsModeOn, mapCallbacksToGaTrackingItems, setEPActions\n} from '@jotforminc/ep-utils';\nimport {\n ContentRenderer, DialogRenderer, EducationDiscountRenderer, HeaderRenderer\n} from './Renderers';\nimport './adminConsoleDarkModal.scss';\nimport Graph from '../../assets/graph.svg';\nimport EnterpriseIcon from '../../assets/enterpriseRocketMini.svg';\n\nconst AdminConsoleDarkModal = (({\n user,\n modalProps,\n onCloseClick,\n // logAbTestAction,\n isEducationDiscountMode,\n isAdminConsoleNoLabelMode,\n onClose\n}) => {\n const uikitModalRef = useRef(null);\n\n const { PRODUCT: { ADMIN_CONSOLE_DARK_MODAL } } = ASSET_IDENTIFIER;\n const target = ADMIN_CONSOLE_DARK_MODAL;\n\n const isAdForm = hasAdwordsModeOn();\n let { [target]: gaFormTrackingItems } = isAdForm ? GA_AD_FORM_TRACKING_ITEMS : GA_FORM_TRACKING_ITEMS;\n\n const gaAttributes = createGaAttributes(target);\n const gaAttributesClose = createGaAttributes(target, GA_SUFFIXES.CLOSE);\n\n useEffect(() => {\n setEPActions({ asset: target, target, action: 'seen' });\n }, []);\n\n const handleCloseClick = () => {\n uikitModalRef.current?.hide();\n onCloseClick();\n setEPActions({ asset: target, target: 'closeButton', action: 'click' });\n };\n\n const handleClose = () => {\n gaDataLayerPushClose(gaAttributes);\n setEPActions({ asset: target, target, action: 'close' });\n onClose();\n };\n\n const handleContactSalesClick = () => {\n setEPActions({ asset: target, target: 'contactSalesButton', action: 'click' });\n };\n\n const handleLearnMoreClick = () => {\n setEPActions({ asset: target, target: 'learnMoreButton', action: 'click' });\n };\n\n const handleFormSubmit = () => {\n setEPActions({ asset: target, target, action: 'formSubmit' });\n };\n\n gaFormTrackingItems = mapCallbacksToGaTrackingItems(gaFormTrackingItems, [handleContactSalesClick, handleLearnMoreClick]);\n\n return (\n }\n HeaderRenderer={() => }\n onModalClose={handleClose}\n {...modalProps}\n >\n
    \n
    \n \n \n {t(ALL_TEXTS.ADMIN_CONSOLE_CAPITALIZED)}\n \n

    \n {translationRenderer(ALL_TEXTS.ADMIN_CONSOLE_DARK_MODAL_DESCRIPTION)({\n renderer1: str => {str},\n renderer2: str => {str}\n })}\n

    \n \n {isEducationDiscountMode && }\n
    \n {/* aside */}\n
    \n \n
    \n
    \n \n );\n});\n\nAdminConsoleDarkModal.propTypes = {\n user: userPropType.isRequired,\n modalProps: object,\n formID: string.isRequired,\n devFormID: string.isRequired,\n isEduTestVariant: bool,\n isAdminConsoleNoLabelMode: bool,\n onClose: func,\n onCloseClick: func,\n logAbTestAction: func,\n isEducationDiscountMode: bool,\n expandableAdminConsoleButtonMode: bool\n};\n\nAdminConsoleDarkModal.defaultProps = {\n modalProps: {},\n isEduTestVariant: false,\n isAdminConsoleNoLabelMode: false,\n onClose: f => f,\n onCloseClick: f => f,\n logAbTestAction: f => f,\n isEducationDiscountMode: false,\n expandableAdminConsoleButtonMode: false\n};\n\nexport default AdminConsoleDarkModal;\n","import { ALL_TEXTS } from './texts';\n\nexport const adminConsoleDescriptiveSliderItems = [\n {\n id: 1,\n name: 'dashboard',\n visualUrl: 'https://cdn.jotfor.ms/assets/img/enterprise/admin-console-descriptive-modal/step1.png?v=1.0.1',\n linkText: 'Manage your organization from one central location',\n content: ALL_TEXTS.VIEW_ALL_FORM_STATS,\n contentList: [\n { title: 'You can easily manage' },\n { item: 'User access' },\n { item: 'Forms' },\n { item: 'Audit logs' },\n { item: 'White labeling' },\n { item: 'Analytics' },\n { item: 'And more!' }\n ]\n }, {\n id: 2,\n name: 'users',\n visualUrl: 'https://cdn.jotfor.ms/assets/img/enterprise/admin-console-descriptive-modal/step2.png?v=1.0.1',\n linkText: 'Seamlessly manage users from one central location',\n content: ALL_TEXTS.SECURELY_MANAGE_DATA,\n contentList: [\n { title: 'You can' },\n { item: 'Create new users' },\n { item: 'Edit and delete users' },\n { item: 'Update user settings, user types, and profile information' },\n { item: 'Review user activity logs' },\n { item: 'And more!' }\n ]\n }, {\n id: 3,\n name: 'forms',\n visualUrl: 'https://cdn.jotfor.ms/assets/img/enterprise/admin-console-descriptive-modal/step3.png?v=1.0.1',\n linkText: 'Manage all of your data from one location',\n content: ALL_TEXTS.MANAGE_ALL_AVAILABLE_FORMS,\n contentList: [\n { title: 'In the menu for each form, you can' },\n { item: 'View the form' },\n { item: 'Edit the form' },\n { item: 'View submissions' },\n { item: 'Delete the form' },\n { item: 'And more!' }\n ]\n }\n];\n","import { useEffect, useState } from 'react';\n\nconst useSlider = (\n initialStep = 1,\n stepCount,\n autoSlide = false,\n SLIDE_DURATION = 6000,\n onStepChange = f => f\n) => {\n const [currentStep, setCurrentStep] = useState(initialStep);\n const FIRST_STEP = 1;\n const LAST_STEP = stepCount;\n\n const validateStepCount = () => {\n const isValid = typeof stepCount === 'number' && stepCount > 0;\n if (!isValid) {\n console.warn('useSlider: Step count should be a number and greater than 0');\n return false;\n }\n return true;\n };\n\n const nextStep = () => {\n if (!validateStepCount()) return;\n if (currentStep === LAST_STEP) {\n setCurrentStep(FIRST_STEP);\n return;\n }\n setCurrentStep(currentStep + 1);\n };\n\n const previousStep = () => {\n if (!validateStepCount()) return;\n if (currentStep === FIRST_STEP) {\n setCurrentStep(LAST_STEP);\n return;\n }\n setCurrentStep(currentStep - 1);\n };\n\n const setStep = step => {\n if (!validateStepCount()) return;\n setCurrentStep(step);\n };\n\n // auto slide\n useEffect(() => {\n if (!validateStepCount()) return;\n if (!autoSlide) return;\n const sliderInterval = setInterval(() => {\n nextStep();\n }, SLIDE_DURATION);\n\n return () => {\n clearInterval(sliderInterval);\n };\n }, [currentStep]);\n\n useEffect(() => {\n onStepChange(currentStep);\n }, [currentStep]);\n\n return [\n currentStep,\n setStep,\n nextStep,\n previousStep\n ];\n};\n\nexport default useSlider;\n","import React from 'react';\nimport { func, node } from 'prop-types';\nimport { t } from '@jotforminc/translation';\nimport { ALL_TEXTS } from '@jotforminc/ep-utils';\nimport { Button } from '@jotforminc/magnet';\nimport { IconXmarkSm } from '@jotforminc/svg-icons';\n\nexport const DialogRenderer = ({ children }) => (
    {children}
    );\n\nDialogRenderer.propTypes = { children: node };\nDialogRenderer.defaultProps = { children: null };\n\nexport const ContentRenderer = ({ children, ...props }) => (\n
    \n {children}\n
    \n);\n\nContentRenderer.propTypes = { children: node };\nContentRenderer.defaultProps = { children: null };\n\nexport const HeaderRenderer = ({ onCloseButton, ...props }) => (\n \n);\n\nHeaderRenderer.propTypes = { onCloseButton: func };\nHeaderRenderer.defaultProps = { onCloseButton: f => f };\n","import React from 'react';\nimport { func } from 'prop-types';\nimport { t } from '@jotforminc/translation';\nimport { ALL_TEXTS } from '@jotforminc/ep-utils';\nimport { Button } from '@jotforminc/magnet';\nimport { IconChevronLeft, IconChevronRight } from '@jotforminc/svg-icons';\n\nconst Navigation = ({\n onPreviousClick,\n onNextClick\n}) => {\n return (\n <>\n
    \n \n \n
    \n \n );\n};\n\nNavigation.propTypes = {\n onNextClick: func,\n onPreviousClick: func\n};\n\nNavigation.defaultProps = {\n onNextClick: f => f,\n onPreviousClick: f => f\n};\n\nexport default Navigation;\n","import React from 'react';\nimport { func, array, number } from 'prop-types';\nimport { t } from '@jotforminc/translation';\nimport {\n ALL_TEXTS, ASSET_IDENTIFIER, GA_SUFFIXES, createGaAttributes\n} from '@jotforminc/ep-utils';\nimport { Button } from '@jotforminc/magnet';\nimport { IconArrowRight } from '@jotforminc/svg-icons';\nimport Navigation from './Navigation';\n\nconst Slide = ({\n sliderItems,\n currentStep,\n onPrimaryClick,\n onSecondaryClick,\n onPreviousClick,\n onNextClick\n}) => {\n const { AB_TEST: { FEATURE_SLIDER_MODAL: target } } = ASSET_IDENTIFIER;\n\n return (\n
      \n {sliderItems\n .filter(item => item.id === currentStep)\n .map(item => (\n
    • \n
      \n
      \n

      {t(ALL_TEXTS.ENTERPRISE_ADMIN_DASHBOARD)}

      \n
      \n \n
      \n
      \n
      \n
      \n\n {/* nav */}\n \n\n
      \n
      {t(item.linkText.toUpperCase())}
      \n

      {t(item.content)}

      \n\n
        \n {item.contentList.map(contentItem => (\n
      • \n {contentItem.title}\n {contentItem.item && }\n {contentItem.item}\n
      • \n ))}\n
      \n
      \n\n
      \n
      \n onSecondaryClick(item)}\n {...createGaAttributes(target, `${item.name}-${GA_SUFFIXES.LEARN_MORE}`)}\n >\n {t(ALL_TEXTS.LEARN_MORE)}\n \n\n onPrimaryClick(item)}\n {...createGaAttributes(target, `${item.name}-${GA_SUFFIXES.CONTACT_SALES}`)}\n >\n {t(ALL_TEXTS.CONTACT_SALES)}\n \n
      \n
      \n
      \n
    • \n ))}\n
    \n );\n};\n\nSlide.propTypes = {\n sliderItems: array.isRequired,\n currentStep: number.isRequired,\n onPrimaryClick: func,\n onSecondaryClick: func,\n onPreviousClick: func,\n onNextClick: func\n};\n\nSlide.defaultProps = {\n onPrimaryClick: f => f,\n onSecondaryClick: f => f,\n onPreviousClick: f => f,\n onNextClick: f => f\n};\n\nexport default Slide;\n","import React, {\n forwardRef,\n useEffect,\n useImperativeHandle,\n useRef\n} from 'react';\nimport { handleCustomNavigation } from '@jotforminc/utils';\nimport { Modal } from '@jotforminc/uikit';\nimport { func, bool, object } from 'prop-types';\nimport {\n ASSET_IDENTIFIER,\n adminConsoleDescriptiveSliderItems,\n GA_SUFFIXES,\n createGaAttributes,\n gaDataLayerPushClose,\n useSlider\n} from '@jotforminc/ep-utils';\nimport { ContentRenderer, DialogRenderer, HeaderRenderer } from './Renderers';\nimport Slide from './Slide';\nimport './adminConsoleDescriptiveModal.scss';\nimport './dialogShared.scss';\n\nconst AdminConsoleDescriptiveSliderModal = forwardRef(\n (\n {\n modalProps, onClose, onPrimaryClick, onSecondaryClick, logAbTestAction\n },\n ref\n ) => {\n const INITIAL_STEP_ID = 1;\n const SLIDE_DURATION = 10000;\n const uikitModalRef = useRef(null);\n const {\n AB_TEST: { FEATURE_SLIDER_MODAL: target }\n } = ASSET_IDENTIFIER;\n\n const gaAttributes = createGaAttributes(target);\n const gaAttributesClose = createGaAttributes(target, GA_SUFFIXES.CLOSE);\n\n // log seen action for auto slide\n const onStepChange = currentStep => {\n const currentItem = adminConsoleDescriptiveSliderItems.find(\n item => item.id === currentStep\n );\n logAbTestAction({\n action: 'seen',\n target: `${currentItem?.name?.toLocaleLowerCase()}-${target}`\n });\n };\n\n const [currentStep, , nextStep, previousStep] = useSlider(\n INITIAL_STEP_ID,\n adminConsoleDescriptiveSliderItems.length,\n true,\n SLIDE_DURATION,\n onStepChange\n );\n\n useEffect(() => {\n logAbTestAction({ action: 'seen', target });\n }, []);\n\n const handleCloseButton = () => {\n gaDataLayerPushClose(gaAttributes);\n logAbTestAction({ action: 'close', target });\n onClose();\n };\n\n useImperativeHandle(ref, () => ({\n show: () => {\n uikitModalRef.current?.show();\n }\n }));\n\n const handlePrimaryClick = slideItem => {\n const { name } = slideItem;\n onPrimaryClick();\n logAbTestAction({\n action: 'click',\n target: `contactSalesButton-${name}Slide-${target}`\n });\n handleCustomNavigation('/enterprise/contact-sales');\n };\n\n const handleSecondaryClick = slideItem => {\n const { name } = slideItem;\n onSecondaryClick();\n logAbTestAction({\n action: 'click',\n target: `learnMoreButton-${name}Slide-${target}`\n });\n handleCustomNavigation('/enterprise/admin-console');\n };\n\n const handleClose = () => {\n gaDataLayerPushClose(gaAttributes);\n logAbTestAction({ action: 'close', target });\n onClose();\n };\n\n return (\n (\n \n )}\n HeaderRenderer={() => (\n \n )}\n onModalClose={handleClose}\n {...modalProps}\n >\n {/* slide */}\n \n {/* nav */}\n {/* */}\n \n );\n }\n);\n\nAdminConsoleDescriptiveSliderModal.propTypes = {\n modalProps: object,\n defaultVisible: bool,\n onClose: func,\n onPrimaryClick: func,\n onSecondaryClick: func,\n logAbTestAction: func\n};\n\nAdminConsoleDescriptiveSliderModal.defaultProps = {\n modalProps: {},\n defaultVisible: true,\n onClose: f => f,\n onPrimaryClick: f => f,\n onSecondaryClick: f => f,\n logAbTestAction: f => f\n};\n\nAdminConsoleDescriptiveSliderModal.displayName = 'AdminConsoleDescriptiveSliderModal';\n\nexport default AdminConsoleDescriptiveSliderModal;\n","import React, {\n useEffect, useRef, useState\n} from 'react';\nimport ReactDOM from 'react-dom';\nimport cx from 'classnames';\nimport { bool, func } from 'prop-types';\nimport { t } from '@jotforminc/translation';\nimport { ABTestManager } from '@jotforminc/abtest-manager';\nimport { Loading } from '@jotforminc/loading';\nimport { IconRocketFilled } from '@jotforminc/svg-icons';\nimport {\n createGaAttributes, getRootElement, saveCustomerAsHubspotFormByUsername, setEPActions,\n ASSET_IDENTIFIER, ENTERPRSE_PROMOTIONS_ROOT_EL_ID, SDR_SOURCES, userPropType\n} from '@jotforminc/ep-utils';\nimport { AdminConsoleDarkModal } from '../AdminConsoleDarkModal';\n\nimport IconEnterpriseRocket from '../../assets/enterpriseRocket.svg';\nimport './adminConsolePromotionButton.scss';\nimport { AdminConsoleDescriptiveSliderModal } from '../AbTest';\n\nconst AdminConsolePromotionButton = ({ user, onClick }) => {\n const { PRODUCT: { ADMIN_CONSOLE_PROMOTION_BUTTON: target } } = ASSET_IDENTIFIER;\n\n const gaAttributes = createGaAttributes(target);\n\n const logModalWithSliderAbTestActionRef = useRef(f => f);\n const modalRootRef = useRef(null);\n\n const [isLoading, setIsLoading] = useState(false);\n\n useEffect(() => {\n setEPActions({ asset: target, target, action: 'seen' });\n }, []);\n\n const handleModalClose = () => {\n if (!modalRootRef.current) return;\n ReactDOM.unmountComponentAtNode(modalRootRef.current);\n };\n\n const renderEnterpriseModal = isTestVariant => {\n if (!modalRootRef.current) {\n modalRootRef.current = getRootElement(ENTERPRSE_PROMOTIONS_ROOT_EL_ID);\n }\n\n const modal = isTestVariant ? (\n \n ) : (\n \n );\n\n ReactDOM.render(modal, modalRootRef.current);\n };\n\n const handleAdminConsolePromotionClick = () => {\n // A/B test: adminConsoleModalWithSlider\n (async () => {\n const abTestManager = new ABTestManager({\n isTestEnabled: true,\n testName: 'adminConsoleModalWithSlider',\n controlVariantCode: '28741',\n testVariantCode: '28751',\n urlParam: 'epacmws',\n user,\n cacheVariantCodeAtLocalStorage: true\n });\n\n logModalWithSliderAbTestActionRef.current = abTestManager.registerABTestAction;\n\n try {\n setIsLoading(true);\n\n const isTestVariant = await abTestManager.isTestVariant();\n renderEnterpriseModal(isTestVariant);\n } finally {\n setIsLoading(false);\n }\n })();\n\n setEPActions({ asset: target, target, action: 'click' });\n saveCustomerAsHubspotFormByUsername({ lastProductAssetInteraction: SDR_SOURCES.ACCOUNT_BOX_ADMIN_CONSOLE_BUTTON });\n onClick();\n };\n\n const buttonClasses = cx({\n 'jNewHeader-adminConsolePromotion': true,\n educationDiscount: false\n });\n\n return (\n \n {t('Admin Console')}\n {isLoading ?
    : }\n {false && (\n
    \n \n {t('30% off')}\n
    \n )}\n \n );\n};\n\nAdminConsolePromotionButton.propTypes = {\n user: userPropType.isRequired,\n onClick: func,\n isEducationDiscountMode: bool\n};\n\nAdminConsolePromotionButton.defaultProps = {\n onClick: f => f,\n isEducationDiscountMode: false\n};\n\nexport default AdminConsolePromotionButton;\n","import React from 'react';\nimport {\n bool, func, oneOfType, shape, string\n} from 'prop-types';\nimport { t } from '@jotforminc/translation';\nimport { handleCustomNavigation, isSalesforceEnv } from '@jotforminc/utils';\nimport { AdminConsolePromotionButton } from '@jotforminc/ep-account-box';\nimport { Texts, Trackings } from '../../constants';\n\nconst MenuItems = ({\n user,\n adminConsoleLink,\n appName,\n isEnterprise,\n showAdminConsole,\n showAdminConsoleWarning,\n logoutURLParameter,\n handleSwitchToOld,\n isAccountBoxOpened,\n toggleAccountBox,\n registerABTestAction,\n registerJotformAction,\n showAdminConsolePromotion,\n showSettings,\n settingsDontUseRootPath\n}) => {\n const userAccountType = user?.account_type?.name;\n const showSwitchToOld = appName === 'tables' && handleSwitchToOld;\n const {\n ADMIN_CONSOLE_PROMO_CLICK, SETTINGS_CLICK, SWITCH_TO_OLD_CLICK, LOGOUT_CLICK, ADMIN_CONSOLE_URL_CLICK\n } = Trackings;\n\n const handleAdminConsolePromotionClick = () => {\n registerABTestAction({ action: 'click', target: 'accountBox-adminConsolePromotion' });\n registerJotformAction(ADMIN_CONSOLE_PROMO_CLICK);\n };\n\n const handleSettingsClick = () => {\n try {\n registerABTestAction({ action: 'click', target: 'accountBox-settings' });\n registerJotformAction(SETTINGS_CLICK);\n } finally {\n handleCustomNavigation('/myaccount/settings', '_blank', settingsDontUseRootPath);\n }\n };\n\n const handleSwitchToOldWithToggle = () => {\n try {\n registerJotformAction(SWITCH_TO_OLD_CLICK);\n } finally {\n if (isAccountBoxOpened) { toggleAccountBox(); }\n handleSwitchToOld();\n }\n };\n\n const handleLogoutClick = () => {\n try {\n registerJotformAction(LOGOUT_CLICK);\n } finally {\n handleCustomNavigation(`/logout.php${logoutURLParameter}`, '_self', true);\n }\n };\n\n return (\n
      \n {/* enterpsie promotions: add & manage users */}\n {!isEnterprise && showAdminConsolePromotion && (\n
    • \n \n
    • \n )}\n {/* settings */}\n {showSettings && (\n
    • \n \n {t(Texts.SETTINGS)}\n \n
    • \n )}\n {/* admin console */}\n {showAdminConsole && (\n
    • \n {\n e.preventDefault();\n registerJotformAction(ADMIN_CONSOLE_URL_CLICK);\n handleCustomNavigation(adminConsoleLink, '_self', true);\n }}\n data-testid=\"adminConsoleButton\"\n className=\"locale jNewHeader-accountLinkListItemLink\"\n role=\"menuitem\"\n >\n {t(Texts.ADMIN_CONSOLE)}\n \n
    • \n )}\n {/* switch to old */}\n {showSwitchToOld && (\n
    • \n \n {t(Texts.SWITCH_TO_OLD_VERSION)}\n \n
    • \n )}\n {/* get the mobile app */}\n {isEnterprise && userAccountType !== 'FORM_USER' && !isSalesforceEnv() && (\n
    • \n \n {t(Texts.GET_THE_APP)}\n \n
    • \n )}\n {/* logout */}\n {!isSalesforceEnv() && (\n
    • \n \n {t(Texts.LOGOUT)}\n \n
    • \n )}\n
    \n );\n};\n\nMenuItems.propTypes = {\n user: shape({}).isRequired,\n isEnterprise: bool.isRequired,\n showAdminConsole: bool.isRequired,\n showAdminConsoleWarning: string,\n registerABTestAction: func.isRequired,\n handleSwitchToOld: oneOfType([\n func,\n bool\n ]),\n adminConsoleLink: string,\n appName: string,\n logoutURLParameter: string,\n isAccountBoxOpened: bool,\n toggleAccountBox: func,\n registerJotformAction: func.isRequired,\n showAdminConsolePromotion: bool,\n showSettings: bool,\n settingsDontUseRootPath: bool\n};\n\nMenuItems.defaultProps = {\n handleSwitchToOld: false,\n adminConsoleLink: '/admin',\n appName: '',\n logoutURLParameter: '',\n isAccountBoxOpened: false,\n toggleAccountBox: f => f,\n showAdminConsoleWarning: undefined,\n showAdminConsolePromotion: true,\n showSettings: true,\n settingsDontUseRootPath: false\n};\n\nexport default MenuItems;\n","import React from 'react';\nimport { number, string } from 'prop-types';\nimport { translationRenderer } from '@jotforminc/translation';\nimport { Texts } from '../../constants';\nimport { getUploadLimitText } from '../../utils';\n\nconst UploadUsageInfo = ({\n name,\n usage,\n limit\n}) => {\n const {\n uploadUsage, uploadUsageUnit, uploadLimit, uploadLimitUnit\n } = getUploadLimitText(usage, limit);\n\n let uploadSpaceUsageInfo = Texts.UPLOAD_SPACE_USAGE_INFO_DEFAULT;\n\n if ([0, 1].includes(parseInt(uploadUsage, 10)) && uploadUsageUnit.toLocaleLowerCase() === Texts.BYTES) {\n uploadSpaceUsageInfo = Texts.UPLOAD_SPACE_USAGE_INFO_BYTE;\n } else if (parseInt(uploadUsage, 10) >= 0 && uploadUsageUnit.toLocaleLowerCase() === Texts.BYTES) {\n uploadSpaceUsageInfo = Texts.UPLOAD_SPACE_USAGE_INFO_BYTES;\n }\n\n return (\n \n {/* for byte usage unit - singular */}\n {uploadSpaceUsageInfo === Texts.UPLOAD_SPACE_USAGE_INFO_BYTE\n && translationRenderer(uploadSpaceUsageInfo)({\n renderer1: () => ({uploadUsage}),\n renderer2: usageUnit => ({usageUnit}),\n renderer3: () => ({uploadLimit}),\n renderer4: () => ({uploadLimitUnit})\n })}\n {/* for bytes usage unit - plural */}\n {uploadSpaceUsageInfo === Texts.UPLOAD_SPACE_USAGE_INFO_BYTES\n && translationRenderer(uploadSpaceUsageInfo)({\n renderer1: () => ({uploadUsage}),\n renderer2: usageUnit => ({usageUnit}),\n renderer3: () => ({uploadLimit}),\n renderer4: () => ({uploadLimitUnit})\n })}\n {/* for default usage unit - KB, MB, GB, TB */}\n {uploadSpaceUsageInfo === Texts.UPLOAD_SPACE_USAGE_INFO_DEFAULT\n && translationRenderer(uploadSpaceUsageInfo)({\n renderer1: () => ({uploadUsage}),\n renderer2: () => ({uploadUsageUnit}),\n renderer3: () => ({uploadLimit}),\n renderer4: () => ({uploadLimitUnit})\n })}\n \n );\n};\n\nUploadUsageInfo.propTypes = {\n name: string.isRequired,\n usage: number.isRequired,\n limit: number.isRequired\n};\n\nexport default UploadUsageInfo;\n","import React from 'react';\nimport { number, string } from 'prop-types';\nimport { translationRenderer } from '@jotforminc/translation';\nimport { Texts } from '../../constants';\nimport { getLimitText, safeLocalizedNumber } from '../../utils';\n\nconst UsageInfo = ({\n name,\n usage,\n limit,\n language\n}) => {\n const limitText = getLimitText(limit);\n\n return (\n \n {limitText === Texts.USAGE_INFO && translationRenderer(limitText)({\n renderer1: () => ({safeLocalizedNumber(usage, language)}),\n renderer2: () => ({safeLocalizedNumber(limit, language)})\n })}\n {limitText === Texts.USAGE_INFO_UNLIMITED && translationRenderer(limitText)({\n renderer1: () => ({safeLocalizedNumber(usage, language)})\n })}\n \n );\n};\n\nUsageInfo.propTypes = {\n name: string.isRequired,\n usage: number.isRequired,\n limit: number.isRequired,\n language: string.isRequired\n};\n\nexport default UsageInfo;\n","import { t } from '@jotforminc/translation';\nimport {\n number, string\n} from 'prop-types';\nimport React from 'react';\n\nimport { LIMIT_KEY_MAP } from '../../constants';\nimport { getColor } from '../../utils';\nimport UploadUsageInfo from './UploadUsageInfo';\nimport UsageInfo from './UsageInfo';\n\nconst Limit = ({\n name,\n label,\n usage,\n limit,\n percentage,\n language\n}) => {\n const getBarStyle = () => ({ width: `${percentage}%`, backgroundColor: getColor(percentage) });\n\n return (\n \n
    \n {t(label)}\n {/* non upload space limits */}\n {name !== LIMIT_KEY_MAP.UPLOAD_SPACE && (\n \n )}\n {/* upload space limit */}\n {name === LIMIT_KEY_MAP.UPLOAD_SPACE && (\n \n )}\n
    \n
    \n
    \n
    \n \n );\n};\n\nLimit.propTypes = {\n name: string.isRequired,\n label: string.isRequired,\n usage: number.isRequired,\n limit: number.isRequired,\n percentage: number.isRequired,\n language: string.isRequired\n};\n\nexport default Limit;\n","import { t, translationRenderer } from '@jotforminc/translation';\nimport { shape, bool } from 'prop-types';\nimport React from 'react';\nimport { Texts } from '../../constants';\n\nexport const SaveBagde = ({\n campaign, isUKNewUserCampaignActive, isOverquotaCampaignActive, isBtp2023CampaignActive\n}) => {\n const computedCampaign = isUKNewUserCampaignActive && !isOverquotaCampaignActive && !isBtp2023CampaignActive ? {\n status: true,\n utm_campaign: 'newUserDesingTest'\n } : campaign;\n\n const { type: campaignType } = campaign;\n\n const { status = false, utm_campaign: utmCampaign = '' } = computedCampaign;\n\n if (!status) return null;\n\n let className = 'save-badge';\n if (isUKNewUserCampaignActive || campaignType === 'BACKTOPAID') {\n className = `ukNewUserCampaignActive--${className} newUser`;\n }\n\n if (campaignType === 'SUMMER') {\n className = 'jf-summer-sale-button-upgrade-button-badge';\n }\n return (\n
    \n {(['newUser', 'newUserDesingTest', 'btp2023'].includes(utmCampaign) || isOverquotaCampaignActive || isBtp2023CampaignActive) && t(Texts.SAVE_FIFTY_PERC_NOW)}\n {utmCampaign === 'ss2023'\n && translationRenderer(Texts.SAVE_FIFTY_PERCENTAGE)({\n renderer1: text => (\n \n {text}\n \n )\n })}\n {utmCampaign === 'bf2022'\n && translationRenderer(Texts.SAVE_FIFTY_PERCENTAGE)({\n renderer1: text => (\n \n {text}\n \n )\n })}\n {utmCampaign === 'eoy2022'\n && translationRenderer(Texts.SAVE_FIFTY_PERCENTAGE)({\n renderer1: text => (\n \n {text}\n \n )\n })}\n
    \n );\n};\n\nSaveBagde.propTypes = {\n campaign: shape().isRequired,\n isUKNewUserCampaignActive: bool,\n isOverquotaCampaignActive: bool,\n isBtp2023CampaignActive: bool\n};\n\nSaveBagde.defaultProps = {\n isUKNewUserCampaignActive: false,\n isOverquotaCampaignActive: false,\n isBtp2023CampaignActive: false\n};\n","/* eslint-disable complexity */\n/* eslint-disable no-nested-ternary */\n/* eslint-disable max-len */\nimport { t } from '@jotforminc/translation';\nimport { func, shape, bool } from 'prop-types';\nimport React, { useState, useMemo } from 'react';\nimport { GrowthAssetManager } from '@jotforminc/growth-asset-manager';\nimport { getUrlParameter } from '@jotforminc/utils';\n\nimport isEmpty from 'lodash/isEmpty';\nimport { Texts } from '../../constants';\nimport { getCampaignName } from '../../utils';\nimport { SaveBagde } from './SaveBagde';\n\nconst OneDollarSilverAccountBoxItem = ({\n // eslint-disable-next-line react/prop-types\n user = {}, onClick\n}) => {\n const { account_type: { currency = 'USD' } = {} } = user;\n\n const oneDollarText = useMemo(() => {\n switch (currency) {\n case 'GBP':\n return '£1';\n case 'EUR':\n return '€1';\n default:\n return '$1';\n }\n }, [currency]);\n\n const currencyImage = useMemo(() => {\n switch (currency) {\n case 'GBP':\n return 'pound';\n case 'EUR':\n return 'euro';\n default:\n return 'dollar';\n }\n }, [currency]);\n\n return (\n \n
    \n \"Coin\"\n
    \n
    \n
    \n {t('Silver Plan')}\n
    \n
    \n {t('Only {oneCurrencyUnit}').replace('{oneCurrencyUnit}', oneDollarText)}\n
    \n
    \n \n
    \n );\n};\n\nconst UpgradeButton = ({\n campaign,\n onClick,\n isUKNewUserCampaignActive,\n isOneDollarSilverCampaignActive,\n user\n}) => {\n const {\n type: campaignType, industryCampaign, industryCampaignAssetVersion, assetsVersion\n } = campaign;\n const [campaignInfo] = useState(window?.campaignInfo || {});\n const enableChurch = industryCampaign === 'CHURCH' && industryCampaignAssetVersion === 'v2';\n const enableAnimalShelter = industryCampaign === 'ANIMAL-SHELTER' && industryCampaignAssetVersion === 'v2';\n const enableEducationCampaign = industryCampaign === 'EDUCATION' && industryCampaignAssetVersion === 'v2';\n const enableSpringSale = campaignType === 'REGULARFIFTYDISCOUNT' && assetsVersion === 'v2';\n return (\n <>\n
  • \n {!isEmpty(campaignInfo) && getUrlParameter('gamEnabled') === '1' ? (\n \n ) : ['BLACKFRIDAY', 'BLACKFRIDAYCHECKOUT'].includes(campaignType) ? (\n \n
    \n {t('BLACK FRIDAY')}\n {t('HUGE SALE')}\n
    \n
    \n \"Blackfriday\"\n
    \n
    {t('Upgrade now')}
    \n \n ) : campaignType === 'EOY' ? (\n
    \n
    \n {t('END OF YEAR')}\n
    \n
    \n {t('SAVE 50%')}\n
    \n
    \n )\n : isOneDollarSilverCampaignActive ? (\n \n )\n : enableChurch ? (\n
    \n
    \n {t('Upgrade Your Plan')}\n
    \n
    \n {t('SAVE 50%')}\n
    \n
    \n )\n : enableEducationCampaign ? (\n \n
    \n
    \n {t('Upgrade Your Plan')}\n
    \n
    \n {t('SAVE 50%')}\n
    \n
    \n \n )\n : enableSpringSale ? (\n
    \n
    \n \"Flowers\"\n
    \n
    \n
    \n {t('SUMMER SALE')}\n
    \n
    \n {t('SAVE 50%')}\n
    \n
    \n
    \n )\n : enableAnimalShelter ? (\n
    \n
    \n {t('Upgrade Your Plan')}\n
    \n
    \n {t('SAVE 50%')}\n
    \n
    \n ) : (\n \n {getCampaignName(campaign) === 'eoy2022' ? {t(Texts.UPGRADE_YOUR_PLAN)} : t(Texts.UPGRADE_YOUR_PLAN)}\n\n {isUKNewUserCampaignActive || campaignType === 'BACKTOPAID' ? (\n
    \n \n
    \n ) : (\n \n )}\n \n )}\n\n
  • \n \n );\n};\n\nUpgradeButton.propTypes = {\n campaign: shape({}).isRequired,\n onClick: func.isRequired,\n isUKNewUserCampaignActive: bool,\n isOneDollarSilverCampaignActive: bool,\n user: shape({}).isRequired\n};\nUpgradeButton.defaultProps = {\n isUKNewUserCampaignActive: false,\n isOneDollarSilverCampaignActive: false\n};\n\nexport default UpgradeButton;\n","/* eslint-disable max-len */\nimport React, { useMemo, useState } from 'react';\nimport {\n bool,\n func, number, shape, string\n} from 'prop-types';\nimport { t } from '@jotforminc/translation';\nimport { handleCustomNavigation, getUrlParameter } from '@jotforminc/utils';\nimport { IconChevronDown } from '@jotforminc/svg-icons';\nimport {\n createLimitItemsRenderingData, findHighestLimit, isArrayHasItem, isFree\n} from '../../utils';\nimport {\n Texts, LIMIT_KEY_MAP, USAGE_KEY_MAP, Trackings\n} from '../../constants';\nimport Limit from './Limit';\nimport UpgradeButton from './UpgradeButton';\n\nconst Limits = ({\n user,\n limits,\n usages,\n campaign,\n language,\n builderType,\n isTestVariant,\n logAbTestAction,\n registerJotformAction,\n isUpgradeOptionVisible,\n settingsDontUseRootPath\n}) => {\n const [isExpanded, setIsExpanded] = useState(false);\n const { isCloseToLimit } = useMemo(() => findHighestLimit(usages, limits, 70), [usages, limits]);\n const { UPGRADE_YOUR_PLAN_CLICK, VIEW_ALL_CLICK } = Trackings;\n\n const { type: campaignType, industryCampaign, industryCampaignAssetVersion } = campaign;\n\n const handleViewAll = e => {\n e.stopPropagation();\n setIsExpanded(expanded => !expanded);\n logAbTestAction({ action: 'click', target: 'accountBox-viewAll' });\n registerJotformAction(VIEW_ALL_CLICK);\n };\n\n const [firstPart, remainingPart] = createLimitItemsRenderingData(usages, limits);\n\n if (!isArrayHasItem(firstPart) || !isArrayHasItem(remainingPart)) return null;\n\n const getExpantionText = () => {\n if (!isTestVariant) {\n return !isExpanded ? t(Texts.VIEW_ALL) : t(Texts.VIEW_LESS);\n }\n return !isExpanded ? t(Texts.VIEW_LIMIT_USAGE) : t(Texts.CLOSE_LIMIT_USAGE);\n };\n\n const getUkNewUserCampaignAvailability = () => {\n if (global?.location?.href?.includes('ukNewUserCampaign=1')) return true;\n\n const { type = '', assetsAvailable = false, assetsVersion } = campaign || {};\n if (type !== 'NEWUSER' || !assetsAvailable) return false;\n return assetsVersion === 'v2';\n };\n\n const getOverquotaUserCampaignAvailability = () => {\n const { type = '', assetsAvailable = false } = campaign || {};\n return assetsAvailable && type === 'OVERQUOTAUSER';\n };\n const getBtp2023CampaignAvailability = () => {\n const { type = '', assetsAvailable = false } = campaign || {};\n return assetsAvailable && type === 'BACKTOPAID';\n };\n const isOverquotaCampaignActive = getOverquotaUserCampaignAvailability();\n const isBtp2023CampaignActive = getBtp2023CampaignAvailability();\n const isUKNewUserCampaignActive = getUkNewUserCampaignAvailability() || isOverquotaCampaignActive;\n const isBlackFriday = campaignType === 'BLACKFRIDAY';\n const isOneDollarSilverCampaignActive = campaignType === 'ONEDOLLARSILVER' || getUrlParameter('one-dollar') === '1';\n const enableChurch = industryCampaign === 'CHURCH' && industryCampaignAssetVersion === 'v2';\n const enableAnimalShelter = industryCampaign === 'ANIMAL-SHELTER' && industryCampaignAssetVersion === 'v2';\n\n const handleUpgradeOptionClick = () => {\n let utmCampaign = builderType === 'card' ? 'upgrade-from-account-box-editor_cf' : 'upgrade-from-account-box-editor';\n if (isUKNewUserCampaignActive && !isOverquotaCampaignActive && isBtp2023CampaignActive) {\n utmCampaign += '-newUserDesingTest';\n }\n\n if (isOverquotaCampaignActive || isBtp2023CampaignActive || isBlackFriday || isOneDollarSilverCampaignActive) {\n utmCampaign += `-${campaign?.utm_campaign}`;\n }\n\n let pricingURL = `/pricing/?utm_source=jNewHeader&utm_medium=banner&utm_campaign=${utmCampaign}&utm_term=Upgrade%20for%20more&utm_content=Upgrade%20Now`;\n\n if (enableChurch) {\n pricingURL = `/online-church/pricing/?utm_campaign=church-2024&utm_source=jNewHeader&utm_content=Upgrade%20Now&utm_term=${user?.username}`;\n }\n if (enableAnimalShelter) {\n pricingURL = `/animal-shelter/pricing/?utm_campaign=animal-shelter&utm_source=jNewHeader&utm_content=Upgrade%20Now&utm_term=${user?.username}`;\n }\n if (isOneDollarSilverCampaignActive) {\n pricingURL = `/pricing/silver/?utm_campaign=${utmCampaign}&utm_source=jNewHeader&utm_content=Upgrade%20Now&utm_term=${user?.username}`;\n }\n\n handleCustomNavigation(pricingURL, '_blank', settingsDontUseRootPath);\n\n if (!isUKNewUserCampaignActive) {\n logAbTestAction({ action: 'click', target: 'accountBox-upgradeOption' });\n registerJotformAction(UPGRADE_YOUR_PLAN_CLICK);\n }\n };\n\n return (\n \n {!isTestVariant && firstPart.map(data => )}\n \n
      \n {!isTestVariant && remainingPart.map(data => (\n \n ))}\n {isTestVariant && [...firstPart, ...remainingPart].map(data => (\n \n ))}\n
    \n \n {/* expand button */}\n
  • \n \n {getExpantionText()}\n \n \n
  • \n {/* upgrade button */}\n {isUpgradeOptionVisible && !isTestVariant && (isCloseToLimit || isFree(user) || isUKNewUserCampaignActive || isOneDollarSilverCampaignActive) && (\n \n )}\n \n );\n};\n\nLimits.propTypes = {\n user: shape({}).isRequired,\n usages: shape({\n [USAGE_KEY_MAP.TOTAL_SUBMISSONS]: string,\n [USAGE_KEY_MAP.PAYMENTS]: string,\n [USAGE_KEY_MAP.FORMS]: string,\n [USAGE_KEY_MAP.SIGNED_DOCUMENTS]: string,\n [USAGE_KEY_MAP.WORKFLOW_RUNS]: string,\n [USAGE_KEY_MAP.SUBMISSONS]: string,\n [USAGE_KEY_MAP.UPLOAD_SPACE]: string,\n [USAGE_KEY_MAP.FORM_VIEWS]: string\n }).isRequired,\n limits: shape({\n [LIMIT_KEY_MAP.TOTAL_SUBMISSONS]: number,\n [LIMIT_KEY_MAP.PAYMENTS]: number,\n [LIMIT_KEY_MAP.FORMS]: number,\n [LIMIT_KEY_MAP.SIGNED_DOCUMENTS]: number,\n [USAGE_KEY_MAP.WORKFLOW_RUNS]: number,\n [LIMIT_KEY_MAP.SUBMISSONS]: number,\n [LIMIT_KEY_MAP.UPLOAD_SPACE]: number,\n [LIMIT_KEY_MAP.FORM_VIEWS]: number\n }).isRequired,\n language: string.isRequired,\n campaign: shape({}).isRequired,\n builderType: string.isRequired,\n logAbTestAction: func.isRequired,\n registerJotformAction: func.isRequired,\n isTestVariant: bool,\n isUpgradeOptionVisible: bool,\n settingsDontUseRootPath: bool\n};\n\nLimits.defaultProps = {\n isTestVariant: false,\n isUpgradeOptionVisible: true,\n settingsDontUseRootPath: false\n};\n\nexport default Limits;\n","import React from 'react';\nimport {\n bool, func, shape, string\n} from 'prop-types';\nimport { t } from '@jotforminc/translation';\nimport { handleCustomNavigation } from '@jotforminc/utils';\nimport { Texts, Trackings } from '../../constants';\n\nconst Header = ({\n isFormUser,\n avatarUrl,\n displayName,\n accountType,\n isEnterprise,\n registerJotformAction,\n navigateToMyAccount,\n settingsDontUseRootPath\n}) => {\n const safeAvatarUrl = (avatarUrl && avatarUrl.length) ? avatarUrl.replace('http://', 'https://') : '';\n const avatarStyle = safeAvatarUrl ? { backgroundImage: `url(\"${safeAvatarUrl}\")` } : {};\n\n const shouldShowPlanBadge = () => {\n if (isFormUser) return false;\n if (isEnterprise && accountType?.name === 'ENTERPRISE') return false;\n return true;\n };\n\n const getPlanBadgeClassName = () => {\n return `jNewHeader-userAccountBox-accountType planName-${accountType?.name?.toLowerCase()}`;\n };\n\n const getPlanBadgeText = () => {\n return accountType?.name === 'FREE' ? t(Texts.STARTER) : t(accountType.name);\n };\n\n const handleClick = e => {\n e.preventDefault();\n\n if (!navigateToMyAccount) return;\n\n const { HEADER_CLICK } = Trackings;\n registerJotformAction(HEADER_CLICK);\n handleCustomNavigation('/myaccount/', '_blank', settingsDontUseRootPath);\n };\n\n // eslint-disable-next-line react/prop-types\n const Container = ({ children }) => (\n navigateToMyAccount\n ? (\n \n {children}\n \n )\n : (\n \n {children}\n \n )\n );\n\n return (\n \n {/* avatar */}\n {!isFormUser && (\n \n )}\n
    \n {/* salute */}\n \n {t(Texts.SALUTE)}\n \n {/* name */}\n \n {displayName}\n \n
    \n {/* plan badge */}\n {shouldShowPlanBadge(accountType, isFormUser, isEnterprise) && (\n \n {getPlanBadgeText(accountType)}\n \n )}\n
    \n );\n};\n\nHeader.propTypes = {\n isFormUser: bool.isRequired,\n avatarUrl: string.isRequired,\n displayName: string.isRequired,\n accountType: shape({}).isRequired,\n isEnterprise: bool.isRequired,\n registerJotformAction: func.isRequired,\n navigateToMyAccount: bool.isRequired,\n settingsDontUseRootPath: bool\n};\n\nHeader.defaultProps = {\n settingsDontUseRootPath: false\n};\n\nexport default Header;\n","/* eslint-disable complexity */\n// TODO: remove isFormUser prop\nimport {\n bool, func, oneOfType, shape, string\n} from 'prop-types';\nimport React, { Component } from 'react';\nimport { ABTestManager, ActionManager } from '@jotforminc/abtest-manager';\nimport {\n LimitEstimationWarning, AccountBoxLimitWarnings\n} from '@jotforminc/limit-assets';\nimport { Button } from '@jotforminc/magnet';\nimport {\n getUrlParameter, readCookie, calculateLimitWarning, shouldShowEstimationWarning\n} from '@jotforminc/utils';\nimport { IconInfoCircleFilled, IconPrintXmark } from '@jotforminc/svg-icons';\nimport { t, translationRenderer } from '@jotforminc/translation';\nimport isEmpty from 'lodash/isEmpty';\n\nimport { findHighestLimit, isGold } from '../../utils';\nimport {\n DEFAULT_LANG, INLINE_LIMIT_ALERT_TRESHOLD, LIMIT_LABEL_MAP, PROJECT_NAME, Texts, Trackings\n} from '../../constants';\nimport EnterpriseInlineLimitAlert from './EnterpriseInlineLimitAlert';\nimport InlineLimitAlertWithTrackings from './InlineLimitAlertWithTrackings';\nimport { InvoiceWarning } from './InvoiceWarning';\nimport MenuItems from './MenuItems';\nimport Limits from './Limits';\nimport Header from './Header';\nimport '../../styles/_jfAccountBox.scss';\nimport { getRecalculationRemainingTime } from '../../api';\n\nconst isErrorInvoice = invoice => {\n const currentDate = new Date();\n const invoiceDueDate = new Date(invoice.invoice_due_date);\n const invoiceErrorDueDate = new Date(invoiceDueDate).setDate(invoiceDueDate.getDate() + 30);\n\n return invoice.invoice_status === 'Overdue' && currentDate > invoiceErrorDueDate;\n};\n\nclass AccountBoxStandalone extends Component {\n constructor(props) {\n super(props);\n\n this.state = {\n isTestVariant: false,\n showEstimationWarning: false,\n limitWarnings: null,\n showLimitWarnings: false,\n remainingTime: {},\n remainingTimeError: ''\n };\n\n const { user, mostOverdueInvoice } = this.props;\n const { usage: usages, account_type: { limits } = {} } = user;\n const {\n maxLimitType, maxLimitPercentage, isCloseToLimit, maxUsage\n } = findHighestLimit(usages, limits, INLINE_LIMIT_ALERT_TRESHOLD.WARNING);\n const actionManager = new ActionManager({ user, projectName: PROJECT_NAME, trackOnce: true });\n\n this.maxUsage = maxUsage;\n this.maxLimitType = maxLimitType;\n this.maxLimitPercentage = maxLimitPercentage;\n this.isCloseToLimit = isCloseToLimit;\n this.registerJotformAction = actionManager.registerJotformAction;\n\n // force InlineLimitAlert & EnterpriseInlineLimitAlert\n const urlParams = new URLSearchParams(window.location.search);\n this.isInlineLimitAlertForced = !!urlParams.get('fila');\n this.isEnterpriseInlineLimitAlertForced = !!urlParams.get('feila');\n this.isEnterpriseInlineLimitAlertV2Forced = !!urlParams.get('feilavt');\n\n if (this.isInlineLimitAlertForced) {\n const { WARNING, DANGER } = INLINE_LIMIT_ALERT_TRESHOLD;\n this.maxLimitPercentage = urlParams.get('dngr') ? DANGER : WARNING;\n }\n\n // Display warning message for invoices that are overdue or waiting on a payment. Invoices are passed from the common-header repo if user is an admin\n const warningMessageIsDismissed = readCookie('INVOICE_WARNING') === 'false';\n if (warningMessageIsDismissed) {\n this.invoice = isErrorInvoice(mostOverdueInvoice) ? mostOverdueInvoice : {};\n } else {\n this.invoice = mostOverdueInvoice;\n }\n this.invoiceMessageType = !!Object.keys(this.invoice).length && this.invoice.invoice_status !== 'Paid' && (isErrorInvoice(this.invoice) ? 'error' : 'warning');\n\n // A/B Test: enterpriseInlineLimitAlertII\n this.abTestHelper = new ABTestManager({\n user,\n isTestEnabled: false,\n testName: 'enterpriseInlineLimitAlertII',\n controlVariantCode: '7661',\n testVariantCode: '7671',\n cacheVariantCodeAtLocalStorage: true,\n urlParam: 'eilat',\n customUserChecks: {\n isGold: isGold(user),\n isUserCloseToLimit: this.isCloseToLimit\n }\n // reminder: dont forget debugMode\n // debugMode: {\n // logTestState: true\n // // forceUserEligible: true\n // // forceTestVariant: true\n // // forceControlVariant: true\n // }\n });\n\n this.accountBoxLimitWarningsABTest = new ABTestManager({\n user,\n isTestEnabled: false,\n testName: 'accountBoxLimitWarnings',\n controlVariantCode: '9861',\n testVariantCode: '9871',\n cacheVariantCodeAtLocalStorage: true\n });\n }\n\n componentDidMount() {\n const {\n user: { usage = {}, account_type: { limits = {}, name: accountTypeName = '' } = {}, limitEstimation = {} }, isEnterprise\n } = this.props;\n\n this.abTestHelper.isTestVariant().then(result => {\n this.setState({ isTestVariant: result });\n this.abTestHelper?.registerABTestAction({ action: 'seen', target: 'accountBox' });\n }).catch(error => {\n this.setState({ isTestVariant: false });\n console.warn(`${this.abTestHelper.testName} variant error`, error);\n });\n\n const limitWarnings = calculateLimitWarning({ usage, limits });\n this.setState({\n limitWarnings: limitWarnings\n });\n\n if (limitWarnings) {\n this.accountBoxLimitWarningsABTest.isTestVariant().then(q => {\n this.setState({\n showLimitWarnings: q\n });\n }).catch(err => {\n this.setState({\n showLimitWarnings: false\n });\n console.log(`${this.accountBoxLimitWarningsABTest.testName} :: Cannot get test variant`, err);\n });\n }\n\n if (false\n && limitEstimation?.estimationDate\n && limitEstimation?.type\n && shouldShowEstimationWarning({ usage: usage?.[limitEstimation?.type], limit: limits?.[limitEstimation?.type === 'signed_documents' ? 'signedDocuments' : limitEstimation?.type] })\n ) {\n this.setState({ showEstimationWarning: true });\n }\n\n const { ACCOUNT_BOX_SEEN } = Trackings;\n this.registerJotformAction(ACCOUNT_BOX_SEEN);\n\n // Get remaining upload space renewal time\n if (false) {\n (async () => {\n if (isEnterprise || accountTypeName === 'ENTERPRISE') {\n return;\n }\n\n try {\n const time = await getRecalculationRemainingTime();\n this.setState({ remainingTime: time });\n } catch (error) {\n this.setState({ remainingTimeError: error });\n }\n })();\n }\n }\n\n render() {\n const {\n user: {\n name = '',\n usage: usages = {},\n campaign = {},\n username = '',\n avatarUrl = '',\n account_type: accountType = {},\n language = DEFAULT_LANG\n } = {}\n } = this.props;\n\n const {\n user,\n appName,\n isFormUser,\n builderType,\n isEnterprise,\n showAdminConsole,\n showUserLimitList,\n handleSwitchToOld,\n isAccountBoxOpened,\n toggleAccountBox,\n logoutURLParameter,\n showAdminConsolePromotion,\n showSettings,\n navigateToMyAccountOnHeaderClick,\n isUpgradeOptionVisible,\n settingsDontUseRootPath\n } = this.props;\n\n const {\n isTestVariant, showEstimationWarning, limitWarnings, showLimitWarnings, remainingTime, remainingTimeError\n } = this.state;\n const { limits } = accountType;\n\n // A/B Test: accountBoxAlertTest\n // const wrapperClassName = this.maxLimitPercentage === 100 ? ' jNewHeader-alertAbTest-danger' : '';\n let wrapperClassName = this.isInlineLimitAlertForced ? ' jNewHeader-alertAbTest-danger' : '';\n wrapperClassName = isTestVariant ? ' jNewHeader-enterpriseAlertAbTest-wrapper' : '';\n\n const adminConsoleLink = window.location.host.split('.').reverse()[0] === 'biz' ? '/enterprise-admin' : '/admin';\n\n return (\n \n
    \n {/* name and account type */}\n \n {getUrlParameter('jfCSS') && (\n
    \n \n
    \n )}\n {false && (!isEmpty(remainingTime) && remainingTimeError === '') && (\n
    \n
    \n \n
    \n
    \n {translationRenderer(Texts.SINCE_RECENTLY_DELETED)({\n renderer1: () => (\n \n {remainingTime?.hour !== 0 && `${remainingTime?.hour} ${remainingTime?.hour > 1 ? t('hours') : t('hour')} `}\n {remainingTime?.minutes >= 1 && remainingTime?.minutes}\n {' '}\n {remainingTime?.minutes > 1 ? t('minutes') : t('minute')}\n {remainingTime?.minutes < 1 && ` ${t('a few seconds')}`}\n \n )\n })}\n
    \n
    \n )}\n
    \n {/* A/B Test: accountBoxAlertTest */}\n {/* A/B Test: waiting for data analysis */}\n {this.isInlineLimitAlertForced && (\n \n )}\n {/* enterprise promotion for gold users */}\n {/* A/B Test: enterpriseInlineLimitAlertII */}\n {(this.isEnterpriseInlineLimitAlertForced\n || this.isEnterpriseInlineLimitAlertV2Forced\n || (this.isCloseToLimit && isGold(user))) && (\n \n )}\n {/* A/B Test :: accountBoxEstimationWarning */}\n {showEstimationWarning && (\n \n )}\n {/* A/B Test :: accountBoxLimitWarnings */}\n {limitWarnings && showLimitWarnings && (\n \n )}\n {/* limits */}\n {!isEnterprise && !isFormUser && showUserLimitList && (\n \n )}\n {/* menu items */}\n \n {/* warning message for admins if an invoice is overdue or waiting payment */}\n {!!Object.keys(this.invoice).length && this.invoice.invoice_status !== 'Paid' && (\n \n )}\n
    \n
    \n \n );\n }\n}\n\nAccountBoxStandalone.propTypes = {\n builderType: string,\n appName: string,\n handleSwitchToOld: oneOfType([\n func,\n bool\n ]),\n isEnterprise: bool.isRequired,\n isAccountBoxOpened: bool.isRequired,\n toggleAccountBox: func.isRequired,\n user: shape({\n account_type: shape({\n name: string,\n limits: shape({})\n }),\n avatarUrl: string,\n username: string,\n usage: shape({}),\n location: shape({}),\n campaign: shape({})\n }).isRequired,\n showUserLimitList: bool,\n logoutURLParameter: string,\n showAdminConsole: bool.isRequired,\n isFormUser: bool,\n mostOverdueInvoice: shape({}),\n showAdminConsolePromotion: bool,\n showSettings: bool,\n navigateToMyAccountOnHeaderClick: bool,\n isUpgradeOptionVisible: bool,\n settingsDontUseRootPath: bool\n};\n\nAccountBoxStandalone.defaultProps = {\n builderType: 'card',\n appName: '',\n handleSwitchToOld: false,\n showUserLimitList: true,\n logoutURLParameter: '',\n isFormUser: false,\n mostOverdueInvoice: {},\n showAdminConsolePromotion: undefined,\n showSettings: undefined,\n navigateToMyAccountOnHeaderClick: true,\n isUpgradeOptionVisible: undefined,\n settingsDontUseRootPath: false\n};\n\nexport default AccountBoxStandalone;\n","import React, { PureComponent } from 'react';\nimport PropTypes from 'prop-types';\n\nclass Content extends PureComponent {\n handleClickOutside() {\n const { isAccountBoxOpened, toggleAccountBox } = this.props;\n if (isAccountBoxOpened) { toggleAccountBox(); }\n }\n\n render() {\n const {\n isAccountBoxOpened, user, renderBoxContent, isTestVariant\n } = this.props;\n return (\n isAccountBoxOpened\n && user?.account_type\n && (\n
    \n
    \n {renderBoxContent()}\n
    \n
    \n )\n );\n }\n}\n\nContent.propTypes = {\n headerColors: PropTypes.shape({}),\n isAccountBoxOpened: PropTypes.bool,\n renderBoxContent: PropTypes.func,\n toggleAccountBox: PropTypes.func,\n user: PropTypes.shape({\n account_type: PropTypes.shape({\n name: PropTypes.string\n })\n }).isRequired,\n isTestVariant: PropTypes.bool\n // viewMode: PropTypes.string\n};\n\nContent.defaultProps = {\n headerColors: {},\n renderBoxContent: () => {},\n isAccountBoxOpened: false,\n toggleAccountBox: () => {},\n isTestVariant: false\n // viewMode: '',\n};\n\nexport default Content;\n","/* eslint-disable complexity */\nimport React, { Component } from 'react';\nimport PropTypes, { oneOfType, string } from 'prop-types';\nimport { t } from '@jotforminc/translation';\nimport { LoginFlow } from '@jotforminc/login-flow';\nimport { getAPIURL } from '@jotforminc/request-layer';\nimport { Button } from '@jotforminc/magnet';\nimport { Loading } from '@jotforminc/loading';\nimport { Texts, ACCOUNT_BOX_VIEW_MODE } from '../constants';\nimport onClickOutside from './HOCs/OnClickOutside';\nimport { AccountBoxStandalone } from './AccountBoxStandalone';\nimport Content from './Content';\nimport '../styles/_jfAccountBox.scss';\n\nclass AccountBox extends Component {\n constructor(props) {\n super(props);\n\n this.state = {\n viewMode: this.handleViewMode(),\n user: props.user || {}\n };\n this.accountBoxContentRef = React.createRef();\n }\n\n static getDerivedStateFromProps(nextProps, prevState) {\n const updates = {};\n const { user = {} } = prevState;\n const { user: nextUser = {} } = nextProps;\n\n // update user and viewMode based on username change\n if (nextUser?.username !== user?.username) {\n updates.user = nextUser;\n updates.viewMode = (\n nextUser.account_type\n && nextUser.account_type.name !== 'GUEST'\n )\n ? ACCOUNT_BOX_VIEW_MODE.ACCOUNT_SETTINGS\n : ACCOUNT_BOX_VIEW_MODE.LOGIN_FLOW;\n }\n\n return updates;\n }\n\n isGuest = user => user?.accountType === 'GUEST' || user?.accountType?.name === 'GUEST' || user?.account_type === 'GUEST' || user?.account_type?.name === 'GUEST';\n\n handleLoginSuccess = response => {\n const { onLoginSuccess, toggleAccountBox, isAccountBoxOpened } = this.props;\n if (isAccountBoxOpened) {\n toggleAccountBox();\n }\n this.changeViewMode(ACCOUNT_BOX_VIEW_MODE.ACCOUNT_SETTINGS);\n onLoginSuccess(response);\n };\n\n handleViewMode = () => {\n const { currentMode, user } = this.props;\n if (currentMode) {\n return ACCOUNT_BOX_VIEW_MODE[currentMode];\n }\n return !this.isGuest(user) ? ACCOUNT_BOX_VIEW_MODE.ACCOUNT_SETTINGS : ACCOUNT_BOX_VIEW_MODE.LOGIN_FLOW;\n };\n\n handleClickOutside() {\n const { isAccountBoxOpened, toggleAccountBox } = this.props;\n if (isAccountBoxOpened) { toggleAccountBox(); }\n }\n\n changeViewMode = viewMode => {\n this.setState({ viewMode });\n };\n\n renderBoxContent = () => {\n const { viewMode } = this.state;\n const {\n user, isEnterprise, appName, handleSwitchToOld, mostOverdueInvoice, isAccountBoxOpened, toggleAccountBox, onLoginSuccess, actionLogger, showUserLimitList,\n logoutURLParameter, loginPredefinedEmail, signupPredefinedEmail, initialScreen, forceRegularUser, verificationHash, shouldCallNavigate, showAdminConsole,\n showAdminConsolePromotion, showSettings, navigateToMyAccountOnHeaderClick, isUpgradeOptionVisible, settingsDontUseRootPath,\n logAbTestAction, ssoLoginOptions, hideSignUp, initiator\n } = this.props;\n\n switch (viewMode) {\n case ACCOUNT_BOX_VIEW_MODE.LOGIN_FLOW:\n return (\n }}\n forceUser={forceRegularUser} // this should be true because this feature is not for form users.\n initiator={initiator}\n apiURL={getAPIURL()}\n onLoginSuccess={onLoginSuccess}\n includeConfirm={true}\n mode=''\n greetingMessage={Texts.SIGN_UP_NOW}\n showLogoOnSignupOptions={false}\n signupButtonText={Texts.CREATE_MY_ACCOUNT}\n appName={appName}\n actionLogger={actionLogger}\n loginPredefinedEmail={loginPredefinedEmail}\n signupPredefinedEmail={signupPredefinedEmail}\n initialScreen={initialScreen}\n verificationHash={verificationHash}\n shouldCallNavigate={shouldCallNavigate}\n showSocialTermsStepAsModal={true}\n onGoogleLoginClick={() => logAbTestAction({ action: 'click', target: `${appName}-loginFlow-googleButton` })}\n onFBLoginClick={() => logAbTestAction({ action: 'click', target: `${appName}-loginFlow-facebookButton` })}\n onMicrosoftLoginClick={() => logAbTestAction({ action: 'click', target: `${appName}-loginFlow-microsoftButton` })}\n onAppleLoginClick={() => logAbTestAction({ action: 'click', target: `${appName}-loginFlow-appleButton` })}\n onSalesforceLoginClick={() => logAbTestAction({ action: 'click', target: `${appName}-loginFlow-salesforceButton` })}\n ssoLoginOptions={ssoLoginOptions}\n ssoNormalLoginEnabled={!!ssoLoginOptions}\n hideSignUp={hideSignUp}\n />\n );\n default:\n return (\n \n );\n }\n };\n\n render() {\n const {\n user,\n headerColors,\n isAccountBoxOpened,\n toggleAccountBox,\n isEnterprise,\n isPreview,\n useChildren,\n children,\n appName,\n isTestVariant,\n logAbTestAction,\n isAbTestLoading\n } = this.props;\n const { avatarUrl, campaign: { type: userCampaign = null } = {} } = user;\n\n const { viewMode } = this.state;\n const campaignAvailable = userCampaign === ('BLACKFRIDAY' || userCampaign === 'EOY') && false;\n let utmCampaignType;\n switch (userCampaign) {\n case 'BLACKFRIDAY':\n utmCampaignType = 'bf2022';\n break;\n case 'EOY':\n utmCampaignType = 'eoy2022';\n break;\n default:\n utmCampaignType = '';\n break;\n }\n\n const isShortText = window.innerWidth < 640;\n const signupButtonText = t(isShortText ? 'Sign Up' : 'Sign Up for Free');\n const showSignupButton = !isAbTestLoading && isTestVariant && this.isGuest(user);\n\n return (\n <>\n \n
    \n {/* A/B Test: productHeaderSignupButtonII */}\n {isAbTestLoading && (\n \n \n
    \n )}\n {showSignupButton && (\n {\n toggleAccountBox();\n logAbTestAction({ action: 'click', target: `${appName}-signUpButton` });\n }}\n colorStyle=\"forms\"\n size=\"small\"\n >\n {t(signupButtonText)}\n \n )}\n {!showSignupButton && (\n <>\n {\n toggleAccountBox();\n logAbTestAction({ action: 'click', target: `${appName}-accountBox-avatar` });\n }}\n />\n {campaignAvailable && ['reports', 'tables', 'inbox'].includes(appName)\n && (\n \n SAVE 50%\n \n )}\n \n )}\n \n \n {\n useChildren\n ? children\n : (\n \n )\n }\n \n\n );\n }\n}\n\nAccountBox.propTypes = {\n currentMode: PropTypes.string,\n onLoginSuccess: PropTypes.func.isRequired,\n headerColors: PropTypes.shape({\n primary: PropTypes.string\n }),\n mostOverdueInvoice: PropTypes.shape({}),\n isAccountBoxOpened: PropTypes.bool,\n isEnterprise: PropTypes.bool,\n toggleAccountBox: PropTypes.func,\n appName: PropTypes.string,\n handleSwitchToOld: PropTypes.oneOfType([\n PropTypes.func,\n PropTypes.bool\n ]),\n user: PropTypes.shape({\n account_type: oneOfType([PropTypes.shape({\n name: PropTypes.string\n }), string]),\n avatarUrl: PropTypes.string,\n username: PropTypes.string,\n campaign: PropTypes.object\n }),\n showUserLimitList: PropTypes.bool,\n logoutURLParameter: PropTypes.string,\n isPreview: PropTypes.bool,\n actionLogger: PropTypes.func,\n children: PropTypes.elementType,\n useChildren: PropTypes.bool,\n loginPredefinedEmail: PropTypes.string,\n signupPredefinedEmail: PropTypes.string,\n initialScreen: string,\n forceRegularUser: PropTypes.bool,\n initiator: PropTypes.string,\n verificationHash: string,\n shouldCallNavigate: PropTypes.bool,\n showAdminConsole: PropTypes.bool,\n showAdminConsolePromotion: PropTypes.bool,\n showSettings: PropTypes.bool,\n navigateToMyAccountOnHeaderClick: PropTypes.bool,\n isUpgradeOptionVisible: PropTypes.bool,\n settingsDontUseRootPath: PropTypes.bool,\n isTestVariant: PropTypes.bool,\n isAbTestLoading: PropTypes.bool,\n logAbTestAction: PropTypes.func,\n ssoLoginOptions: PropTypes.array,\n hideSignUp: PropTypes.bool\n};\n\nAccountBox.defaultProps = {\n user: {\n account_type: { name: 'GUEST' },\n avatarUrl: '',\n username: 'guest_apiDemo',\n campaign: { type: null }\n },\n currentMode: '',\n headerColors: {},\n mostOverdueInvoice: {},\n isAccountBoxOpened: false,\n isEnterprise: false,\n appName: '',\n handleSwitchToOld: false,\n toggleAccountBox: () => {},\n showUserLimitList: true,\n logoutURLParameter: '',\n isPreview: false,\n actionLogger: null,\n children: null,\n useChildren: false,\n loginPredefinedEmail: '',\n signupPredefinedEmail: '',\n initialScreen: 'signupOptions',\n forceRegularUser: true,\n initiator: '',\n verificationHash: '',\n shouldCallNavigate: true,\n showAdminConsole: false,\n showAdminConsolePromotion: undefined,\n showSettings: undefined,\n navigateToMyAccountOnHeaderClick: undefined,\n isUpgradeOptionVisible: undefined,\n settingsDontUseRootPath: false,\n isTestVariant: false,\n isAbTestLoading: false,\n logAbTestAction: f => f,\n ssoLoginOptions: [],\n hideSignUp: false\n};\n\nexport default onClickOutside(AccountBox);\n","function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nconst SvgIconAppMyTeams = props => /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 26 32\"\n}, props), /*#__PURE__*/React.createElement(\"g\", {\n id: \"Layer_2\",\n \"data-name\": \"Layer 2\"\n}, /*#__PURE__*/React.createElement(\"g\", {\n id: \"Layer_1-2\",\n \"data-name\": \"Layer 1\"\n}, /*#__PURE__*/React.createElement(\"rect\", {\n width: 26,\n height: 32,\n rx: 4,\n style: {\n fill: \"#18235c\"\n }\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M21.7,21.35a3.65,3.65,0,1,1-3.65-3.65,3.64,3.64,0,0,1,3.65,3.65\",\n style: {\n fill: \"#fff\"\n }\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M16.49,15.3h3.14a2.08,2.08,0,0,0,2.07-2.09V10.09A2.08,2.08,0,0,0,19.61,8H16.49a2.08,2.08,0,0,0-2.09,2.09v3.14a2.08,2.08,0,0,0,2.09,2.07Z\",\n style: {\n fill: \"#09f\"\n }\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M10.21,17.7H7.09A2.08,2.08,0,0,0,5,19.79v3.14A2.08,2.08,0,0,0,7.09,25h3.14a2.08,2.08,0,0,0,2.07-2.09V19.79a2.08,2.08,0,0,0-2.09-2.09Z\",\n style: {\n fill: \"#ffb629\"\n }\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M8.26,8.24a.43.43,0,0,1,.77,0l3.21,6.42a.43.43,0,0,1-.38.63H5.44a.43.43,0,0,1-.39-.63Z\",\n style: {\n fill: \"#ff6100\"\n }\n}))));\nexport default SvgIconAppMyTeams;","function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nconst SvgIconAppMyWorkspace = props => /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 26 32\"\n}, props), /*#__PURE__*/React.createElement(\"g\", {\n id: \"Layer_2\",\n \"data-name\": \"Layer 2\"\n}, /*#__PURE__*/React.createElement(\"g\", {\n id: \"Layer_1-2\",\n \"data-name\": \"Layer 1\"\n}, /*#__PURE__*/React.createElement(\"rect\", {\n width: 26,\n height: 32,\n rx: 4,\n style: {\n fill: \"#18235c\"\n }\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M21.7,21.35a3.65,3.65,0,1,1-3.65-3.65,3.64,3.64,0,0,1,3.65,3.65\",\n style: {\n fill: \"#fff\"\n }\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M16.49,15.3h3.14a2.08,2.08,0,0,0,2.07-2.09V10.09A2.08,2.08,0,0,0,19.61,8H16.49a2.08,2.08,0,0,0-2.09,2.09v3.14a2.08,2.08,0,0,0,2.09,2.07Z\",\n style: {\n fill: \"#09f\"\n }\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M10.21,17.7H7.09A2.08,2.08,0,0,0,5,19.79v3.14A2.08,2.08,0,0,0,7.09,25h3.14a2.08,2.08,0,0,0,2.07-2.09V19.79a2.08,2.08,0,0,0-2.09-2.09Z\",\n style: {\n fill: \"#ffb629\"\n }\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M8.26,8.24a.43.43,0,0,1,.77,0l3.21,6.42a.43.43,0,0,1-.38.63H5.44a.43.43,0,0,1-.39-.63Z\",\n style: {\n fill: \"#ff6100\"\n }\n}))));\nexport default SvgIconAppMyWorkspace;","import {\n IconProductApprovalsColor, IconProductApprovalsMono, IconProductAppsColor, IconProductAppsMono, IconProductFormAnalyticsColor,\n IconProductFormAnalyticsMono, IconProductFormBuilderColor, IconProductFormBuilderMagnifyingGlassColor,\n IconProductFormBuilderMagnifyingGlassMono, IconProductFormBuilderMono, IconProductInboxColor, IconProductInboxMono,\n IconProductPdfEditorColor, IconProductPdfEditorMono, IconProductReportBuilderColor, IconProductReportBuilderFilled,\n IconProductSignColor,\n IconProductSignMono,\n IconProductTablesColor, IconProductTablesMono, IconProductTeamsColor, IconProductTeamsMono,\n IconProductPagesMono, IconProductPagesColor\n} from '@jotforminc/svg-icons';\n\nimport MyContactsDefault from '../../assets/svg/appIcons/contacts_default.svg';\nimport MyContactsSelected from '../../assets/svg/appIcons/contacts_selected.svg';\nimport BoardsDefault from '../../assets/svg/appIcons/boards_default.svg';\nimport BoardsSelected from '../../assets/svg/appIcons/boards_selected.svg';\nimport AgentsDefault from '../../assets/svg/iconAppAiAgentBuilder2.svg';\nimport AgentsSelected from '../../assets/svg/iconAppAiAgentBuilder1.svg';\nimport IconConversations1 from '../../assets/svg/iconConversationsv1.svg';\nimport IconConversations2 from '../../assets/svg/iconConversationsv2.svg';\n\nexport default {\n viewForm: {\n Default: IconProductFormBuilderMagnifyingGlassMono,\n Selected: IconProductFormBuilderMagnifyingGlassColor\n },\n formBuilder: {\n Default: IconProductFormBuilderMono,\n Selected: IconProductFormBuilderColor\n },\n pdfEditor: {\n Default: IconProductPdfEditorMono,\n Selected: IconProductPdfEditorColor\n },\n tables: {\n Default: IconProductTablesMono,\n Selected: IconProductTablesColor\n },\n inbox: {\n Default: IconProductInboxMono,\n Selected: IconProductInboxColor\n },\n approvals: {\n Default: IconProductApprovalsMono,\n Selected: IconProductApprovalsColor\n },\n reports: {\n Default: IconProductReportBuilderFilled,\n Selected: IconProductReportBuilderColor\n },\n sign: {\n Default: IconProductSignMono,\n Selected: IconProductSignColor\n },\n portal: {\n Default: IconProductAppsMono,\n Selected: IconProductAppsColor\n },\n formAnalytics: {\n Default: IconProductFormAnalyticsMono,\n Selected: IconProductFormAnalyticsColor\n },\n myTeams: {\n Default: IconProductTeamsMono,\n Selected: IconProductTeamsColor\n },\n myWorkspace: {\n Default: IconProductTeamsMono,\n Selected: IconProductTeamsColor\n },\n myContacts: {\n Default: MyContactsDefault,\n Selected: MyContactsSelected\n },\n boards: {\n Default: BoardsDefault,\n Selected: BoardsSelected\n },\n signInbox: {\n Default: IconProductInboxMono,\n Selected: IconProductInboxColor\n },\n pages: {\n Default: IconProductPagesMono,\n Selected: IconProductPagesColor\n },\n myAgents: {\n Default: AgentsDefault,\n Selected: AgentsSelected\n },\n conversations: {\n Default: IconConversations1,\n Selected: IconConversations2\n }\n};\n","import { RequestLayer, Interceptors } from '@jotforminc/request-layer';\n\nconst layer = new RequestLayer('/API', {\n interceptorConfig: {\n teamID: global.teamID,\n customResponseInterceptors: [Interceptors.requestManagerResponseNormalizer]\n }\n});\n\nexport const getUnpaidInvoices = () => layer.get('enterprise/invoice/getUnpaidInvoices');\n\nexport const fetchNavigationResources = (from, id, to) => layer.get(`navigate/${from}/${id}/${to}`);\n\nexport const fetchTeamProps = teamID => layer.get(`team/${teamID}/properties`, { headers: { 'jf-team-id': teamID } });\n","export const Texts = {\n SIGN_UP_NOW: 'Sign Up Now!',\n CREATE_MY_ACCOUNT: 'CREATE MY ACCOUNT',\n HELLO_TEXT: 'Hello,',\n LOG_OUT: 'Log out',\n MY_FORMS: 'My Forms',\n PROFILE: 'Profile'\n};\n\nexport const appList = [\n 'viewForm',\n 'formBuilder',\n 'pdfEditor',\n 'tables',\n 'inbox',\n 'formAnalytics',\n 'reports',\n 'sign',\n 'approvals',\n 'portal',\n 'boards',\n 'conversations',\n 'aiAgentBuilder',\n 'signInbox'\n];\n","import { isEnterprise } from '@jotforminc/enterprise-utils';\nimport { fetchNavigationResources } from './api';\nimport { appList } from '../constants';\n\nconst visibilityConditions = {\n pdfEditor: {\n key: 'pdf_designer_group',\n group: ['1', '2', '3', '5', '10'],\n adminCheck: true,\n keyExistCheck: true,\n ifKeyNotExist: true,\n replaceWith: 'oldPdfEditor'\n },\n sign: {\n key: '',\n group: [],\n adminCheck: false,\n visibilityChecker: (user, sourceApp) => {\n return user.allowSign && ['sign', 'inbox', 'portal', 'workflow'].includes(sourceApp);\n }\n },\n signInbox: {\n key: '',\n group: [],\n adminCheck: false,\n visibilityChecker: (user, sourceApp) => {\n return user.allowSign && ['portal'].includes(sourceApp);\n }\n },\n portal: {\n key: '',\n group: [],\n adminCheck: false, // this is handled at backend in user.allowMyApps prop\n visibilityChecker: user => user.allowMyApps\n },\n boards: {\n key: '',\n group: [],\n adminCheck: false,\n visibilityChecker: user => user.allowBoards\n },\n aiAgentBuilder: {\n key: '',\n group: [],\n adminCheck: false,\n visibilityChecker: (user, form) => form?.isAIAgentCreated && !(user?.formCopilotNewSignUp || user?.formCopilotExistingUsers)\n },\n conversations: {\n key: '',\n group: [],\n adminCheck: false,\n visibilityChecker: () => false\n }\n};\n\nconst visibilityCheck = (user, app, sourceAppName, form) => {\n const appDetail = visibilityConditions[app];\n if (appDetail) {\n if (appDetail.adminCheck && user.account_type && user.account_type.name === 'ADMIN' && !isEnterprise()) {\n return true;\n }\n if (appDetail.keyExistCheck && !user[appDetail.key]) {\n return appDetail.ifKeyNotExist;\n }\n if (appDetail.group.indexOf(user[appDetail.key]) > -1) {\n return true;\n }\n\n if (appDetail.visibilityChecker && (typeof appDetail.visibilityChecker) === 'function') {\n if (sourceAppName === 'formBuilder' && app === 'aiAgentBuilder') {\n return appDetail.visibilityChecker(user, form);\n }\n return appDetail.visibilityChecker(user, sourceAppName);\n }\n return false;\n }\n return true;\n};\n\nconst getAppList = (user, list, sourceAppName, form) => list.reduce((newApps, app) => {\n if (user.allowedProductsInTeam && !user.allowedProductsInTeam.includes(app)) {\n return newApps;\n }\n\n if (!visibilityCheck(user, app, sourceAppName, form)) {\n if (visibilityConditions[app] && visibilityConditions[app].replaceWith) {\n newApps.push(visibilityConditions[app].replaceWith);\n }\n } else if (sourceAppName === 'portal' && app === 'tables') {\n newApps.push('appTables');\n } else {\n newApps.push(app);\n }\n\n if (sourceAppName === 'boards') { // TODO: review visibleList config for boards again\n return ['boards'];\n }\n\n if (sourceAppName === 'conversations') {\n return ['conversations', 'aiAgentBuilder'];\n }\n\n return newApps;\n}, []);\n\nexport const getUserAppList = (user, sourceAppName = '', form) => {\n if (window.JOTFORM_ENV === 'ENTERPRISE') {\n if (user && user.isDataOnlyUser === '1') {\n return [];\n }\n const enterpriseConf = window.enterpriseConfigs || window.CUSTOMIZED_CONFIGS;\n const visibleApps = enterpriseConf && (enterpriseConf.visibleNavigationApps || enterpriseConf.VISIBLE_NAVIGATION_APPS);\n let newAppList = appList;\n if (visibleApps) {\n newAppList = appList.filter(app => visibleApps.indexOf(app) > -1);\n }\n return getAppList(user, newAppList, sourceAppName, form);\n }\n\n return getAppList(user, appList, sourceAppName, form);\n};\nexport const getToggleContext = context => `is${context.charAt(0).toUpperCase()}${context.slice(1)}Opened`;\nexport const getToggleHandler = context => `${context}ToggleHandler`;\nexport const getToggleDisabled = context => `${context}ToggleDisabled`;\nexport const getNavigationResources = async (from, id, to) => {\n const { type, result } = await fetchNavigationResources(from, id, to);\n return { type, result: Object.values(result) };\n};\n\nexport const getDefaultLogoSrc = () => {\n const hostname = global?.location?.hostname || '';\n if (hostname === 'www.jform.co.kr') return 'https://cdn.jotfor.ms/assets/img/logo2021/ko-KR/jform-logo.svg';\n return 'https://cdn.jotfor.ms/assets/img/logo2021/jotform-logo.svg';\n};\n\nexport const isPlural = c => c > 1 || c === 0;\n\nexport const isShowTeamBadge = (user, isTeamMember, teamBadgeID) => {\n const canShowTeamBadge = !isEnterprise() ? isTeamMember : (user && user.userType !== 'formuser' && user.account_type?.name !== 'GUEST');\n return canShowTeamBadge && !!teamBadgeID;\n};\n\nexport const hasTeamAvatarInfo = team => {\n const {\n name, teamAvatarURL, teamAvatarIcon, teamAvatarEmojiId, teamAvatarIconSvgRef\n } = team || {};\n\n return name && !!(teamAvatarURL || teamAvatarIcon || teamAvatarEmojiId || teamAvatarIconSvgRef);\n};\n","import Styled from 'styled-components';\n\nexport const ScRB = Styled.div`\n display: flex;\n flex-direction: column;\n align-items: center;\n overflow-y: auto;\n\n .content {\n width: 90%;\n max-width: 500px;\n padding-bottom: 40px;\n text-align: center;\n font-size: 1em;\n color: #0A1551;\n font-weight: 700;\n margin: auto;\n\n > svg {\n display: unset;\n margin-bottom: 8px;\n }\n }\n\n .content.wider { max-width: 540px; }\n\n .assignToOrgSvg {\n width: 54vw;\n height: 36vh;\n max-width: 192px;\n max-height: 136px;\n }\n\n .title {\n font-size: 18px;\n line-height: 20px;\n color: #141E46;\n font-weight: 500;\n }\n\n .subtitle {\n font-size: 15px;\n line-height: 16px;\n color: #252F58;\n font-weight: 500;\n }\n\n p {\n font-size: 14px;\n line-height: 24px;\n color: #60658C;\n }\n\n p, .custom-content { font-weight: 300; margin: 12px 0; }\n\n .sec { color: #2c3345; margin: 1em 0 0; line-height: 1.5; }\n\n [data-value=\"sendNotificationEmail\"] { display: inline-flex; }\n\n .assigneeMsg {\n max-width: 426px;\n width: 100%;\n display: block;\n height: 90px;\n border-radius: 4px;\n border: solid 1px #d8dae9;\n margin: 1em auto 0;\n font-size: .875rem;\n padding: .375rem .5rem;\n transition: border-color .15s ease;\n\n ::placeholder { color: #8d8fa8; }\n :focus { outline: 0; border-color: #4c7af7; }\n }\n\n .dontshow {\n display: inline-flex;\n background-color: #ecf4ff;\n align-items: center;\n padding: 10px;\n margin-top: 38px;\n margin-bottom: 20px;\n \n &-input {\n opacity: 0;\n pointer-events: none;\n position: absolute;\n \n &:checked + .dontshow-checkbox:before {\n background-color: #54b45c;\n border-color: #54b45c;\n }\n \n &:checked + .dontshow-checkbox:after {\n opacity: 1;\n }\n \n &:focus {\n outline: 0;\n }\n }\n \n &-checkbox {\n width: 14px;\n height: 14px;\n background-color: #fff;\n border-radius: 2px;\n position: relative;\n \n &:before {\n content: \"\";\n position: absolute;\n width: 100%;\n height: 100%;\n border: 1px solid #CCD0DA;\n background-color: #fff;\n border-radius: 2px;\n top: 0;\n left: 0;\n transition: .3s;\n transform: translate(-1px, -1px);\n }\n \n &:after {\n content: \"\";\n display: block;\n width: 4px;\n height: 8px;\n border: solid #fff;\n border-width: 0 2px 2px 0;\n transform: rotate(45deg);\n position: absolute;\n top: 1px;\n left: 4px;\n opacity: 1;\n transition: .3s;\n z-index: 2;\n }\n }\n \n &-text {\n font-weight: 400;\n font-size: 16px;\n margin-left: 8px;\n line-height: 1;\n color: #52587e;\n }\n }\n\n @media screen and (max-width: 480px) {\n font-size: 0.875em;\n\n p { margin: 1em 0 .75em; }\n } \n`;\n","import React, { forwardRef } from 'react';\nimport { elementType, node, oneOfType } from 'prop-types';\n\nimport { StyledModal as Modal } from '@jotforminc/styled-modal';\nimport { ScRB } from '../styles/ScRB';\n\nconst PickerModal = forwardRef(({\n children,\n footer,\n ...modalProps\n}, ref) => (\n \n \n {children}\n \n \n));\n\nPickerModal.propTypes = {\n children: oneOfType([elementType, node]),\n footer: oneOfType([elementType, node])\n};\n\nPickerModal.defaultProps = {\n children: null,\n footer: null\n};\n\nexport default PickerModal;\n","import Styled from 'styled-components';\nimport { PickerModal } from '@jotforminc/picker-modal';\n\nexport const ScPickerModal = Styled(PickerModal)`\n .header-content {\n margin: 20px 0;\n font-family: Circular,-apple-system,BlinkMacSystemFont,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",\"Segoe UI Symbol\";\n\n .pm-t {\n margin: 0;\n font-size: 20px;\n font-weight: 500;\n letter-spacing: 0.15px;\n color: #141E46;\n }\n\n .pm-d {\n margin: 0.25em 0 0;\n font-size: 16px;\n letter-spacing: 0.12px;\n color: #60658C;\n }\n }\n\n .close-modal {\n margin-right: 24px;\n }\n\n .pm-b {\n max-width: 600px;\n width: 90%;\n min-height: 570px;\n\n [data-sc=\"smartList-controlBar\"] {\n .cb-body {\n display: none;\n }\n .cb-searchCont {\n flex: 0 0 100%;\n }\n }\n\n .emptyList {\n text-align: center;\n min-height: 60vh;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n }\n\n\n [data-sc='footer'] {\n background-color: rgba(239,239,246,.45);\n }\n\n .pm-f {\n display: flex;\n justify-content: space-between;\n\n button {\n font-weight: 500;\n font-family: Circular,-apple-system,BlinkMacSystemFont,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",\"Segoe UI Symbol\";\n }\n\n .taste.isGray {\n padding: 8px 32px;\n }\n\n .taste.isGreen {\n background-color: #01BD6F;\n padding: 0px 32px;\n\n &:hover {\n background-color: #01d67e;\n }\n &[disabled] {\n opacity: 1;\n background-color: #78D6AF;\n }\n }\n }\n\n .js-ConfirmationModal {\n font-family: inherit;\n }\n\n &.autoHeight {\n .pm-b {\n min-height: auto;\n\n ul {\n overflow-y: auto;\n\n li:last-child {\n margin-bottom: 28px;\n }\n }\n }\n }\n\n @media screen and (min-width: 480px) {\n [data-sc=\"picker-body\"] {\n max-height: 60vh;\n }\n }\n`;\n","/* eslint-disable max-len */\nimport { Button } from '@jotforminc/uikit';\nimport styled from 'styled-components';\n\nexport const ScButton = styled(Button)`\n &.bare {\n font-size: .875em;\n color: #4573e3;\n text-decoration: none;\n background: transparent;\n cursor: pointer;\n box-shadow: none;\n padding: 0;\n border: 0;\n }\n\n &.taste {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n padding: .5em .75em;\n border-radius: 4px;\n cursor: pointer;\n text-transform: uppercase;\n border: 0;\n font-size: 1em;\n line-height: 1.5;\n font-weight: 500;\n font-family: inherit;\n }\n\n &.panel {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n border-radius: 2px;\n cursor: pointer;\n text-transform: capitalize;\n border: 0;\n padding: 6px;\n margin: 0;\n font-size: 15px;\n font-family: Roboto,Circular,-apple-system,BlinkMacSystemFont,\"Segoe UI\",Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",\"Segoe UI Symbol\";\n transition: .3s background-color ease;\n }\n\n &.panel.isGreen {\n background-color: #4BC073;\n color: #fff;\n\n &:hover {\n background-color: #65DA8D;\n }\n\n &:active {\n background-color: #32A75A;\n }\n }\n\n &.taste.isGreen {\n background-color: #54b45c;\n color: #fff;\n }\n\n\n &.taste.isPurple {\n background-color: #8563ce;\n color: #fff;\n }\n\n &.taste.isRed {\n background-color: #ff4947;\n color: #fff;\n }\n\n &.taste.isGray {\n background-color: #FAFAFC;\n border: 1px solid #ADB4D2;\n color: #A0A6C3;\n\n &:hover {\n background-color: #fff;\n color: #9EA7CE;\n border-color: #9EA7CE;\n }\n\n &[disabled] {\n color: #A0A6C3;\n border-color: #A0A6C3;\n background-color: #FAFAFC;\n }\n }\n\n &.taste.isBlue, &.panel.isBlue {\n background-color: #0099FF;\n color: #fff;\n transition: .3s background-color ease;\n\n &:hover {\n background-color: #33adff;\n }\n\n &:active {\n background-color: #007acc;\n }\n }\n\n &.taste.isLightGreen {\n background-color: #78BB07;\n color: #fff;\n\n &:hover {\n background-color: #4EB100;\n }\n\n &:active {\n background-color: #5FA200;\n }\n }\n\n &.taste.isSubGray {\n background-color: #e9e9f2;\n color: #898ba9;\n\n &:hover {\n background-color: #F2F2FE;\n }\n\n &:active {\n background-color: #DEDEEC;\n }\n\n &[disabled] {\n &:hover,&:active {\n background-color: #e9e9f2;\n }\n }\n }\n\n &.taste.isWhite {\n background-color: #fff;\n color: #8E4FCD;\n transition: .3s background-color ease;\n border: 1px solid #8E4FCD;\n\n svg path {\n fill: #8E4FCD;\n }\n\n &:hover {\n background-color: #7735BA;\n color: #fff;\n\n svg path { fill: #fff; }\n }\n\n &:active {\n background-color: #6722AC;\n color: #fff;\n\n svg path { fill: #fff; }\n }\n }\n\n\n &.taste.quickQR {\n border-radius: 4px;\n & > svg {\n & > path { fill: #fff }\n }\n\n @media screen and (max-width: 480px) {\n border-radius: 29px;\n }\n }\n\n &.taste.quickQR {\n margin: 0 20px;\n font-weight: 500;\n font-size: 14px;\n font-family: inherit;\n transition: .3s background-color ease;\n text-transform: none;\n\n & > svg { margin-right: 7px;}\n\n @media screen and (max-width: 480px) {\n padding: 11px;\n margin: 0;\n\n & > span { display: none; }\n & > svg {\n margin-right: 0;\n & > path { fill: #fff }\n }\n }\n }\n\n &.taste.quickQR {\n background-color: #0a1551;\n\n &:hover {\n background-color: #252d5b;\n }\n }\n\n &.taste.quickQR.isSelected {\n background-color: #091141;\n }\n\n &.taste.undoRedo {\n margin: 0 2px;\n padding: 12px 17px;\n font-size: 14px;\n font-family: inherit;\n transition: .3s background-color ease;\n text-transform: none;\n font-weight: 400;\n\n & > svg { margin-right: 11px;}\n & > span { color: #23283A; line-height: 16px; }\n\n @media screen and (max-width: 768px) {\n padding: 12px 10px;\n & > span { display: none; }\n & > svg { margin-right: 0; }\n }\n\n @media screen and (max-width: 480px) {\n padding: 12px 10px;\n & > span { display: none; }\n & > svg { margin-right: 0; }\n }\n\n &[disabled] {\n & > svg > path { fill: #979797;}\n & > span { color: #898BA9; }\n }\n }\n\n &[disabled] { opacity: .6; cursor: initial; }\n\n\n &.outline {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n padding: .5em 1em;\n border-radius: 2px;\n cursor: pointer;\n background: transparent;\n border: 1px solid currentColor;\n font-size: .875em;\n line-height: 1rem;\n font-weight: 500;\n }\n\n &.outline.isRed {\n color: #ff4947;\n }\n\n &.outline.removeForms { padding: .625em; }\n &.outline.removeForms span { margin-left: .25rem; }\n\n &.goBack {\n font-size: .875em;\n line-height: 1;\n color: #90a4ae;\n padding: 0 1em 1em 0;\n\n & > * { vertical-align: middle; }\n svg { width: 18px; margin-right: 5px; }\n }\n\n /*\n &.forRevoke {\n font-size: .875em;\n color: #f9535c;\n margin: 0 .5rem 0 auto;\n padding: .5em 1em .5em 1.5rem;\n background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='15' viewBox='0 0 11 15'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23F9535C'%3E%3Cpath d='M8.834 3.252v9.037c0 .834-.58 1.445-1.375 1.446-1.757.002-3.514.002-5.271 0-.795-.001-1.374-.612-1.374-1.447V3.252h8.02zM2.828 5.345v6.292h1.137c.166 0 .187 0 .19-.138V5.548c0-.037.01-.079-.003-.108-.018-.037-.056-.09-.085-.09-.41-.007-.82-.005-1.239-.005zm3.99 0H5.686c-.192 0-.193 0-.193.202v6.08H6.82V5.345zM0 2.414V.819h.184C.992.82 1.8.823 2.607.814c.08 0 .177-.05.238-.112.178-.187.339-.396.515-.585.05-.054.13-.097.198-.097.843-.007 1.687-.007 2.53 0 .067 0 .148.043.198.097.177.19.337.399.515.585.061.063.158.112.238.112.803.009 1.605.005 2.408.005h.195v1.595H0z' transform='translate(-3 -1) translate(3.542 1.417)'/%3E%3C/g%3E%3Cpath d='M0 0L17 0 17 17 0 17z' transform='translate(-3 -1)'/%3E%3C/g%3E%3C/svg%3E%0A\");\n background-repeat: no-repeat;\n background-size: 11px 15px;\n background-position: 8px 7px;\n }\n */\n\n @media screen and (max-width: 480px) {\n &.outline.removeForms span { display: none; }\n &.cb-addForm {\n margin-left: 0.5em;\n span { display: none; }\n svg { margin-right: 0 !important; }\n }\n }\n`;\n","import React, {\n forwardRef, useState, useMemo, useCallback, useImperativeHandle, useRef\n} from 'react';\nimport {\n func, oneOf, shape, string\n} from 'prop-types';\nimport { Hooks } from '@jotforminc/uikit';\nimport { t } from '@jotforminc/translation';\n\nimport { ResourcePicker, resourceConfigs } from '@jotforminc/resource-picker';\nimport { ScPickerModal } from './ScPickerModal';\nimport { ScButton } from './ScButton';\n\nconst ResourcePickerModal = forwardRef(({\n resourceType,\n defaultValue = '',\n onResourceSelectionChange = f => f,\n onResourceSelectionComplete = f => f,\n onCreateNewResource = null,\n headerDescription = '',\n footerCreateNew = t('Create New'),\n footerCancel = t('Cancel'),\n footerDone = t('Done'),\n // eslint-disable-next-line\n classNames = '',\n pickerProps = {},\n ...rest\n}, ref) => {\n const [selectedResource, setSelectedResource] = useState('');\n const [resources, setResources] = useState([]);\n const pickerRef = useRef();\n\n useImperativeHandle(ref, () => ({\n ...pickerRef.current,\n showPicker: content => {\n setSelectedResource('');\n setResources(content);\n pickerRef.current.show();\n }\n }));\n\n const onChange = useCallback(resourceID => {\n if (resourceID !== selectedResource && resourceID !== '') {\n setSelectedResource(resourceID);\n }\n }, [selectedResource]);\n\n const hidePicker = useCallback(() => {\n pickerRef.current.hide();\n }, []);\n\n const handleCreateNew = useCallback(() => {\n onCreateNewResource();\n hidePicker();\n }, []);\n\n const isDoneButtonActive = useMemo(() => !selectedResource, [selectedResource]);\n\n const onDoneClick = useCallback(() => {\n if (selectedResource) {\n onResourceSelectionComplete(selectedResource);\n }\n hidePicker();\n }, [selectedResource, resources]);\n\n const Footer = useMemo(() => (\n
    \n {onCreateNewResource && typeof onCreateNewResource === 'function' ? (\n \n {footerCreateNew}\n \n ) : (\n \n {footerCancel}\n \n )}\n {resources.length !== 0 && (\n \n {footerDone}\n \n )}\n
    \n ), [isDoneButtonActive, resources]);\n\n const Header = useMemo(() => (\n <>\n
    {t(resourceConfigs[resourceType].headerTitle || '')}
    \n

    {headerDescription}

    \n \n ), []);\n\n Hooks.useEffectIgnoreFirst(() => {\n onResourceSelectionChange(selectedResource);\n }, [selectedResource]);\n\n return (\n \n \n \n );\n});\n\nResourcePickerModal.propTypes = {\n resourceType: oneOf(Object.keys(resourceConfigs)).isRequired,\n defaultValue: string,\n onResourceSelectionChange: func,\n onResourceSelectionComplete: func,\n onCreateNewResource: func,\n headerDescription: string,\n footerCreateNew: string,\n footerCancel: string,\n footerDone: string,\n classNames: string,\n pickerProps: shape({})\n};\n\nexport default ResourcePickerModal;\n","// It's app picker navigation item badge\n// DUE TO DIFFERENT DESIGN RULES, IT WAS CREATED AS A CUSTOM COMPONENT OTHER THAN THE MAGNET BADGE.\n\nimport { Flex } from '@jotforminc/magnet';\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\n\nconst NavigationItemBadge = ({ text = '', selected = false, colorStyle = '' }) => {\n const badgeClasses = classNames('absolute w-auto h-full min-h-4 max-h-4 text-xxs line-height-xxs font-medium px-1.5', {\n 'bg-blue-500 color-white': !selected && colorStyle !== 'success',\n 'bg-navy-75 color-navy-700': selected && colorStyle !== 'success',\n 'bg-green-500 color-white': colorStyle === 'success'\n });\n return (\n \n {text}\n \n );\n};\n\nNavigationItemBadge.propTypes = {\n text: PropTypes.string,\n selected: PropTypes.bool,\n colorStyle: PropTypes.string\n};\n\nexport default NavigationItemBadge;\n","/* eslint-disable complexity */\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { t } from '@jotforminc/translation';\nimport { Loading } from '@jotforminc/loading';\nimport { handleCustomNavigation } from '@jotforminc/utils';\n\nimport { ActivityLogger } from '@jotforminc/activity-logger';\nimport qs from 'querystring';\nimport { appToResourceType, defaultNavigationItem } from './navigationConstants';\nimport ResourcePickerModal from './ResourcePickerModal';\nimport { getNavigationResources } from '../../utils/utils';\nimport NavigationItemBadge from './NavigationItemBadge';\n\nconst shouldHide = ({\n summary, app, appConfig, currentAppName\n}) => {\n if (currentAppName === app || !appConfig.hideIfEmpty) return false;\n\n const { count = 0, notification = 0 } = summary;\n\n return !(count || notification);\n};\n\nclass NavigationItem extends React.PureComponent {\n constructor(props) {\n super(props);\n this.getConfig = this.getConfig.bind(this);\n this.onClick = this.onClick.bind(this);\n this.redirectToCreate = this.redirectToCreate.bind(this);\n this.redirect = this.redirect.bind(this);\n this.resourcePickerModalRef = React.createRef();\n }\n\n onClick(e) {\n const {\n logDiscoverabilityActions = f => f,\n disabled = false\n } = this.props;\n e.preventDefault();\n\n if (disabled) return;\n const appConfig = this.getConfig();\n const appTitle = appConfig?.title?.replace(/ +/g, '');\n\n // discoverabilityTracking\n logDiscoverabilityActions({\n action: 'click',\n target: `.appItem${appTitle}`\n });\n\n this.newNavigation();\n }\n\n getConfig() {\n const {\n app = '',\n currentAppName = '',\n appConfig = null,\n branding21 = false\n } = this.props;\n const config = appConfig || defaultNavigationItem(app, branding21);\n if (['approvals', 'portal'].includes(currentAppName) && app === 'sign') {\n config.target = '_blank';\n }\n return config;\n }\n\n getHref(id, oldNavigation) {\n const { appLink } = this.getConfig();\n return typeof appLink === 'function' ? appLink(id, oldNavigation) : appLink;\n }\n\n getCreateLink(formIDs) {\n const { createLink } = this.getConfig();\n if (typeof createLink !== 'function') {\n return false;\n }\n return createLink(formIDs);\n }\n\n redirectToCreate(formIDs) {\n const {\n currentAppName = '',\n activeFormID = '',\n formIDs: propFormIDs = []\n } = this.props;\n let createLink;\n if (formIDs) {\n createLink = this.getCreateLink(formIDs);\n } else if (currentAppName === 'tables') {\n // If formIDs is undefined, it means that create new button is clicked.\n // Create app with all forms in the sheet\n createLink = this.getCreateLink(propFormIDs);\n } else {\n // Create an app with the current form\n createLink = this.getCreateLink(activeFormID);\n }\n\n if (createLink) {\n this.redirectClick(createLink);\n }\n }\n\n async newNavigation() {\n const {\n currentAppName = '',\n appID = '',\n activeFormID = '',\n app = '',\n setLoading = f => f,\n toggleNavigation = f => f,\n forms = []\n } = this.props;\n if (currentAppName === app) {\n return; // Don't do anything if same product is clicked\n }\n const toProduct = app === 'appTables' ? 'tables' : app;\n const currentProductID = appID || activeFormID;\n\n if (currentAppName === 'portal' && toProduct === 'tables') { // Tables will automatically handle appTable case\n this.redirect(currentProductID);\n return;\n }\n\n if (currentAppName === 'AIAgentBuilder' && app === 'conversations') {\n this.redirect();\n return;\n }\n\n if (currentAppName === 'AIAgentBuilder' && forms.length) {\n if (forms.length === 1) {\n this.redirect(forms[0]?.id);\n } else {\n if (typeof toggleNavigation === 'function') {\n toggleNavigation();\n }\n this.resourcePickerModalRef?.current?.showPicker(forms, toProduct);\n }\n return;\n }\n\n setLoading(true);\n if (!currentProductID) {\n this.redirect(activeFormID, true);\n return;\n }\n try {\n const { type, result } = await getNavigationResources(currentAppName, currentProductID, toProduct);\n switch (type) {\n case 'SheetFormsList':\n // It means that there is no form connected to an app.\n // Create new app with all the forms in the sheet in this case.\n this.redirectToCreate(result);\n break;\n case 'NoPortal':\n ActivityLogger.setLogger(window?.JotFormActions('formBuilderLauncher'))\n .log({\n action: 'click',\n target: `CreateApp - ${activeFormID}`\n });\n this.redirectToCreate(activeFormID);\n break;\n case 'EmptyPortal':\n this.resourcePickerModalRef?.current?.showPicker([], toProduct);\n break;\n default:\n if (result.length === 1) {\n this.redirect(result[0]?.id);\n } else {\n if (typeof toggleNavigation === 'function') {\n toggleNavigation();\n }\n this.resourcePickerModalRef?.current?.showPicker(result, toProduct);\n }\n }\n } catch (error) {\n // For navigations whose endpoints are not ready, stick with old behavior\n this.redirect(activeFormID, true);\n }\n setLoading(false);\n }\n\n redirect(id = '', oldNavigation) {\n const {\n app = '', user: { accountType, username, name } = {}, agentID = '', currentAppName\n } = this.props;\n\n const isGuestUser = accountType === 'GUEST';\n const isGuestUserClickedViewForm = (app === 'viewForm' && isGuestUser);\n if (!isGuestUserClickedViewForm) {\n const res = ActivityLogger.log({\n action: 'appChanged',\n target: `${app}|${id}`\n });\n\n if (!res && window?.JotFormActions) {\n const { tick } = window.JotFormActions('productPickerNavigationActions');\n tick?.({\n actor: username || name,\n action: 'appChanged',\n target: `${app}${id ? `|${id}` : ''}`\n });\n }\n\n const href = this.getHref(app === 'aiAgentBuilder' && currentAppName !== 'conversations' ? agentID : id, oldNavigation);\n this.redirectClick(href, app);\n }\n }\n\n redirectClick(href, app) {\n const { target = '_self' } = this.getConfig();\n const {\n redirectionParameters = {},\n currentAppName = '',\n createForm = f => f,\n setLoading = f => f,\n agentID = ''\n } = this.props;\n const parameters = qs.stringify(redirectionParameters);\n setTimeout(() => {\n if (app === 'viewForm') {\n handleCustomNavigation(`${href}${parameters ? `?${parameters}` : ''}`, '_blank', true);\n } else if (currentAppName === 'tables' && app === 'formBuilder') {\n createForm('edit', true);\n } else if ((app === 'formBuilder' || app === 'inbox' || app === 'conversations') && window?.location?.pathname.includes('agent/build')) {\n setLoading(true);\n if (app === 'conversations') {\n handleCustomNavigation(`/conversations/withAgent/${agentID}${parameters ? `?${parameters}` : ''}`, target, true);\n } else {\n handleCustomNavigation(`${href}${app === 'inbox' ? '/conversations' : ''}${parameters ? `?${parameters}` : ''}`, target, true);\n }\n } else {\n handleCustomNavigation(`${href}${parameters ? `?${parameters}` : ''}`, target);\n }\n }, 250);\n }\n\n render() {\n const {\n title = '',\n explanation = '',\n app = '',\n currentAppName = '',\n summary = { notification: 0 },\n hideIfEmpty = false,\n branding21 = false,\n newBadge = false,\n loading = false,\n disabled = false\n } = this.props;\n\n const { notification = 0 } = summary;\n\n const appConfig = this.getConfig();\n\n if (hideIfEmpty && shouldHide({\n summary, currentAppName, app, appConfig\n })) {\n return null;\n }\n\n const isSelected = app === currentAppName;\n const AppIcon = isSelected ? appConfig?.icons?.Selected : appConfig?.icons?.Default;\n const selectedColor = (branding21 && appConfig.appColor) ? appConfig.appColor : appConfig.secondaryColor;\n // if current app is related to boards or agents\n const showBetaBadge = ['boards', 'myboards', 'conversations', 'myagents', 'aiagentbuilder'].includes(app.toLowerCase()) || false;\n const showNewBadge = app === 'myTasks' && window?.isWorkflowReleased;\n const footerCreateNewText = app === 'boards' ? t('Create New Board') : t('Create New');\n const footerDoneText = app === 'boards' ? t('Open') : t('Done');\n\n return (\n
  • \n \n \n {branding21 && AppIcon ? : appConfig.icon}\n \n\n {explanation ? (\n \n \n {t(title)}\n \n \n {t(explanation)}\n \n \n )\n : (\n \n {t(title)}\n \n )}\n {/* beta tag for Boards in app picker */}\n {showNewBadge ? () : null}\n {showBetaBadge ? () : null}\n {loading && (\n \n \n \n )}\n \n \n
  • \n );\n }\n}\n\nNavigationItem.propTypes = {\n app: PropTypes.string,\n appConfig: PropTypes.shape({}),\n currentAppName: PropTypes.string,\n title: PropTypes.string,\n explanation: PropTypes.string,\n forms: PropTypes.arrayOf(PropTypes.shape({})),\n formIDs: PropTypes.instanceOf(Array),\n appID: PropTypes.string,\n activeFormID: PropTypes.string,\n agentID: PropTypes.string,\n summary: PropTypes.shape({\n notification: PropTypes.number\n }),\n user: PropTypes.shape({\n accountType: PropTypes.string,\n username: PropTypes.string,\n name: PropTypes.string\n }).isRequired,\n hideIfEmpty: PropTypes.bool,\n branding21: PropTypes.bool,\n setLoading: PropTypes.func,\n loading: PropTypes.bool,\n disabled: PropTypes.bool,\n logDiscoverabilityActions: PropTypes.func,\n toggleNavigation: PropTypes.func,\n newBadge: PropTypes.bool,\n redirectionParameters: PropTypes.shape({}),\n createForm: PropTypes.func\n};\n\nexport default NavigationItem;\n","/* eslint-disable camelcase */\nimport React, { ReactNode, FunctionComponent } from 'react';\nimport styled from 'styled-components';\nimport { Tooltip } from '@jotforminc/tooltip';\nimport { t } from '@jotforminc/translation';\nimport { canCreateTeam } from '../../utils';\n\ntype Props = {\n user: {\n isDataOnlyUser: string,\n account_type?: any,\n accountType?: any\n },\n children?: ReactNode\n isTeamCreationDisabled?: boolean,\n tooltipProps?: { attach: string, align: string }\n};\n\nconst TooltipContainer = styled.div`\n .jfTooltipNew-hoverTarget {\n position: relative;\n }\n .jfTooltipNew-body {\n width: 200px\n }\n button {\n opacity: .5;\n }\n`;\n\nexport const CreateTeamButton: FunctionComponent = ({\n user,\n tooltipProps,\n isTeamCreationDisabled = false,\n children = 'Create Team',\n ...buttonProps\n}: Props) => {\n const disableMessage = user?.isDataOnlyUser === '1' ? \"You don't have permission to create team\" : '';\n if (!canCreateTeam(isTeamCreationDisabled, user?.accountType || user?.account_type)) return null;\n\n return !disableMessage ? (\n \n {children}\n \n ) : (\n \n
    \n \n {children}\n \n \n {t(disableMessage)}\n \n
    \n
    \n );\n};\n","import React from 'react';\nimport {\n arrayOf, shape, string, func, bool\n} from 'prop-types';\nimport { t } from '@jotforminc/translation';\nimport { ImageWithWrapper, CreateTeamButton } from '@jotforminc/enterprise-components';\nimport { handleCustomNavigation } from '@jotforminc/utils';\nimport classNames from 'classnames';\nimport { isPlural } from '../../utils/index';\n\nimport IconNoTeam from '../../assets/svg/teamselection-noteam.svg';\nimport '../../styles/_jfAppPickerTeamSelection.scss';\n\nconst TeamSection = ({\n user,\n teams = [],\n openCreateTeamModal = () => {},\n currentTeamID = '',\n isTeamPage = false,\n isTeamCreationDisabled = false,\n isTeamBrowsingDisabled = false\n}) => {\n return (\n
    \n

    \n {t('MY TEAMS')}\n

    \n
    \n {teams.length\n ? teams.slice(0, 3).map(team => (\n {\n e.preventDefault();\n handleCustomNavigation(`/myteams/${team?.slug || team?.id}`, '_self');\n }}\n className={classNames({ selected: isTeamPage && currentTeamID === team?.id })}\n >\n \n
    \n
    {team?.name || ''}
    \n
    \n {team?.memberCount}\n  \n {isPlural(team?.memberCount) ? t('members') : t('member')}\n
    \n
    \n \n )) : (\n
    \n
    \n \n
    \n

    {`${t(\"You don't have any teams yet. Create your first team and start collaborating with your colleagues.\")}`}

    \n
    \n )}\n
    \n {!isTeamBrowsingDisabled && !!teams.length && (\n \n )}\n
    \n \n {`+ ${t('CREATE A TEAM')}`}\n \n
    \n
    \n );\n};\n\nTeamSection.propTypes = {\n teams: arrayOf(shape({})),\n isTeamCreationDisabled: bool,\n isTeamBrowsingDisabled: bool,\n openCreateTeamModal: func,\n currentTeamID: string,\n isTeamPage: bool,\n user: shape({\n username: string,\n account_type: shape({\n name: string\n })\n }).isRequired\n};\n\nexport default TeamSection;\n","import React, { useState } from 'react';\nimport {\n shape, string, func, bool, arrayOf\n} from 'prop-types';\nimport qs from 'querystring';\nimport { t } from '@jotforminc/translation';\nimport { handleCustomNavigation } from '@jotforminc/utils';\nimport { canCreateTeam } from '@jotforminc/enterprise-components';\nimport { isEnterprise } from '@jotforminc/enterprise-utils';\nimport { IconChevronRight } from '@jotforminc/svg-icons';\nimport { ActivityLogger } from '@jotforminc/activity-logger';\n\nimport classNames from 'classnames';\nimport {\n appConfigPropsTypes, getDefaultNavItems\n} from './navigationConstants';\nimport NavigationItem from './NavigationItem';\nimport TeamSection from './TeamSection';\n\nconst hasNewBadge = () => {\n return false;\n};\n\n// eslint-disable-next-line complexity\nconst Navigation = ({\n form = {},\n forms = [],\n appID = '',\n appList = [],\n formIDs = [],\n summary = {},\n hideIfEmpty = false,\n showBackToMyForms = true,\n visibleNavigationApps = [],\n backToMyFormsLink = '/myforms',\n backToMyFormsText = 'Go Back to My Forms',\n onMyformsClick = f => f,\n logDiscoverabilityActions = f => f,\n toggleNavigation = f => f,\n isAppPickerSideModeActive = false,\n teamID = '',\n teams = [],\n openCreateTeamModal = () => {},\n showTeamSection = false,\n isTeamPage = false,\n isInListings = false,\n isTeamCreationDisabled = false,\n isTeamBrowsingDisabled = false,\n createForm = f => f,\n user,\n appConfig,\n appName: currentAppName,\n agentID = ''\n}) => {\n const [loading, setLoading] = useState(false);\n const [loadingApp, setLoadingApp] = useState('');\n\n const isNotFormOwner = form?.owner && user?.username && form.owner !== user.username;\n const appConfigs = { ...getDefaultNavItems(true), [currentAppName]: appConfig };\n const apps = appList.indexOf(currentAppName) !== -1 || currentAppName === 'myTeams' ? appList : [...appList, currentAppName];\n const hideBackButton = window.JOTFORM_ENV === 'ENTERPRISE' && visibleNavigationApps.length > 0 && visibleNavigationApps.indexOf('toMyForms') === -1;\n const userAccountType = user?.accountType || user?.account_type;\n const hideTeamSection = teams.length === 0 && !canCreateTeam(isTeamCreationDisabled, userAccountType);\n const isJotformAdmin = !isEnterprise() && (userAccountType === 'ADMIN' || userAccountType?.name === 'ADMIN');\n const isTeamSectionVisible = showTeamSection && !hideTeamSection;\n const noRedirectedApps = ['myTeams', 'myWorkspace'];\n const preventWorkspaceRedirect = !isEnterprise() && user && !!user.allowMixedListing && !isJotformAdmin;\n\n if (!teamID && isNotFormOwner && currentAppName !== 'portal') {\n // For now, don't show app builder on navigation for subusers\n const portalIndex = apps.indexOf('portal');\n if (portalIndex !== -1) {\n apps.splice(portalIndex, 1);\n }\n }\n\n const myPagesIndex = apps.indexOf('myPages');\n if (myPagesIndex !== -1) {\n apps.splice(myPagesIndex, 1);\n }\n\n const setLoadingState = app => state => {\n setLoading(state);\n setLoadingApp(state ? app : '');\n };\n\n const handleBackToMyFormsClick = e => {\n ActivityLogger.setLogger(window?.JotFormActions?.('productPickerNavigationActions'))\n .log({\n action: 'click',\n target: backToMyFormsText?.replace(/ +/g, '')\n });\n\n const parameters = qs.stringify({ ...(preventWorkspaceRedirect ? { preventWorkspaceRedirect: true } : {}) });\n e.preventDefault();\n if (onMyformsClick) {\n onMyformsClick({ queryParams: parameters });\n } else {\n const hasParameter = backToMyFormsLink && backToMyFormsLink.indexOf('?') > -1 ? '&' : '?';\n if (backToMyFormsLink.includes('myagents') || window.location.pathname.includes('/agent/build')) {\n handleCustomNavigation(`${backToMyFormsLink}${parameters ? `${hasParameter}${parameters}` : ''}`, '_blank', true);\n } else {\n handleCustomNavigation(`${backToMyFormsLink}${parameters ? `${hasParameter}${parameters}` : ''}`, '_blank');\n }\n }\n\n logDiscoverabilityActions({\n action: 'click',\n target: 'goBackToMyForms'\n });\n };\n\n return (\n \n
      \n {apps.map(app => {\n return (\n \n );\n })}\n { !hideBackButton && showBackToMyForms && (\n \n {t(backToMyFormsText)}\n
      \n \n
      \n \n ) }\n
    \n {isTeamSectionVisible\n && (\n \n )}\n \n );\n};\n\nNavigation.propTypes = {\n form: shape({\n id: string,\n owner: string\n }),\n forms: arrayOf(shape({})),\n user: shape({\n username: string,\n account_type: shape({\n name: string\n })\n }).isRequired,\n appID: string,\n hideIfEmpty: bool,\n summary: shape({}),\n showBackToMyForms: bool,\n backToMyFormsLink: string,\n backToMyFormsText: string,\n formIDs: arrayOf(string),\n appName: string.isRequired,\n appList: arrayOf(string),\n visibleNavigationApps: arrayOf(string),\n appConfig: appConfigPropsTypes.isRequired,\n onMyformsClick: func,\n logDiscoverabilityActions: func,\n toggleNavigation: func,\n isAppPickerSideModeActive: bool,\n teamID: string,\n teams: arrayOf(shape({})),\n openCreateTeamModal: func,\n showTeamSection: bool,\n isTeamPage: bool,\n isInListings: bool,\n isTeamCreationDisabled: bool,\n isTeamBrowsingDisabled: bool,\n createForm: func,\n agentID: string\n};\n\nexport default Navigation;\n","import React, { PureComponent } from 'react';\nimport PropTypes, { bool } from 'prop-types';\nimport classNames from 'classnames';\nimport { t } from '@jotforminc/translation';\nimport { IconChevronDown, IconXmark } from '@jotforminc/svg-icons';\nimport { Badge } from '@jotforminc/magnet';\n\nclass NavigationTrigger extends PureComponent {\n render() {\n const {\n appTag = '',\n appTitle = '',\n appName = '',\n summary = {},\n toggleNavigation = () => {},\n logDiscoverabilityActions = f => f,\n isAppPickerTooltipActive = false,\n onAppPickerTooltipOverlayClicked = f => f,\n onAppPickerTooltipCloseIconClicked = f => f,\n onAppPickerTooltipRendered = f => f,\n darkMode = false,\n isNavigationOpened = false\n } = this.props;\n\n const notification = Object.values(summary).findIndex(s => (s?.notification || 0) > 0) > -1;\n\n if (isAppPickerTooltipActive) {\n onAppPickerTooltipRendered();\n }\n\n const appTitleName = appName === 'myTeams' ? appTitle : t(appTitle);\n\n const isBetaAsset = ['boards', 'myboards', 'conversations', 'myagents'].includes(appName?.toLowerCase()) || false;\n\n return (\n <>\n {\n toggleNavigation();\n\n // discoverabilityTracking\n if (appName === 'formBuilder' || appName === 'myForms') {\n logDiscoverabilityActions({\n action: 'click',\n target: '.appSelectorTrigger-button'\n });\n }\n }}\n aria-haspopup=\"true\"\n aria-expanded={isNavigationOpened}\n data-testid=\"appSelectorTrigger-button\"\n aria-label={`${t('Product Selector, Currently Selected')} ${appTitleName}`}\n >\n \n {appTitle}\n \n {isBetaAsset ? (\n \n {t('BETA')}\n \n ) : null}\n \n \n \n
    \n \n {isAppPickerTooltipActive\n && (\n
    \n \n \n \n
    {t(\"You've got responses! 🎉'\")}
    \n

    {t('Now click here to discover how you can make the most of your responses.')}

    \n
    \n )}\n\n {isAppPickerTooltipActive\n && (\n <>\n \n \n )}\n\n \n );\n }\n}\n\nNavigationTrigger.propTypes = {\n appTag: PropTypes.string,\n appTitle: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),\n appName: PropTypes.string,\n toggleNavigation: PropTypes.func,\n summary: PropTypes.shape({}),\n logDiscoverabilityActions: PropTypes.func,\n isAppPickerTooltipActive: bool,\n onAppPickerTooltipOverlayClicked: PropTypes.func,\n onAppPickerTooltipCloseIconClicked: PropTypes.func,\n onAppPickerTooltipRendered: PropTypes.func,\n darkMode: PropTypes.bool,\n isNavigationOpened: PropTypes.bool\n};\n\nexport default NavigationTrigger;\n","import React from 'react';\nimport PropTypes, { string, bool } from 'prop-types';\nimport { onClickOutsideHOC } from '@jotforminc/account-box';\nimport { ActionManager } from '@jotforminc/abtest-manager';\n\nimport { appConfigPropsTypes } from './navigationConstants';\nimport Navigation from '.';\nimport NavigationTrigger from './NavigationTrigger';\nimport '../../styles/_jfAppPicker.scss';\nimport '../../styles/_jfAppPickerSideMode.scss';\n\nclass NavigationWrapper extends React.PureComponent {\n constructor(props) {\n super(props);\n\n // discoverabilityTracking\n const { user = {} } = this.props;\n this.discoverabilityTracking = new ActionManager({ user, projectName: 'discoverabilityTracking', trackOnce: true });\n }\n\n handleClickOutside() {\n const { isNavigationOpened = false, toggleNavigation = f => f } = this.props;\n if (isNavigationOpened) { toggleNavigation(); }\n }\n\n render() {\n const {\n appList = [],\n appID = '',\n formIDs = [],\n appName = '',\n appTag = '',\n form = {},\n forms = [],\n isNavigationOpened = false,\n toggleNavigation = () => {},\n backToMyFormsText = 'Go Back to My Forms',\n backToMyFormsLink = '/myforms',\n onMyformsClick = null,\n showBackToMyForms = true,\n summary = {},\n visibleNavigationApps = [],\n title = '',\n hideIfEmpty = false,\n isAppPickerSideModeActive = false,\n isAppPickerTooltipActive = false,\n onAppPickerTooltipOverlayClicked = f => f,\n onAppPickerTooltipCloseIconClicked = f => f,\n onAppPickerTooltipRendered = f => f,\n darkMode = false,\n isInSsrHeader = false,\n teamID = '',\n teams = [],\n openCreateTeamModal = () => {},\n showTeamSection = false,\n isTeamPage = false,\n isInListings = false,\n isTeamCreationDisabled = false,\n isTeamBrowsingDisabled = false,\n createForm = f => f,\n appConfig = {},\n user,\n agentID = ''\n } = this.props;\n\n return (\n
    \n \n \n
    \n );\n }\n}\n\nNavigationWrapper.propTypes = {\n appConfig: appConfigPropsTypes.isRequired,\n appList: PropTypes.arrayOf(PropTypes.string),\n appID: PropTypes.string,\n formIDs: PropTypes.arrayOf(PropTypes.string),\n appName: PropTypes.string,\n appTag: PropTypes.string,\n showBackToMyForms: PropTypes.bool,\n form: PropTypes.shape({}),\n forms: PropTypes.arrayOf(PropTypes.shape({})),\n isNavigationOpened: PropTypes.bool,\n toggleNavigation: PropTypes.func,\n backToMyFormsText: string,\n backToMyFormsLink: string,\n onMyformsClick: PropTypes.func,\n summary: PropTypes.shape({}),\n visibleNavigationApps: PropTypes.arrayOf(PropTypes.string),\n title: string,\n user: PropTypes.shape({\n account_type: PropTypes.shape({\n name: PropTypes.string\n })\n }).isRequired,\n hideIfEmpty: bool,\n isAppPickerSideModeActive: bool,\n isAppPickerTooltipActive: bool,\n onAppPickerTooltipOverlayClicked: PropTypes.func,\n onAppPickerTooltipCloseIconClicked: PropTypes.func,\n onAppPickerTooltipRendered: PropTypes.func,\n darkMode: PropTypes.bool,\n isInSsrHeader: PropTypes.bool,\n teamID: PropTypes.string,\n teams: PropTypes.arrayOf(PropTypes.shape({})),\n openCreateTeamModal: PropTypes.func,\n showTeamSection: PropTypes.bool,\n isTeamPage: PropTypes.bool,\n isInListings: PropTypes.bool,\n isTeamCreationDisabled: PropTypes.bool,\n isTeamBrowsingDisabled: PropTypes.bool,\n createForm: PropTypes.func,\n agentID: PropTypes.string\n};\n\nexport default onClickOutsideHOC(NavigationWrapper);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { t } from '@jotforminc/translation';\nimport { handleCustomNavigation } from '@jotforminc/utils';\nimport { ActivityLogger } from '@jotforminc/activity-logger';\nimport { getDefaultLogoSrc } from '../../utils';\n\nconst Logo = props => {\n const {\n alt = 'JotForm Logo',\n title = 'My Forms',\n className = 'jfLogo',\n href = '',\n background = '',\n src = getDefaultLogoSrc(),\n wrapperClassName = 'jNewHeader-logo iBlock',\n onClick = null,\n preventRedirection = false,\n ariaLabel = ''\n } = props;\n\n const handleClick = e => {\n e.preventDefault();\n if (window?.JotFormActions) {\n ActivityLogger.setLogger(window?.JotFormActions('header-actions'))\n .log({\n action: 'click',\n target: 'topLeftMainLogo'\n });\n }\n\n if (onClick) {\n onClick();\n } else {\n handleCustomNavigation(href, '_self');\n }\n };\n\n return (\n <>\n {preventRedirection\n ? (\n
    \n \n
    \n )\n : (\n \n \n \n )}\n \n );\n};\n\nLogo.propTypes = {\n alt: PropTypes.string,\n title: PropTypes.string,\n className: PropTypes.string,\n href: PropTypes.string,\n background: PropTypes.string,\n src: PropTypes.string,\n wrapperClassName: PropTypes.string,\n onClick: PropTypes.func,\n preventRedirection: PropTypes.bool,\n ariaLabel: PropTypes.string\n};\n\nexport default Logo;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { t } from '@jotforminc/translation';\nimport { Editable } from '@jotforminc/editable';\nimport { IconChevronDown } from '@jotforminc/svg-icons';\n\nclass Title extends React.PureComponent {\n constructor(props) {\n super(props);\n this.state = {\n isMenuOpened: false\n };\n this.wrapperRef = React.createRef();\n }\n\n toggleMenu = () => {\n this.setState(prevProps => ({ isMenuOpened: !prevProps.isMenuOpened }));\n };\n\n // handle click out side\n\n render() {\n const {\n className = '',\n isEditable = false,\n forceTitleRename = false,\n isIconVisible = true,\n onBlur = f => f,\n appMenuComponent: AppMenu = null,\n onTitleClick = () => {},\n toggleFormList = () => {},\n title = ''\n } = this.props;\n const { isMenuOpened } = this.state;\n const appMenuClass = title && isIconVisible ? ' hasApp' : '';\n const containerClass = `jNewHeader-title iBlock${className}${appMenuClass}`;\n\n return (\n <>\n {isEditable ? (\n \n ) : (\n \n {title}\n
    \n )}\n {title && isIconVisible && (AppMenu ? (\n <>\n
    \n \n \n
    \n {isMenuOpened\n && (\n \n )}\n \n \n ) : (\n \n \n \n ))}\n \n );\n }\n}\n\nTitle.propTypes = {\n className: PropTypes.string,\n isEditable: PropTypes.bool,\n forceTitleRename: PropTypes.bool,\n isIconVisible: PropTypes.bool,\n onBlur: PropTypes.func,\n onTitleClick: PropTypes.func,\n toggleFormList: PropTypes.func,\n appMenuComponent: PropTypes.func,\n title: PropTypes.string\n};\n\nexport default Title;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { IconArrowRotateRight } from '@jotforminc/svg-icons';\n\nconst SubTitle = props => {\n const {\n iconSvg = ,\n isIconVisible = true,\n onClick = () => {},\n onIconClick = () => {},\n title = ''\n } = props;\n\n return (\n \n { typeof title === 'function' ? title() : title }\n { isIconVisible\n && (\n \n {iconSvg}\n \n )}\n \n );\n};\n\nSubTitle.propTypes = {\n iconSvg: PropTypes.element,\n isIconVisible: PropTypes.bool,\n onClick: PropTypes.func,\n onIconClick: PropTypes.func,\n title: PropTypes.oneOfType([PropTypes.string, PropTypes.func, PropTypes.node])\n};\n\nexport default SubTitle;\n","/* eslint-disable max-len */\nimport React from 'react';\n\nexport const IconGovernment = ({ ...props }) => (\n \n \n \n);\n","/* eslint-disable react/prop-types */\nimport React from 'react';\nimport IconHipaa from '../../assets/svg/iconHipaa.svg';\nimport { IconGovernment } from './IconGovernment';\n\nexport const HeaderBadge = ({ badge }) => {\n if (typeof badge !== 'string') return null;\n switch (badge) {\n case 'hipaa': return (\n
    \n \n \n HIPAA\n
    \n Compliance\n
    \n
    \n );\n case 'government': {\n return (\n
    \n
    \n
    \n \n Government\n
    \n
    \n );\n }\n default: return null;\n }\n};\n","/* eslint-disable react/destructuring-assignment */\nimport React from 'react';\nimport {\n func,\n bool,\n string,\n node,\n shape,\n oneOfType,\n instanceOf,\n arrayOf,\n elementType,\n array\n} from 'prop-types';\nimport classnames from 'classnames';\nimport isObject from 'lodash/isObject';\nimport isEqual from 'lodash/isEqual';\nimport { truncate } from 'lodash/fp';\nimport { ResizeObserver as ResizeObserverPolyfill } from '@juggle/resize-observer';\nimport { EmptyList } from '@jotforminc/empty-list';\nimport { ResourcePicker, RESOURCE_TYPES } from '@jotforminc/resource-picker';\nimport { ActivityLogger } from '@jotforminc/activity-logger';\nimport { isEnterprise } from '@jotforminc/enterprise-utils';\nimport { AccountBox, FormUserAccountBox } from '@jotforminc/account-box';\nimport { t } from '@jotforminc/translation';\nimport { TeamBadge, isBillingTabActive } from '@jotforminc/enterprise-components';\nimport { propTypes } from '@jotforminc/constants';\nimport { handleCustomNavigation, readCookie } from '@jotforminc/utils';\nimport { ActionManager } from '@jotforminc/abtest-manager';\n\nimport NavigationWrapper from '../Navigation/NavigationWrapper';\nimport Logo from '../Logo';\nimport Title from '../Title';\nimport SubTitle from '../SubTitle';\nimport '../../styles/_jfHeader.scss';\nimport {\n appConfigPropsTypes,\n getDefaultNavItems\n} from '../Navigation/navigationConstants';\nimport {\n getToggleContext, getToggleDisabled, getToggleHandler, isShowTeamBadge, hasTeamAvatarInfo\n} from '../../utils';\nimport { fetchTeamProps, getUnpaidInvoices } from '../../utils/api';\nimport IconEmptyFormList from '../../assets/svg/emptyFormList.svg';\nimport { HeaderBadge } from './HeaderBadge';\n\nclass ProductHeader extends React.PureComponent {\n constructor(props) {\n super(props);\n\n this.toggleNavigation = this.toggleContext.bind(this, 'navigation');\n this.toggleFormList = this.toggleContext.bind(this, 'formList');\n this.toggleAccountBox = this.toggleContext.bind(this, 'accountBox');\n this.subTitleClick = this.subTitleClick.bind(this);\n this.isFieldVisible = this.isFieldVisible.bind(this);\n this.handleFormChange = this.handleFormChange.bind(this);\n this.renderTitle = this.renderTitle.bind(this);\n this.updateTeamBadgeVisibility = this.updateTeamBadgeVisibility.bind(this);\n this.skipToMainContent = this.skipToMainContent.bind(this);\n this.isAdmin = this.isAdmin.bind(this);\n this.getInvoices = this.getInvoices.bind(this);\n this.showAdminConsole = this.showAdminConsole.bind(this);\n\n // A/B Test: productHeaderSignupButtonII\n this.isGuest = this.isGuest.bind(this);\n this.distributeProductHeaderSignupButtonAbTest = this.distributeProductHeaderSignupButtonAbTest.bind(this);\n\n this.navigationTrigger = React.createRef();\n this.navigationWrapper = React.createRef();\n this.rightWrapper = React.createRef();\n this.titleAligner = React.createRef();\n\n const isProd = window.JOTFORM_ENV === 'PRODUCTION';\n\n const {\n appName = '', user = {}, teamProperties = null\n } = this.props;\n\n this.state = {\n isFormListOpened: false,\n isNavigationOpened: false,\n isAccountBoxOpened: false,\n leftSideWidth: 0,\n rightSideWidth: 0,\n team: teamProperties,\n showTeamBadge: false,\n isTestVariant: false,\n isAbTestLoading: isProd,\n logAbTestAction: f => f\n };\n\n if ('JotFormActions' in window) {\n if (user.username) {\n ActivityLogger.setLogger(window.JotFormActions('commonHeader'))\n .setMiddleware(window.location.href.indexOf('.jotform.pro') < 0)\n .setMiddleware(['ADMIN', 'SUPPORT', 'INTERN'].indexOf(user.account_type.name) < 0)\n .setApp(appName);\n }\n }\n }\n\n componentDidMount() {\n this.updateTeamBadgeVisibility();\n this.getInvoices();\n const ResizeObserver = window.ResizeObserver || ResizeObserverPolyfill;\n this.resizeRightSideObserver = new ResizeObserver(entries => {\n const newWidth = entries[0].target.offsetWidth;\n this.setState(state => {\n if (state.rightSideWidth !== newWidth) {\n return { rightSideWidth: newWidth };\n }\n });\n });\n\n this.resizeLeftSideObserver = new ResizeObserver(entries => {\n const newWidth = entries[0].target.offsetWidth;\n this.setState(state => {\n if (state.leftSideWidth !== newWidth) {\n return { leftSideWidth: newWidth };\n }\n });\n });\n\n this.resizeRightSideObserver.observe(this.rightWrapper.current);\n if (this.navigationWrapper.current) {\n this.resizeLeftSideObserver.observe(this.navigationWrapper.current);\n }\n\n // A/B Test: productHeaderSignupButtonII\n this.distributeProductHeaderSignupButtonAbTest();\n }\n\n componentDidUpdate(prevProps) {\n const {\n user = {}, isTeamMember = false, teamBadgeID = '', teamProperties = null, waitForTeamProps = false\n } = this.props;\n const {\n user: prevUser, isTeamMember: prevIsTeamMember, teamBadgeID: prevTeamBadgeID, teamProperties: prevTeamProps\n } = prevProps;\n if ((prevUser && user && prevUser.userType !== user.userType)\n || prevIsTeamMember !== isTeamMember\n || prevTeamBadgeID !== teamBadgeID\n || (waitForTeamProps && !isEqual(teamProperties, prevTeamProps) && hasTeamAvatarInfo(teamProperties))\n ) {\n this.updateTeamBadgeVisibility();\n\n // A/B Test: productHeaderSignupButtonII\n this.distributeProductHeaderSignupButtonAbTest();\n }\n if (user.username) {\n ActivityLogger.setUsername(user.username);\n }\n\n this.titleMaxWidthCalculator();\n }\n\n componentWillUnmount() {\n if (this.resizeRightSideObserver) {\n this.resizeRightSideObserver.disconnect();\n }\n if (this.resizeLeftSideObserver) {\n this.resizeLeftSideObserver.disconnect();\n }\n }\n\n get forms() {\n const { forms } = this.props;\n if (!forms) {\n return [];\n }\n\n return forms.filter(f => !f.properties || f.properties?.resourceType !== 'AGENT');\n }\n\n isGuest(user) {\n return user?.accountType === 'GUEST' || user?.accountType?.name === 'GUEST' || user?.account_type === 'GUEST' || user?.account_type?.name === 'GUEST';\n }\n\n // A/B Test: productHeaderSignupButtonII\n distributeProductHeaderSignupButtonAbTest() {\n const { user = {} } = this.props;\n\n try {\n const urlParams = new URLSearchParams(window.location.search);\n const hasUrlParam = urlParams.get('phsbii') === 'true';\n const variation = readCookie('phsb_variation');\n const isTestVariant = variation === '27331' || hasUrlParam;\n const isIncludedInAbTest = !!variation || hasUrlParam;\n const actionManager = new ActionManager({ user, projectName: 'productHeaderSignupButtonII', enableDebugMode: hasUrlParam });\n const logAbTestAction = isIncludedInAbTest && this.isGuest(user) ? actionManager.registerJotformAction : f => f;\n\n this.setState({ isTestVariant, logAbTestAction });\n } catch (e) {\n this.setState({ isTestVariant: false, logAbTestAction: f => f });\n } finally {\n this.setState({ isAbTestLoading: false });\n }\n }\n\n handleFormChange(formID) {\n const { linkHandler = f => f, form: { id } = {} } = this.props;\n if (id === formID || id === formID[0]) return;\n linkHandler(formID);\n this.setState({\n isFormListOpened: false\n });\n ActivityLogger.log({\n action: 'formChanged',\n target: formID\n });\n }\n\n get appConfig() {\n const { appConfig = null, appName = '' } = this.props;\n if (appConfig) return appConfig;\n return getDefaultNavItems(true)[appName];\n }\n\n get textTheme() {\n return 'isDark';\n }\n\n // Fetches invoices to be passed to the AccountBox component to display a warning for overdue invoices\n getInvoices = async () => {\n try {\n if (this.showAdminConsole() && await isBillingTabActive()) {\n const unpaidInvoices = await getUnpaidInvoices();\n\n this.setState(\n currState => ({\n ...currState,\n mostOverdueInvoice: Array.isArray(unpaidInvoices?.mostOverdueInvoice)\n ? unpaidInvoices?.mostOverdueInvoice[0] || {}\n : unpaidInvoices?.mostOverdueInvoice || {}\n })\n );\n }\n } catch (error) {\n // eslint-disable-next-line no-console\n console.error('Unable to get invoices', error);\n }\n };\n\n titleMaxWidthCalculator = () => {\n const { leftSideWidth, rightSideWidth } = this.state;\n if (!leftSideWidth || !rightSideWidth) return;\n\n const maxValue = Math.max(leftSideWidth, rightSideWidth);\n const totalValue = leftSideWidth + rightSideWidth;\n\n if (this.maxValue !== maxValue || window.innerWidth < 501) {\n if (window.innerWidth > 500) {\n this.titleAligner.current.style.maxWidth = `calc(100% - ${maxValue * 2 + 40}px)`;\n } else if (window.innerWidth < 501) {\n this.titleAligner.current.style.maxWidth = `calc(100% - ${totalValue + 20}px)`;\n }\n this.maxValue = maxValue;\n }\n };\n\n showAdminConsole() {\n const { hideAdminConsole = false } = this.props;\n\n return !hideAdminConsole && isEnterprise() && this.isAdmin();\n }\n\n isAdmin() {\n const { user = {} } = this.props;\n\n return isObject(user.account_type) ? user.account_type.name === 'ADMIN' : user.account_type === 'ADMIN';\n }\n\n updateTeamBadgeVisibility() {\n const {\n user = {}, isTeamMember = false, teamBadgeID = '', teamProperties = null, waitForTeamProps = false\n } = this.props;\n const { team } = this.state;\n const showTeamBadge = isShowTeamBadge(user, isTeamMember, teamBadgeID);\n this.setState(currState => ({ ...currState, showTeamBadge }));\n if (showTeamBadge && !hasTeamAvatarInfo(team)) {\n if (hasTeamAvatarInfo(teamProperties)) {\n this.setState(currState => ({ ...currState, team: teamProperties }));\n } else if (!waitForTeamProps) {\n fetchTeamProps(teamBadgeID).then(resp => {\n if (resp?.name) {\n this.setState(currState => ({ ...currState, team: resp }));\n }\n });\n }\n }\n }\n\n toggleContext(_context) {\n const context = getToggleContext(_context);\n const handler = getToggleHandler(_context);\n const disable = getToggleDisabled(_context);\n\n if (this.props[disable] === true) return;\n\n this.setState(state => ({ [context]: !state[context] }), () => {\n ActivityLogger.log({\n action: context,\n target: this.state[context]\n });\n if (context === 'isFormListOpened' && !this.state[context]) {\n ActivityLogger.log({\n action: 'formListClosed'\n });\n }\n this.props[handler](this.state[context]);\n });\n }\n\n subTitleClick() {\n const { form = {} } = this.props;\n ActivityLogger.log({\n action: 'subTitleClicked',\n target: form.id\n });\n }\n\n logoutUser() {\n const { location: { origin } } = window;\n handleCustomNavigation(`${origin}/logout.php?backTo=${origin}`, '_self', true);\n }\n\n isFieldVisible(field) {\n if (!isEnterprise()) {\n return true;\n }\n\n const { enterpriseConfigs: { hideFields = [] } } = this.props;\n return hideFields.indexOf(field) === -1;\n }\n\n /**\n * Gain focus on the element with the id given in\n * mainContentLinkDestination prop, if an event is passed\n * prevent its default behaviour.\n */\n skipToMainContent(e) {\n const { mainContentLinkDestination = '' } = this.props;\n e.preventDefault();\n document.getElementById(mainContentLinkDestination.replace('#', ''))?.focus();\n }\n\n renderTitle() {\n const {\n form = {},\n onTitleBlur = f => f,\n onTitleClick = f => f,\n titleClassName = '',\n appMenuComponent = null,\n forceTitleRename = false,\n TitleRenderer = Title,\n title = ''\n } = this.props;\n const { components } = this.appConfig;\n\n return (\n \n );\n }\n\n // eslint-disable-next-line complexity\n render() {\n const {\n isNavigationOpened,\n isFormListOpened,\n isAccountBoxOpened\n } = this.state;\n\n const {\n handleSwitchToOld = false,\n navigationToggleDisabled = false,\n appList = [],\n appName = '',\n appTag = '',\n children = null,\n eventTypes,\n form = {},\n appID = '',\n formIDs = [],\n logoAction = null,\n onMyformsClick = null,\n subTitle = '',\n emptyFormListTitle = null,\n emptyFormListDescription = null,\n emptyFormListIcon = ,\n backToMyFormsText = 'Go Back to My Forms',\n backToMyFormsLink = '/myforms',\n formListSearchPlaceholder = 'Search in your forms',\n formListTitle = 'Go to another form',\n formListDescription = 'You\\'ve done great on this form. Time to focus on another one? Let\\'s go then!',\n submissionsKeyword = 'Submissions',\n user = {},\n enterpriseConfigs = {\n hideFields: [],\n preventLogoRedirection: false,\n visibleNavigationApps: []\n },\n customHeaderClass = null,\n logo = {},\n onLoginSuccess = () => window.location.reload(),\n navigationAppTitle = '',\n actionLogger = null,\n showAppNavigation = true,\n currentMode = undefined,\n forceUseRegularAccountBox = undefined,\n loginPredefinedEmail = '',\n signupPredefinedEmail = '',\n initialLoginScreen = 'signupOptions',\n forceRegularUser = true,\n initiator = '',\n verificationHash = '',\n shouldCallNavigate = true,\n showUserLimitList = true,\n LogoTitleRenderer = null,\n customResourcePickerItems = [],\n isAppPickerSideModeActive = undefined,\n isAppPickerPulseActive = false,\n isAppPickerTooltipActive = false,\n onAppPickerTooltipCloseIconClicked = f => f,\n onAppPickerTooltipRendered = f => f,\n teamID = '',\n mainContentLinkDestination = '',\n navigationLinkDestination = '',\n productType = '',\n resourceType = RESOURCE_TYPES.FORM,\n childrenPosition = '',\n createForm = f => f,\n settingsDontUseRootPath = false,\n tooltipAttach,\n tooltipText,\n ssoLoginOptions,\n hideSignUp,\n agentID,\n isAccountBoxVisible = true\n } = this.props;\n const {\n mostOverdueInvoice, team, showTeamBadge, isAbTestLoading, isTestVariant, logAbTestAction\n } = this.state;\n const { appConfig } = this;\n const { components, className: appClassName } = appConfig;\n const { campaign: { type: userCampaign = null } = {} } = user;\n const campaignAvailable = ['BLACKFRIDAY', 'EOY', 'NEWUSER'].includes(userCampaign);\n const isCampaignActive = campaignAvailable && ['reports', 'tables', 'inbox'].includes(appName);\n\n const rootClassNames = classnames({\n jNewHeader: true,\n [appClassName]: true,\n [this.textTheme]: true,\n [customHeaderClass]: !!customHeaderClass,\n appBoxOpened: isNavigationOpened,\n navigationToggleDisabled,\n branding21: truncate,\n isCampaignAvatarActive: isCampaignActive,\n appPickerSideWrapper: isAppPickerSideModeActive,\n appPickerPulseActive: isAppPickerPulseActive,\n appPickerTooltipActive: isAppPickerTooltipActive\n });\n const { preventLogoRedirection = false, visibleNavigationApps = [] } = enterpriseConfigs;\n const badgeType = (user.isGovernment ? 'government' : '') || (user.isHIPAA === '1' ? 'hipaa' : '');\n return (\n \n {mainContentLinkDestination && (\n {\n if (e.code === 'Space' || e.code === 'Enter') {\n this.skipToMainContent(e);\n }\n }}\n >\n {t('Skip to main content')}\n \n )}\n {navigationLinkDestination && (\n \n {t('Skip to navigation')}\n \n )}\n {this.isFieldVisible('Logo') && (\n \n { components.logo.visible && (\n \n )}\n \n {this.isFieldVisible('AppNavigation') && showAppNavigation && (\n \n )}\n {LogoTitleRenderer && }\n
    \n )}\n \n {childrenPosition === 'left' && children}\n\n {components.title.visible && (\n \n {this.renderTitle()}\n \n )}\n { components.subTitle.visible && (\n {}}\n />\n )}\n \n \n { !childrenPosition && children }\n {isAccountBoxVisible && this.isFieldVisible('AccountBox') && user && (\n (!forceUseRegularAccountBox && user.userType === 'formuser') ? (\n
    \n \n
    \n ) : (\n \n )\n )}\n \n {this.isFieldVisible('FormPicker') && isFormListOpened && (\n }\n showHeader={true}\n listTitle={formListTitle}\n listDescription={formListDescription}\n searchPlaceholder={formListSearchPlaceholder}\n isModal={true}\n isModalOpen={isFormListOpened}\n onClose={this.toggleFormList}\n submissionsKeyword={submissionsKeyword}\n customItemsList={customResourcePickerItems}\n t={t}\n productType={productType}\n />\n )}\n \n );\n }\n}\n\nProductHeader.propTypes = {\n /* eslint-disable react/no-unused-prop-types */\n // Toggle handlers are dynamically used\n accountBoxToggleHandler: func,\n formListToggleHandler: func,\n navigationToggleHandler: func,\n // Toggle disable props are dynamically used\n navigationToggleDisabled: bool,\n formListToggleDisabled: bool,\n accountBoxToggleDisabled: bool,\n /* eslint-enable react/no-unused-prop-types */\n appConfig: appConfigPropsTypes,\n appList: instanceOf(Array),\n appName: string,\n appTag: string,\n children: node,\n form: shape({\n id: string,\n title: string\n }),\n title: string,\n appID: string,\n formIDs: instanceOf(Array),\n enterpriseConfigs: shape({\n hideFields: instanceOf(Array),\n visibleNavigationApps: instanceOf(Array),\n preventLogoRedirection: bool\n }),\n forms: instanceOf(Array),\n linkHandler: func,\n logoAction: func,\n onMyformsClick: func,\n handleSwitchToOld: oneOfType([func, bool]),\n onTitleBlur: func,\n onTitleClick: func,\n appMenuComponent: func,\n subTitle: oneOfType([func, string, node]),\n titleClassName: string,\n forceTitleRename: bool,\n backToMyFormsText: string,\n backToMyFormsLink: string,\n formListTitle: string,\n formListDescription: string,\n formListSearchPlaceholder: string,\n emptyFormListTitle: node,\n emptyFormListDescription: node,\n emptyFormListIcon: node,\n user: shape({\n username: string,\n account_type: oneOfType([shape({\n name: string\n }), string]),\n userType: string,\n email: string\n }),\n customHeaderClass: string,\n logo: shape({\n src: string\n }),\n onLoginSuccess: func,\n TitleRenderer: elementType,\n navigationAppTitle: oneOfType([string, node]),\n actionLogger: func,\n showAppNavigation: bool,\n currentMode: string,\n forceUseRegularAccountBox: bool,\n loginPredefinedEmail: string,\n signupPredefinedEmail: string,\n initialLoginScreen: string,\n forceRegularUser: bool,\n initiator: string,\n verificationHash: string,\n shouldCallNavigate: bool,\n hideAdminConsole: bool,\n showUserLimitList: bool,\n submissionsKeyword: string,\n LogoTitleRenderer: elementType,\n customResourcePickerItems: arrayOf(shape({\n CustomItemComponent: propTypes.renderable,\n props: shape({})\n })),\n isAppPickerSideModeActive: bool,\n isAppPickerPulseActive: bool,\n isAppPickerTooltipActive: bool,\n onAppPickerTooltipCloseIconClicked: func,\n onAppPickerTooltipRendered: func,\n teamID: string,\n mainContentLinkDestination: string,\n navigationLinkDestination: string,\n teamProperties: shape({}),\n teamBadgeID: string,\n productType: string,\n isTeamMember: bool,\n resourceType: string,\n childrenPosition: string,\n createForm: func,\n settingsDontUseRootPath: bool,\n tooltipAttach: string,\n tooltipText: string,\n eventTypes: array,\n ssoLoginOptions: array,\n hideSignUp: bool,\n agentID: string,\n isAccountBoxVisible: bool,\n waitForTeamProps: bool\n};\n\nProductHeader.defaultProps = {\n accountBoxToggleHandler: f => f,\n handleSwitchToOld: false,\n formListToggleHandler: f => f,\n navigationToggleHandler: f => f,\n navigationToggleDisabled: false,\n formListToggleDisabled: false,\n accountBoxToggleDisabled: false,\n appConfig: null,\n appList: [],\n appName: '',\n title: null,\n appTag: '',\n children: null,\n form: {},\n appID: '',\n formIDs: [],\n forms: [],\n linkHandler: f => f,\n logoAction: null,\n appMenuComponent: null,\n onMyformsClick: null,\n onTitleBlur: f => f,\n onTitleClick: null,\n subTitle: '',\n titleClassName: '',\n emptyFormListTitle: null,\n emptyFormListDescription: null,\n emptyFormListIcon: ,\n forceTitleRename: false,\n backToMyFormsText: 'Go Back to My Forms',\n backToMyFormsLink: '/myforms',\n formListSearchPlaceholder: 'Search in your forms',\n formListTitle: 'Go to another form',\n formListDescription: 'You\\'ve done great on this form. Time to focus on another one? Let\\'s go then!',\n submissionsKeyword: 'Submissions',\n user: {},\n enterpriseConfigs: {\n hideFields: [],\n preventLogoRedirection: false,\n visibleNavigationApps: []\n },\n customHeaderClass: null,\n logo: {},\n onLoginSuccess: () => window.location.reload(),\n navigationAppTitle: '',\n TitleRenderer: Title,\n actionLogger: null,\n showAppNavigation: true,\n currentMode: undefined,\n forceUseRegularAccountBox: undefined,\n loginPredefinedEmail: '',\n signupPredefinedEmail: '',\n initialLoginScreen: 'signupOptions',\n forceRegularUser: true,\n initiator: '',\n verificationHash: '',\n shouldCallNavigate: true,\n hideAdminConsole: false,\n showUserLimitList: true,\n LogoTitleRenderer: null,\n customResourcePickerItems: [],\n isAppPickerSideModeActive: undefined,\n isAppPickerPulseActive: false,\n isAppPickerTooltipActive: false,\n onAppPickerTooltipCloseIconClicked: f => f,\n onAppPickerTooltipRendered: f => f,\n teamID: '',\n mainContentLinkDestination: '',\n navigationLinkDestination: '',\n teamProperties: null,\n teamBadgeID: '',\n productType: '',\n isTeamMember: false,\n resourceType: RESOURCE_TYPES.FORM,\n childrenPosition: '',\n createForm: f => f,\n settingsDontUseRootPath: false,\n tooltipAttach: 'Bottom',\n tooltipText: null,\n eventTypes: undefined,\n ssoLoginOptions: [],\n hideSignUp: false,\n agentID: '',\n isAccountBoxVisible: true,\n waitForTeamProps: false\n};\n\nexport default ProductHeader;\n","import React, { PureComponent } from 'react';\nimport ProductHeader from '../ProductHeader';\n\nclass Header extends PureComponent {\n render() {\n return ;\n }\n}\n\nexport default Header;\n","import React from 'react';\n\nconst ActionLoggerContext = React.createContext(f => f);\n\nexport default ActionLoggerContext;\n","import { useEffect, useState } from 'react';\n\nconst useFirstOpen = () => {\n const [isFirstOpen, setIsFirstOpen] = useState(true);\n\n useEffect(() => {\n setTimeout(() => {\n setIsFirstOpen(false);\n }, 4000);\n }, []);\n\n return isFirstOpen;\n};\n\nexport default useFirstOpen;\n","import walkthroughManager from '../utils/FormBuilderWalkthroughManager';\n\nconst logFullStoryClick = walkthroughManager.createFsCustomEvent({ walkthroughType: 'informative', eventType: 'click' });\n\nconst steps = [\n // initial step is a modal\n {\n type: 'modal',\n step: 0,\n name: 'initialModalStep',\n title: 'Welcome to the Form Builder, #{username}',\n content: '

    Complete 5 simple steps to start collecting data through your form!

    We’d love to show you how.

    ',\n emoji: '🎉',\n onConfirm: {\n text: \"Let's go!\",\n waitCbComplete: 500,\n callback: e => {\n walkthroughManager.closePreviewMode(e);\n walkthroughManager.openBuilderTab(e);\n walkthroughManager.closeRightPanel();\n walkthroughManager.closeLeftPanel();\n logFullStoryClick({ step: 'initialModalStep', buttonName: 'letsGo' });\n }\n },\n onDismiss: {\n text: 'No thanks',\n callback: () => { logFullStoryClick({ step: 'initialModalStep', buttonName: 'noThanks' }); }\n }\n },\n // step1\n {\n type: 'popover',\n step: 1,\n name: 'addElementsStep',\n title: 'Add the form elements you need',\n content: 'There’s a form element for every use case. E-signatures, file uploads, payment processors, and other widgets let you collect data in many different ways.',\n reference: '#toogleLeftPanel',\n placement: 'right-start',\n styles: {\n overlay: {\n borderRadius: '0px 36px 36px 0px',\n widthExpand: 16,\n heightExpand: 16\n }\n },\n visuals: {\n posterUrl: 'https://cdn.jotfor.ms/assets/img/v4/walkthrough/formElements/formElements.png',\n webmVideoUrl: 'https://cdn.jotfor.ms/assets/img/v4/walkthrough/formElements/formElements.webm',\n mp4VideoUrl: 'https://cdn.jotfor.ms/assets/img/v4/walkthrough/formElements/formElements.mp4',\n playRate: 1.2,\n height: 282,\n minHeight: 226\n },\n onConfirm: {\n callback: () => {\n logFullStoryClick({ step: 'addElementsStep', buttonName: 'next' });\n }\n }\n },\n // step2\n {\n type: 'popover',\n step: 2,\n name: 'designYourFormStep',\n title: 'Style your form for a more professional look',\n content: 'Change colors and fonts to match your branding. Add custom CSS to make your form blend in with your website or app.',\n reference: '[data-testid=\"panelToggle-designer\"]',\n placement: 'bottom-start',\n styles: {\n overlay: {\n widthExpand: 16,\n heightExpand: 16,\n borderRadius: '40px'\n }\n },\n visuals: {\n posterUrl: 'https://cdn.jotfor.ms/assets/img/v4/walkthrough/formDesigner/formDesigner.png',\n webmVideoUrl: 'https://cdn.jotfor.ms/assets/img/v4/walkthrough/formDesigner/formDesigner.webm',\n mp4VideoUrl: 'https://cdn.jotfor.ms/assets/img/v4/walkthrough/formDesigner/formDesigner.mp4',\n playRate: 1.2,\n height: 296,\n minHeight: 239\n },\n onConfirm: {\n callback: () => {\n logFullStoryClick({ step: 'designYourFormStep', buttonName: 'next' });\n }\n },\n onBack: {\n callback: () => {\n logFullStoryClick({ step: 'designYourFormStep', buttonName: 'back' });\n }\n }\n },\n // step3\n {\n type: 'popover',\n step: 3,\n name: 'adjustSettingsStep',\n title: 'Set up automations',\n content: 'Discover everything you can do with your form. Integrate with your favorite apps, create approval flows, adjust security settings, and more.',\n reference: '#siteNav_id_settings',\n placement: 'bottom',\n styles: {\n overlay: {\n borderRadius: '8px'\n }\n },\n visuals: {\n posterUrl: 'https://cdn.jotfor.ms/assets/img/v4/walkthrough/formSettings/formSettings.png',\n webmVideoUrl: 'https://cdn.jotfor.ms/assets/img/v4/walkthrough/formSettings/formSettings.webm',\n mp4VideoUrl: 'https://cdn.jotfor.ms/assets/img/v4/walkthrough/formSettings/formSettings.mp4',\n height: 296,\n minHeight: 239\n },\n onConfirm: {\n callback: () => {\n logFullStoryClick({ step: 'adjustSettingsStep', buttonName: 'next' });\n }\n },\n onBack: {\n callback: e => {\n walkthroughManager.closePreviewMode(e);\n logFullStoryClick({ step: 'adjustSettingsStep', buttonName: 'back' });\n }\n }\n },\n // step4\n {\n type: 'popover',\n step: 4,\n name: 'previewYourFormStep',\n title: 'Test your form',\n content: 'See how the user experience will look on different devices — such as mobile, tablet, and desktop.',\n reference: '#js-previewSwitch',\n placement: 'bottom-end',\n styles: {\n overlay: {\n borderRadius: '8px'\n }\n },\n visuals: {\n posterUrl: 'https://cdn.jotfor.ms/assets/img/v4/walkthrough/formPreview/formPreview.png',\n webmVideoUrl: 'https://cdn.jotfor.ms/assets/img/v4/walkthrough/formPreview/formPreview.webm',\n mp4VideoUrl: 'https://cdn.jotfor.ms/assets/img/v4/walkthrough/formPreview/formPreview.mp4',\n playRate: 1.2,\n height: 291,\n minHeight: 235\n },\n onConfirm: {\n callback: () => {\n logFullStoryClick({ step: 'previewYourFormStep', buttonName: 'next' });\n }\n },\n onBack: {\n callback: () => {\n logFullStoryClick({ step: 'previewYourFormStep', buttonName: 'back' });\n }\n }\n },\n // step5\n {\n type: 'popover',\n step: 5,\n name: 'publishYourFormStep',\n title: 'Share your form with the world',\n content: 'Share your form with a link, email it to users, or embed your form into your website easily.',\n reference: '#siteNav_id_publish',\n placement: 'bottom',\n styles: {\n overlay: {\n borderRadius: '8px'\n }\n },\n visuals: {\n posterUrl: 'https://cdn.jotfor.ms/assets/img/v4/walkthrough/formPublish/formPublish__nb.png',\n webmVideoUrl: 'https://cdn.jotfor.ms/assets/img/v4/walkthrough/formPublish/formPublish__nb.webm',\n mp4VideoUrl: 'https://cdn.jotfor.ms/assets/img/v4/walkthrough/formPublish/formPublish__nb.mp4',\n playRate: 1.2,\n height: 296,\n minHeight: 239\n },\n onConfirm: {\n callback: () => {\n logFullStoryClick({ step: 'publishYourFormStep', buttonName: 'next' });\n }\n },\n onBack: {\n callback: e => {\n walkthroughManager.closePreviewMode(e);\n logFullStoryClick({ step: 'publishYourFormStep', buttonName: 'back' });\n }\n }\n },\n // step6\n // {\n // type: 'popover',\n // step: 6,\n // name: 'viewYourSubmissions',\n // title: 'View your submissions',\n // content: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris dignissim metus nulla, a imperdiet risus rutrum non. Proin porta augue ac finibus malesuada.',\n // reference: '.jNewHeader-buttonNew.appSelectorTrigger-button',\n // placement: 'bottom',\n // styles: {\n // overlay: {\n // top: 12,\n // heightExpand: -25,\n // borderRadius: '8px'\n // },\n // popover: {\n // offset: [226, -16],\n // triangleOffset: [0, -164]\n // }\n // },\n // visuals: {\n // posterUrl: 'https://cdn.jotfor.ms/assets/img/v4/walkthrough/formPublish/formPublish__nb.png',\n // webmVideoUrl: 'https://cdn.jotfor.ms/assets/img/v4/walkthrough/formPublish/formPublish__nb.webm',\n // mp4VideoUrl: 'https://cdn.jotfor.ms/assets/img/v4/walkthrough/formPublish/formPublish__nb.mp4',\n // playRate: 1.2,\n // height: 296,\n // minHeight: 239\n // },\n // onConfirm: {\n // callback: () => {\n // console.log('open app navigation');\n // logFullStoryClick({ step: 'viewYourSubmissions', buttonName: 'next' });\n // }\n // },\n // onBack: {\n // callback: (e) => {\n // walkthroughManager.closePreviewMode(e);\n // logFullStoryClick({ step: 'viewYourSubmissions', buttonName: 'back' });\n // }\n // }\n // },\n // finalPopover\n {\n type: 'finalPopover',\n step: 6,\n name: 'finalStep',\n title: 'Nice work, #{username}',\n // eslint-disable-next-line max-len\n content: 'If you need additional resources, check out our user guides or video tutorials. Just click on the Help menu at the top right.',\n reference: '.helpButton',\n placement: 'bottom-end',\n contentLinks: {\n help: '/help',\n videoTutorial: 'https://www.youtube.com/watch?v=XXwv6n61xEg&list=PLPsiQt6a8YQlfNE57uWA7wGVjiZrbwbcy&t=71s'\n },\n visuals: {\n posterUrl: 'https://cdn.jotfor.ms/assets/img/v4/walkthrough/finalStep/finalStep@2x.png',\n height: 251,\n minHeight: 203\n },\n styles: {\n overlay: {\n borderRadius: '18px'\n }\n },\n emoji: '🎉',\n onConfirm: {\n callback: () => {\n logFullStoryClick({ step: 'finalStep', buttonName: 'finishTour' });\n }\n },\n onContinue: {\n waitCbComplete: 500,\n callback: () => {\n logFullStoryClick({ step: 'finalStep', buttonName: 'restart' });\n }\n }\n },\n // ending step\n {\n type: 'endingPopover',\n step: 7,\n name: 'endingStep',\n title: '',\n content: 'In case you need to visit it later, you can restart the onboarding tour under the Help menu.',\n reference: '.helpButton',\n placement: 'bottom-end',\n onLastStep: {\n waitCbComplete: 150,\n callback: stepData => {\n if (stepData) {\n logFullStoryClick({ step: `${stepData.name}`, buttonName: 'endTour' });\n }\n }\n }\n }\n];\n\nexport default steps;\n","/* eslint-disable max-len */\nimport Styled from 'styled-components';\n\nconst minScreenResolutionControl = 'screen and (max-height: 599px), (max-width: 959px)';\nconst fontFamily = '\"Circular\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", roboto, oxygen-sans, ubuntu, cantarell, \"Helvetica Neue\", sans-serif';\n\nexport const ScWrapper = Styled.div`\n\n@font-face {\n font-family:\"Circular\";\n src: local(\"Circular Regular\"), local(\"Circular-Regular\"), url(\"https://cdn.jotfor.ms/fonts/circular/fonts/Circular-Book.woff2\") format(\"woff2\"), url(\"https://cdn.jotfor.ms/fonts/circular/fonts/Circular-Book.woff\") format(\"woff\");\n font-display:swap;\n font-style:normal;\n font-weight:400;\n }\n @font-face {\n font-family:\"Circular\";\n src: local(\"Circular Medium\"), local(\"Circular-Medium\"), url(\"https://cdn.jotfor.ms/fonts/circular/fonts/Circular-Medium.woff2\") format(\"woff2\"), url(\"https://cdn.jotfor.ms/fonts/circular/fonts/Circular-Medium.woff\") format(\"woff\");\n font-display:swap;\n font-style:normal;\n font-weight:500;\n }\n @font-face {\n font-family:\"Circular\";\n src: local(\"Circular Bold\"), local(\"Circular-Bold\"), url(\"https://cdn.jotfor.ms/fonts/circular/fonts/Circular-Bold.woff2\") format(\"woff2\"), url(\"https://cdn.jotfor.ms/fonts/circular/fonts/Circular-Bold.woff\") format(\"woff\");\n font-display:swap;\n font-style:normal;\n font-weight:700;\n }\n\nfont-family:${fontFamily};\n\n@media ${minScreenResolutionControl}{\n display: none;\n}\n\nbutton{\n font-family:${fontFamily};\n}\n\n`;\n","/* eslint-disable max-len */\nimport Styled, { keyframes } from 'styled-components';\n\nconst slideFromBottom = keyframes`\n 0% { margin-bottom: -64px }\n 100% { margin-bottom: 0 }\n`;\n\nconst completedColor = '#01BD6F';\nconst inProgressColor = '#5C5CFF';\n\nconst onMediumDesktop = 'screen and (max-width: 1400px)';\nconst onSmallDesktop = 'screen and (max-width: 1200px)';\nconst heightResolutionControl = 'screen and (max-height: 800px)';\n\nexport const ScFooterOutline = Styled.div`\n position: absolute;\n bottom: 0;\n left: 0;\n right: 0;\n background: #ffffff;\n z-index: 1020;\n box-shadow: 0px 0px 24px 0px rgba(43, 50, 69, 0.25);\n display: flex;\n animation-name: ${slideFromBottom};\n animation-duration: .25s;\n animation-fill-mode: forwards;\n animation-timing-function: ease-in;\n`;\n\nexport const ScStepsOutline = Styled.div`\n display: flex;\n flex-direction: row;\n flex-wrap: nowrap;\n align-items: stretch;\n`;\n\nexport const ScFooterButton = Styled.button`\n display: flex;\n align-self: auto;\n align-items: center;\n justify-content: center;\n text-align: left;\n height: 64px;\n font-weight: 400;\n font-style: normal;\n font-size: 12px;\n line-height: 16px;\n border: none;\n background: transparent;\n position: relative;\n padding: 8px 40px;\n cursor: pointer;\n color: #2B3245;\n letter-spacing: 0.35px;\n transition: color .2s, background-color .2s;\n margin: 0;\n text-align: center;\n\n @media ${onMediumDesktop} {\n padding: 8px 30px;\n }\n\n @media ${heightResolutionControl}, ${onSmallDesktop} {\n padding: 8px 16px;\n height: 48px;\n }\n\n &:after{\n content:\"\";\n display: block;\n width: 0;\n height: 0;\n border-radius: 50%;\n position: absolute;\n left: 24px;\n top: 32px;\n transition: all .2s;\n }\n\n &:hover{\n background-color: #F8FBFF\n // color: #4644ff;\n // &>div{\n // background-color: #9392ff;\n // }\n }\n\n &>div{\n &:before{\n transition: width 1s;\n width: 0%;\n }\n &:after{\n transition: width 1s;\n width: 0%;\n }\n }\n\n ${({ status }) => {\n if (status === 'notStarted') {\n return `\n `;\n } if (status === 'inProgress') {\n return `\n color: #2B3245;\n font-weight: 700;\n letter-spacing: 0.05px;\n \n &>div{\n &:before{\n background-color: ${inProgressColor};\n width: 100%;\n }\n &:after{\n background-color: ${inProgressColor};\n width: 100%;\n right: inherit;\n left: 0;\n }\n }\n `;\n } if (status === 'completed') {\n return `\n font-weight: 700;\n letter-spacing: 0.05px;\n color: #26A65B;\n &::after{\n width: 16px;\n height: 16px;\n left: 16px;\n top: 24px;\n background: ${completedColor};\n border-color: ${completedColor};\n background-image: url(\"data:image/svg+xml,%3Csvg width='8' height='6' viewBox='0 0 8 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 3L3 5L7 1' stroke='white' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A\");\n background-repeat: no-repeat;\n background-position: center;\n\n html[dir=\"rtl\"] & {\n left: inherit;\n right: 16px;\n }\n\n @media ${onMediumDesktop} {\n left: 10px;\n\n html[dir=\"rtl\"] & {\n left: inherit;\n right: 10px;\n }\n }\n\n @media ${heightResolutionControl}, ${onSmallDesktop} {\n left: 2px;\n top: 17px;\n width: 12px;\n height: 12px;\n background-size: 6px;\n\n html[dir=\"rtl\"] & {\n left: inherit;\n right: 2px;\n }\n }\n\n }\n\n &>div{\n background: ${completedColor};\n &:before{\n background-color: ${completedColor};\n width: 0%;\n }\n }\n\n &:hover{\n color: #26A65B;\n &>div{\n background-color: ${completedColor};\n }\n }\n\n `;\n }\n }}\n`;\n\nexport const ScFooterButtonLoader = Styled.div`\n position: absolute;\n left: 0;\n right: 0;\n bottom: 0;\n height: 8px;\n background-color: #C3CAD8;\n transition: background .2s;\n\n &:before{\n content: \"\";\n display: block;\n width: 0%;\n height: 8px;\n\n ${({ status }) => {\n if (status === 'inProgress') {\n return `\n background-color: ${inProgressColor};\n `;\n }\n }}\n\n }\n\n &:after{\n content: \"\";\n display: block;\n width: 0%;\n height: 8px;\n position: absolute;\n right: 0;\n bottom: 0;\n background: ${inProgressColor};\n transition: all .2s;\n\n html[dir=\"rtl\"] & {\n right: inherit;\n left: 0;\n }\n\n }\n\n`;\n\nexport const ScFooterButtonCurrentIndicator = Styled.div`\n display: block;\n width: 100%;\n height: 8px;\n background-color: ${inProgressColor}!important;\n position: absolute;\n bottom: 0;\n`;\n\nexport const ScFooterDivider = Styled.div`\n // width: 1px;\n // background-color: #E6EBF2;\n // display: flex;\n // margin: 8px 8px 8px 16px;\n // height: 32px;\n\n // @media ${onSmallDesktop}{\n // margin-left: 8px;\n // }\n`;\n\nexport const ScFooterClose = Styled.button`\n border:none;\n font-size: 12px;\n white-space: nowrap;\n line-height: 16px;\n padding: 4px 16px;\n cursor: pointer;\n background: transparent;\n color: #57647E;\n margin-right: auto;\n display: flex;\n align-items: center;\n justify-content: center;\n transition: all .2s;\n min-width: 170px;\n position: relative;\n\n html[dir=\"rtl\"] & {\n margin-right: 0;\n margin-left: auto;\n }\n\n @media ${onMediumDesktop}{\n min-width: 120px;\n }\n \n @media ${heightResolutionControl}, ${onSmallDesktop}{\n min-width: 100px;\n }\n\n &:after{\n content: \"\";\n position: absolute;\n bottom: 0;\n left: 0;\n right: 0;\n height: 8px;\n background-color: #E6EBF2;\n transition: all .2s;\n }\n\n &:hover{\n background: #F8FBFF;\n }\n\n ${({ switchCloseView }) => {\n if (switchCloseView === true) {\n return `\n background-color: rgba(85, 216, 139, 0.1);\n font-weight: 700;\n\n &:after{\n background-color: #55D88B\n }\n\n &::before{\n display: none!important;\n }\n\n &:hover{\n background-color: #01BD6F;\n color: #ffffff;\n }\n `;\n }\n }}\n\n &:before{\n content: \"\";\n display: inline-flex;\n flex-shrink: 0;\n width: 9px;\n height: 9px;\n margin-top: -1px;\n margin-right: 8px;\n background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10px' height='10px' viewBox='0 0 10 10' style='enable-background:new 0 0 10 10;' xml:space='preserve'%3E%3Cpath fill='%238894AB' d='M8.5,9.5C8.2,9.5,8,9.4,7.8,9.2L5,6.4L2.2,9.2c-0.4,0.4-1,0.4-1.4,0s-0.4-1,0-1.4L3.6,5L0.8,2.2 c-0.4-0.4-0.4-1,0-1.4s1-0.4,1.4,0L5,3.6l2.8-2.8c0.4-0.4,1-0.4,1.4,0s0.4,1,0,1.4L6.4,5l2.8,2.8c0.4,0.4,0.4,1,0,1.4 C9,9.4,8.8,9.5,8.5,9.5z'/%3E%3C/svg%3E%0A\");\n background-position: center left;\n background-size: 9px;\n background-repeat: no-repeat;\n\n html[dir=\"rtl\"] & {\n margin-right: 0;\n margin-left: 8px;\n }\n }\n`;\n\nexport const ScFooterContinue = Styled.button`\n height: 48px;\n font-style: normal;\n font-size: 16px;\n line-height: 32px;\n border: none;\n cursor: pointer;\n color: #ffffff;\n background: ${inProgressColor};\n border-radius: 4px;\n margin-left: 8px;\n margin-top: 8px;\n margin-right: 8px;\n padding: 8px 24px;\n transition: all .2s;\n\n @media ${heightResolutionControl}, ${onSmallDesktop} {\n height: 36px;\n padding: 2px 16px;\n font-size: 12px;\n margin-top: 6px;\n margin-right: 6px;\n }\n\n &:hover{\n background-color: #3F3FCA;\n }\n\n ${({ continueButtonVisible }) => {\n if (continueButtonVisible === true) {\n return `\n opacity: 1;\n `;\n } if (continueButtonVisible === false) {\n return `\n opacity: 0;\n pointer-events: none;\n `;\n }\n }}\n`;\n","/* eslint-disable max-len */\nimport Styled, { keyframes } from 'styled-components';\n\nconst onSmallDesktop = 'screen and (max-width: 1200px)';\nconst heightResolutionControl = 'screen and (max-height: 800px)';\n\nconst animationHide = keyframes`\n 0% {\n opacity: 0;\n width: 100px;\n height: 80px;\n transform: translate(-300px, -300px);\n }\n 10% {\n opacity: 1;\n width: 380px;\n height: 100%;\n transform: translate(0%, 0%);\n }\n 95% { opacity: 1 }\n 100% { opacity: 0 }\n`;\n\nconst animationHideSmallDesktop = keyframes`\n 0% {\n opacity: 0;\n width: 100px;\n height: 80px;\n transform: translate(-300px, -300px);\n }\n 10% {\n opacity: 1;\n width: 320px;\n height: 100%;\n transform: translate(0%, 0%);\n }\n 95% { opacity: 1 }\n 100% { opacity: 0 }\n`;\n\nexport const ScContinuePopoverOutline = Styled.div`\n position: relative;\n padding: 16px 8px;\n background: #ffffff;\n border-radius: 8px;\n box-shadow: 0px 0px 24px 0px rgba(43, 50, 69, 0.25);\n width: 380px;\n margin-bottom: 16px;\n animation-name: ${animationHide};\n animation-duration: 8s;\n animation-delay: 0s;\n animation-fill-mode: forwards;\n animation-timing-function: ease;\n ${({ alignleft }) => (alignleft ? 'margin-left: -30px;' : 'margin-left: 12px;')};\n\n html[dir=\"rtl\"] & {\n margin-left: 0;\n ${({ alignleft }) => (alignleft ? 'margin-right: -30px;' : 'margin-right: 12px;')};\n }\n\n @media ${heightResolutionControl}, ${onSmallDesktop} {\n ${({ alignleft }) => (alignleft ? 'margin-left: -30px;' : 'margin-left: 70px;')};\n padding: 8px;\n width: 320px;\n animation-name: ${animationHideSmallDesktop};\n\n html[dir=\"rtl\"] & {\n margin-left: 0;\n ${({ alignleft }) => (alignleft ? 'margin-right: -30px;' : 'margin-right: 70px;')};\n }\n }\n\n ${({ type }) => {\n if (type === 'primary') {\n return `\n background: #493cff;\n color: #ffffff;\n margin-bottom: 0;\n `;\n }\n }\n}\n`;\n\nexport const ScContinuePopoverTriangle = Styled.div` \n display: block;\n width: 30px;\n height: 8px;\n position: absolute;\n background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='30px' height='9px' viewBox='0 0 30.8 8'%3E%3Cpath fill='%23ffffff' d='M17.7,0.9c-1.4-1-3.3-1-4.7,0L7,5.2C5,6.7,2.5,7.6,0,8h30.8c-2.5-0.4-5-1.3-7.1-2.8L17.7,0.9z'/%3E%3C/svg%3E\");\n bottom: -8px;\n ${({ alignleft }) => (alignleft ? 'left: 105px;' : 'left: 290px;')};\n transform: rotate( 180deg);\n\n html[dir=\"rtl\"] & {\n left: inherit;\n ${({ alignleft }) => (alignleft ? 'right: 105px;' : 'right: 290px;')};\n }\n\n @media ${heightResolutionControl}, ${onSmallDesktop}{\n ${({ alignleft }) => (alignleft ? 'left: 96px;' : 'left: 264px;')};\n\n html[dir=\"rtl\"] & {\n left: inherit;\n ${({ alignleft }) => (alignleft ? 'right: 96px;' : 'right: 264px;')};\n }\n }\n\n ${({ type }) => {\n if (type === 'primary') {\n return `\n background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='30px' height='9px' viewBox='0 0 30.8 8'%3E%3Cpath fill='%23493cff' d='M17.7,0.9c-1.4-1-3.3-1-4.7,0L7,5.2C5,6.7,2.5,7.6,0,8h30.8c-2.5-0.4-5-1.3-7.1-2.8L17.7,0.9z'/%3E%3C/svg%3E\");`;\n }\n }\n}\n\n`;\n\nconst animationOpacity = keyframes`\n 0% { opacity: 0}\n 100% { opacity: 1 }\n`;\n\nexport const ScContinuePopoverContent = Styled.div`\n padding: 16px;\n font-size: 16px;\n line-height: 24px;\n font-weight: 700;\n opacity: 0;\n animation-name: ${animationOpacity};\n animation-duration: .25s;\n animation-delay: .75s;\n animation-fill-mode: forwards;\n animation-timing-function: ease-in;\n\n @media ${heightResolutionControl}, ${onSmallDesktop}{\n padding: 8px;\n font-size: 14px;\n }\n`;\n","import React, { useRef } from 'react';\nimport { shape, bool } from 'prop-types';\nimport { Popover } from '@jotforminc/uikit';\nimport { t } from '@jotforminc/translation';\n\nimport { ScContinuePopoverOutline, ScContinuePopoverTriangle, ScContinuePopoverContent } from './sc/scContinuePopover';\n\nconst ContinuePopover = ({ targetRef, visible }) => {\n const popoverRef = useRef();\n\n const popoverStyles = {\n zIndex: '1030',\n width: '400px',\n paddingRight: '12px',\n pointerEvents: 'none'\n };\n\n const popoverOptions = {\n placement: 'top'\n };\n\n if (!visible) return null;\n\n return (\n \n \n \n {t(\"Click here to continue when you're ready.\")}\n \n \n );\n};\n\nContinuePopover.propTypes = {\n targetRef: shape().isRequired,\n visible: bool\n};\n\nContinuePopover.defaultProps = {\n visible: false\n};\n\nexport default ContinuePopover;\n","import React, { useRef } from 'react';\nimport { arrayOf, shape } from 'prop-types';\nimport { Popover } from '@jotforminc/uikit';\nimport { t } from '@jotforminc/translation';\n\nimport { ScContinuePopoverOutline, ScContinuePopoverTriangle, ScContinuePopoverContent } from './sc/scContinuePopover';\n\nconst ButtonPopover = ({ buttonRefs, popoverSteps }) => {\n const popoverRef = useRef();\n\n const firstUncompletedStepIndex = popoverSteps.findIndex(step => !step.completed);\n const isLastStepOnUi = firstUncompletedStepIndex === popoverSteps.length - 1;\n\n if (!firstUncompletedStepIndex) return null;\n\n return (\n \n \n \n \n {t(\"Move on to the next step when you're ready.\")}\n \n \n \n );\n};\n\nButtonPopover.propTypes = {\n buttonRefs: shape().isRequired,\n popoverSteps: arrayOf(shape()).isRequired\n};\n\nexport default ButtonPopover;\n","import React from 'react';\nimport { arrayOf, shape } from 'prop-types';\n\nconst Preload = ({ popoverSteps }) => (popoverSteps.map(step => (\n \n {step.visuals && step.visuals.posterUrl && (\n \n )}\n\n {step.visuals && step.visuals.webmVideoUrl && (\n \n )}\n\n {step.visuals && step.visuals.mp4VideoUrl && (\n \n )}\n \n)));\n\nexport default Preload;\n\nPreload.propTypes = {\n popoverSteps: arrayOf(shape()).isRequired\n};\n","import React from 'react';\nimport { bool, string } from 'prop-types';\nimport { ScFooterButtonCurrentIndicator, ScFooterButtonLoader } from './sc/scFooter';\n\nconst ButtonProgressRenderer = ({ status, touchedAfterCompleted, isCurrentStep }) => {\n return (\n <>\n \n {touchedAfterCompleted && isCurrentStep && }\n \n );\n};\n\nButtonProgressRenderer.propTypes = {\n status: string,\n isCurrentStep: bool,\n touchedAfterCompleted: bool\n};\n\nButtonProgressRenderer.defaultProps = {\n status: '',\n isCurrentStep: false,\n touchedAfterCompleted: false\n};\n\nexport default ButtonProgressRenderer;\n","import React, { useState, useRef, useMemo } from 'react';\nimport {\n arrayOf, number, shape, func, bool, oneOfType, elementType, node\n} from 'prop-types';\nimport { t } from '@jotforminc/translation';\n\nimport {\n ScFooterOutline,\n ScStepsOutline,\n ScFooterButton,\n ScFooterClose,\n ScFooterDivider,\n ScFooterContinue\n} from './sc/scFooter';\nimport ContinuePopover from './ContinuePopover';\nimport ButtonPopover from './ButtonPopover';\nimport Preload from './Preload';\nimport PWButtonProgress from './ButtonProgressRenderer';\n\nconst Footer = ({\n steps,\n currentStep,\n shadowNextStep,\n withContinueButton,\n buttonPopoverVisible,\n switchCloseView,\n continuePopoverVisible,\n continueButtonVisible,\n touchedAfterCompleted,\n onEndTourClick,\n onStepClickDefault,\n onContinueClickDefault,\n OutlineRenderer,\n StepsOutlineRenderer,\n ButtonRenderer,\n ButtonProgressRenderer,\n DividerRenderer,\n CloseRenderer,\n ContinueRenderer\n}) => {\n const continuePopoverTargetRef = useRef(false);\n const buttonRefs = useRef([]);\n const [continuePopoverRenderedOnce, setContinuePopoverRenderedOnce] = useState(false);\n const popoverSteps = useMemo(() => steps.filter(step => step.type === 'popover'), [steps]);\n\n const handleContinueClick = (e, stepData) => {\n if (!shadowNextStep) return;\n\n const prevOfNextStep = steps[shadowNextStep - 1];\n setContinuePopoverRenderedOnce(true);\n\n let callback;\n let waitCbComplete;\n\n if (prevOfNextStep.type === 'popover') {\n callback = prevOfNextStep.onContinue && prevOfNextStep.onContinue.callback;\n waitCbComplete = prevOfNextStep.onContinue && prevOfNextStep.onContinue.waitCbComplete;\n }\n\n if (prevOfNextStep.type === 'modal') {\n callback = prevOfNextStep.onConfirm && prevOfNextStep.onConfirm.callback;\n waitCbComplete = prevOfNextStep.onConfirm && prevOfNextStep.onConfirm.waitCbComplete;\n }\n\n if (typeof callback === 'function') {\n callback(e);\n\n // wait a little bit for the callback actions to get completed before jump into the next step\n // otherwise popovers dont render to the correct position\n setTimeout(() => {\n onContinueClickDefault(stepData);\n }, waitCbComplete);\n } else {\n onContinueClickDefault(stepData);\n }\n };\n\n const handleStepClick = (e, stepData) => {\n const stepIndex = steps.indexOf(stepData);\n const prevStep = steps[stepIndex - 1];\n\n let callback;\n let waitCbComplete;\n\n if (prevStep.type === 'popover') {\n callback = prevStep.onContinue && prevStep.onContinue.callback;\n waitCbComplete = prevStep.onContinue && prevStep.onContinue.waitCbComplete;\n }\n\n if (prevStep.type === 'modal') {\n callback = prevStep.onConfirm && prevStep.onConfirm.callback;\n waitCbComplete = prevStep.onConfirm && prevStep.onConfirm.waitCbComplete;\n }\n\n if (typeof callback === 'function') {\n callback(e);\n\n // wait a little bit for the callback actions to get completed before jump into the next step\n // otherwise popovers dont render to the correct position\n setTimeout(() => {\n onStepClickDefault(stepData);\n }, waitCbComplete);\n } else {\n onContinueClickDefault(stepData);\n }\n };\n\n const handleEndTourClick = (e, stepData) => {\n onEndTourClick(e, stepData);\n };\n\n const getButtonStatus = (nthStep, completed) => {\n if (switchCloseView) return 'completed';\n if (nthStep === currentStep) return 'inProgress';\n if (completed) return 'completed';\n if (!completed) return 'notStarted';\n };\n\n const pushButtonRef = buttonRef => {\n if (buttonRefs.current.length === popoverSteps.length) return;\n buttonRefs.current.push({ current: buttonRef });\n };\n\n return (\n \n \n \n {/* steps */}\n {popoverSteps.map(step => (\n pushButtonRef(ref)}\n status={getButtonStatus(step.step, step.completed)}\n onClick={e => handleStepClick(e, step)}\n >\n {t(step.stepButtonText)}\n \n \n ))}\n \n \n {/* close button */}\n handleEndTourClick(e, steps[currentStep])}\n >\n {t(switchCloseView ? 'Finish Tour' : 'End tour')}\n \n {/* continue buton */}\n {withContinueButton && (\n handleContinueClick(e, steps[currentStep])}\n >\n {t('CONTINUE')}\n \n )}\n {/* continue popover */}\n {withContinueButton && !continuePopoverRenderedOnce && (\n \n )}\n {/* next step popover */}\n {!withContinueButton\n && buttonPopoverVisible\n && (\n \n )}\n \n );\n};\n\nFooter.propTypes = {\n steps: arrayOf(shape()).isRequired,\n currentStep: number.isRequired,\n shadowNextStep: number,\n switchCloseView: bool,\n withContinueButton: bool,\n continueButtonVisible: bool,\n buttonPopoverVisible: bool,\n continuePopoverVisible: bool,\n touchedAfterCompleted: bool,\n onContinueClickDefault: func,\n onEndTourClick: func.isRequired,\n onStepClickDefault: func.isRequired,\n OutlineRenderer: oneOfType([elementType, node]),\n StepsOutlineRenderer: oneOfType([elementType, node]),\n ButtonRenderer: oneOfType([elementType, node]),\n ButtonProgressRenderer: oneOfType([elementType, node]),\n DividerRenderer: oneOfType([elementType, node]),\n CloseRenderer: oneOfType([elementType, node]),\n ContinueRenderer: oneOfType([elementType, node])\n};\n\nFooter.defaultProps = {\n shadowNextStep: 0,\n switchCloseView: false,\n withContinueButton: true,\n continueButtonVisible: false,\n continuePopoverVisible: false,\n buttonPopoverVisible: false,\n touchedAfterCompleted: false,\n OutlineRenderer: ScFooterOutline,\n StepsOutlineRenderer: ScStepsOutline,\n ButtonRenderer: ScFooterButton,\n ButtonProgressRenderer: PWButtonProgress,\n DividerRenderer: ScFooterDivider,\n CloseRenderer: ScFooterClose,\n ContinueRenderer: ScFooterContinue,\n onContinueClickDefault: f => f\n};\n\nexport default Footer;\n","/* eslint-disable max-len */\nimport Styled from 'styled-components';\n\nexport const ScInitialModalOutline = Styled.div`\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n padding: 8px;\n z-index: 1002;\n\n &>div{\n display: flex;\n align-items: flex-end;\n justify-content: flex-end;\n padding-right: 32px;\n padding-bottom: 48px;\n\n ${({ overlayVisible }) => {\n if (overlayVisible === true) {\n return `\n background-color: rgba(10,21,81,.7)!important;\n `;\n }\n\n if (overlayVisible === false) {\n return `\n pointer-events: none;\n background-color: transparent!important;\n\n &>div{\n &>div{\n box-shadow: 8px 8px 32px rgba(41, 42, 61, 0.1), 0px 0px 16px rgba(41, 42, 61, 0.1);\n }\n }\n `;\n }\n }}\n\n\n &>div{\n max-height: 100vh;\n pointer-events: all;\n &>div{\n max-width: 400px;\n width: 100%!important;\n border-radius: 8px;\n position: relative;\n padding: 0!important;\n margin: 0 auto!important;\n background-color: #493cff!important;\n\n &:before{\n content: \"\";\n clear: both;\n display: table;\n }\n }\n }\n }\n`;\n\nexport const ScInitialCloseButton = Styled.button`\n background: #3F3FCA;\n border-radius: 50%;\n display: block;\n width: 48px;\n height: 48px;\n position: absolute;\n top: -8px;\n right: -8px;\n background-image: url(\"data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 12 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10.2929 0.292893C10.6834 -0.0976311 11.3166 -0.0976311 11.7071 0.292893C12.0976 0.683417 12.0976 1.31658 11.7071 1.70711L7.41421 6L11.7071 10.2929C12.0976 10.6834 12.0976 11.3166 11.7071 11.7071C11.3166 12.0976 10.6834 12.0976 10.2929 11.7071L6 7.41421L1.70711 11.7071C1.31658 12.0976 0.683418 12.0976 0.292894 11.7071C-0.0976312 11.3166 -0.0976312 10.6834 0.292894 10.2929L4.58579 6L0.292893 1.70711C-0.0976309 1.31658 -0.0976309 0.683417 0.292893 0.292893C0.683418 -0.0976311 1.31658 -0.0976311 1.70711 0.292893L6 4.58579L10.2929 0.292893Z' fill='%23ffffff'/%3E%3C/svg%3E%0A\");\n background-repeat: no-repeat;\n background-position: center;\n cursor: pointer;\n transition: background .2s;\n border: none;\n\n &:hover{\n background-color: #5252cf;\n }\n`;\n\nexport const ScInitialModalContent = Styled.div`\n padding: 32px 32px 8px 32px;\n\n &>p{\n font-size: 16px;\n line-height: 24px;\n font-weight: 400;\n color: #ffffff;\n }\n`;\n\nexport const ScInitialModalTitle = Styled.h2`\n margin: 0;\n font-weight: 700;\n font-size: 16px;\n line-height: 24px;\n color: #ffffff;\n`;\n\nexport const ScInitialFooterButton = Styled.button`\n background: #ffffff;\n color: #3F3FCA;\n border-radius: 4px;\n border:none;\n font-size: 16px;\n font-weight: 700;\n line-height: 24px;\n padding: 8px 16px;\n cursor: pointer;\n transition: background .2s;\n margin: 24px 32px 32px 32px;\n\n &:hover{\n background-color: #f5f5f5;\n }\n`;\n\nexport const ScInitialFooterPODO = Styled.div`\n display: block;\n width: 191px;\n height: 128px;\n background-image: url(\"data:image/svg+xml,%3Csvg width='191' height='129' viewBox='0 0 191 129' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M53.6792 74.9296C46.8017 71.5368 28.385 59.5206 35.1348 57.9713C37.7065 57.3799 40.2818 56.8932 42.7931 56.0638C43.7636 55.743 55.1783 53.5068 55.6441 52.3943' fill='%23ED9321'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M54.0854 72.6761C48.8067 70.1467 34.6773 61.1754 39.8705 59.9995C41.848 59.5509 43.8282 59.1808 45.7589 58.5534C46.5062 58.3117 55.2829 56.6114 55.6441 55.7747' fill='%23DC692D'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M134.514 24.7887C134.61 17.2016 132.275 -4.43854 127.856 0.812009C126.175 2.80987 124.583 4.85914 122.718 6.69734C121.996 7.40764 114.87 16.4553 113.672 16.3659' fill='%23ED9321'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M132.821 24.7887C132.942 18.9152 131.31 2.17699 127.921 6.27138C126.631 7.83008 125.41 9.42623 123.98 10.8608C123.429 11.4163 117.961 18.4654 117.052 18.4033' fill='%23DC692D'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M55.6431 50.8813C55.6431 50.8813 53.8376 56.4102 53.7979 57.6002C53.7544 58.7905 51.1229 59.9787 50.0349 60.5296C48.9467 61.0823 48.7166 61.8341 50.2777 62.0231C51.841 62.2127 52.5642 62.3168 50.2339 63.9223C47.9058 65.5283 47.4473 66.3201 47.4473 66.3201C47.4473 66.3201 44.8678 68.5622 48.874 67.1244C52.8795 65.6874 55.5483 64.7296 55.577 62.0045C55.6018 59.2822 56.7432 52.5728 56.7669 51.2681C56.7895 49.9643 56.7523 49.7336 55.6431 50.8813Z' fill='%23F3A41D'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M134.313 28.1765C134.313 28.1765 130.697 24.4452 129.762 23.9237C128.827 23.402 129.067 20.7826 129.116 19.6769C129.166 18.5708 128.668 18.0743 127.809 19.2614C126.949 20.4471 126.539 20.9904 126.305 18.4483C126.073 15.9034 125.645 15.2058 125.645 15.2058C125.645 15.2058 125.015 12.1996 124.354 16.0316C123.692 19.8624 123.253 22.4169 125.424 23.5563C127.596 24.6939 132.459 28.3731 133.495 28.9274C134.529 29.4795 134.731 29.5447 134.313 28.1765Z' fill='%23F3A41D'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M66.8292 33.3529C52.4977 47.5469 47.4928 67.0621 55.5354 81.8614L77.0205 116.816C77.7481 117.874 78.5829 118.938 79.5144 120H170.36C173.307 115.332 175.395 110.399 176.53 105.445C177.391 105.395 178.523 105.117 179.842 104.759L180.831 104.487C183.977 103.595 182.83 102.972 182.444 102.814L182.338 102.775C182.338 102.775 182.024 102.242 179.943 102.055L179.756 102.037C178.122 101.856 178.544 101.386 179.777 100.475L180.461 99.9744C181.927 98.8646 181.812 98.2798 180.84 98.3934C180.747 98.4044 180.641 98.4181 180.527 98.4331C179.394 98.5805 177.368 98.8443 177.549 97.7439L177.555 97.6831C177.56 97.5989 177.548 97.5026 177.525 97.3959C177.536 96.6889 177.889 95.4288 178.329 93.8567C179.48 89.746 181.228 83.5023 179.024 79.4366C176.336 74.4775 170.461 70.9785 165.95 68.2923C163.22 66.6667 160.99 65.3388 160.269 64.165L156.798 58.518C156.832 58.4698 155.381 56.161 153.932 53.8565C152.489 51.5601 151.048 49.2678 151.083 49.221L140.486 31.9808C131.92 18.0447 113.636 12.8088 95.1359 17.3956C92.9352 17.7716 88.9959 18.898 86.9468 19.504L85.627 19.9004C83.8288 18.1606 78.5505 14.6823 78.8264 16.9244C78.8501 17.1193 78.8754 17.3136 78.9007 17.5076C78.9866 18.166 79.0721 18.8212 79.0927 19.4865L79.0942 19.5137C79.1018 19.6196 79.1355 19.8829 79.18 20.2304C79.3236 21.3534 79.5798 23.3559 79.432 23.7674L79.217 23.8911C78.4741 23.6363 76.4996 22.2952 75.3459 21.5116C74.9153 21.2191 74.599 21.0043 74.5038 20.9526L74.172 20.7655C73.5135 20.3829 72.8886 19.9542 72.2622 19.5246C72.0544 19.3821 71.8464 19.2394 71.637 19.0983C69.1968 17.4603 70.0503 25.3881 71.0031 28.6772L71.0615 28.8726C71.0615 28.8726 69.6515 30.3187 67.9073 32.1884L66.8292 33.3529Z' fill='%23F5A51C'/%3E%3Cpath d='M148.602 58.0282C148.602 58.0282 202.123 68.169 175.644 120' stroke='url(%23paint0_linear)' stroke-width='16' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M8 93C8 93 36.5 116.486 71 100.486' stroke='url(%23paint1_linear)' stroke-width='16' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M129.572 111.657C129.925 112.23 130.912 112.267 131.774 111.742C132.64 111.215 133.054 110.324 132.701 109.751C132.349 109.18 131.362 109.14 130.497 109.667C129.635 110.192 129.22 111.086 129.572 111.657Z' fill='%23DB6A2A'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M138.911 35.2244C138.155 36.035 137.471 36.7648 136.855 37.3463C147.094 54.3955 138.963 78.1809 118.578 90.6196C98.0844 103.124 72.9697 99.4237 62.4815 82.3569C62.112 81.7562 61.7672 81.1455 61.4438 80.5289C61.0526 80.2089 60.7749 79.9081 60.7027 79.6636C60.3681 78.476 58.3126 79.9274 57.4483 80.4628C56.5835 80.9973 56.2337 80.457 57.2215 78.6742C58.207 76.8928 58.6586 76.0494 56.6968 76.7579C54.7346 77.469 54.2218 77.1183 54.2218 77.1183C54.2218 77.1183 51.9291 77.4248 54.9587 74.8386C56.3712 73.6339 57.5598 72.622 58.5056 72.1597C55.7183 57.9968 62.6141 41.9127 76.6157 31.5035C76.9162 30.7869 75.594 29.3671 75.0394 28.7031C74.3872 27.9212 74.8747 27.5027 76.7811 28.2376C78.689 28.9701 79.5884 29.304 78.6084 27.4597C77.6294 25.618 77.9055 25.0642 77.9055 25.0642C77.9055 25.0642 77.2769 22.8398 80.2696 25.4826C81.1777 26.2838 81.9875 27.0019 82.6097 27.6483C99.0276 18.5955 117.94 19.6095 129.847 29.285C131.154 29.8634 132.438 30.5478 132.656 31.0791C133.126 32.22 135.001 30.5462 135.801 29.9159C136.598 29.2882 137.005 29.785 136.229 31.6665C135.452 33.5516 135.099 34.4386 136.967 33.5112C138.835 32.5858 139.383 32.8751 139.383 32.8751C139.383 32.8751 141.624 32.3118 138.911 35.2244Z' fill='%23F7C847'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M108.762 47.6581C111.28 51.7708 116.653 53.063 120.768 50.5441C124.88 48.0257 126.172 42.652 123.653 38.5392C121.135 34.4265 115.761 33.1345 111.648 35.6526C107.535 38.1715 106.243 43.5457 108.762 47.6581Z' fill='white'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M122.776 38.8576C124.807 42.1749 123.762 46.5107 120.448 48.5401C117.133 50.5701 112.797 49.5298 110.765 46.2125C108.735 42.8962 109.779 38.5592 113.094 36.5294C116.408 34.5003 120.745 35.5415 122.776 38.8576Z' fill='%23211F1F'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M118.256 37.8567C118.817 37.5895 119.492 37.8242 119.76 38.3865C120.026 38.9468 119.79 39.6211 119.229 39.8896C118.668 40.1578 117.995 39.9202 117.727 39.3606C117.458 38.7978 117.695 38.1257 118.256 37.8567Z' fill='white'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M117.448 45.2358C118.289 44.8345 119.298 45.1881 119.705 46.0313C120.105 46.8723 119.751 47.8832 118.909 48.2848C118.067 48.6879 117.059 48.331 116.655 47.4902C116.252 46.6475 116.608 45.6382 117.448 45.2358Z' fill='white'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M111.728 40.2462C112.988 39.6456 114.503 40.1813 115.113 41.4447C115.717 42.7077 115.187 44.223 113.925 44.8241C112.665 45.425 111.15 44.8888 110.545 43.6262C109.935 42.3603 110.466 40.8487 111.728 40.2462Z' fill='white'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M69.8884 71.3199C72.4066 75.4329 77.7811 76.7247 81.894 74.2065C86.0047 71.6889 87.2988 66.3133 84.7808 62.2006C82.2619 58.0879 76.8855 56.7969 72.7743 59.3145C68.6619 61.8327 67.3701 67.2073 69.8884 71.3199Z' fill='white'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M83.3396 63.0827C85.3711 66.4 84.3248 70.7366 81.012 72.7655C77.6964 74.7956 73.3605 73.7551 71.3291 70.4377C69.2983 67.1216 70.3417 62.7848 73.6572 60.7546C76.9702 58.726 81.3089 59.7666 83.3396 63.0827Z' fill='%23211F1F'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M78.8186 61.5187C79.3802 61.2513 80.0534 61.4868 80.3229 62.0481C80.5901 62.6081 80.3533 63.2828 79.792 63.5515C79.2306 63.8198 78.5575 63.5825 78.2905 63.0223C78.0208 62.46 78.2581 61.788 78.8186 61.5187Z' fill='white'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M78.0134 68.3344C78.8537 67.933 79.8629 68.2866 80.2676 69.1307C80.6692 69.9708 80.3136 70.9822 79.4712 71.3839C78.6319 71.7858 77.6222 71.4299 77.2186 70.5891C76.8156 69.7467 77.1709 68.7381 78.0134 68.3344Z' fill='white'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M72.8551 64.4713C74.1137 63.8712 75.6288 64.4065 76.2389 65.6702C76.8442 66.9326 76.3139 68.4483 75.0513 69.0499C73.7916 69.6503 72.2793 69.1129 71.6704 67.8521C71.0629 66.585 71.5927 65.0741 72.8551 64.4713Z' fill='white'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M122.387 57.0174C123.437 58.6947 127.323 58.2373 131.067 55.9953C134.811 53.7533 136.994 50.5756 135.944 48.8983C134.893 47.2208 131.006 47.6781 127.262 49.9199C123.519 52.1619 121.336 55.3398 122.387 57.0174Z' fill='%23F3A41D'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M71.6824 87.4401C72.7322 89.1168 76.6177 88.6604 80.3622 86.4178C84.1047 84.1764 86.2898 80.9974 85.24 79.3207C84.1897 77.6432 80.3003 78.101 76.5578 80.3424C72.8135 82.5848 70.632 85.7626 71.6824 87.4401Z' fill='%23F3A41D'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M101.278 63.0986L102.968 64.7887L101.278 63.0986Z' fill='%23F7C847'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M101.307 63.0874C101.616 63.7059 101.924 64.3245 102.233 64.9432C102.278 65.0321 102.322 65.1211 102.367 65.21C102.441 65.3599 102.627 65.4003 102.784 65.2873C102.936 65.1782 103.014 64.9499 102.939 64.7999C102.63 64.1812 102.322 63.5626 102.012 62.9444C101.968 62.8551 101.924 62.766 101.879 62.6771C101.804 62.5272 101.619 62.4872 101.462 62.6C101.31 62.7091 101.232 62.9371 101.307 63.0874Z' fill='%23F2A41E'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M102.16 59.7992C102.162 59.9449 102.161 60.0907 102.163 60.2928C102.686 59.9127 102.933 59.4747 102.966 58.9614C102.996 58.4883 102.719 58.2322 102.297 58.118C101.6 57.9242 100.86 58.0541 100.143 58.4115C99.0667 58.9459 98.1906 59.7261 97.5965 60.7689C97.293 61.3012 97.2098 61.8118 97.58 62.237C97.9015 62.6074 98.4546 62.6409 99.0112 62.2919C98.8632 62.2244 98.7276 62.1658 98.5923 62.1048C98.6067 62.079 98.6221 62.0535 98.6359 62.0273C98.9262 62.1059 99.2189 62.1838 99.5114 62.2576C100.207 62.4305 100.854 62.2584 101.454 61.6656C101.822 61.3017 102.002 60.9042 102.006 60.4496C102.008 60.2357 102.043 60.0159 102.062 59.7986C102.095 59.7989 102.129 59.8011 102.16 59.7992Z' fill='%23211F1F'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M95.6447 70.7302L95.644 70.7337C97.7608 74.1389 102.933 74.8131 107.195 72.2396C111.457 69.6659 113.198 64.8157 111.082 61.4084L95.6447 70.7302Z' fill='%238B1B1D'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M110.855 68.4216C110 69.6413 108.82 70.757 107.352 71.628C105.752 72.5788 104.039 73.1049 102.405 73.2394C102.798 71.9551 103.794 70.3617 105.658 69.1055C107.488 67.8741 109.587 68.1026 110.855 68.4216Z' fill='%23CD6EA7'/%3E%3Cdefs%3E%3ClinearGradient id='paint0_linear' x1='183' y1='120' x2='183' y2='58.0282' gradientUnits='userSpaceOnUse'%3E%3Cstop stop-color='%23FBD13C'/%3E%3Cstop offset='1' stop-color='%23F5A51C'/%3E%3C/linearGradient%3E%3ClinearGradient id='paint1_linear' x1='9.20038' y1='114.408' x2='65.5' y2='100.986' gradientUnits='userSpaceOnUse'%3E%3Cstop stop-color='%23FBD13C'/%3E%3Cstop offset='1' stop-color='%23F5A51C'/%3E%3C/linearGradient%3E%3C/defs%3E%3C/svg%3E%0A\");\n background-repeat: no-repeat;\n position: absolute;\n right: 24px;\n bottom: -8px;\n`;\n\nexport const ScModalOutline = Styled.div`\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n padding: 8px;\n z-index: 1002;\n display: flex;\n justify-content: center;\n align-items: center;\n ${({ overlayVisible }) => overlayVisible && 'background-color: rgba(10,21,81,.7);'}\n`;\n\nexport const ScModal = Styled.div`\n width: 560px;\n border-radius: 8px;\n position: relative;\n padding: 0;\n overflow: hidden;\n background: #ffffff;\n ${({ overlayVisible }) => !overlayVisible && 'box-shadow: 8px 8px 32px rgba(41, 42, 61, 0.1), 0px 0px 16px rgba(41, 42, 61, 0.1);'}\n\n &:before{\n content: \"\";\n clear: both;\n display: table;\n }\n`;\n\nexport const ScCloseButton = Styled.button`\n background: #E6EBF2;\n border: 16px solid #FFFFFF;\n border-radius: 50%;\n display: block;\n width: 64px;\n height: 64px;\n position: absolute;\n top: 0;\n right: 0;\n background-image: url(\"data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 12 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10.2929 0.292893C10.6834 -0.0976311 11.3166 -0.0976311 11.7071 0.292893C12.0976 0.683417 12.0976 1.31658 11.7071 1.70711L7.41421 6L11.7071 10.2929C12.0976 10.6834 12.0976 11.3166 11.7071 11.7071C11.3166 12.0976 10.6834 12.0976 10.2929 11.7071L6 7.41421L1.70711 11.7071C1.31658 12.0976 0.683418 12.0976 0.292894 11.7071C-0.0976312 11.3166 -0.0976312 10.6834 0.292894 10.2929L4.58579 6L0.292893 1.70711C-0.0976309 1.31658 -0.0976309 0.683417 0.292893 0.292893C0.683418 -0.0976311 1.31658 -0.0976311 1.70711 0.292893L6 4.58579L10.2929 0.292893Z' fill='%238894AB'/%3E%3C/svg%3E%0A\");\n background-repeat: no-repeat;\n background-position: center;\n cursor: pointer;\n transition: background .2s;\n\n &:hover{\n background-color: #efefef;\n }\n`;\n\nexport const ScModalVisualArea = Styled.div`\n background: #ffffff;\n height: 235px;\n margin-bottom: -11px;\n background-repeat: no-repeat;\n background-image: url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='utf-8'%3F%3E%3C!-- Generator: Adobe Illustrator 24.2.0, 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' width='560px' height='234.9px' viewBox='0 0 560 234.9' style='enable-background:new 0 0 560 234.9;' xml:space='preserve'%3E%3Cstyle type='text/css'%3E .st0%7Bfill:%23D3D3FF;%7D .st1%7Bfill:%23CECEFF;filter:url(%23Adobe_OpacityMaskFilter);%7D .st2%7Bmask:url(%23mask0_1_);%7D .st3%7Bfill:%23BBBBF5;%7D .st4%7Bfill:%23A9A9EE;%7D .st5%7Bfill:%239898E6;%7D .st6%7Bfill:%234C3B91;%7D .st7%7Bfill-rule:evenodd;clip-rule:evenodd;%7D .st8%7Bfill-rule:evenodd;clip-rule:evenodd;fill:%23302B45;%7D .st9%7Bfill-rule:evenodd;clip-rule:evenodd;fill:url(%23SVGID_1_);%7D .st10%7Bfill:%23FFC738;%7D .st11%7Bfill:%23FF8C38;%7D .st12%7Bfill:%234C3B90;%7D .st13%7Bfill-rule:evenodd;clip-rule:evenodd;fill:%23B45217;%7D .st14%7Bfill-rule:evenodd;clip-rule:evenodd;fill:url(%23SVGID_2_);%7D .st15%7Bfill-rule:evenodd;clip-rule:evenodd;fill:%23FFD18D;%7D .st16%7Bfill-rule:evenodd;clip-rule:evenodd;fill:%234C3B90;%7D .st17%7Bfill:%2347526B;%7D .st18%7Bfill:%232B3245;%7D .st19%7Bfill:%23FFFFFF;%7D .st20%7Bfill:%2357647E;%7D .st21%7Bfill:%23E6EBF2;%7D .st22%7Bfill-rule:evenodd;clip-rule:evenodd;fill:%2357647E;%7D .st23%7Bfill:%23302B45;%7D .st24%7Bfill-rule:evenodd;clip-rule:evenodd;fill:%23ED9321;%7D .st25%7Bfill-rule:evenodd;clip-rule:evenodd;fill:%23DC692D;%7D .st26%7Bfill-rule:evenodd;clip-rule:evenodd;fill:%23F3A41D;%7D .st27%7Bfill-rule:evenodd;clip-rule:evenodd;fill:url(%23SVGID_3_);%7D .st28%7Bfill:none;stroke:url(%23SVGID_4_);stroke-width:21.3333;stroke-linecap:round;stroke-linejoin:round;%7D .st29%7Bfill:none;stroke:url(%23SVGID_5_);stroke-width:21.3333;stroke-linecap:round;stroke-linejoin:round;%7D .st30%7Bfill:none;stroke:%23663100;stroke-width:6;stroke-linecap:round;stroke-linejoin:round;%7D .st31%7Bfill:url(%23SVGID_6_);%7D .st32%7Bfill-rule:evenodd;clip-rule:evenodd;fill:%23DB6A2A;%7D .st33%7Bfill-rule:evenodd;clip-rule:evenodd;fill:url(%23SVGID_7_);%7D .st34%7Bfill-rule:evenodd;clip-rule:evenodd;fill:%23FFFFFF;%7D .st35%7Bfill-rule:evenodd;clip-rule:evenodd;fill:%23211F1F;%7D .st36%7Bfill-rule:evenodd;clip-rule:evenodd;fill:%23F7C847;%7D .st37%7Bfill-rule:evenodd;clip-rule:evenodd;fill:%23F2A41E;%7D .st38%7Bfill-rule:evenodd;clip-rule:evenodd;fill:%238B1B1D;%7D .st39%7Bfill-rule:evenodd;clip-rule:evenodd;fill:%23CD6EA7;%7D .st40%7Bfill:%23C71D38;%7D .st41%7Bfill:%23F23A3C;%7D .st42%7Bclip-path:url(%23SVGID_9_);%7D .st43%7Bfill:none;%7D%0A%3C/style%3E%3Cg%3E%3Crect class='st0' width='560' height='224'/%3E%3Cdefs%3E%3Cfilter id='Adobe_OpacityMaskFilter' filterUnits='userSpaceOnUse' x='-104' y='11' width='664' height='209'%3E%3CfeColorMatrix type='matrix' values='1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0'/%3E%3C/filter%3E%3C/defs%3E%3Cmask maskUnits='userSpaceOnUse' x='-104' y='11' width='664' height='209' id='mask0_1_'%3E%3Crect class='st1' width='560' height='224'/%3E%3C/mask%3E%3Cg class='st2'%3E%3Cpath class='st3' d='M6.9,46h1.6l3.7,5.3V35.4h15.4l3.2-3.2h9v20.2h2.1V41.2h1.6v10.1l4.8,4.8V37h10.1v12.2h7.4l8.5,2.1v4.2h12.2 l3.7,3.7v30.2h2.7V51.3h6.9v4.8h8l8.5,8.5l6.9-6.9v-3.2h17l12.7,12.7h10.1v18.6l6.9-6.9h16.4V64l5.8-11.7h4.2v-4.2h35v11.1h32.3 V49.2l17,17v25.5h4.8V61.4l2.1-2.1h13.8v21.2h3.7V35.4h33.9v13.8h6.4l4.2,4.2V63h7.4V35.4l3.2,3.2v19.1h3.7V33.3l2.1-4.2v16.4h3.7 v27h15.9V52.4h20.7V31.2l11.7-11.7l10.6,11.7v42.4h13.3v20.7l8-4.8h4.8V52.4h7.4V33.3h12.2v2.1h9.5l8.5,24.9v5.8h12.2V53.4 l3.7-3.2V11h11.7l9,2.7v27.6l4.8,4.2v14.8l5.8,3.7V45.5h5.8v-9h5.3v7.4l6.4,3.2v11.7l3.2,2.7v99.2H0V67.2l2.7-2.7h1.6v5.3h2.7V46z '/%3E%3Cpath class='st4' d='M453.4,71.5v-3.7l21.7-4.2h9v6.4h19.1v56.2l3.7-3.7V98.5h5.8v-3.7l14.3-2.1l6.9,2.7v4.2l11.1,2.7V125h3.2v5.8 l2.1,1.1v-11.1h2.1v5.3l2.1,3.2v5.8h2.6v-29.7l2.7-2.7v57.8H0V97.4h10.6l3.7-3.7h5.8l13.8-13.8H44l5.8,5.8v5.3H52v2.7h3.2v1.6 h11.1v-27L80.6,54l6.4,6.4v28.1h18.6V75.7h3.7l11.1,4.2v4.2h5.8V61.9l2.7-2.7h1.6V46.5l1.6-1.6v2.1l2.1,2.1V39.1l2.1-2.1v9 l2.7,2.7V38.6h1.6v10.1l3.2,3.2v6.9l3.2,3.2v26l6.4-6.4h15.4v6.9h3.7V78.3l2.7-2.7v-4.8h5.3v4.8h9.5v21.7l4.2-4.2V77.3l4.2-4.2V46 h6.9l4.2-4.2h12.2v48.8l2.1,2.1v13.8H237V90h4.2V70.9l4.8-4.8h9v-9.5l7.4,7.4v1.6h5.3l7.4,17.5v29.2h6.9V91.1l3.2-3.2V67.7 l1.6-1.6V32.7l2.7-2.7v18.6l4.8,4.8V89h7.4V73l5.8-5.8h8v11.7h2.1V67.2h9v15.9h2.1v-4.8h18V59.3h5.3v-4.8l5.3-5.3h13.8L377,55 v21.2l9.5-9.5h3.7v-7.4l3.2-3.2v-8h21.2v9.5h4.2l4.8,4.8l2.1-2.1V54l6.4-13.8v12.2l2.1,2.1v3.2h3.2v8.5v18.6h2.1v9.5l3.7,3.7 l1.1-1.1h2.1V143h3.2v-29.2h2.1v8.5l3.2-3.2V71.5H453.4z'/%3E%3Cpath class='st5' d='M8,139.9l8.5-8.5h5.3l7.4-3.7h13.3v-22.3h28.1v17h12.7v-3.2l2.1-2.1v-9.5l1.6-1.6V91.1h3.7v-6.4l2.7-2.7h3.2 l1.6-2.1h5.8l6.9,3.7v8.5h6.4v12.2l1.6,1.6v2.7h3.2v-6.9l8-2.7h8V86.3h10.6v15.4h11.1V86.3l12.2-2.7l13.3,1.1v28.6h1.6l6.4-10.6 h6.4l8.5-8.5h10.6V108h3.2v-8l4.8-2.7h11.1l6.9,6.9h5.3l5.3,5.3h8.5v-7.4l3.7-3.7V78.3l2.1-2.1v-17h1.1v18.6l3.2,2.7v7.4l3.2,2.7 v11.1l5.3,4.8v11.1l2.1,5.8l2.1-2.1V92.7h2.1v-4.8l2.1-2.1v-3.2h10.1l4.2,1.6l1.6,8h3.2v20.7h6.4v-10.6l2.1-2.1h2.1v8.5h3.7v-9 l8-4.8h8l3.2,3.2v10.6h4.8V98h9v9.5h4.8V133h2.1v-8.5h5.3V116l2.7-2.7v-9.5l2.7-2.7h4.8v2.7h4.2v-2.7h4.2l2.7,5.8v5.8h3.7v-10.1 l6.9-6.9l6.9,6.9v8.5h4.2V95.3h3.2l1.6-1.6h9.5v15.9l2.1,2.1V124l2.7,2.7v10.1h6.9v-5.3h8.5v2.7h5.3v2.7l2.7,2.7l5.8-5.8v-3.7 l1.6-1.6h2.7v19.6h7.4v-9.5l-1.6-1.6l2.1-2.1h4.2l2.1,2.1l-1.6,1.6v8H490v-27.6l2.1-2.1h9.5v28.1h4.8v-4.2h17.5l11.7,4.2V142h5.3 l10.6,11.1h8.5V208H0v-65.5h4.2v-4.2l1.6-4.2v-8.5H8V139.9z'/%3E%3Cpath class='st6' d='M223,108.5l2,5.5h-6v-6L223,108.5z'/%3E%3Cpath class='st6' d='M207,108.5l2,5.5h-6v-6L207,108.5z'/%3E%3Cpath class='st6' d='M183,108.5l2,5.5h-6v-6L183,108.5z'/%3E%3Cpath class='st6' d='M167,108.5l2,5.5h-6v-6L167,108.5z'/%3E%3Cpath class='st6' d='M151,108.5l2,5.5h-6v-6L151,108.5z'/%3E%3Cpath class='st6' d='M135,108.5l2,5.5h-6v-6L135,108.5z'/%3E%3Cpath class='st6' d='M111,108.5l2,5.5h-6v-6L111,108.5z'/%3E%3Cpath class='st6' d='M95,108.5l2,5.5h-6v-6L95,108.5z'/%3E%3Cpath class='st6' d='M79,108.5l2,5.5h-6v-6L79,108.5z'/%3E%3Cpath class='st6' d='M55,108.5l2,5.5h-6v-6L55,108.5z'/%3E%3Cpath class='st6' d='M39,108.5l2,5.5h-6v-6L39,108.5z'/%3E%3Cpath class='st6' d='M23,108.5l2,5.5h-6v-6L23,108.5z'/%3E%3Cpath class='st7' d='M-75,107c1.8,0,3.3,1.2,3.7,2.9l1.3,5.1h-2l-1.3-4.5c-0.2-0.9-1-1.5-1.9-1.5H-77c-0.6,0-1-0.4-1-1s0.4-1,1-1 H-75z M-59,107c1.8,0,3.3,1.2,3.7,2.9l1.3,5.1h-2l-1.3-4.5c-0.2-0.9-1-1.5-1.9-1.5H-61c-0.6,0-1-0.4-1-1s0.4-1,1-1H-59z M-35,107 c1.8,0,3.3,1.2,3.7,2.9l1.3,5.1h-2l-1.3-4.5c-0.2-0.9-1-1.5-1.9-1.5H-37c-0.6,0-1-0.4-1-1s0.4-1,1-1H-35z M-19,107 c1.8,0,3.3,1.2,3.7,2.9l1.3,5.1h-2l-1.3-4.5c-0.2-0.9-1-1.5-1.9-1.5H-21c-0.6,0-1-0.4-1-1s0.4-1,1-1H-19z M-3,107 c1.8,0,3.3,1.2,3.7,2.9L2,115H0l-1.3-4.5c-0.2-0.9-1-1.5-1.9-1.5H-5c-0.6,0-1-0.4-1-1s0.4-1,1-1H-3z M21,107 c1.8,0,3.3,1.2,3.7,2.9L26,115h-2l-1.3-4.5c-0.2-0.9-1-1.5-1.9-1.5H19c-0.6,0-1-0.4-1-1s0.4-1,1-1H21z M37,107 c1.8,0,3.3,1.2,3.7,2.9L42,115h-2l-1.3-4.5c-0.2-0.9-1-1.5-1.9-1.5H35c-0.6,0-1-0.4-1-1s0.4-1,1-1H37z M53,107 c1.8,0,3.3,1.2,3.7,2.9L58,115h-2l-1.3-4.5c-0.2-0.9-1-1.5-1.9-1.5H51c-0.6,0-1-0.4-1-1s0.4-1,1-1H53z M77,107 c1.8,0,3.3,1.2,3.7,2.9L82,115h-2l-1.3-4.5c-0.2-0.9-1-1.5-1.9-1.5H75c-0.6,0-1-0.4-1-1s0.4-1,1-1H77z M93,107 c1.8,0,3.3,1.2,3.7,2.9L98,115h-2l-1.3-4.5c-0.2-0.9-1-1.5-1.9-1.5H91c-0.6,0-1-0.4-1-1s0.4-1,1-1H93z M109,107 c1.8,0,3.3,1.2,3.7,2.9l1.3,5.1h-2l-1.3-4.5c-0.2-0.9-1-1.5-1.9-1.5H107c-0.6,0-1-0.4-1-1s0.4-1,1-1H109z M133,107 c1.8,0,3.3,1.2,3.7,2.9l1.3,5.1h-2l-1.3-4.5c-0.2-0.9-1-1.5-1.9-1.5H131c-0.6,0-1-0.4-1-1s0.4-1,1-1H133z M149,107 c1.8,0,3.3,1.2,3.7,2.9l1.3,5.1h-2l-1.3-4.5c-0.2-0.9-1-1.5-1.9-1.5H147c-0.6,0-1-0.4-1-1s0.4-1,1-1H149z M165,107 c1.8,0,3.3,1.2,3.7,2.9l1.3,5.1h-2l-1.3-4.5c-0.2-0.9-1-1.5-1.9-1.5H163c-0.6,0-1-0.4-1-1s0.4-1,1-1H165z M181,107 c1.8,0,3.3,1.2,3.7,2.9l1.3,5.1h-2l-1.3-4.5c-0.2-0.9-1-1.5-1.9-1.5H179c-0.6,0-1-0.4-1-1s0.4-1,1-1H181z M205,107 c1.8,0,3.3,1.2,3.7,2.9l1.3,5.1h-2l-1.3-4.5c-0.2-0.9-1-1.5-1.9-1.5H203c-0.6,0-1-0.4-1-1s0.4-1,1-1H205z M221,107 c1.8,0,3.3,1.2,3.7,2.9l1.3,5.1h-2l-1.3-4.5c-0.2-0.9-1-1.5-1.9-1.5H219c-0.6,0-1-0.4-1-1s0.4-1,1-1H221z'/%3E%3Cpath class='st8' d='M-95,98l331.3,0l0.7,1H-95V98z'/%3E%3ClinearGradient id='SVGID_1_' gradientUnits='userSpaceOnUse' x1='80' y1='817.2912' x2='80' y2='873.7912' gradientTransform='matrix(1 0 0 -1 0 1025.2911)'%3E%3Cstop offset='0' style='stop-color:%23DC692D'/%3E%3Cstop offset='1' style='stop-color:%23F5A51C'/%3E%3C/linearGradient%3E%3Cpath class='st9' d='M-94,97v15h338.8c12.1,22.3,19,47.8,19.2,74.9v15.4c0,1.1-0.4,2.1-1.2,2.8l-1.7,1.7c-0.8,0.8-1.8,1.2-2.8,1.2 H-92c-6.5,0-11.8-5.2-12-11.7l0-0.3v-95c0-3.2,2.6-5.9,5.8-6l0.2,0h2C-94.9,95-94,95.9-94,97z'/%3E%3Crect x='45' y='140' class='st10' width='20' height='68'/%3E%3Crect x='65' y='140' class='st10' width='20' height='68'/%3E%3Crect x='44' y='140' class='st11' width='2' height='68'/%3E%3Crect x='64' y='140' class='st11' width='2' height='68'/%3E%3Crect x='84' y='140' class='st11' width='2' height='68'/%3E%3Cpath class='st12' d='M52,142h6c2.2,0,4,1.8,4,4v48c0,2.2-1.8,4-4,4h-6c-2.2,0-4-1.8-4-4v-48C48,143.8,49.8,142,52,142z'/%3E%3Cpath class='st12' d='M72,142h6c2.2,0,4,1.8,4,4v48c0,2.2-1.8,4-4,4h-6c-2.2,0-4-1.8-4-4v-48C68,143.8,69.8,142,72,142z'/%3E%3Crect x='209' y='140' class='st10' width='20' height='68'/%3E%3Crect x='229' y='140' class='st10' width='20' height='68'/%3E%3Crect x='208' y='140' class='st11' width='2' height='68'/%3E%3Crect x='228' y='140' class='st11' width='2' height='68'/%3E%3Crect x='248' y='140' class='st11' width='2' height='68'/%3E%3Cpath class='st12' d='M216,142h6c2.2,0,4,1.8,4,4v48c0,2.2-1.8,4-4,4h-6c-2.2,0-4-1.8-4-4v-48C212,143.8,213.8,142,216,142z'/%3E%3Cpath class='st12' d='M236,142h6c2.2,0,4,1.8,4,4v48c0,2.2-1.8,4-4,4h-6c-2.2,0-4-1.8-4-4v-48C232,143.8,233.8,142,236,142z'/%3E%3Cpath class='st13' d='M-98.1,199.1c1.1,1.1,2.6,1.8,4.2,1.8l0.3,0h346.9c2.2,0,4.2,0.8,5.8,2.3l0.2,0.2l2.7,2.7l-0.7,0.7l-2.7-2.7 c-1.3-1.3-3.1-2.1-5-2.2l-0.3,0H-93.7c-1.9,0-3.8-0.8-5.2-2.1c-0.2-0.2-0.2-0.5,0-0.7C-98.7,199-98.3,199-98.1,199.1z'/%3E%3ClinearGradient id='SVGID_2_' gradientUnits='userSpaceOnUse' x1='80.335' y1='930.2912' x2='80.335' y2='885.2912' gradientTransform='matrix(1 0 0 -1 0 1025.2911)'%3E%3Cstop offset='0.3854' style='stop-color:%23F5A51C'/%3E%3Cstop offset='1' style='stop-color:%23DC692D'/%3E%3C/linearGradient%3E%3Cpath class='st14' d='M194,95c0.6,0,1,0.4,1,1v16h49.8c4.8,8.9,8.8,18.2,11.8,28H-88c-4.3,0-7.9-3.4-8-7.8l0-0.2V95 c1.1,0,1.9,0.8,2,1.9l0,0.1v12c0,1.6,1.2,2.9,2.8,3l0.2,0h44V96c0-0.6,0.4-1,1-1s1,0.4,1,1v16h56V96c0-0.6,0.4-1,1-1s1,0.4,1,1v16 h56V96c0-0.6,0.4-1,1-1s1,0.4,1,1v16h56V96c0-0.6,0.4-1,1-1s1,0.4,1,1v16h64V96C193,95.4,193.4,95,194,95z'/%3E%3Cpath class='st15' d='M-104,139h360.5l0.5,1h-361V139z'/%3E%3Cpath class='st16' d='M-100,112h344.5l0.5,1h-345V112z'/%3E%3Cpath class='st17' d='M12,183c11.6,0,21,9.4,21,21c0,1.4-0.1,2.7-0.4,4h-79.2c-0.2-1.3-0.4-2.6-0.4-4c0-11.6,9.4-21,21-21 c8.4,0,15.6,4.9,19,12C-3.6,187.9,3.6,183,12,183z'/%3E%3Cpath d='M12,184c11,0,20,9,20,20c0,1.4-0.1,2.7-0.4,4h-77.2c-0.3-1.3-0.4-2.6-0.4-4c0-11,9-20,20-20c8.9,0,16.4,5.8,19,13.7 C-4.4,189.8,3.1,184,12,184z'/%3E%3Cpath class='st17' d='M184,183c11.6,0,21,9.4,21,21c0,1.4-0.1,2.7-0.4,4h-41.2c-0.2-1.3-0.4-2.6-0.4-4 C163,192.4,172.4,183,184,183z'/%3E%3Cpath d='M184,184c11,0,20,9,20,20c0,1.4-0.1,2.7-0.4,4h-39.2c-0.3-1.3-0.4-2.6-0.4-4C164,193,173,184,184,184z'/%3E%3Cpath class='st18' d='M12,188c8.8,0,16,7.2,16,16s-7.2,16-16,16s-16-7.2-16-16S3.2,188,12,188z'/%3E%3Cpath class='st19' d='M12,194c5.5,0,10,4.5,10,10s-4.5,10-10,10s-10-4.5-10-10S6.5,194,12,194z'/%3E%3Cpath class='st20' d='M12,196c4.4,0,8,3.6,8,8s-3.6,8-8,8s-8-3.6-8-8S7.6,196,12,196z'/%3E%3Cpath class='st21' d='M12,198c3.3,0,6,2.7,6,6s-2.7,6-6,6s-6-2.7-6-6S8.7,198,12,198z'/%3E%3Cpath class='st18' d='M12,202c-1.1,0-2,0.9-2,2s0.9,2,2,2s2-0.9,2-2S13.1,202,12,202z'/%3E%3Cpath class='st22' d='M12,207.5c0.3,0,0.5,0.2,0.5,0.5s-0.2,0.5-0.5,0.5s-0.5-0.2-0.5-0.5S11.7,207.5,12,207.5z M10.2,207 c0.2,0.1,0.3,0.4,0.2,0.7c-0.1,0.2-0.4,0.3-0.7,0.2s-0.3-0.4-0.2-0.7C9.7,207,10,206.9,10.2,207z M14.4,207.2 c0.1,0.2,0.1,0.5-0.2,0.7s-0.5,0.1-0.7-0.2c-0.1-0.2-0.1-0.5,0.2-0.7S14.3,207,14.4,207.2z M9,205.8c0.1,0.2,0.1,0.5-0.2,0.7 c-0.2,0.1-0.5,0.1-0.7-0.2s-0.1-0.5,0.2-0.7C8.5,205.4,8.8,205.5,9,205.8z M15.7,205.6c0.2,0.1,0.3,0.4,0.2,0.7s-0.4,0.3-0.7,0.2 c-0.2-0.1-0.3-0.4-0.2-0.7S15.5,205.4,15.7,205.6z M8,203.5c0.3,0,0.5,0.2,0.5,0.5s-0.2,0.5-0.5,0.5s-0.5-0.2-0.5-0.5 S7.7,203.5,8,203.5z M16,203.5c0.3,0,0.5,0.2,0.5,0.5s-0.2,0.5-0.5,0.5s-0.5-0.2-0.5-0.5S15.7,203.5,16,203.5z M15.9,201.8 c0.1,0.2,0.1,0.5-0.2,0.7c-0.2,0.1-0.5,0.1-0.7-0.2s-0.1-0.5,0.2-0.7C15.5,201.4,15.8,201.5,15.9,201.8z M8.8,201.6 c0.2,0.1,0.3,0.4,0.2,0.7s-0.4,0.3-0.7,0.2C8,202.3,8,202,8.1,201.8S8.5,201.4,8.8,201.6z M14.2,200.1c0.2,0.1,0.3,0.4,0.2,0.7 c-0.1,0.2-0.4,0.3-0.7,0.2s-0.3-0.4-0.2-0.7C13.7,200,14,200,14.2,200.1z M10.4,200.3c0.1,0.2,0.1,0.5-0.2,0.7s-0.5,0.1-0.7-0.2 c-0.1-0.2-0.1-0.5,0.2-0.7S10.3,200,10.4,200.3z M12,199.5c0.3,0,0.5,0.2,0.5,0.5s-0.2,0.5-0.5,0.5s-0.5-0.2-0.5-0.5 S11.7,199.5,12,199.5z'/%3E%3Cpath class='st18' d='M184,188c8.8,0,16,7.2,16,16s-7.2,16-16,16s-16-7.2-16-16S175.2,188,184,188z'/%3E%3Cpath class='st19' d='M184,194c5.5,0,10,4.5,10,10s-4.5,10-10,10s-10-4.5-10-10S178.5,194,184,194z'/%3E%3Cpath class='st20' d='M184,196c4.4,0,8,3.6,8,8s-3.6,8-8,8s-8-3.6-8-8S179.6,196,184,196z'/%3E%3Cpath class='st21' d='M184,198c3.3,0,6,2.7,6,6s-2.7,6-6,6s-6-2.7-6-6S180.7,198,184,198z'/%3E%3Cpath class='st18' d='M184,202c-1.1,0-2,0.9-2,2s0.9,2,2,2s2-0.9,2-2S185.1,202,184,202z'/%3E%3Cpath class='st22' d='M184,207.5c0.3,0,0.5,0.2,0.5,0.5s-0.2,0.5-0.5,0.5s-0.5-0.2-0.5-0.5S183.7,207.5,184,207.5z M182.2,207 c0.2,0.1,0.3,0.4,0.2,0.7c-0.1,0.2-0.4,0.3-0.7,0.2s-0.3-0.4-0.2-0.7C181.7,207,182,206.9,182.2,207z M186.4,207.2 c0.1,0.2,0.1,0.5-0.2,0.7s-0.5,0.1-0.7-0.2c-0.1-0.2-0.1-0.5,0.2-0.7S186.3,207,186.4,207.2z M181,205.8c0.1,0.2,0.1,0.5-0.2,0.7 s-0.5,0.1-0.7-0.2s-0.1-0.5,0.2-0.7S180.8,205.5,181,205.8z M187.7,205.6c0.2,0.1,0.3,0.4,0.2,0.7s-0.4,0.3-0.7,0.2 s-0.3-0.4-0.2-0.7S187.5,205.4,187.7,205.6z M180,203.5c0.3,0,0.5,0.2,0.5,0.5s-0.2,0.5-0.5,0.5s-0.5-0.2-0.5-0.5 S179.7,203.5,180,203.5z M188,203.5c0.3,0,0.5,0.2,0.5,0.5s-0.2,0.5-0.5,0.5s-0.5-0.2-0.5-0.5S187.7,203.5,188,203.5z M187.9,201.8c0.1,0.2,0.1,0.5-0.2,0.7s-0.5,0.1-0.7-0.2s-0.1-0.5,0.2-0.7S187.8,201.5,187.9,201.8z M180.8,201.6 c0.2,0.1,0.3,0.4,0.2,0.7s-0.4,0.3-0.7,0.2s-0.3-0.4-0.2-0.7S180.5,201.4,180.8,201.6z M186.2,200.1c0.2,0.1,0.3,0.4,0.2,0.7 c-0.1,0.2-0.4,0.3-0.7,0.2s-0.3-0.4-0.2-0.7C185.7,200,186,200,186.2,200.1z M182.4,200.3c0.1,0.2,0.1,0.5-0.2,0.7 s-0.5,0.1-0.7-0.2c-0.1-0.2-0.1-0.5,0.2-0.7S182.3,200,182.4,200.3z M184,199.5c0.3,0,0.5,0.2,0.5,0.5s-0.2,0.5-0.5,0.5 s-0.5-0.2-0.5-0.5S183.7,199.5,184,199.5z'/%3E%3Cpath class='st16' d='M264,188c-4.4,0-8-3.6-8-8v-40h0.7C261.4,155.2,264,171.3,264,188z'/%3E%3Cellipse class='st19' cx='261' cy='196' rx='1' ry='2'/%3E%3Cellipse class='st19' cx='258.5' cy='195' rx='0.5' ry='1'/%3E%3Crect x='-14' y='140' class='st12' width='52' height='40'/%3E%3Crect x='92' y='140' class='st12' width='52' height='40'/%3E%3Cpath class='st12' d='M146,140h52v28c0,6.6-5.4,12-12,12h-40V140z'/%3E%3Cpath class='st23' d='M231.7,91.6c0.2-0.2,0.5-0.1,0.7,0.1c20.5,27.3,31.9,60.4,32.1,95.2l0,1.1v15c0,0.3-0.2,0.5-0.5,0.5 c-0.2,0-0.5-0.2-0.5-0.4l0-0.1v-15c0-35-11.3-68.3-31.9-95.7C231.4,92.1,231.5,91.8,231.7,91.6z'/%3E%3C/g%3E%3Cpath class='st24' d='M371.6,163.9c-9.2-4.5-33.7-20.5-24.7-22.6c3.4-0.8,6.9-1.4,10.2-2.5c1.3-0.4,16.5-3.4,17.1-4.9'/%3E%3Cpath class='st25' d='M372.1,160.9c-7-3.4-25.9-15.3-19-16.9c2.6-0.6,5.3-1.1,7.9-1.9c1-0.3,12.7-2.6,13.2-3.7'/%3E%3Cpath class='st24' d='M479.4,97.1c0.1-10.1-3-39-8.9-32c-2.2,2.7-4.4,5.4-6.9,7.8c-1,0.9-10.5,13-12.1,12.9'/%3E%3Cpath class='st25' d='M477.1,97.1c0.2-7.8-2-30.1-6.5-24.7c-1.7,2.1-3.3,4.2-5.3,6.1c-0.7,0.7-8,10.1-9.2,10.1'/%3E%3Cpath class='st26' d='M374.2,131.8c0,0-2.4,7.4-2.5,9c-0.1,1.6-3.6,3.2-5,3.9c-1.5,0.7-1.8,1.7,0.3,2c2.1,0.3,3,0.4-0.1,2.5 c-3.1,2.1-3.7,3.2-3.7,3.2s-3.4,3,1.9,1.1c5.3-1.9,8.9-3.2,8.9-6.8c0-3.6,1.6-12.6,1.6-14.3C375.7,130.6,375.7,130.3,374.2,131.8z' /%3E%3Cpath class='st26' d='M479.1,101.6c0,0-4.8-5-6.1-5.7c-1.2-0.7-0.9-4.2-0.9-5.7c0.1-1.5-0.6-2.1-1.7-0.6c-1.1,1.6-1.7,2.3-2-1.1 c-0.3-3.4-0.9-4.3-0.9-4.3s-0.8-4-1.7,1.1c-0.9,5.1-1.5,8.5,1.4,10c2.9,1.5,9.4,6.4,10.8,7.2C479.4,103.3,479.6,103.4,479.1,101.6z '/%3E%3ClinearGradient id='SVGID_3_' gradientUnits='userSpaceOnUse' x1='530.0138' y1='750.6879' x2='433.5138' y2='880.6879' gradientTransform='matrix(1 0 0 -1 0 1025.2911)'%3E%3Cstop offset='0' style='stop-color:%23DC692D'/%3E%3Cstop offset='1' style='stop-color:%23F5A51C'/%3E%3C/linearGradient%3E%3Cpath class='st27' d='M389.1,108.5c-19.1,18.9-25.8,44.9-15.1,64.7l28.6,46.6c1,1.4,2.1,2.8,3.3,4.2h121.1 c3.9-6.2,6.7-12.8,8.2-19.4c1.1-0.1,2.7-0.4,4.4-0.9l1.3-0.4c4.2-1.2,2.7-2,2.2-2.2l-0.1-0.1c0,0-0.4-0.7-3.2-1l-0.2,0 c-2.2-0.2-1.6-0.9,0-2.1l0.9-0.7c2-1.5,1.8-2.3,0.5-2.1c-0.1,0-0.3,0-0.4,0.1c-1.5,0.2-4.2,0.5-4-0.9l0-0.1c0-0.1,0-0.2,0-0.4 c0-0.9,0.5-2.6,1.1-4.7c1.5-5.5,3.9-13.8,0.9-19.2c-3.6-6.6-11.4-11.3-17.4-14.9c-3.6-2.2-6.6-3.9-7.6-5.5l-4.6-7.5 c0-0.1-1.9-3.1-3.8-6.2c-1.9-3.1-3.8-6.1-3.8-6.2l-14.1-23c-11.4-18.6-35.8-25.6-60.5-19.4c-2.9,0.5-8.2,2-10.9,2.8l-1.8,0.5 c-2.4-2.3-9.4-7-9.1-4c0,0.3,0.1,0.5,0.1,0.8c0.1,0.9,0.2,1.8,0.3,2.6l0,0c0,0.1,0.1,0.5,0.1,1c0.2,1.5,0.5,4.2,0.3,4.7l-0.3,0.2 c-1-0.3-3.6-2.1-5.2-3.2c-0.6-0.4-1-0.7-1.1-0.7l-0.4-0.2c-0.9-0.5-1.7-1.1-2.5-1.7c-0.3-0.2-0.6-0.4-0.8-0.6 c-3.3-2.2-2.1,8.4-0.8,12.8l0.1,0.3c0,0-1.9,1.9-4.2,4.4L389.1,108.5z'/%3E%3ClinearGradient id='SVGID_4_' gradientUnits='userSpaceOnUse' x1='550.0551' y1='804.647' x2='504.0551' y2='887.647' gradientTransform='matrix(1 0 0 -1 0 1025.2911)'%3E%3Cstop offset='0' style='stop-color:%23FBD13C'/%3E%3Cstop offset='1' style='stop-color:%23EF9721'/%3E%3C/linearGradient%3E%3Cpath class='st28' d='M498.1,141.4c0,0,71.4,13.5,36.1,82.6'/%3E%3ClinearGradient id='SVGID_5_' gradientUnits='userSpaceOnUse' x1='309.3182' y1='821.1145' x2='384.3842' y2='839.0115' gradientTransform='matrix(1 0 0 -1 0 1025.2911)'%3E%3Cstop offset='0' style='stop-color:%23FBD13C'/%3E%3Cstop offset='1' style='stop-color:%23F29D1F'/%3E%3C/linearGradient%3E%3Cpath class='st29' d='M310.7,188c0,0,38,31.3,84,10'/%3E%3Cpath class='st30' d='M313,180.5l30-102'/%3E%3ClinearGradient id='SVGID_6_' gradientUnits='userSpaceOnUse' x1='333.7762' y1='920.8838' x2='270.2762' y2='929.3838' gradientTransform='matrix(1 0 0 -1 0 1025.2911)'%3E%3Cstop offset='0' style='stop-color:%23C71D38'/%3E%3Cstop offset='1' style='stop-color:%23FF6038'/%3E%3C/linearGradient%3E%3Cpath class='st31' d='M328,127.5L341,85c0,0-21.5-17-70.5,5C320,98.5,328,127.5,328,127.5z'/%3E%3Cpath class='st32' d='M472.8,212.9c0.5,0.8,1.8,0.8,2.9,0.1c1.2-0.7,1.7-1.9,1.2-2.7c-0.5-0.8-1.8-0.8-2.9-0.1 C472.8,210.9,472.3,212.1,472.8,212.9z'/%3E%3ClinearGradient id='SVGID_7_' gradientUnits='userSpaceOnUse' x1='457.1335' y1='841.2712' x2='404.6335' y2='928.7712' gradientTransform='matrix(1 0 0 -1 0 1025.2911)'%3E%3Cstop offset='0' style='stop-color:%23FFD959'/%3E%3Cstop offset='1' style='stop-color:%23F7C847'/%3E%3C/linearGradient%3E%3Cpath class='st33' d='M485.2,111c-1,1.1-1.9,2.1-2.7,2.8c13.7,22.7,2.8,54.4-24.4,71c-27.3,16.7-60.8,11.7-74.8-11 c-0.5-0.8-1-1.6-1.4-2.4c-0.5-0.4-0.9-0.8-1-1.2c-0.4-1.6-3.2,0.4-4.3,1.1c-1.2,0.7-1.6,0-0.3-2.4c1.3-2.4,1.9-3.5-0.7-2.6 c-2.6,0.9-3.3,0.5-3.3,0.5s-3.1,0.4,1-3c1.9-1.6,3.5-3,4.7-3.6c-3.7-18.9,5.5-40.3,24.1-54.2c0.4-1-1.4-2.8-2.1-3.7 c-0.9-1-0.2-1.6,2.3-0.6c2.5,1,3.7,1.4,2.4-1c-1.3-2.5-0.9-3.2-0.9-3.2s-0.8-3,3.2,0.6c1.2,1.1,2.3,2,3.1,2.9 c21.9-12.1,47.1-10.7,63,2.2c1.7,0.8,3.5,1.7,3.7,2.4c0.6,1.5,3.1-0.7,4.2-1.6c1.1-0.8,1.6-0.2,0.6,2.3c-1,2.5-1.5,3.7,1,2.5 c2.5-1.2,3.2-0.8,3.2-0.8S488.8,107.1,485.2,111z'/%3E%3Cpath class='st34' d='M445,127.5c3.4,5.5,10.5,7.2,16,3.8c5.5-3.4,7.2-10.5,3.8-16c-3.4-5.5-10.5-7.2-16-3.8 C443.4,114.9,441.7,122.1,445,127.5z'/%3E%3Cpath class='st35' d='M463.7,115.8c2.7,4.4,1.3,10.2-3.1,12.9c-4.4,2.7-10.2,1.3-12.9-3.1c-2.7-4.4-1.3-10.2,3.1-12.9 C455.2,110,461,111.4,463.7,115.8z'/%3E%3Cpath class='st34' d='M457.7,114.5c0.7-0.4,1.6,0,2,0.7c0.4,0.7,0,1.6-0.7,2c-0.7,0.4-1.6,0-2-0.7 C456.6,115.7,456.9,114.8,457.7,114.5z'/%3E%3Cpath class='st34' d='M456.6,124.3c1.1-0.5,2.5-0.1,3,1.1c0.5,1.1,0.1,2.5-1.1,3c-1.1,0.5-2.5,0.1-3-1.1 C455,126.2,455.5,124.9,456.6,124.3z'/%3E%3Cpath class='st34' d='M449,117.7c1.7-0.8,3.7-0.1,4.5,1.6c0.8,1.7,0.1,3.7-1.6,4.5c-1.7,0.8-3.7,0.1-4.5-1.6 C446.6,120.5,447.3,118.5,449,117.7z'/%3E%3Cpath class='st34' d='M393.2,159.1c3.4,5.5,10.5,7.2,16,3.8c5.5-3.4,7.2-10.5,3.8-16c-3.4-5.5-10.5-7.2-16-3.8 C391.5,146.4,389.8,153.6,393.2,159.1z'/%3E%3Cpath class='st35' d='M411.1,148.1c2.7,4.4,1.3,10.2-3.1,12.9c-4.4,2.7-10.2,1.3-12.9-3.1c-2.7-4.4-1.3-10.2,3.1-12.9 C402.6,142.3,408.4,143.7,411.1,148.1z'/%3E%3Cpath class='st34' d='M405.1,146c0.7-0.4,1.6,0,2,0.7c0.4,0.7,0,1.6-0.7,2c-0.7,0.4-1.6,0-2-0.7C404,147.3,404.3,146.4,405.1,146z' /%3E%3Cpath class='st34' d='M404,155.1c1.1-0.5,2.5-0.1,3,1.1c0.5,1.1,0.1,2.5-1.1,3c-1.1,0.5-2.5,0.1-3-1.1 C402.4,157,402.9,155.7,404,155.1z'/%3E%3Cpath class='st34' d='M397.1,150c1.7-0.8,3.7-0.1,4.5,1.6c0.8,1.7,0.1,3.7-1.6,4.5c-1.7,0.8-3.7,0.1-4.5-1.6 C394.8,152.8,395.5,150.8,397.1,150z'/%3E%3Cpath class='st26' d='M463.2,140c1.4,2.2,6.6,1.6,11.6-1.4c5-3,7.9-7.2,6.5-9.5c-1.4-2.2-6.6-1.6-11.6,1.4 C464.7,133.5,461.8,137.8,463.2,140z'/%3E%3Cpath class='st26' d='M395.6,180.6c1.4,2.2,6.6,1.6,11.6-1.4c5-3,7.9-7.2,6.5-9.5c-1.4-2.2-6.6-1.6-11.6,1.4 C397.1,174.1,394.2,178.4,395.6,180.6z'/%3E%3Cpath class='st36' d='M435,148.1l2.3,2.3L435,148.1z'/%3E%3Cpath class='st37' d='M435.1,148.1c0.4,0.8,0.8,1.6,1.2,2.5c0.1,0.1,0.1,0.2,0.2,0.4c0.1,0.2,0.3,0.3,0.6,0.1 c0.2-0.1,0.3-0.4,0.2-0.6c-0.4-0.8-0.8-1.6-1.2-2.5c-0.1-0.1-0.1-0.2-0.2-0.4c-0.1-0.2-0.3-0.3-0.6-0.1 C435.1,147.6,435,147.9,435.1,148.1z'/%3E%3Cpath class='st35' d='M436.2,143.7c0,0.2,0,0.4,0,0.7c0.7-0.5,1-1.1,1.1-1.8c0-0.6-0.3-1-0.9-1.1c-0.9-0.3-1.9-0.1-2.9,0.4 c-1.4,0.7-2.6,1.8-3.4,3.1c-0.4,0.7-0.5,1.4,0,2c0.4,0.5,1.2,0.5,1.9,0.1c-0.2-0.1-0.4-0.2-0.6-0.2c0,0,0-0.1,0.1-0.1 c0.4,0.1,0.8,0.2,1.2,0.3c0.9,0.2,1.8,0,2.6-0.8c0.5-0.5,0.7-1,0.7-1.6c0-0.3,0-0.6,0.1-0.9C436.1,143.7,436.2,143.7,436.2,143.7z' /%3E%3Cpath class='st38' d='M427.5,158.3L427.5,158.3c2.8,4.5,9.7,5.4,15.4,2c5.7-3.4,8-9.9,5.2-14.4L427.5,158.3z'/%3E%3Cpath class='st39' d='M447.8,155.2c-1.1,1.6-2.7,3.1-4.7,4.3c-2.1,1.3-4.4,2-6.6,2.1c0.5-1.7,1.9-3.8,4.3-5.5 C443.3,154.5,446.1,154.8,447.8,155.2z'/%3E%3Cpath class='st40' d='M421,119c-18.7,10.6-30,24.5-36.6,34.5c-2.9,4.4-8.8,3.3-9.7-1.9l-3.2-19.1l-2-9.5L398,84l47.5-5l7,6 L469,95.3c5,3.1,3,10.3-2.9,10.8C453.3,107.2,436.3,110.4,421,119z'/%3E%3Cpath class='st41' d='M388.5,70.5c-35.5,21.3-25,59.2-15.5,71c0-12.5,18-33,34.5-42.5c16-9.2,40-13.5,51.5-10 C449.3,73.8,418.5,52.5,388.5,70.5z'/%3E%3Cg%3E%3Cdefs%3E%3Crect id='SVGID_8_' x='384.5' y='63.7' transform='matrix(4.459704e-02 -0.999 0.999 4.459704e-02 292.182 494.2069)' width='40' height='61.2'/%3E%3C/defs%3E%3CclipPath id='SVGID_9_'%3E%3Cuse xlink:href='%23SVGID_8_' style='overflow:visible;'/%3E%3C/clipPath%3E%3Cg class='st42'%3E%3Cpath class='st19' d='M376.6,108.9l5.8,2.9l-0.9,1.6l-5.8-2.9l-1.2,2.2l-1.6-0.8l3.2-5.9l1.6,0.8L376.6,108.9z'/%3E%3Cpath class='st19' d='M380.3,107.1c-0.5-0.4-1-0.8-1.3-1.3c-0.3-0.5-0.5-1-0.6-1.5c-0.1-0.5-0.1-1,0.1-1.6c0.1-0.5,0.4-1,0.7-1.5 c0.3-0.5,0.7-0.8,1.2-1.1c0.5-0.3,1-0.5,1.5-0.6c0.5-0.1,1.1-0.1,1.7,0c0.6,0.1,1.1,0.4,1.7,0.7c0.5,0.4,1,0.8,1.3,1.2 c0.3,0.5,0.5,1,0.6,1.5c0.1,0.5,0.1,1-0.1,1.5c-0.1,0.5-0.4,1-0.7,1.5c-0.3,0.5-0.7,0.8-1.2,1.1c-0.5,0.3-1,0.5-1.5,0.6 c-0.5,0.1-1.1,0.1-1.7,0C381.4,107.7,380.8,107.5,380.3,107.1z M381.4,105.6c0.4,0.2,0.7,0.4,1,0.5c0.3,0.1,0.7,0.1,1,0 c0.3-0.1,0.6-0.2,0.8-0.4c0.2-0.2,0.4-0.4,0.6-0.6c0.2-0.2,0.3-0.5,0.4-0.8c0.1-0.3,0.1-0.6,0.1-0.8c0-0.3-0.1-0.6-0.3-0.9 c-0.2-0.3-0.4-0.5-0.8-0.8c-0.4-0.2-0.7-0.4-1-0.5c-0.3-0.1-0.7-0.1-1,0c-0.3,0.1-0.6,0.2-0.8,0.3c-0.2,0.2-0.4,0.4-0.6,0.6 c-0.2,0.2-0.3,0.5-0.4,0.8c-0.1,0.3-0.1,0.6-0.1,0.9c0,0.3,0.1,0.6,0.3,0.9C380.7,105.1,381,105.4,381.4,105.6z'/%3E%3Cpath class='st19' d='M391.7,99.9c-0.3,0.3-0.7,0.6-1,0.7c-0.4,0.2-0.8,0.3-1.2,0.3c-0.4,0-0.8,0-1.2-0.2 c-0.4-0.1-0.8-0.4-1.2-0.7l-3.8-3.5l1.3-1.3l3.7,3.4c0.4,0.3,0.7,0.5,1.1,0.5c0.4,0,0.7-0.2,1-0.5c0.3-0.3,0.5-0.6,0.5-1 c0-0.3-0.2-0.7-0.5-1l-3.7-3.4l1.3-1.3l3.8,3.5c0.4,0.3,0.6,0.7,0.8,1.1c0.2,0.4,0.2,0.8,0.2,1.1c0,0.4-0.1,0.8-0.3,1.1 C392.3,99.2,392,99.5,391.7,99.9z'/%3E%3Cpath class='st19' d='M395,92.8l-0.5,0.4l1.9,2.3l-1.5,1.1l-5.1-6.3l2.6-1.9c0.3-0.2,0.6-0.4,1-0.5c0.3-0.1,0.7-0.1,1-0.1 c0.3,0,0.6,0.1,0.9,0.3c0.3,0.2,0.6,0.4,0.8,0.7c0.3,0.4,0.5,0.9,0.5,1.4c0,0.5-0.1,0.9-0.4,1.4l3.4,1.6l-1.6,1.2L395,92.8z M394.4,91.3c0.3-0.2,0.5-0.5,0.5-0.7c0-0.3,0-0.5-0.2-0.7c-0.2-0.2-0.4-0.4-0.7-0.4c-0.3,0-0.6,0.1-0.9,0.3l-0.9,0.6l1.2,1.5 L394.4,91.3z'/%3E%3Cpath class='st19' d='M408.4,88.5l-0.5-0.7c0,0.3-0.2,0.6-0.5,1c-0.3,0.3-0.7,0.6-1.2,0.9c-0.5,0.2-1,0.4-1.6,0.4 c-0.6,0-1.1,0-1.6-0.2c-0.5-0.2-1-0.4-1.4-0.8c-0.4-0.4-0.8-0.8-1.1-1.4c-0.3-0.6-0.4-1.1-0.5-1.7c0-0.6,0-1.1,0.2-1.6 c0.2-0.5,0.5-0.9,0.8-1.3c0.4-0.4,0.8-0.7,1.4-1c0.5-0.2,1-0.4,1.5-0.4c0.5,0,0.9,0,1.3,0.1c0.4,0.1,0.7,0.2,1,0.4 c0.3,0.2,0.6,0.4,0.8,0.6l-1.3,1.3c-0.1-0.1-0.2-0.2-0.4-0.3c-0.2-0.1-0.3-0.2-0.5-0.3c-0.2-0.1-0.5-0.1-0.7-0.1 c-0.3,0-0.6,0.1-0.9,0.2c-0.3,0.1-0.5,0.3-0.7,0.5c-0.2,0.2-0.4,0.4-0.5,0.7c-0.1,0.3-0.2,0.6-0.2,0.9c0,0.3,0.1,0.7,0.3,1.1 c0.2,0.4,0.4,0.7,0.7,0.9c0.3,0.2,0.5,0.4,0.8,0.5c0.3,0.1,0.6,0.1,0.9,0.1c0.3,0,0.6-0.1,0.9-0.3c0.3-0.1,0.6-0.3,0.7-0.5 c0.2-0.2,0.3-0.4,0.4-0.6c0.1-0.2,0.1-0.4,0.1-0.5c0-0.2,0-0.3,0-0.4l-2.2,1l-0.7-1.4l3.8-1.8l2,3.8L408.4,88.5z'/%3E%3Cpath class='st19' d='M414.1,86.7c-0.4,0.1-0.9,0.2-1.3,0.2c-0.4,0-0.8-0.1-1.2-0.3c-0.4-0.2-0.7-0.4-1-0.7s-0.5-0.7-0.7-1.2 l-1.6-4.8l1.8-0.5l1.6,4.7c0.2,0.5,0.4,0.8,0.7,0.9c0.3,0.2,0.7,0.2,1.1,0c0.4-0.1,0.7-0.3,0.9-0.6c0.2-0.3,0.2-0.7,0-1.1 l-1.6-4.7l1.8-0.5l1.6,4.8c0.2,0.5,0.2,0.9,0.2,1.3c0,0.4-0.2,0.8-0.4,1.1c-0.2,0.3-0.5,0.6-0.8,0.9 C414.9,86.4,414.5,86.6,414.1,86.7z'/%3E%3Cpath class='st19' d='M418.7,85.3l-1.8-7.8l1.8-0.4l1.8,7.8L418.7,85.3z'/%3E%3Cpath class='st19' d='M422.1,84.6l-1.1-7.9l3-0.4c0.6-0.1,1.2,0,1.7,0.1c0.5,0.1,1,0.3,1.4,0.6c0.4,0.3,0.7,0.7,1,1.1 c0.3,0.5,0.4,1,0.5,1.6c0.1,0.6,0.1,1.2-0.1,1.7c-0.1,0.5-0.4,1-0.7,1.3c-0.3,0.4-0.7,0.7-1.2,0.9c-0.5,0.2-1,0.4-1.7,0.5 L422.1,84.6z M424.8,82.6c0.3,0,0.6-0.1,0.9-0.2c0.3-0.1,0.5-0.3,0.7-0.5c0.2-0.2,0.3-0.5,0.4-0.8c0.1-0.3,0.1-0.6,0-1 c-0.1-0.4-0.2-0.7-0.3-1c-0.2-0.3-0.4-0.5-0.6-0.7c-0.2-0.2-0.5-0.3-0.8-0.3c-0.3-0.1-0.6-0.1-0.9,0l-1.1,0.1l0.6,4.6L424.8,82.6 z'/%3E%3Cpath class='st19' d='M430.3,83.7l-0.2-7.9l5.2-0.1l0,1.7l-3.4,0l0,1.5l3.1-0.1l0,1.6l-3.1,0.1l0,1.5l3.4-0.1l0,1.7L430.3,83.7z' /%3E%3C/g%3E%3C/g%3E%3Cellipse transform='matrix(0.799 -0.6014 0.6014 0.799 35.1334 247.0112)' class='st40' cx='387' cy='71' rx='4.5' ry='4'/%3E%3Cpath class='st43' d='M759,547.1h16v-16h-16V547.1z'/%3E%3C/g%3E%3C/svg%3E%0A\");\n`;\n\nexport const ScModalContent = Styled.div`\n padding: 32px;\n\n &>p{\n font-size: 16px;\n line-height: 24px;\n font-weight: 400;\n margin-block-start: 0;\n margin-block-end: 0;\n &>p{\n margin-block-start: .75rem;\n margin-block-end: 0;\n }\n }\n\n a{\n color: #2E69FF;\n text-decoration: underline;\n transition: color .2s;\n\n &:hover{\n color: #134fe8;\n }\n }\n`;\n\nexport const ScModalTitle = Styled.h2`\n margin: 0;\n font-weight: 700;\n font-size: 16px;\n line-height: 24px;\n color: #2B3245;\n`;\n\nexport const ScModalFooter = Styled.div`\n background: #F8FBFF;\n border-top: 1px solid #E6EBF2;\n padding: 24px 32px;\n display: flex;\n border-bottom-right-radius: 8px;\n border-bottom-left-radius: 8px;\n\n &>button{\n &+button{\n margin-left: auto;\n }\n }\n`;\n\nexport const ScFooterCancelButton = Styled.button`\n background: transparent;\n color: #57647E;\n border: 1px solid #b5bed1;\n border-radius: 4px;\n font-size: 16px;\n line-height: 24px;\n padding: 8px 16px;\n cursor: pointer;\n transition: all .2s;\n\n &:hover{\n background-color: #E6EBF2;\n border-color: #E6EBF2;\n }\n`;\n\nexport const ScFooterButton = Styled.button`\n background: #5C5CFF;\n color: #ffffff;\n border-radius: 4px;\n border:none;\n font-size: 16px;\n line-height: 24px;\n padding: 8px 16px;\n cursor: pointer;\n transition: background .2s;\n\n &:hover{\n background-color: #3F3FCA;\n }\n`;\n","import React, { forwardRef } from 'react';\nimport {\n shape, func, elementType, oneOfType, node\n} from 'prop-types';\nimport { Modal as UIKitModal } from '@jotforminc/uikit';\nimport { t } from '@jotforminc/translation';\n\nimport {\n ScModal,\n ScModalOutline,\n ScModalVisualArea,\n ScModalContent,\n ScModalTitle,\n ScModalFooter,\n ScFooterCancelButton,\n ScFooterButton\n} from './sc/scModal';\n\nconst StandardModal = forwardRef(({\n data,\n ContentRenderer,\n DialogRenderer,\n TitleRenderer,\n onConfirmClick,\n onDismissClick\n}, modalRef) => {\n return (\n \n {/* visual area */}\n \n {/* content */}\n \n {t(data.title)}\n

    \n \n {/* footer */}\n \n {/* cancel button */}\n {t(data.onDismiss.text)}\n {/* confirm button */}\n {t(data.onConfirm.text)}\n \n \n );\n});\n\nStandardModal.propTypes = {\n data: shape().isRequired,\n onConfirmClick: func.isRequired,\n onDismissClick: func.isRequired,\n DialogRenderer: oneOfType([elementType, node]),\n ContentRenderer: oneOfType([elementType, node]),\n TitleRenderer: oneOfType([elementType, node])\n};\n\n/* eslint-disable react/prop-types */\nStandardModal.defaultProps = {\n DialogRenderer: ScModalOutline,\n ContentRenderer: ScModal,\n TitleRenderer: ScModalTitle\n};\n\nexport default StandardModal;\n","import { RequestLayer, Interceptors } from '@jotforminc/request-layer';\nimport { StorageHelper } from '@jotforminc/storage-helper';\nimport { defaultStep } from '../constants';\n\nexport const replaceUsername = (text, { name, username, accountType } = {}) => {\n if (!name && !username) return text;\n if (accountType === 'GUEST') {\n return text.replace(', #{username}', ' ');\n }\n if (typeof text === 'string') {\n return text.replace('#{username}', (name && name.split(' ')[0]) || username);\n }\n};\n\nexport const replaceLinks = (text, helpLink, videoTutorialLink) => {\n if (!helpLink || !videoTutorialLink) return text;\n if (typeof text === 'string') {\n return text.replace('#{helpLink}', helpLink).replace('#{videoTutorialLink}', videoTutorialLink);\n }\n};\n\nexport const setWalkthroughOffered = (value, error) => {\n const layer = new RequestLayer('/API', {\n interceptorConfig: {\n teamID: global.teamID,\n customResponseInterceptors: [Interceptors.requestManagerResponseNormalizer]\n }\n });\n\n layer.post(`user/settings?walkthroughOffered=${value}`).catch(err => {\n if (typeof error === 'function') {\n error(err);\n }\n });\n};\n\nexport const getIsWalkthroughOfferedFromLocalStorage = () => {\n return StorageHelper.getLocalStorageItem({ key: 'signWalkthroughOffered' }) === '1';\n};\n\nexport const setIsWalkthroughOfferedToLocalStorage = () => {\n StorageHelper.setLocalStorageItem({ key: 'signWalkthroughOffered', value: '1' });\n};\n\nexport const isScreenSizeAppropriate = () => window.innerWidth >= 800 && window.innerHeight >= 440;\n\nconst isGuest = user => user?.accountType === 'GUEST' || user?.accountType?.name === 'GUEST' || user?.account_type === 'GUEST' || user?.account_type.name === 'GUEST';\n\nexport const renderFirstName = user => (!isGuest(user) && user?.name) || '';\n\nexport const populateStepsWithDefaults = steps => steps.map(step => ({\n ...defaultStep,\n ...step,\n onConfirm: { ...defaultStep.onConfirm },\n onDismiss: { ...defaultStep.onDismiss },\n ...(step.onConfirm && { onConfirm: { ...defaultStep.onConfirm, ...step.onConfirm } }),\n ...(step.onDismiss && { onDismiss: { ...defaultStep.onDismiss, ...step.onDismiss } }),\n pulse: { ...defaultStep.pulse, ...step.pulse }\n}));\n\nexport const isPageHasAnyQuestion = () => !!document.querySelector('[data-qid]');\n","import React from 'react';\n\nexport const SignWalkthroughContext = React.createContext([]);\nexport const FormBuilderWalkthroughContext = React.createContext({ isWalkthroughEnabled: false, isWalkthroughControlVariant: false });\nexport const WalkthroughJotFormActionContext = React.createContext(f => f);\nexport const SignProductActionContext = React.createContext({ registerJotformAction: f => f });\n","import React, { useEffect, useRef, useContext } from 'react';\nimport { shape, func, bool } from 'prop-types';\nimport { t } from '@jotforminc/translation';\nimport Tracking from '@jotforminc/tracking';\n\nimport StandardModal from './StandardModal';\nimport { ScModalTitle, ScModalOutline } from './sc/scModal';\nimport { replaceUsername, setWalkthroughOffered } from '../../utils';\nimport { WalkthroughJotFormActionContext } from '../../context';\n\nconst InitialModal = ({\n data,\n user,\n overlayVisible,\n onConfirmClickDefault,\n onDismissClickDefault\n}) => {\n const modalRef = useRef();\n const logWalkthroughAction = useContext(WalkthroughJotFormActionContext);\n\n useEffect(() => {\n const { accountType, email } = user;\n logWalkthroughAction({ action: 'seen', target: 'initialModal' });\n if (accountType === 'ADMIN') return;\n if (email === 'burcucelikkaya+testuser1@jotform.com'\n || email === 'burcucelikkaya+testuser2@jotform.com'\n || email === 'burcucelikkaya+test97@jotform.com'\n || email === 'burcucelikkaya+test98@jotform.com'\n || email === 'burcucelikkaya+test99@jotform.com'\n ) {\n return;\n }\n\n setWalkthroughOffered('1', error => {\n const errorMessage = `Error in walkthroughOffered: ${error.data?.message}, responseCode: ${error.data?.responseCode}`;\n console.error(errorMessage, error);\n Tracking.configureScope(scope => {\n scope.addBreadcrumb({\n category: 'productWalkthroughV2',\n message: errorMessage,\n level: global.Sentry.Severity.Error,\n data: { user }\n });\n });\n });\n }, []);\n\n // handle confirm\n const handleConfirmClick = e => {\n const { onConfirm: { callback, waitCbComplete } = {} } = data;\n if (typeof callback === 'function') {\n modalRef.current.hide();\n callback(e);\n\n // wait a little bit for the callback actions to get completed before jump into the next step\n // otherwise popovers dont render to the correct position\n setTimeout(() => {\n onConfirmClickDefault(data);\n }, waitCbComplete);\n } else {\n onConfirmClickDefault(data);\n }\n };\n\n // handle dismiss\n const handleDismissClick = e => {\n const { onDismiss: { callback } = {} } = data;\n if (typeof callback === 'function') {\n modalRef.current.hide();\n callback(e);\n }\n\n onDismissClickDefault(e);\n };\n\n return (\n {children}}\n TitleRenderer={() => (\n \n {replaceUsername(t(data.title), user)}\n {' '}\n {data.emoji}\n \n )}\n onConfirmClick={handleConfirmClick}\n onDismissClick={handleDismissClick}\n />\n );\n};\n\nInitialModal.propTypes = {\n overlayVisible: bool,\n data: shape().isRequired,\n user: shape().isRequired,\n onConfirmClickDefault: func.isRequired,\n onDismissClickDefault: func.isRequired\n};\n\nInitialModal.defaultProps = {\n overlayVisible: true\n};\n\nexport default InitialModal;\n","/* eslint-disable max-len */\nimport Styled, { keyframes } from 'styled-components';\n\nconst heightResolutionControl = 'screen and (max-height: 800px)';\nconst minScreenResolutionControl = 'screen and (max-height: 599px), (max-width: 959px)';\n\nconst opacityContentDelay = '.25s';\nconst opacityAnimation = keyframes`\n 0% { opacity: 0 }\n 100% { opacity: 1 }\n`;\n\nconst opacityAutoHide = keyframes`\n 0% { opacity: 1 }\n 100% { opacity: 0 }\n`;\n\nexport const ScAutoHide = Styled.div`\n animation-delay: 4s;\n animation-name: ${opacityAutoHide};\n animation-duration: .5s;\n animation-fill-mode: forwards;\n animation-timing-function: ease-in;\n pointer-events: none;\n`;\n\nexport const ScOpacityAnimation = Styled.div`\n animation-delay: 0;\n animation-name: ${opacityAnimation};\n animation-duration: .5s;\n animation-fill-mode: forwards;\n animation-timing-function: ease-in;\n`;\n\nconst slideAnimation = keyframes`\n 0% { }\n 100% { top:0; right: 0; left:0; bottom:0; }\n`;\n\nexport const ScPopoverOutline = Styled.div`\n position: relative;\n padding: 16px;\n height: 100%;\n background: #ffffff;\n border-radius: 8px;\n box-shadow: 0px 0px 24px 0px rgba(43, 50, 69, 0.25);\n opacity: 1;\n animation-delay: .25s;\n animation-name: ${slideAnimation};\n animation-duration: .25s;\n animation-fill-mode: forwards;\n animation-timing-function: ease-in;\n transition: all .2s;\n\n @media ${heightResolutionControl}{\n padding: 8px;\n }\n\n ${({ position }) => {\n if (position === 'right-start') {\n return `\n right: -30px;\n margin-left: 24px;\n margin-top: -48px;\n `;\n }\n\n if (position === 'left-start') {\n return `\n animation-duration: 1s;\n animation-timing-function: linear;\n margin-right: 24px;\n margin-top: -48px;\n `;\n }\n\n if (position === 'bottom') {\n return `\n animation-duration: 1s;\n animation-timing-function: linear;\n margin-top: 16px;\n `;\n }\n\n if (position === 'bottom-start') {\n return `\n animation-duration: 1s;\n animation-timing-function: linear;\n margin-left: -72px;\n margin-top: -101px;\n margin-right: 72px;\n `;\n }\n\n if (position === 'bottom-end') {\n return `\n animation-duration: 1s;\n animation-timing-function: linear;\n margin-right: 8px;\n margin-top: 16px;\n `;\n }\n }}\n\n @media ${minScreenResolutionControl}{\n display: none;\n }\n`;\n\nexport const ScCloseButton = Styled.button`\n display: block;\n width: 32px;\n height: 32px;\n position: absolute;\n z-index: 1;\n right: 16px;\n top: 16px;\n border-radius: 50%;\n border: none;\n background-color: #E6EBF2;\n text-indent: -9999px;\n cursor: pointer;\n background-image: url(\"data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 12 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L11 11M1 11L11 1' stroke='%2357647E' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E%0A\");\n background-position: center;\n background-size: 12px;\n background-repeat: no-repeat;\n transition: background-color .2s;\n\n &:hover{\n background-color: #ced5e0;\n }\n`;\n\nexport const ScPopoverTriangle = Styled.div` \n display: block;\n width: 30px;\n height: 8px;\n position: absolute;\n background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='30px' height='9px' viewBox='0 0 30.8 8'%3E%3Cpath fill='%23ffffff' d='M17.7,0.9c-1.4-1-3.3-1-4.7,0L7,5.2C5,6.7,2.5,7.6,0,8h30.8c-2.5-0.4-5-1.3-7.1-2.8L17.7,0.9z'/%3E%3C/svg%3E\");\n\n ${({ position }) => {\n if (position === 'right-start') {\n return `\n transform: rotate(-90deg);\n left: -19px;\n top: 70px;\n `;\n }\n\n if (position === 'left-start') {\n return `\n transform: rotate(90deg);\n right: -19px;\n top: 70px;\n `;\n }\n\n if (position === 'bottom') {\n return `\n top: -8px;\n left: calc(50% - 15px);\n `;\n }\n\n if (position === 'bottom-start') {\n return `\n transform: rotate(90deg);\n right: -19px;\n top: 70px;\n `;\n }\n\n if (position === 'bottom-end') {\n return `\n top: -8px;\n right: 22px;\n `;\n }\n }}\n\n ${({ offset }) => {\n if (offset) {\n return `\n margin-top:${offset[0]}px;\n margin-left:${offset[1]}px;\n `;\n }\n }}\n`;\n\nexport const ScPopoverTitleWrapper = Styled.div`\n display: flex;\n align-items: center;\n`;\n\nexport const ScPopoverTitle = Styled.h2`\n margin: 16px 16px 0;\n font-weight: 700;\n font-size: 16px;\n line-height: 24px;\n color: #2B3245;\n opacity: 0;\n animation-delay: ${opacityContentDelay};\n animation-name: ${opacityAnimation};\n animation-duration: .5s;\n animation-fill-mode: forwards;\n animation-timing-function: ease-in;\n flex: 1;\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n\n @media ${heightResolutionControl}{\n font-size: 12px;\n line-height: 20px;\n margin: 16px 8px 0;\n }\n`;\nexport const ScPopoverStepIndicator = Styled.div`\n background-color: #E6EBF2;\n color: #2B3245;\n border-radius: 4px;\n padding: 4px 10px;\n font-size: 12px;\n line-height: 16px;\n font-weight: bold;\n margin-left: 16px;\n margin-top: -3px;\n white-space: nowrap;\n\n &>span {\n margin: 0 2px;\n color: #57647E\n }\n`;\n\nexport const ScPopoverContent = Styled.div`\n padding: 16px;\n font-size: 16px;\n line-height: 24px;\n font-weight: 400;\n opacity: 0;\n animation-delay: ${opacityContentDelay};\n animation-name: ${opacityAnimation};\n animation-duration: .5s;\n animation-fill-mode: forwards;\n animation-timing-function: ease-in;\n\n a{\n color: #2B3245;\n text-decoration: none;\n border-bottom: 1px solid #2B3245;\n transition: all .2s;\n\n &:hover{\n color: #134fe8;\n border-color: #134fe8;\n }\n }\n\n @media ${heightResolutionControl}{\n font-size: 12px;\n line-height: 22px;\n padding: 8px;\n }\n\n`;\n\nexport const ScPopoverFooter = Styled.div`\n padding: 8px 16px 16px 16px;\n display: flex;\n align-items: center;\n justify-content: space-between;\n opacity: 0;\n animation-delay: ${opacityContentDelay};\n animation-name: ${opacityAnimation};\n animation-duration: .5s;\n animation-fill-mode: forwards;\n animation-timing-function: ease-in;\n\n @media ${heightResolutionControl}{\n padding: 8px;\n }\n\n ${({ isIgnoreStepCallbacks }) => {\n if (isIgnoreStepCallbacks === true) {\n return `\n background: #F8FBFF;\n margin: 16px -16px -16px;\n border-bottom-left-radius: 8px;\n border-bottom-right-radius: 8px;\n padding: 24px 32px;\n border-top: 1px solid #E6EBF2;\n\n @media ${heightResolutionControl}{\n margin: 8px -8px -8px -8px;\n }\n\n `;\n }\n }}\n\n ${({ isSingleInformativeFooter }) => {\n if (isSingleInformativeFooter === true) {\n return `\n background: #ffffff;\n border: none;\n margin: 0 -16px -16px;\n padding: 8px 32px 32px;\n `;\n }\n }}\n\n &>div{\n margin-left: 0;\n margin-top: 0;\n }\n\n`;\n\nexport const ScPopoverDefaultButton = Styled.button`\n border:none;\n font-size: 16px;\n line-height: 24px;\n padding: 8px 16px;\n cursor: pointer;\n border-radius: 4px;\n\n @media ${heightResolutionControl}{\n font-size: 12px;\n padding: 4px 12px;\n }\n\n`;\n\nexport const ScPopoverEndButton = Styled(ScPopoverDefaultButton)`\n background: transparent;\n color: #57647E;\n display: flex;\n align-items: center;\n transition: background .2s;\n\n &:hover{\n background: #E6EBF2;\n }\n\n &:before{\n content: \"\";\n display: inline-block;\n width: 9px;\n height: 9px;\n margin-top: -1px;\n margin-right: 8px;\n background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10px' height='10px' viewBox='0 0 10 10' style='enable-background:new 0 0 10 10;' xml:space='preserve'%3E%3Cpath fill='%238894AB' d='M8.5,9.5C8.2,9.5,8,9.4,7.8,9.2L5,6.4L2.2,9.2c-0.4,0.4-1,0.4-1.4,0s-0.4-1,0-1.4L3.6,5L0.8,2.2 c-0.4-0.4-0.4-1,0-1.4s1-0.4,1.4,0L5,3.6l2.8-2.8c0.4-0.4,1-0.4,1.4,0s0.4,1,0,1.4L6.4,5l2.8,2.8c0.4,0.4,0.4,1,0,1.4 C9,9.4,8.8,9.5,8.5,9.5z'/%3E%3C/svg%3E%0A\");\n background-position: center left;\n background-size: 9px;\n background-repeat: no-repeat;\n }\n`;\n\nexport const ScPopoverDismissButton = Styled(ScPopoverDefaultButton)`\n background: transparent;\n color: #57647E;\n transition: all .2s;\n border: 1px solid #b5bed1;\n\n &:hover{\n background-color: #E6EBF2;\n border-color: #E6EBF2;\n }\n`;\n\nexport const ScPopoverBackButton = Styled(ScPopoverDefaultButton)`\n background: transparent;\n color: #57647E;\n transition: all .2s;\n border: 1px solid #b5bed1;\n margin-left: auto;\n padding: 8px 24px;\n\n @media ${heightResolutionControl}{\n font-size: 12px;\n padding: 4px 12px;\n }\n\n &:hover{\n background-color: #E6EBF2;\n border-color: #E6EBF2;\n }\n`;\n\nexport const ScPopoverConfirmButton = Styled(ScPopoverDefaultButton)`\n background: #5C5CFF;\n font-weight: 700;\n color: #ffffff;\n transition: background .2s;\n margin-left: 8px;\n padding: 8px 24px;\n\n &:hover{\n background-color: #3F3FCA;\n }\n\n @media ${heightResolutionControl}{\n padding: 4px 12px;\n }\n`;\n\nexport const ScOverlayBlockerTop = Styled.div`\n display: block;\n z-index: 1010;\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n height: ${({ rectProps }) => rectProps.top}px;\n`;\n\nexport const ScOverlayBlockerLeft = Styled.div`\n display: block;\n z-index: 1010;\n position: fixed;\n top: 0;\n bottom: 0;\n left: 0;\n width: ${({ rectProps }) => rectProps.left}px;\n`;\n\nexport const ScOverlayBlockerRight = Styled.div`\n display: block;\n z-index: 1010;\n position: fixed;\n top: 0;\n bottom: 0;\n right: 0;\n width: calc(100% - ${({ rectProps }) => rectProps.width}px - ${({ rectProps }) => rectProps.left}px);\n`;\n\nexport const ScOverlayBlockerBottom = Styled.div`\n display: block;\n z-index: 1010;\n position: fixed;\n left: 0;\n bottom: 0;\n right: 0;\n height: calc(100% - ${({ rectProps }) => rectProps.height}px - ${({ rectProps }) => rectProps.top}px);\n`;\n\nexport const ScOverlayWithHighlight = Styled.div`\n display: block;\n border-radius: ${({ borderRadius }) => borderRadius};\n background-color: transparent;\n z-index: 1010;\n box-shadow: 0 0 0 9999px rgba(10,21,81,.7);\n position: absolute;\n pointer-events: none;\n ${({\n top,\n left,\n rectProps,\n widthExpand,\n heightExpand\n }) => {\n return `\n width: ${rectProps.right - rectProps.left + widthExpand}px;\n height: ${rectProps.bottom - rectProps.top + heightExpand}px;\n top: ${rectProps.top - (widthExpand / 2) + top}px;\n left: ${rectProps.left - (heightExpand / 2) + left}px;\n `;\n }}\n`;\n","import React from 'react';\nimport { number, string, shape } from 'prop-types';\nimport {\n ScOverlayWithHighlight,\n ScOverlayBlockerTop,\n ScOverlayBlockerLeft,\n ScOverlayBlockerRight,\n ScOverlayBlockerBottom\n} from './sc/scPopover';\n\nconst defaultOverlayStyles = {\n top: 0,\n left: 0,\n heightExpand: 0,\n widthExpand: 0,\n borderRadius: '0px'\n};\n\nconst Overlay = ({ targetBoundingClientRect, overlayStyles }) => {\n const overlaySt = { ...defaultOverlayStyles, ...overlayStyles };\n\n return (\n <>\n \n \n \n \n \n \n );\n};\n\nOverlay.propTypes = {\n targetBoundingClientRect: shape().isRequired,\n overlayStyles: shape({\n top: number,\n left: number,\n heightExpand: number,\n widthExpand: number,\n borderRadius: string\n })\n};\n\nOverlay.defaultProps = {\n overlayStyles: defaultOverlayStyles\n};\n\nexport default Overlay;\n","import React, { useState, useLayoutEffect, useCallback } from 'react';\nimport {\n shape, node, string, bool\n} from 'prop-types';\nimport debounce from 'lodash/debounce';\nimport { Popover as UIKitPopover } from '@jotforminc/uikit';\nimport { ScOpacityAnimation, ScAutoHide } from './sc/scPopover';\nimport Overlay from './Overlay';\n\nconst Popover = React.forwardRef(({\n children,\n data,\n targetElSelector,\n overlay,\n isInformative\n}, popoverRef) => {\n const [currentBoundingRect, setCurrentBoundingRect] = useState();\n\n const memoizedUpdateCurrentBoundingRect = useCallback(() => {\n const popoverReferenceEl = global.document.querySelector(targetElSelector);\n setCurrentBoundingRect(popoverReferenceEl.getBoundingClientRect());\n }, [targetElSelector]);\n\n useLayoutEffect(() => {\n memoizedUpdateCurrentBoundingRect();\n const debouncedHandleResize = debounce(memoizedUpdateCurrentBoundingRect, 200);\n\n global.window.addEventListener('resize', debouncedHandleResize);\n return () => {\n global.window.removeEventListener('resize', debouncedHandleResize);\n };\n }, [targetElSelector]);\n\n let transformSource;\n let isOpacityFade;\n let isAutoHidden;\n let isClickable = true;\n let contentMaxWidth = '560px';\n\n if (!isInformative) {\n if (data.placement === 'right-start') {\n transformSource = 'translate(40%, calc(100vh - 56px))';\n isOpacityFade = true;\n }\n\n if (data.placement === 'left-start') {\n transformSource = 'translate(40%, calc(100vh - 56px))';\n }\n\n if (data.placement === 'bottom-start') {\n transformSource = 'translate(40%, calc(100vh - 56px))';\n }\n\n if (data.placement === 'bottom') {\n transformSource = 'translate(40%, calc(100vh - 56px))';\n }\n\n if (data.placement === 'bottom-end') {\n transformSource = 'translate(40%, calc(100vh - 56px))';\n }\n\n if (data.placement === 'left') {\n transformSource = 'translate(40%, calc(100vh - 56px))';\n isOpacityFade = true;\n isAutoHidden = true;\n }\n }\n\n if (isInformative) {\n if (data.placement === 'right-start') {\n transformSource = 'translate(calc( 50vh + 15px ), calc(50vh - 190px))';\n }\n }\n\n const mediaQuery = global.matchMedia('(max-height: 800px)');\n const mediaQuerySmall = global.matchMedia('(max-height: 768px)');\n const mediaQueryWidth = global.matchMedia('(max-width: 1020px)');\n\n if (mediaQuerySmall.matches) {\n contentMaxWidth = '440px';\n } else if (mediaQuery.matches) {\n contentMaxWidth = '460px';\n } else {\n contentMaxWidth = '560px';\n }\n\n if (data.type === 'finalPopover' && isInformative) {\n transformSource = mediaQuery.matches ? 'translate( calc(60vw - 230px), 110px' : 'translate( calc(60vw - 280px), 110px)';\n }\n\n if (data.type === 'endingPopover') {\n isAutoHidden = true;\n isOpacityFade = true;\n isClickable = false;\n transformSource = mediaQueryWidth.matches ? 'translate(calc(100vw - 434px), 50px)' : 'translate(calc(100vw - 487px), 50px)';\n }\n\n const popoverStyles = {\n zIndex: '1030',\n maxWidth: contentMaxWidth,\n transform: transformSource,\n transition: 'transform .5s',\n pointerEvents: isClickable ? 'all' : 'none'\n };\n\n const popoverOptions = {\n placement: data.placement,\n modifiers: [\n {\n name: 'offset',\n options: {\n offset: () => data.styles?.popover?.offset || [0, 0]\n }\n }]\n };\n\n const renderChildren = () => {\n if (isOpacityFade && isAutoHidden) {\n return {children};\n }\n if (isOpacityFade) {\n return {children};\n }\n if (isAutoHidden) {\n return {children};\n }\n return children;\n };\n\n return (\n

    \n {overlay && currentBoundingRect\n && (\n \n )}\n \n { renderChildren() }\n \n
    \n );\n});\n\nPopover.propTypes = {\n data: shape().isRequired,\n children: node.isRequired,\n targetElSelector: string.isRequired,\n overlay: bool,\n isInformative: bool\n};\n\nPopover.defaultProps = {\n overlay: true,\n isInformative: false\n};\n\nexport default Popover;\n","/* eslint-disable max-len */\nimport Styled, { keyframes } from 'styled-components';\n\nconst heightResolutionControl = 'screen and (max-height: 800px)';\nconst opacityContentDelay = '.4s';\nconst opacityAnimation = keyframes`\n 0% { opacity: 0 }\n 100% { opacity: 1 }\n`;\n\nexport const ScVisualOutline = Styled.div`\n display: flex;\n width: 100%;\n margin-bottom: 16px;\n\n ${({ height }) => {\n if (height > 0) {\n return `\n min-height: ${height}px;\n `;\n }\n }}\n\n transition: all .2s;\n\n @media ${heightResolutionControl}{\n margin-bottom: 0;\n ${({ minHeight }) => {\n if (minHeight > 0) {\n return `\n min-height: ${minHeight}px;\n `;\n }\n }}\n }\n \n &:after{\n content: \"\";\n clear: both;\n display: table;\n }\n\n &>video,\n &>img {\n width: 100%;\n height: 100%;\n opacity: 0;\n animation-delay: ${opacityContentDelay};\n animation-name: ${opacityAnimation};\n animation-duration: .5s;\n animation-fill-mode: forwards;\n animation-timing-function: ease-in;\n pointer-events: none;\n }\n`;\n","import React, { useRef, useEffect } from 'react';\nimport { string, number } from 'prop-types';\n\nconst Video = ({\n webmVideoUrl,\n mp4VideoUrl,\n posterUrl,\n playRate\n}) => {\n const videoRef = useRef();\n useEffect(() => {\n videoRef.current.playbackRate = playRate;\n }, [playRate]);\n\n return (\n <>\n \n {mp4VideoUrl && }\n {webmVideoUrl && }\n \n \n );\n};\n\nVideo.propTypes = {\n webmVideoUrl: string.isRequired,\n mp4VideoUrl: string.isRequired,\n posterUrl: string.isRequired,\n playRate: number\n};\n\nVideo.defaultProps = {\n playRate: 1\n};\n\nexport default Video;\n","import React from 'react';\nimport { number, shape, string } from 'prop-types';\nimport { t } from '@jotforminc/translation';\n\nimport { ScVisualOutline } from './sc/scVisualSection';\nimport Video from './Video';\n\nconst VisualSection = ({\n visuals,\n title\n}) => {\n if (!visuals) return null;\n if (visuals && !visuals.posterUrl) return null;\n\n const {\n webmVideoUrl, mp4VideoUrl, posterUrl, height, minHeight\n } = visuals;\n\n if (webmVideoUrl || mp4VideoUrl) {\n return (\n \n \n );\n }\n\n return (\n \n {t(title)}\n \n );\n};\n\nVisualSection.propTypes = {\n visuals: shape().isRequired,\n title: string.isRequired,\n height: number,\n minHeight: number\n};\n\nVisualSection.defaultProps = {\n height: 0,\n minHeight: 0\n};\n\nexport default VisualSection;\n","import React from 'react';\nimport {\n shape, bool, elementType, func\n} from 'prop-types';\nimport { t } from '@jotforminc/translation';\n\nimport Popover from './Popover';\nimport VisualSection from './VisualSection';\nimport {\n ScPopoverTitleWrapper,\n ScPopoverTitle,\n ScPopoverContent,\n ScPopoverOutline,\n ScPopoverTriangle,\n ScCloseButton\n} from './sc/scPopover';\n\nconst DefaultPopover = React.forwardRef(({\n data,\n showVisuals,\n showCloseButton,\n onClose,\n TitleRenderer,\n ContentRenderer,\n FooterRenderer,\n isInformative\n}, ref) => {\n return (\n \n \n \n {showVisuals && }\n {showCloseButton && {t('Close')} }\n \n {t(data.title)}\n \n {t(data.content)}\n \n \n \n );\n});\n\nDefaultPopover.propTypes = {\n showVisuals: bool,\n showCloseButton: bool,\n data: shape().isRequired,\n isInformative: bool,\n TitleRenderer: elementType,\n ContentRenderer: elementType,\n FooterRenderer: elementType.isRequired,\n onClose: func\n};\n\n/* eslint react/prop-types: \"off\" */\nDefaultPopover.defaultProps = {\n showVisuals: true,\n isInformative: false,\n showCloseButton: false,\n TitleRenderer: ({ children }) => {children},\n ContentRenderer: ({ children }) => ,\n onClose: f => f\n};\n\nexport default DefaultPopover;\n","import React, { useState, useEffect, useRef } from 'react';\nimport { shape, func } from 'prop-types';\nimport { t } from '@jotforminc/translation';\n\nimport DefaultPopover from './DefaultPopover';\nimport {\n ScPopoverFooter,\n ScPopoverConfirmButton,\n ScPopoverEndButton\n} from './sc/scPopover';\n\nconst StepPopover = ({\n data,\n onConfirmClick,\n onDismissClick\n}) => {\n const popoverRef = useRef();\n const [visible, setVisible] = useState(true);\n\n useEffect(() => {\n setVisible(true);\n }, [data]);\n\n useEffect(() => {\n const targetEl = global.document.querySelector(data.reference);\n const handleClick = e => {\n setVisible(false);\n if (targetEl.contains(e.target)) {\n onConfirmClick(data);\n }\n };\n\n targetEl.addEventListener('click', handleClick, true);\n return () => targetEl.removeEventListener('click', handleClick, true);\n });\n\n const handleConfrimClick = e => {\n const { onConfirm: { callback, waitCbComplete = 0 } = {} } = data;\n if (typeof callback === 'function') {\n callback(e);\n setTimeout(() => {\n onConfirmClick(data);\n }, waitCbComplete);\n }\n setVisible(false);\n };\n\n const handleDismissClick = e => {\n onDismissClick(e, data);\n };\n\n const FooterRenderer = () => {\n return (\n \n handleDismissClick(e)}>{t('End tour')}\n handleConfrimClick(e)}>{t('Try it now!')}\n \n );\n };\n\n if (!visible) return null;\n\n return (\n \n );\n};\n\nStepPopover.propTypes = {\n data: shape().isRequired,\n onConfirmClick: func,\n onDismissClick: func\n\n};\n\nStepPopover.defaultProps = {\n onConfirmClick: f => f,\n onDismissClick: f => f\n};\n\nexport default StepPopover;\n","/* eslint-disable max-len */\nimport Styled from 'styled-components';\n\nexport const ScEndingPopoverOutline = Styled.div`\n position: relative;\n padding: 16px;\n background: #ffffff;\n border-radius: 8px;\n box-shadow: 0px 0px 24px 0px rgba(43, 50, 69, 0.25);\n max-width: 384px;\n margin-top: 12px;\n margin-right: -8px;\n`;\n\nexport const ScEndingPopoverTriangle = Styled.div` \n display: block;\n width: 30px;\n height: 8px;\n position: absolute;\n background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='30px' height='9px' viewBox='0 0 30.8 8'%3E%3Cpath fill='%23ffffff' d='M17.7,0.9c-1.4-1-3.3-1-4.7,0L7,5.2C5,6.7,2.5,7.6,0,8h30.8c-2.5-0.4-5-1.3-7.1-2.8L17.7,0.9z'/%3E%3C/svg%3E\");\n top: -8px;\n right: 55px;\n`;\n\nexport const ScEndingPopoverContent = Styled.div`\n padding: 16px;\n font-size: 16px;\n line-height: 24px;\n font-weight: 400;\n`;\n\nexport const ScPopoverFooter = Styled.div`\n padding: 16px;\n display: flex;\n`;\n\nexport const ScPopoverButton = Styled.button`\n background: #5C5CFF;\n color: #ffffff;\n border-radius: 4px;\n border:none;\n font-size: 16px;\n line-height: 24px;\n padding: 8px 16px;\n cursor: pointer;\n transition: background .2s;\n margin-left: auto;\n margin-right: 16px;\n\n &:hover{\n background-color: #246cff;\n }\n`;\n\nexport const ScOverlayBlocker = Styled.div`\n display: block;\n z-index: 1010;\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n`;\n\nexport const ScOverlayWithHighlight = Styled.div`\n display: block;\n border-radius: 8px;\n background-color: transparent;\n z-index: 1010;\n box-shadow: 0 0 0 9999px rgba(18, 22, 33, 0.75);\n position: absolute;\n width: calc(${({ rectProps }) => rectProps.width}px + 16px);\n height: calc(${({ rectProps }) => rectProps.height}px + 16px);\n top: calc(${({ rectProps }) => rectProps.y}px - 8px);\n left: calc(${({ rectProps }) => rectProps.x}px - 8px);\n`;\n","import React, { useRef } from 'react';\nimport { shape } from 'prop-types';\nimport { Hooks } from '@jotforminc/uikit';\nimport { t } from '@jotforminc/translation';\n\nimport Popover from './Popover';\nimport { ScEndingPopoverOutline, ScEndingPopoverTriangle, ScEndingPopoverContent } from './sc/scEndingPopover';\n\nconst EndingPopover = ({ data }) => {\n const a = useRef();\n const [visible, setVisible] = Hooks.useClickOutsideState(true, [a]);\n\n const handleButtonClick = e => {\n const { onClick } = data;\n\n if (typeof onClick === 'function') {\n onClick(e);\n }\n setVisible(false);\n };\n\n if (!visible) return null;\n\n return (\n \n \n \n {t(data.content)}\n \n \n );\n};\n\nEndingPopover.propTypes = {\n data: shape().isRequired\n};\n\nexport default EndingPopover;\n","import React, { useEffect, useRef } from 'react';\nimport {\n shape, func, bool, string\n} from 'prop-types';\nimport { t } from '@jotforminc/translation';\n\nimport DefaultPopover from './DefaultPopover';\nimport {\n ScPopoverTitle,\n ScPopoverContent,\n ScPopoverFooter,\n ScPopoverConfirmButton,\n ScPopoverDismissButton\n} from './sc/scPopover';\nimport { replaceUsername, replaceLinks } from '../../utils';\n\nconst FinalPopover = ({\n data, user, onFinishTourClick, onRestartTourClick, endWalkthrough, showVisuals, onCloseClick, FinishTourText\n}) => {\n const popoverRef = useRef();\n\n useEffect(() => {\n const handleClick = e => {\n if (popoverRef.current.contains(e.target)) return;\n endWalkthrough();\n };\n\n global.document.addEventListener('click', handleClick, true);\n return () => global.document.removeEventListener('click', handleClick, true);\n });\n\n const handleConfirmClick = () => {\n onFinishTourClick(data);\n };\n\n const handleDismissClick = e => {\n onRestartTourClick(e, data);\n };\n\n const handleCloseClick = e => {\n onCloseClick(e, data);\n };\n\n const TitleRenderer = () => {`${replaceUsername(t(data.title), user)} ${data.emoji}`};\n const ContentRenderer = () => ;\n\n const FooterRenderer = () => {\n return (\n \n handleDismissClick(e)}>{t('Restart')}\n handleConfirmClick(e)}>{t(FinishTourText)}\n \n );\n };\n\n return (\n \n );\n};\n\nFinalPopover.propTypes = {\n showVisuals: bool,\n data: shape().isRequired,\n user: shape().isRequired,\n FinishTourText: string,\n onRestartTourClick: func.isRequired,\n onFinishTourClick: func.isRequired,\n onCloseClick: func,\n endWalkthrough: func.isRequired\n};\n\nFinalPopover.defaultProps = {\n FinishTourText: 'Finish tour',\n showVisuals: true,\n onCloseClick: f => f\n};\n\nexport default FinalPopover;\n","import React, {\n useEffect, useState, useContext, forwardRef, useImperativeHandle\n} from 'react';\nimport { arrayOf, shape } from 'prop-types';\nimport findLast from 'lodash/findLast';\nimport { ScWrapper } from './sc/scWrapper';\nimport Footer from './Footer';\nimport InitialModal from './InitialModal';\nimport StepPopover from './StepPopover';\nimport EndingPopover from './EndingPopover';\nimport FinalPopover from './FinalPopover';\nimport { WalkthroughJotFormActionContext } from '../../context';\n\nconst StepByStepWithContinue = forwardRef(({ steps, user }, ref) => {\n const [extendedSteps, setExtendedSteps] = useState([]);\n const [currentStep, setCurrentStep] = useState(-1);\n const [footerVisible, setFooterVisible] = useState(false);\n const [shadowNextStep, setShadowNextStep] = useState(0);\n const [continueButtonVisible, setContinueButtonVisible] = useState(true);\n const [continuePopoverVisible, setContinuePopoverVisible] = useState(false);\n\n const logWalkthroughAction = useContext(WalkthroughJotFormActionContext);\n\n // helpers\n const initCompletedPropOfAllSteps = allSteps => allSteps.map(step => ({ ...step, completed: false }));\n\n const findFirstUncompletedPopoverStep = allSteps => allSteps.find(step => step.type === 'popover' && !step.completed);\n\n const findLastCompletedPopoverStep = allSteps => findLast(allSteps, step => step.completed);\n\n const toggleStepComplete = (stepData, allSteps) => {\n return allSteps.map(step => {\n if (step.step === stepData.step) return { ...stepData, completed: !stepData.completed };\n return step;\n });\n };\n\n // state updates\n const updateAllSteps = allSteps => setExtendedSteps(allSteps);\n const updateCurrentStep = step => setCurrentStep(step);\n const updateShadowNextStep = step => setShadowNextStep(step);\n\n const showContinueButton = () => setContinueButtonVisible(true);\n const hideContinueButton = () => setContinueButtonVisible(false);\n\n const showContinuePopover = () => setContinuePopoverVisible(true);\n const hideContinuePopover = () => setContinuePopoverVisible(false);\n\n // effects\n useEffect(() => {\n const renderableSteps = steps.filter(step => step.type !== 'endTourButton');\n const stepsWithCompleted = initCompletedPropOfAllSteps(renderableSteps);\n const sortedSteps = stepsWithCompleted.sort((a, b) => a.step - b.step);\n updateAllSteps(sortedSteps);\n }, []);\n\n useEffect(() => {\n if (user.walkthroughOffered === '1') {\n updateCurrentStep(-1);\n }\n }, []);\n\n useEffect(() => {\n if (extendedSteps.length === 0) return;\n if (currentStep === -1) return;\n\n const isLastStep = currentStep === extendedSteps.length - 1;\n const isPopover = extendedSteps[currentStep].type === 'popover';\n const isFinalPopover = extendedSteps[currentStep].type === 'finalPopover';\n\n if (isFinalPopover || isLastStep || currentStep === -1) {\n setFooterVisible(false);\n return;\n }\n\n if (isPopover && !footerVisible) {\n setFooterVisible(true);\n }\n }, [currentStep]);\n\n useEffect(() => {\n const className = 'walkthroughActive';\n const bodyElClassList = global.document.querySelector('body').classList;\n\n if (!footerVisible) {\n bodyElClassList.remove(className);\n return;\n }\n\n if (footerVisible && !bodyElClassList.contains(className)) {\n bodyElClassList.add(className);\n }\n }, [footerVisible]);\n\n useEffect(() => {\n if (currentStep === extendedSteps.length - 1) return;\n if (currentStep === -1) return;\n\n const updatedSteps = toggleStepComplete(extendedSteps[currentStep], extendedSteps);\n let firstUncompletedStep = findFirstUncompletedPopoverStep(updatedSteps);\n\n if (firstUncompletedStep && firstUncompletedStep.step === extendedSteps[currentStep]) {\n firstUncompletedStep = findFirstUncompletedPopoverStep(firstUncompletedStep);\n }\n\n if (firstUncompletedStep) {\n updateShadowNextStep(firstUncompletedStep.step);\n } else {\n const lastCompletedStep = findLastCompletedPopoverStep(updatedSteps);\n updateShadowNextStep(lastCompletedStep ? lastCompletedStep.step + 1 : 1);\n }\n }, [currentStep]);\n\n useEffect(() => {\n if (currentStep === -1) return;\n\n const stepType = steps[currentStep].type;\n if (stepType === 'popover') {\n hideContinueButton();\n hideContinuePopover();\n }\n }, [currentStep]);\n\n // walkthrough controls\n const restartWalkthrough = e => {\n const zeroStep = extendedSteps[0];\n const { onConfirm: { callback, waitCbComplete = 0 } = {} } = zeroStep;\n if (typeof callback === 'function') {\n callback(e);\n\n setTimeout(() => {\n const resetSteps = initCompletedPropOfAllSteps(extendedSteps);\n updateAllSteps(resetSteps);\n updateCurrentStep(1);\n }, waitCbComplete);\n }\n };\n\n useImperativeHandle(ref, () => ({\n startWalkthrough: e => { restartWalkthrough(e); }\n }));\n\n const endWalkthrough = () => updateCurrentStep(-1);\n\n const jumpToLastStep = (e, stepData) => {\n const lastStep = extendedSteps[extendedSteps.length - 1];\n const { onLastStep: { callback, waitCbComplete = 0 } = {} } = lastStep;\n\n if (typeof callback === 'function') {\n callback(stepData);\n setTimeout(() => {\n updateCurrentStep(lastStep.step);\n }, waitCbComplete);\n }\n };\n\n const jumpToStep = step => updateCurrentStep(step);\n\n const nextStep = stepData => {\n const updatedSteps = toggleStepComplete(stepData, extendedSteps);\n updateAllSteps(updatedSteps);\n updateCurrentStep(shadowNextStep);\n };\n\n // initial modal\n const handleInitModalConfirm = stepData => {\n nextStep(stepData); hideContinueButton();\n logWalkthroughAction({ action: 'letsGoClick', target: 'initialModal' });\n };\n\n const handleInitModalDismiss = e => {\n jumpToLastStep(e);\n logWalkthroughAction({ action: 'noThanksClick', target: 'initialModal' });\n };\n\n // step popover\n const handleStepPopoverConfirmClick = stepData => {\n showContinueButton();\n showContinuePopover();\n logWalkthroughAction({ action: 'tryItNowClick', target: `${stepData.name}` });\n };\n\n const handleStepPopoverDismissClick = (e, stepData) => {\n jumpToLastStep(e, stepData);\n logWalkthroughAction({ action: 'endTourClick', target: `${stepData.name}` });\n };\n\n // final popover\n const handleFinalPopoverFinishTourClick = stepData => {\n endWalkthrough();\n logWalkthroughAction({ action: 'finishTourClick', target: `${stepData.name}` });\n };\n\n const handleFinalPopoverRestartTourClick = (e, stepData) => {\n restartWalkthrough(e);\n logWalkthroughAction({ action: 'restartClick', target: `${stepData.name}` });\n };\n\n // ending popover\n const handleEndingPopoverClick = () => endWalkthrough();\n\n // footer\n const handleContinueClickDefault = stepData => {\n nextStep(stepData);\n logWalkthroughAction({ action: 'continueClick', target: `${stepData.name}` });\n };\n\n // end tour\n const handleEndTourClick = (e, stepData) => {\n const endTour = steps.find(step => step.type === 'endTourButton');\n const { onClick: { callback, waitCbComplete = 0 } = {} } = endTour;\n\n if (typeof callback === 'function') {\n callback(stepData);\n setTimeout(() => {\n jumpToLastStep(e, stepData);\n }, waitCbComplete);\n }\n\n logWalkthroughAction({ action: 'endTourClick', target: `${stepData.name}` });\n };\n\n // step button\n const handleStepClickDefault = stepData => {\n if (stepData.completed) {\n const updatedSteps = toggleStepComplete(stepData, extendedSteps);\n updateAllSteps(updatedSteps);\n }\n jumpToStep(stepData.step);\n logWalkthroughAction({ action: 'stepClick', target: `${stepData.name}` });\n };\n\n // map steps to components\n const stepComponents = extendedSteps.map(step => {\n if (step.type === 'modal') {\n return (\n \n );\n }\n\n if (step.type === 'popover') {\n return (\n \n );\n }\n\n if (step.type === 'finalPopover') {\n return (\n \n );\n }\n\n if (step.type === 'endingPopover') {\n return (\n \n );\n }\n\n return null;\n });\n\n if (extendedSteps.length === 0) return null;\n if (currentStep === -1) return null;\n\n return (\n \n {stepComponents[currentStep]}\n {footerVisible && (\n \n )}\n \n );\n});\n\nStepByStepWithContinue.propTypes = {\n steps: arrayOf(shape()).isRequired,\n user: shape().isRequired\n};\n\nexport default StepByStepWithContinue;\n","import React, {\n useEffect, useState, useContext, useMemo, forwardRef, useImperativeHandle\n} from 'react';\nimport { arrayOf, shape } from 'prop-types';\nimport { ScWrapper } from './sc/scWrapper';\nimport Footer from './Footer';\nimport InitialModal from './InitialModal';\nimport StepPopover from './StepPopover';\nimport EndingPopover from './EndingPopover';\nimport FinalPopover from './FinalPopover';\nimport { WalkthroughJotFormActionContext } from '../../context';\n\nconst StepByStep = forwardRef(({ steps, user }, ref) => {\n const [extendedSteps, setExtendedSteps] = useState([]);\n const [currentStep, setCurrentStep] = useState(-1);\n const [footerVisible, setFooterVisible] = useState(false);\n const [buttonPopoverVisible, setButtonPopoverVisible] = useState(false);\n const [switchFooterEndTourView, setSwitchFooterEndTourView] = useState(false);\n const [touchedAfterCompleted, setTouchedAfterCompleted] = useState(false);\n\n const popoverSteps = useMemo(() => extendedSteps.filter(step => step.type === 'popover'), [extendedSteps]);\n const areAllPopoverStepsCompleted = useMemo(() => popoverSteps.filter(step => !step.completed).length === 0, [popoverSteps]);\n\n const logWalkthroughAction = useContext(WalkthroughJotFormActionContext);\n\n // helpers\n const initCompletedPropOfAllSteps = allSteps => allSteps.map(step => ({ ...step, completed: false }));\n const resetCompletedPropOfAllSteps = allSteps => allSteps.map(step => (step.type === 'modal' ? step : { ...step, completed: false }));\n\n const toggleStepComplete = (stepData, allSteps) => {\n return allSteps.map(step => {\n if (step.step === stepData.step) return { ...stepData, completed: !stepData.completed };\n return step;\n });\n };\n\n const showButtonPopover = () => setButtonPopoverVisible(true);\n const hideButtonPopover = () => setButtonPopoverVisible(false);\n\n // state updates\n const updateAllSteps = allSteps => setExtendedSteps(allSteps);\n const updateCurrentStep = step => setCurrentStep(step);\n\n // effects\n useEffect(() => {\n const renderableSteps = steps.filter(step => step.type !== 'endTourButton');\n const stepsWithCompleted = initCompletedPropOfAllSteps(renderableSteps);\n const sortedSteps = stepsWithCompleted.sort((a, b) => a.step - b.step);\n updateAllSteps(sortedSteps);\n }, []);\n\n useEffect(() => {\n if (user.walkthroughOffered === '1') {\n updateCurrentStep(-1);\n }\n }, []);\n\n useEffect(() => {\n if (extendedSteps.length === 0) return;\n if (currentStep === -1) return;\n\n const isLastStep = currentStep === extendedSteps.length - 1;\n const isPopover = extendedSteps[currentStep].type === 'popover';\n const isFinalPopover = extendedSteps[currentStep].type === 'finalPopover';\n\n if (isFinalPopover || isLastStep || currentStep === -1) {\n setFooterVisible(false);\n return;\n }\n\n if (isPopover && !footerVisible) {\n setFooterVisible(true);\n }\n }, [currentStep]);\n\n useEffect(() => {\n if (extendedSteps.length === 0) return;\n if (currentStep === -1) return;\n if (!switchFooterEndTourView) return;\n setTouchedAfterCompleted(true);\n }, [currentStep]);\n\n useEffect(() => {\n const className = 'walkthroughActive';\n const bodyElClassList = global.document.querySelector('body').classList;\n\n if (!footerVisible) {\n bodyElClassList.remove(className);\n return;\n }\n\n if (footerVisible && !bodyElClassList.contains(className)) {\n bodyElClassList.add(className);\n }\n }, [footerVisible]);\n\n useEffect(() => {\n if (extendedSteps.length === 0) return;\n if (currentStep === extendedSteps.length - 1) return;\n if (currentStep === -1) return;\n\n const currentStepData = extendedSteps[currentStep];\n if (currentStepData.completed || currentStepData.type === 'finalPopover') return;\n const updatedSteps = toggleStepComplete(currentStepData, extendedSteps);\n updateAllSteps(updatedSteps);\n }, [currentStep]);\n\n useEffect(() => {\n if (currentStep === -1) return;\n\n const stepType = steps[currentStep].type;\n if (stepType === 'popover') {\n hideButtonPopover();\n }\n }, [currentStep]);\n\n // walkthrough controls\n const restartWalkthrough = e => {\n const zeroStep = extendedSteps[0];\n const { onConfirm: { callback, waitCbComplete = 0 } = {} } = zeroStep;\n if (typeof callback === 'function') {\n callback(e);\n\n setTimeout(() => {\n const resetSteps = resetCompletedPropOfAllSteps(extendedSteps);\n updateAllSteps(resetSteps);\n updateCurrentStep(1);\n setSwitchFooterEndTourView(false);\n setTouchedAfterCompleted(false);\n }, waitCbComplete);\n }\n };\n\n useImperativeHandle(ref, () => ({\n startWalkthrough: e => { restartWalkthrough(e); }\n }));\n\n const endWalkthrough = () => updateCurrentStep(-1);\n\n const jumpToLastStep = (e, stepData) => {\n const lastStep = extendedSteps[extendedSteps.length - 1];\n const { onLastStep: { callback, waitCbComplete = 0 } = {} } = lastStep;\n\n if (typeof callback === 'function') {\n callback(stepData);\n setTimeout(() => {\n updateCurrentStep(lastStep.step);\n }, waitCbComplete);\n }\n };\n\n const jumpToStep = step => updateCurrentStep(step);\n\n const nextStep = () => {\n updateCurrentStep(currentStep + 1);\n };\n\n // initial modal\n const handleInitModalConfirm = stepData => {\n const updatedSteps = toggleStepComplete(stepData, extendedSteps);\n updateAllSteps(updatedSteps);\n nextStep();\n logWalkthroughAction({ action: 'letsGoClick', target: 'initialModal' });\n };\n\n const handleInitModalDismiss = e => {\n jumpToLastStep(e);\n logWalkthroughAction({ action: 'noThanksClick', target: 'initialModal' });\n };\n\n // step popover\n const handleStepPopoverConfirmClick = stepData => {\n showButtonPopover();\n const switchDelay = 5000;\n if (areAllPopoverStepsCompleted) {\n setTimeout(() => { setSwitchFooterEndTourView(true); }, switchDelay);\n }\n logWalkthroughAction({ action: 'tryItNowClick', target: `${stepData.name}` });\n };\n\n // final popover\n const handleFinalPopoverFinishTourClick = stepData => {\n endWalkthrough();\n logWalkthroughAction({ action: 'finishTourClick', target: `${stepData.name}` });\n };\n\n const handleFinalPopoverRestartTourClick = (e, stepData) => {\n restartWalkthrough(e);\n logWalkthroughAction({ action: 'restartClick', target: `${stepData.name}` });\n };\n\n // ending popover\n const handleEndingPopoverClick = () => endWalkthrough();\n\n // end tour\n const handleEndTourClick = (e, stepData) => {\n const endTour = steps.find(step => step.type === 'endTourButton');\n const { onClick: { callback, waitCbComplete = 0 } = {} } = endTour;\n\n if (typeof callback === 'function') {\n callback(e);\n setTimeout(() => {\n const allPopoversCompleted = popoverSteps.every(step => step.completed);\n if (allPopoversCompleted) {\n const finalPopoverIndex = extendedSteps.findIndex(step => step.type === 'finalPopover');\n jumpToStep(finalPopoverIndex);\n return;\n }\n\n jumpToLastStep(e, stepData);\n }, waitCbComplete);\n }\n\n logWalkthroughAction({ action: 'endTourClick', target: `${stepData.name}` });\n };\n\n // step button\n const handleStepClickDefault = stepData => {\n jumpToStep(stepData.step);\n logWalkthroughAction({ action: 'stepClick', target: `${stepData.name}` });\n };\n\n // map steps to components\n const stepComponents = extendedSteps.map(step => {\n if (step.type === 'modal') {\n return (\n \n );\n }\n\n if (step.type === 'popover') {\n return (\n \n );\n }\n\n if (step.type === 'finalPopover') {\n return (\n \n );\n }\n\n if (step.type === 'endingPopover') {\n return (\n \n );\n }\n\n return null;\n });\n\n if (extendedSteps.length === 0) return null;\n if (currentStep === -1) return null;\n\n return (\n \n {stepComponents[currentStep]}\n {footerVisible && (\n \n )}\n \n );\n});\n\nStepByStep.propTypes = {\n steps: arrayOf(shape()).isRequired,\n user: shape().isRequired\n};\n\nexport default StepByStep;\n","import React, { useEffect, useRef } from 'react';\nimport {\n shape, func, number, bool\n} from 'prop-types';\nimport { t } from '@jotforminc/translation';\n\nimport DefaultPopover from './DefaultPopover';\nimport {\n ScPopoverFooter,\n ScPopoverConfirmButton,\n ScPopoverEndButton,\n ScPopoverBackButton,\n ScPopoverStepIndicator,\n ScPopoverTitle\n} from './sc/scPopover';\n\nconst InformativeStepPopover = ({\n data,\n stepCount,\n currentStep,\n showVisuals,\n onConfirmClick,\n onBackClick,\n onDismissClick\n}) => {\n const popoverRef = useRef();\n\n useEffect(() => {\n const targetEl = global.document.querySelector(data.reference);\n const handleClick = e => {\n e.preventDefault();\n e.stopPropagation();\n };\n\n targetEl.addEventListener('click', handleClick, true);\n return () => targetEl.removeEventListener('click', handleClick, true);\n });\n\n const handleBackClick = e => {\n const { onBack: { callback, waitCbComplete = 0 } = {} } = data;\n if (typeof callback === 'function') {\n callback(e);\n }\n setTimeout(() => {\n onBackClick(data);\n }, waitCbComplete);\n };\n\n const handleConfrimClick = e => {\n const { onConfirm: { callback, waitCbComplete = 0 } = {} } = data;\n if (typeof callback === 'function') {\n callback(e);\n }\n setTimeout(() => {\n onConfirmClick(data);\n }, waitCbComplete);\n };\n\n const handleDismissClick = e => {\n onDismissClick(e, data);\n };\n\n const TitleRendererForWithVisual = () => (\n \n {t(data.title)}\n \n {currentStep}\n {' '}\n /\n {' '}\n {stepCount}\n \n \n );\n\n const TitleRendererForWithoutVisual = () => {t(data.title)};\n\n const FooterRendererForWithVisual = () => {\n return (\n \n handleDismissClick(e)}>{t('End tour')}\n {currentStep > 1 && handleBackClick(e)}>{t('Back')} }\n handleConfrimClick(e)}>{t('Next')}\n \n );\n };\n\n const FooterRendererForWithoutVisual = () => {\n return (\n \n \n {currentStep}\n {' '}\n /\n {' '}\n {stepCount}\n \n {currentStep > 1 && handleBackClick(e)}>{t('Back')} }\n handleConfrimClick(e)}>{t('Next')}\n \n );\n };\n\n return (\n \n );\n};\n\nInformativeStepPopover.propTypes = {\n showVisuals: bool,\n currentStep: number.isRequired,\n stepCount: number.isRequired,\n data: shape().isRequired,\n onConfirmClick: func,\n onBackClick: func,\n onDismissClick: func\n\n};\n\nInformativeStepPopover.defaultProps = {\n showVisuals: true,\n onConfirmClick: f => f,\n onBackClick: f => f,\n onDismissClick: f => f\n};\n\nexport default InformativeStepPopover;\n","import React from 'react';\nimport { ScModalOutline } from './sc/scModal';\n\nconst StandaloneOverlay = () => ;\n\nexport default StandaloneOverlay;\n","import React, {\n useEffect, useState, useContext, forwardRef, useImperativeHandle\n} from 'react';\nimport { arrayOf, shape, bool } from 'prop-types';\nimport { ScWrapper } from './sc/scWrapper';\nimport Preload from './Preload';\nimport InitialModal from './InitialModal';\nimport InformativeStepPopover from './InformativeStepPopover';\nimport EndingPopover from './EndingPopover';\nimport FinalPopover from './FinalPopover';\nimport StandaloneOverlay from './StandaloneOverlay';\nimport { WalkthroughJotFormActionContext } from '../../context';\n\nconst Informative = forwardRef(({\n steps, user, showVisuals\n}, ref) => {\n const [extendedSteps, setExtendedSteps] = useState([]);\n const [currentStep, setCurrentStep] = useState(-1);\n\n const logWalkthroughAction = useContext(WalkthroughJotFormActionContext);\n\n // state updates\n const updateAllSteps = allSteps => setExtendedSteps(allSteps);\n\n // effects\n useEffect(() => {\n const sortedSteps = steps.sort((a, b) => a.step - b.step);\n updateAllSteps(sortedSteps);\n }, []);\n\n useEffect(() => {\n if (user.walkthroughOffered === '1') {\n setCurrentStep(-1);\n }\n }, []);\n\n // walkthrough controls\n const restartWalkthrough = e => {\n const zeroStep = extendedSteps[0];\n const { onConfirm: { callback, waitCbComplete = 0 } = {} } = zeroStep;\n if (typeof callback === 'function') {\n callback(e);\n }\n\n setTimeout(() => {\n setCurrentStep(1);\n }, waitCbComplete);\n };\n\n useImperativeHandle(ref, () => ({\n startWalkthrough: e => { restartWalkthrough(e); }\n }));\n\n const endWalkthrough = () => setCurrentStep(-1);\n\n const jumpToLastStep = (e, stepData) => {\n const lastStep = extendedSteps[extendedSteps.length - 1];\n const { onLastStep: { callback, waitCbComplete = 0 } = {} } = lastStep;\n\n if (typeof callback === 'function') {\n callback(stepData);\n }\n\n setTimeout(() => {\n setCurrentStep(lastStep.step);\n }, waitCbComplete);\n };\n\n const prevStep = () => {\n setCurrentStep(step => step - 1);\n };\n\n const nextStep = () => {\n setCurrentStep(step => step + 1);\n };\n\n // initial modal\n const handleInitModalConfirm = stepData => {\n nextStep(stepData);\n logWalkthroughAction({ action: 'letsGoClick', target: 'initialModal' });\n };\n\n const handleInitModalDismiss = e => {\n jumpToLastStep(e);\n logWalkthroughAction({ action: 'noThanksClick', target: 'initialModal' });\n };\n\n // informative step popover\n const handleStepPopoverConfirmClick = stepData => {\n nextStep(stepData);\n logWalkthroughAction({ action: 'nextClick', target: `${stepData.name}` });\n };\n\n const handleStepPopoverDismissClick = (e, stepData) => {\n jumpToLastStep(e, stepData);\n logWalkthroughAction({ action: 'endTourClick', target: `${stepData.name}` });\n };\n\n const handleStepPopoverBackClick = stepData => {\n prevStep(stepData);\n logWalkthroughAction({ action: 'backClick', target: `${stepData.name}` });\n };\n\n // final popover\n const handleFinalPopoverFinishTourClick = stepData => {\n endWalkthrough();\n logWalkthroughAction({ action: 'finishTourClick', target: `${stepData.name}` });\n };\n\n const handleFinalPopoverRestartTourClick = (e, stepData) => {\n restartWalkthrough(e);\n logWalkthroughAction({ action: 'restartClick', target: `${stepData.name}` });\n };\n\n const handleFinalPopoverCloseClick = (e, stepData) => {\n endWalkthrough();\n logWalkthroughAction({ action: 'closeClick', target: `${stepData.name}` });\n };\n\n // ending popover\n const handleEndingPopoverClick = () => endWalkthrough();\n\n // map steps to components\n const stepComponents = extendedSteps.map(step => {\n if (step.type === 'modal') {\n return (\n \n );\n }\n\n if (step.type === 'popover') {\n return (\n stp.type === 'popover').length}\n />\n );\n }\n\n if (step.type === 'finalPopover') {\n return (\n \n );\n }\n\n if (step.type === 'endingPopover') {\n return (\n \n );\n }\n\n return null;\n });\n\n if (extendedSteps.length === 0) return null;\n if (currentStep === -1) return null;\n\n const popoverSteps = extendedSteps.filter(step => step.type === 'popover');\n\n return (\n \n \n {extendedSteps[currentStep].type === 'modal'\n && }\n {stepComponents[currentStep]}\n \n );\n});\n\nInformative.propTypes = {\n showVisuals: bool,\n user: shape().isRequired,\n steps: arrayOf(shape()).isRequired\n};\n\nInformative.defaultProps = {\n showVisuals: true\n};\n\nexport default Informative;\n","import React from 'react';\nimport { createRoot } from 'react-dom/client';\nimport { arrayOf, shape, string } from 'prop-types';\nimport StepByStepWithContinue from './StepByStepWithContinue';\nimport StepByStep from './StepByStep';\nimport Informative from './Informative';\nimport { WalkthroughJotFormActionContext } from '../../context';\n\nclass FormBuilderWalkthrough extends React.Component {\n constructor(props) {\n super(props);\n\n const { containerSelector } = props;\n\n this.JotFormActions = null;\n this.logWalkthroughAction = this.logWalkthroughAction.bind(this);\n this.containerEl = global.document.querySelector(containerSelector);\n\n this.setupJotFormActions();\n }\n\n setupJotFormActions() {\n const { JotFormActions } = global;\n if (typeof JotFormActions === 'function') {\n this.JotFormActions = JotFormActions('productWalkthroughV5');\n }\n }\n\n logWalkthroughAction({ action, target }) {\n const { user: { username: actor = null } } = this.props;\n\n if (actor && this.JotFormActions) {\n this.JotFormActions.tick({ actor, action, target });\n }\n }\n\n init() {\n if (!this.containerEl) {\n console.log('ProductWalkthrough: Container element doest not exists. Check your selector.');\n return;\n }\n\n const root = createRoot(this.containerEl);\n\n const { type } = this.props;\n\n const walkthroughMap = {\n stepByStep: ,\n informativeWithVisuals: ,\n informative: ,\n stepByStepWithContinue: \n };\n\n root.render(\n \n {walkthroughMap[type]}\n \n );\n }\n}\n\nFormBuilderWalkthrough.propTypes = {\n type: string,\n user: shape().isRequired,\n containerSelector: string.isRequired,\n steps: arrayOf(shape()).isRequired\n};\n\nFormBuilderWalkthrough.defaultProps = {\n type: 'stepByStep'\n};\n\nexport default FormBuilderWalkthrough;\n","import React from 'react';\nimport {\n IconVideoFilled, IconFileFilled, IconKeyboard, IconMessageFilled, IconPaperPlaneFilled,\n IconAnnotationInfoFilled, IconRocketFilled,\n IconGraduationCapFilled,\n IconTagFilled\n} from '@jotforminc/svg-icons';\n\nexport const staticMenuItems = [\n {\n id: 1,\n name: 'jotformAcademy',\n url: '/academy/',\n title: 'Jotform Academy',\n icon: ,\n trackerName: 'jotformAcademy'\n },\n {\n id: 2,\n name: 'videoTutorials',\n url: 'https://www.youtube.com/watch?v=C1XrCmJIkmQ',\n title: 'Video Tutorials',\n icon: ,\n trackerName: 'videoTutorials'\n },\n {\n id: 3,\n name: 'userGuides',\n url: '/help/',\n title: 'User Guides',\n icon: ,\n trackerName: 'userGuides'\n },\n {\n id: 4,\n name: 'showTips',\n url: '',\n title: 'Show Tips',\n icon: ,\n trackerName: 'productWalkthrough'\n },\n {\n id: 5,\n name: 'keyboardShortcuts',\n url: '',\n title: 'Keyboard Shortcuts',\n icon: ,\n trackerName: 'keyboardShortcuts'\n },\n {\n id: 6,\n name: 'supportForum',\n url: '/answers/',\n title: 'Support Forum',\n icon: ,\n trackerName: 'forum'\n },\n {\n id: 7,\n name: 'contact',\n url: '/contact/',\n title: 'Contact Support',\n icon: ,\n trackerName: 'contactUs'\n },\n {\n id: 8,\n name: 'pricing',\n url: '/pricing/',\n title: 'Pricing',\n icon: ,\n trackerName: 'Pricing'\n },\n {\n id: 9,\n name: 'getProfessionalServices',\n url: '/enterprise/professional-services/',\n title: 'Get Professional Services',\n icon: ,\n trackerName: 'getProfessionalServices'\n }\n];\n\nexport const popularArticleItems = [\n {\n id: 1,\n name: 'createYourFirstWebForm',\n url: '/help/2-how-to-create-your-first-web-form',\n title: 'How to Create Your First Web Form',\n icon: ,\n trackerName: 'popularArticle_howToCreateYourFirstWebForm'\n },\n {\n id: 2,\n name: 'settingUpEmailNotification',\n url: '/help/25-setting-up-email-notifications',\n title: 'Setting Up Email Notification',\n icon: ,\n trackerName: 'popularArticle_settingUpEmailNotification'\n },\n {\n id: 3,\n name: 'howToViewFormSubmission',\n url: '/help/269-how-to-view-form-submissions',\n title: 'How to View Form Submissions',\n icon: ,\n trackerName: 'popularArticle_howToViewFormSubmissions'\n },\n {\n id: 4,\n name: 'smartForms',\n url: '/help/57-smart-forms-conditional-logic-for-online-forms',\n title: 'Smart Forms: Conditional Logic for Online Forms',\n icon: ,\n trackerName: 'popularArticle_smartFormsConditionalLogicForOnlineForms'\n },\n {\n id: 5,\n name: 'whichFormEmbedShouldUse',\n url: '/help/67-which-form-embed-code-should-i-use',\n title: 'Which Form Embed Code Should I Use',\n icon: ,\n trackerName: 'popularArticle_whichFormEmbedCodeShouldIUse'\n }\n];\n\nexport const searchResult = {\n data: [\n {\n id: 1,\n url: 'https://www.jotform.com/',\n title: 'Hide or Show Multiple Fields at Once'\n },\n {\n id: 2,\n url: 'https://www.jotform.com/',\n title: 'How to Show or Hide Fields Base on User\\'s Answer'\n },\n {\n id: 3,\n url: 'https://www.jotform.com/',\n title: 'How to Show and Hide Columns in JotForm Tables'\n },\n {\n id: 4,\n url: 'https://www.jotform.com/',\n title: 'How to Show or Hide Fields on Edit URL'\n }\n ]\n};\n\nexport const MIN_SEARCH_TERM_LENGTH = 2;\n\nexport const walkthroughType = 'informativeWithVisuals';\n\nexport const shortcuts = [\n {\n id: 1,\n title: 'Undo',\n combinations: {\n default: [['CTRL', 'Z']],\n mac: [['⌘', 'Z']]\n }\n },\n {\n id: 2,\n title: 'Redo',\n combinations: {\n default: [['CTRL', 'Y']],\n mac: [['⌘', 'Y'], ['⌘', '⇧', 'Z']]\n }\n },\n {\n id: 3,\n title: 'Select / deselect multiple fields',\n combinations: {\n default: [['CTRL', 'Click']],\n mac: [['⌘', 'Click']]\n }\n },\n {\n id: 4,\n title: 'Select all fields',\n combinations: {\n default: [['CTRL', 'A']],\n mac: [['⌘', 'A']]\n }\n },\n {\n id: 5,\n title: 'Copy selected field(s)',\n combinations: {\n default: [['CTRL', 'C']],\n mac: [['⌘', 'C']]\n }\n },\n {\n id: 6,\n title: 'Paste field(s) below selection',\n combinations: {\n default: [['CTRL', 'V']],\n mac: [['⌘', 'V']]\n }\n },\n {\n id: 7,\n title: 'Duplicate selected field(s)',\n combinations: {\n default: [['CTRL', 'D']],\n mac: [['⌘', 'D']]\n }\n },\n {\n id: 8,\n title: 'Delete selected field(s)',\n combinations: {\n default: [['DELETE']],\n mac: [['⌦'], ['fn', '⌫']]\n }\n },\n {\n id: 9,\n title: 'Deselect selection',\n combinations: {\n default: [['ESC']],\n mac: [['ESC']]\n }\n },\n {\n id: 10,\n title: 'Select next field',\n combinations: {\n default: [['↓']],\n mac: [['↓']]\n }\n },\n {\n id: 11,\n title: 'Select previous field',\n combinations: {\n default: [['↑']],\n mac: [['↑']]\n }\n }\n];\n","import { useEffect, useRef } from 'react';\nimport {\n formBuilderWalkthroughManager as walkthroughManager,\n FormBuilderWalkthrough as ProductWalkthrough,\n informativeSteps\n} from '@jotforminc/product-walkthrough';\nimport { walkthroughType } from '../constants';\n\nconst useWalkthrough = (user, formBuilderActions = {}) => {\n const walkthroughRef = useRef();\n\n useEffect(() => {\n try {\n walkthroughManager.builderActions.actions = formBuilderActions;\n walkthroughManager.currentWalkthroughType = walkthroughType;\n\n let walkthroughOptions = {\n containerSelector: '#walkthrough-root',\n steps: informativeSteps,\n user: user,\n ref: Walkthrough => {\n if (Walkthrough && typeof Walkthrough.startWalkthrough === 'function') {\n walkthroughManager.walkthroughActions.startWalkthrough = Walkthrough.startWalkthrough;\n }\n }\n };\n\n walkthroughOptions = { ...walkthroughOptions, type: walkthroughType };\n\n walkthroughRef.current = new ProductWalkthrough(walkthroughOptions);\n walkthroughRef.current?.init();\n } catch (e) {\n console.log('product walkthrough failed...', e);\n }\n }, []);\n\n return walkthroughRef;\n};\n\nexport default useWalkthrough;\n","import React from 'react';\nimport { func, node } from 'prop-types';\nimport { t } from '@jotforminc/translation';\nimport { ALL_TEXTS } from '@jotforminc/ep-utils';\nimport CloseIcon from '../../../../assets/svg/close_revised.svg';\n\nexport const DialogRenderer = ({ children }) => (
    {children}
    );\n\nDialogRenderer.propTypes = { children: node };\nDialogRenderer.defaultProps = { children: null };\n\nexport const ContentRenderer = ({ children, ...props }) => (\n
    \n
    \n {children}\n
    \n
    \n);\n\nContentRenderer.propTypes = { children: node };\nContentRenderer.defaultProps = { children: null };\n\nexport const HeaderRenderer = ({ onCloseClick, ...props }) => (\n \n \n \n);\n\nHeaderRenderer.propTypes = { onCloseClick: func };\nHeaderRenderer.defaultProps = { onCloseClick: f => f };\n","import React from 'react';\nimport { func } from 'prop-types';\nimport { t, translationRenderer } from '@jotforminc/translation';\nimport { IconRocketFilled } from '@jotforminc/svg-icons';\nimport {\n ALL_TEXTS, ASSET_IDENTIFIER, GA_SUFFIXES, createGaAttributes\n} from '@jotforminc/ep-utils';\n\nconst Aside = ({ onContactSalesClick, onLearnMoreClick }) => {\n const { AB_TEST: { SCHEDULE_ZOOM_MODAL: target } } = ASSET_IDENTIFIER;\n\n const gaAttributesLm = createGaAttributes(target, GA_SUFFIXES.LEARN_MORE);\n const gaAttributesCs = createGaAttributes(target, GA_SUFFIXES.UPGRADE_TO_ENTERPRISE);\n\n return (\n
    \n
    \n \n

    {t(ALL_TEXTS.JOTFORM_ENTERPRISE)}

    \n
    \n

    \n {translationRenderer(ALL_TEXTS.APPLY_FOR_DEDICATED_ZOOM_SUPPORT)({\n renderer1: str => {str}\n })}\n

    \n
    \n {/* contact sales */}\n \n {t(ALL_TEXTS.UPGRADE_TO_ENTERPRISE)}\n \n {/* learn more */}\n \n {t(ALL_TEXTS.LEARN_MORE_ABOUT_JOTFORM_ENTERPRISE)}\n \n
    \n
    \n );\n};\n\nAside.propTypes = {\n onContactSalesClick: func.isRequired,\n onLearnMoreClick: func.isRequired\n};\n\nexport default Aside;\n","import React, { useEffect, useRef, useState } from 'react';\nimport { Modal } from '@jotforminc/uikit';\nimport {\n func, bool, object\n} from 'prop-types';\nimport { handleCustomNavigation } from '@jotforminc/utils';\nimport { t } from '@jotforminc/translation';\nimport {\n ASSET_IDENTIFIER, ALL_TEXTS, CTA_URLS, userPropType, LEAD_FORM_MAP, GA_FORM_TRACKING_ITEMS, GA_AD_FORM_TRACKING_ITEMS,\n GA_SUFFIXES, createGaAttributes, gaDataLayerPushClose, setEPActions, mapCallbacksToGaTrackingItems, hasAdwordsModeOn,\n PrefilledLeadFormAside\n} from '@jotforminc/ep-utils';\nimport { ContentRenderer, DialogRenderer, HeaderRenderer } from './Renderers';\nimport Aside from './Aside';\nimport '../../../../styles/scheduleZoomModal.scss';\n\nconst ScheduleZoomModal = ({\n user,\n modalProps,\n logAbTestAction,\n onClose\n}) => {\n const { AB_TEST: { SCHEDULE_ZOOM_MODAL: target } } = ASSET_IDENTIFIER;\n const { SCHEDULE_ZOOM_MODAL: { LEARN_MORE_URL } } = CTA_URLS;\n\n const uikitModalRef = useRef(null);\n const [isFormVisible, setIsFormVisible] = useState(false);\n\n const gaAttributes = createGaAttributes(target);\n const gaAttributesClose = createGaAttributes(target, GA_SUFFIXES.CLOSE);\n\n const isAdForm = hasAdwordsModeOn();\n let { [target]: gaFormTrackingItems } = isAdForm ? GA_AD_FORM_TRACKING_ITEMS : GA_FORM_TRACKING_ITEMS;\n\n useEffect(() => {\n const actionData = { action: 'seen', target };\n\n logAbTestAction(actionData);\n setEPActions({ asset: target, ...actionData });\n }, []);\n\n const handleCloseClick = () => {\n const actionData = { action: 'click', target: 'closeButton' };\n\n logAbTestAction(actionData);\n setEPActions({ asset: target, target: 'closeButton', action: 'click' });\n\n uikitModalRef.current?.hide();\n };\n\n const handleClose = () => {\n gaDataLayerPushClose(gaAttributes);\n\n const actionData = { action: 'close', target };\n logAbTestAction(actionData);\n setEPActions({ asset: target, ...actionData });\n\n onClose();\n };\n\n const handleUpgradeToEnterpriseClick = () => {\n const actionData = { target: 'upgradeToEnterprise', action: 'click' };\n\n logAbTestAction(actionData);\n setEPActions({ asset: target, ...actionData });\n\n setIsFormVisible(true);\n };\n\n const handleLearnMoreClick = () => {\n const actionData = { target: 'learnMoreButton', action: 'click' };\n\n logAbTestAction(actionData);\n setEPActions({ asset: target, target: 'learnMoreButton', action: 'click' });\n\n handleCustomNavigation(`${window.location.origin}${LEARN_MORE_URL}`);\n };\n\n const handleContactNowClick = () => {\n const actionData = { target: 'contactNowButton', action: 'click' };\n\n logAbTestAction(actionData);\n setEPActions({ asset: target, ...actionData });\n };\n\n const handleFormSubmit = () => {\n const actionData = { target, action: 'formSubmit' };\n\n logAbTestAction(actionData);\n setEPActions({ asset: target, ...actionData });\n };\n\n gaFormTrackingItems = mapCallbacksToGaTrackingItems(gaFormTrackingItems, [handleContactNowClick]);\n\n return (\n
    \n }\n HeaderRenderer={() => }\n onModalClose={handleClose}\n {...modalProps}\n >\n
    \n {isFormVisible ? (\n
    \n \n {t(ALL_TEXTS.CONTACT_ENTERPRISE_SALES_REPRESENTATIVE)}\n \n \n
    \n ) : (\n <>\n
    \n {/* aside */}\n \n
    \n
    \n {ALL_TEXTS.ENTERPRISE_ADMIN_CONSOLE}\n {ALL_TEXTS.ENTERPRISE_ADMIN_CONSOLE}\n
    \n \n )}\n\n
    \n \n
    \n );\n};\n\nScheduleZoomModal.propTypes = {\n user: userPropType.isRequired,\n modalProps: object,\n defaultVisible: bool,\n onClose: func,\n logAbTestAction: func\n};\n\nScheduleZoomModal.defaultProps = {\n modalProps: {},\n defaultVisible: true,\n onClose: f => f,\n logAbTestAction: f => f\n};\n\nexport default ScheduleZoomModal;\n","import React, { useEffect } from 'react';\nimport { t } from '@jotforminc/translation';\nimport { func } from 'prop-types';\nimport { IconRocketSquareBrokenFilled, IconZoomCircleFilled } from '@jotforminc/svg-icons';\nimport {\n GA_SUFFIXES, createGaAttributes, renderModal,\n ALL_TEXTS, ASSET_IDENTIFIER, userPropType, setEPActions\n} from '@jotforminc/ep-utils';\nimport '../../../styles/scheduleZoomBanner.scss';\nimport { ScheduleZoomModal } from '../../Modals';\n\nconst ScheduleZoomBanner = ({ user, logAbTestAction }) => {\n const { AB_TEST: { SCHEDULE_ZOOM_BANNER: target } } = ASSET_IDENTIFIER;\n\n const gaAttributes = createGaAttributes(target);\n const gaAttributesAn = createGaAttributes(target, GA_SUFFIXES.SCHEDULE_ZOOM_CALL);\n\n useEffect(() => {\n const actionData = { action: 'seen', target };\n\n logAbTestAction(actionData);\n setEPActions({ asset: target, ...actionData });\n }, []);\n\n const handleScheduleAZoomCallClick = () => {\n logAbTestAction({ action: 'click', target: target });\n renderModal({\n user,\n Modal: ScheduleZoomModal,\n logAbTestAction\n });\n };\n\n return (\n
    \n \n \n \n \n {t(ALL_TEXTS.SCHEDULE_ZOOM_CALL)}\n \n \n \n \n
    \n );\n};\n\nScheduleZoomBanner.propTypes = {\n user: userPropType.isRequired,\n logAbTestAction: func\n};\n\nScheduleZoomBanner.defaultProps = {\n logAbTestAction: f => f\n};\n\nexport default ScheduleZoomBanner;\n","import React from 'react';\nimport { func, node } from 'prop-types';\nimport { t } from '@jotforminc/translation';\nimport { ALL_TEXTS } from '@jotforminc/ep-utils';\nimport CloseIcon from '../../../../assets/svg/close_revised.svg';\n\nexport const DialogRenderer = ({ children }) => (
    {children}
    );\n\nDialogRenderer.propTypes = { children: node };\nDialogRenderer.defaultProps = { children: null };\n\nexport const ContentRenderer = ({ children, ...props }) => (\n
    \n
    \n {children}\n
    \n
    \n);\n\nContentRenderer.propTypes = { children: node };\nContentRenderer.defaultProps = { children: null };\n\nexport const HeaderRenderer = ({ onCloseClick, ...props }) => (\n \n \n \n);\n\nHeaderRenderer.propTypes = { onCloseClick: func };\nHeaderRenderer.defaultProps = { onCloseClick: f => f };\n","import React, { useRef } from 'react';\nimport { Modal } from '@jotforminc/uikit';\nimport {\n bool, func, object, string\n} from 'prop-types';\nimport { t, translationRenderer } from '@jotforminc/translation';\nimport {\n ALL_TEXTS, gaAttributesPropType, gaFormTrackingItemsPropType, userPropType, PrefilledLeadFormAside\n} from '@jotforminc/ep-utils';\nimport { ContentRenderer, DialogRenderer, HeaderRenderer } from './Renderers';\nimport EnterpriseIcon from '../../../../assets/svg/enterpriseRocketMini.svg';\nimport '../../../../styles/dedicatedSupportModal.scss';\n\nconst SupportModal = (({\n user,\n modalProps,\n title,\n gaAttributes,\n gaAttributesClose,\n formUiModifier,\n gaFormTrackingItems,\n descriptionText,\n onClose,\n onCloseClick,\n onFormSubmit,\n isAdForm,\n ...props\n}) => {\n const uikitModalRef = useRef(null);\n\n const handleClose = () => {\n onClose();\n };\n\n const handleCloseClick = () => {\n uikitModalRef.current?.hide();\n onCloseClick();\n };\n\n return (\n }\n HeaderRenderer={() => }\n onModalClose={handleClose}\n {...modalProps}\n >\n
    \n
    \n \n \n {t(title)}\n \n

    \n {translationRenderer(descriptionText)({\n renderer1: nowrapText => (\n \n {nowrapText}\n \n )\n })}\n

    \n {t(ALL_TEXTS.DEDICATED_SUPPORT_DESC)}\n
    \n {/* aside */}\n
    \n \n
    \n
    \n \n );\n});\n\nSupportModal.propTypes = {\n title: string.isRequired,\n descriptionText: string.isRequired,\n gaAttributes: gaAttributesPropType.isRequired,\n gaAttributesClose: gaAttributesPropType.isRequired,\n user: userPropType.isRequired,\n formUiModifier: string.isRequired,\n gaFormTrackingItems: gaFormTrackingItemsPropType.isRequired,\n modalProps: object,\n onClose: func,\n onCloseClick: func,\n logAbTestAction: func,\n onFormSubmit: func,\n isAdForm: bool\n};\n\nSupportModal.defaultProps = {\n modalProps: {},\n onClose: f => f,\n onCloseClick: f => f,\n logAbTestAction: f => f,\n onFormSubmit: f => f,\n isAdForm: false\n};\n\nexport default SupportModal;\n","import React, { useEffect } from 'react';\nimport { func } from 'prop-types';\nimport {\n ASSET_IDENTIFIER, ALL_TEXTS,\n GA_FORM_TRACKING_ITEMS, userPropType, GA_AD_FORM_TRACKING_ITEMS,\n GA_SUFFIXES, createGaAttributes, gaDataLayerPushClose, hasAdwordsModeOn, setEPActions, mapCallbacksToGaTrackingItems\n} from '@jotforminc/ep-utils';\nimport SupportModal from './SupportModal';\n\n// A/B Test: formBuilderHelpMenuDedicatedSupportII\nconst HelpDedicatedSupportModal = (({\n user,\n onCloseClick,\n logAbTestAction,\n onClose\n}) => {\n const { PRODUCT: { HELP_DEDICATED_SUPPORT_MODAL } } = ASSET_IDENTIFIER;\n const target = HELP_DEDICATED_SUPPORT_MODAL;\n\n const isAdForm = hasAdwordsModeOn();\n let { [target]: gaFormTrackingItems } = isAdForm ? GA_AD_FORM_TRACKING_ITEMS : GA_FORM_TRACKING_ITEMS;\n\n const gaAttributes = createGaAttributes(target);\n const gaAttributesClose = createGaAttributes(target, GA_SUFFIXES.CLOSE);\n\n useEffect(() => {\n const actionData = { action: 'seen', target };\n\n logAbTestAction(actionData);\n setEPActions({ asset: target, ...actionData });\n }, []);\n\n const handleCloseClick = () => {\n const actionData = { action: 'click', target: 'closeButton' };\n\n logAbTestAction(actionData);\n setEPActions({ asset: target, target: 'closeButton', action: 'click' });\n\n onCloseClick();\n };\n\n const handleClose = () => {\n gaDataLayerPushClose(gaAttributes);\n\n const actionData = { action: 'close', target };\n logAbTestAction(actionData);\n setEPActions({ asset: target, ...actionData });\n\n onClose();\n };\n\n const handleContactNowClick = () => {\n const actionData = { target: 'contactNowButton', action: 'click' };\n\n logAbTestAction(actionData);\n setEPActions({ asset: target, ...actionData });\n };\n\n gaFormTrackingItems = mapCallbacksToGaTrackingItems(gaFormTrackingItems, [handleContactNowClick]);\n\n return (\n \n );\n});\n\nHelpDedicatedSupportModal.propTypes = {\n user: userPropType.isRequired,\n onClose: func,\n onCloseClick: func,\n logAbTestAction: func\n};\n\nHelpDedicatedSupportModal.defaultProps = {\n onClose: f => f,\n onCloseClick: f => f,\n logAbTestAction: f => f\n};\n\nexport default HelpDedicatedSupportModal;\n","import React, {\n useEffect\n} from 'react';\nimport { bool, func } from 'prop-types';\nimport { t } from '@jotforminc/translation';\nimport {\n ASSET_IDENTIFIER, ALL_TEXTS, SDR_SOURCES, userPropType,\n GA_SUFFIXES, createGaAttributes, renderModal, saveCustomerAsHubspotFormByUsername, setEPActions\n} from '@jotforminc/ep-utils';\nimport EnterpriseIcon from '../../../assets/svg/enterpriseRocketMini.svg';\nimport '../../../styles/dedicatedSupportBanner.scss';\nimport { HelpDedicatedSupportModal } from '../../Modals';\n\nconst DedicatedSupportBanner = ({ user, isFirstOpen, logAbTestAction }) => {\n const { PRODUCT: { DEDICATED_SUPPORT_BANNER: target } } = ASSET_IDENTIFIER;\n\n const gaAttributes = createGaAttributes(target);\n const gaAttributesCs = createGaAttributes(target, GA_SUFFIXES.CONTACT_SALES);\n\n useEffect(() => {\n const actionData = { action: 'seen', target };\n\n logAbTestAction(actionData);\n setEPActions({ asset: target, target, action: 'seen' });\n }, [logAbTestAction]);\n\n const handleContactSalesClick = async () => {\n const actionData = { action: 'click', target: 'contactSalesButton' };\n\n logAbTestAction(actionData);\n setEPActions({ asset: target, ...actionData });\n saveCustomerAsHubspotFormByUsername({ lastProductAssetInteraction: SDR_SOURCES.FORM_BUILDER_HELP_MENU });\n\n renderModal({\n user,\n Modal: HelpDedicatedSupportModal,\n logAbTestAction\n });\n };\n\n const getClassName = () => {\n return `dedicated-support-banner ${isFirstOpen ? 'firstOpen' : ''}`;\n };\n\n return (\n
    \n
    \n \n {t(ALL_TEXTS.DEDICATED_SUPPORT_SUB_TITLE)}\n
    \n
    \n {t(ALL_TEXTS.DEDICATED_SUPPORT)}\n
    \n

    \n {t(ALL_TEXTS.DEDICATED_SUPPORT_CONTENT)}\n

    \n {/* contact sales */}\n \n {t(ALL_TEXTS.CONTACT_SALES)}\n \n
    \n );\n};\n\nDedicatedSupportBanner.propTypes = {\n user: userPropType.isRequired,\n logAbTestAction: func,\n isFirstOpen: bool\n};\n\nDedicatedSupportBanner.defaultProps = {\n isFirstOpen: false,\n logAbTestAction: f => f\n};\n\nexport default DedicatedSupportBanner;\n","import React, { useEffect, useRef, useState } from 'react';\nimport { bool } from 'prop-types';\nimport { ABTestManager } from '@jotforminc/abtest-manager';\nimport { userPropType } from '@jotforminc/ep-utils';\nimport '../../styles/loader.scss';\nimport { DedicatedSupportBanner, ScheduleZoomBanner } from '../Banners';\n\n// A/B Test: formBuilderHelpMenuDedicatedSupportIII\nconst DedicatedSupportAbTester = ({\n user,\n isFirstOpen\n}) => {\n const [isLoading, setIsLoading] = useState(true);\n const [isTestVariant, setIsTestVariant] = useState(null);\n const logAbTestAction = useRef(f => f);\n\n useEffect(() => {\n (async () => {\n const abTestManager = new ABTestManager({\n isTestEnabled: true,\n testName: 'formBuilderHelpMenuDedicatedSupportIII',\n controlVariantCode: '28202',\n testVariantCode: '28212',\n urlParam: 'fbhmdsiii',\n user,\n cacheVariantCodeAtLocalStorage: true\n });\n\n logAbTestAction.current = abTestManager.registerABTestAction;\n\n try {\n const _isTestVariant = await abTestManager.isTestVariant();\n setIsTestVariant(_isTestVariant);\n } finally {\n setIsLoading(false);\n }\n })();\n }, [user]);\n\n if (isLoading) return null;\n\n return isTestVariant ? \n : ;\n};\n\nDedicatedSupportAbTester.propTypes = {\n user: userPropType.isRequired,\n isFirstOpen: bool.isRequired\n};\n\nexport default DedicatedSupportAbTester;\n","const generateRequestKey = keyLength => {\n const MAX_LENGTH = 128;\n if (keyLength.length > MAX_LENGTH) {\n console.warn('max help request key length is exceeded.');\n }\n\n let result = '';\n const characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\n const charactersLength = characters.length;\n for (let i = 0; i < keyLength; i++) {\n result += characters.charAt(Math.floor(Math.random() * charactersLength));\n }\n return result;\n};\n\nexport default generateRequestKey;\n","import { RequestLayer, Interceptors } from '@jotforminc/request-layer';\n\nconst r = new RequestLayer('/API', {\n interceptorConfig: {\n teamID: global.teamID,\n customResponseInterceptors: [Interceptors.returnAxiosData]\n }\n});\n\nexport const endpoints = {\n searchInHelpGuide: (searchTerm, searchLang, key) => r.post(\n `helpGuides/search?searchTerm=${searchTerm}&searchLang=${searchLang}&location=${global.location.href}&key=${key}`,\n null,\n { isFormData: true }\n )\n};\n","import React, {\n useState, useRef, useContext, useEffect, useMemo\n} from 'react';\nimport { func, string } from 'prop-types';\nimport { IconMagnifyingGlass, IconXmark } from '@jotforminc/svg-icons';\nimport debounce from 'lodash/debounce';\nimport { t } from '@jotforminc/translation';\nimport { MIN_SEARCH_TERM_LENGTH } from '../constants';\nimport { generateRequestKey } from '../utils';\nimport { ActionLoggerContext } from '../context';\nimport { endpoints } from '../api';\n\nconst SearchInput = React.forwardRef(({\n searchLanguage,\n onSearchInputFocus,\n onSearchInputChange,\n onSearchResultsChange,\n setSearchResultsLoading\n}, ref) => {\n const inputRef = useRef(null);\n const logHelpOnBuilderABTestEvent = useContext(ActionLoggerContext);\n const [reqKey, setReqKey] = useState('');\n\n useEffect(() => {\n setReqKey(generateRequestKey(32));\n return () => { setReqKey(''); };\n }, []);\n\n const searchInHelpGuideAPI = (value, lang) => {\n return new Promise((resolve, reject) => {\n endpoints.searchInHelpGuide(value, lang, reqKey).then(searchResponse => {\n const { content: { data: results = [], count = 0 } = {} } = searchResponse;\n resolve({ results, count });\n }).catch(reject);\n });\n };\n\n const searchInHelpGuide = (searchTerm, lang) => {\n searchInHelpGuideAPI(searchTerm, lang).then(({ results, count }) => {\n onSearchResultsChange(results, count);\n }).catch(error => {\n onSearchResultsChange([], 0);\n console.log('help search api error:', error);\n });\n };\n\n const debouncedSearchInHelpGuide = useMemo(() => debounce(searchInHelpGuide, 550), [reqKey]);\n\n const handleInputChange = ({ target }) => {\n onSearchInputChange(target.value);\n if (target.value.length < MIN_SEARCH_TERM_LENGTH) return;\n debouncedSearchInHelpGuide(target.value, searchLanguage);\n setSearchResultsLoading(true);\n };\n\n const handleSearchClearClick = () => {\n if (!inputRef.current) return;\n inputRef.current.value = '';\n inputRef.current.focus();\n onSearchInputChange('');\n };\n\n const handleInputFocus = () => {\n onSearchInputFocus();\n logHelpOnBuilderABTestEvent({ action: 'focus', target: 'searchInput' });\n };\n\n return (\n
  • \n
    \n \n \n \n {inputRef.current && inputRef.current.value !== ''\n && (\n \n )}\n
    \n
  • \n );\n});\n\nSearchInput.propTypes = {\n searchLanguage: string,\n onSearchResultsChange: func,\n onSearchInputChange: func,\n onSearchInputFocus: func,\n setSearchResultsLoading: func\n};\n\nSearchInput.defaultProps = {\n searchLanguage: 'en-US',\n onSearchResultsChange: f => f,\n onSearchInputChange: f => f,\n onSearchInputFocus: f => f,\n setSearchResultsLoading: f => f\n};\n\nexport default SearchInput;\n","import React from 'react';\nimport {\n elementType, func, shape, string\n} from 'prop-types';\nimport { handleCustomNavigation, isValidUrl } from '@jotforminc/utils';\nimport { t } from '@jotforminc/translation';\n\nconst HelpMenuItem = ({\n itemData, highlightTerm, Icon, displayMode, logAbTestAction\n}) => {\n const getOutlineClassName = () => {\n let outlineClassName = displayMode === 'footerItem' ? 'footerItem' : '';\n outlineClassName = displayMode === 'searchResultItem' ? 'searchResultItem' : outlineClassName;\n return outlineClassName;\n };\n\n const createHighlightMarkup = ({ text, highlightText, className = '' }) => {\n // Example: 'How to Change Username in Jotform New howmany how there are HowhOw'\n // Behaviour: all the 'how' occurrences will be wrapped with a span element\n let finalMarkup = text;\n const highLightRegex = new RegExp(highlightText, 'gi');\n const highlightLength = highlightText.length;\n const foundVariants = [];\n\n while (highLightRegex.test(text)) {\n const startsAt = highLightRegex.lastIndex - highlightLength;\n const matchingPhrase = text.substr(startsAt, highlightLength);\n\n // optimization: dont replace the phrase already replaced previously\n if (foundVariants.indexOf(matchingPhrase) > -1) continue;\n foundVariants.push(matchingPhrase);\n\n const highlightedPhrase = `${matchingPhrase}`;\n finalMarkup = finalMarkup.replaceAll(matchingPhrase, highlightedPhrase);\n }\n\n return finalMarkup;\n };\n\n const createMarkup = () => {\n return createHighlightMarkup({\n text: t(itemData.title),\n highlightText: highlightTerm,\n className: 'searchResultHighlight'\n });\n };\n\n const handleClick = async (e, item) => {\n e?.preventDefault();\n logAbTestAction({ action: 'click', target: `${item.name}` });\n\n if (item.onClick && typeof item.onClick === 'function') {\n item.onClick();\n return;\n }\n\n const url = isValidUrl(item.url) ? item.url : `${window.location.origin}${item.url}`;\n handleCustomNavigation(url, '_blank');\n };\n\n return (\n
  • \n handleClick(e, itemData)}>\n {itemData.icon || Icon}\n {highlightTerm\n ? \n : {t(itemData.title)}}\n {itemData.hasNewBadge && (\n {t('New')}\n )}\n \n
  • \n );\n};\n\nHelpMenuItem.propTypes = {\n Icon: elementType,\n itemData: shape().isRequired,\n highlightTerm: string,\n displayMode: string,\n logAbTestAction: func\n};\n\nHelpMenuItem.defaultProps = {\n Icon: null,\n highlightTerm: '',\n displayMode: '',\n logAbTestAction: f => f\n};\n\nexport default HelpMenuItem;\n","import React, { useContext } from 'react';\nimport { func, shape, string } from 'prop-types';\nimport { t } from '@jotforminc/translation';\nimport { ActionLoggerContext } from '../context';\n\nconst HelpMenuButton = ({ htmlID, itemData, onClick }) => {\n const logHelpOnBuilderABTestEvent = useContext(ActionLoggerContext);\n\n const handleClick = (e, item) => {\n onClick(e, item);\n logHelpOnBuilderABTestEvent({ action: 'click', target: item.trackerName });\n };\n\n return (\n
  • \n \n
  • \n );\n};\n\nHelpMenuButton.propTypes = {\n htmlID: string,\n itemData: shape().isRequired,\n onClick: func\n};\n\nHelpMenuButton.defaultProps = {\n htmlID: '',\n onClick: f => f\n};\n\nexport default HelpMenuButton;\n","export { default as fakeHelpApi } from './fakeHelpApi';\nexport { default as generateRequestKey } from './generateRequestKey';\n\nexport const isEnterprise = () => window.JOTFORM_ENV === 'ENTERPRISE';\n","import React from 'react';\nimport {\n arrayOf, bool, func, shape\n} from 'prop-types';\nimport HelpMenuItem from './HelpMenuItem';\nimport HelpMenuButton from './HelpMenuButton';\nimport { isEnterprise } from '../utils';\n\nconst StaticMenuItems = ({\n onShortcutButtonClick,\n onWalkthroughButtonClick,\n onProfessionalServicesClick,\n onPricingButtonClick,\n staticMenuItems,\n showPricingItem,\n logAbTestAction\n}) => {\n const renderItems = items => {\n return items.map(item => {\n if (item.name === 'jotformAcademy') {\n return !isEnterprise() ? (\n \n ) : null;\n }\n\n if (item.name === 'keyboardShortcuts') {\n return (\n \n );\n }\n\n if (item.name === 'showTips') {\n return (\n \n );\n }\n\n if (item.name === 'pricing') {\n return showPricingItem && !isEnterprise() ? (\n \n ) : null;\n }\n\n if (item.name === 'getProfessionalServices') {\n return (\n \n );\n }\n\n return (\n \n );\n });\n };\n\n return renderItems(staticMenuItems);\n};\n\nStaticMenuItems.propTypes = {\n onProfessionalServicesClick: func,\n newVersion: bool,\n onShortcutButtonClick: func,\n staticMenuItems: arrayOf(shape({})),\n showPricingItem: bool,\n onPricingButtonClick: func,\n logAbTestAction: func\n};\n\nStaticMenuItems.defaulProps = {\n onProfessionalServicesClick: f => f,\n newVersion: false,\n onShortcutButtonClick: f => f,\n staticMenuItems: [],\n showPricingItem: false,\n onPricingButtonClick: f => f,\n logAbTestAction: f => f\n};\n\nexport default StaticMenuItems;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { t } from '@jotforminc/translation';\nimport { IconMessageFilled, IconMagnifyingGlass } from '@jotforminc/svg-icons';\nimport HelpMenuItem from './HelpMenuItem';\n\nconst SearchResultsFooter = ({ count, searchTerm }) => {\n if (count > 0) {\n const footerTitle = t('See all user guide articles');\n // const dynamicFooterTitle = footerTitle.replace('#{count}', count);\n\n const menuItemData = {\n url: `/help/?s=${searchTerm}`,\n title: footerTitle,\n icon: ,\n trackerName: 'seeAllUserGuideArticles'\n };\n\n return (\n \n );\n } if (count === 0) {\n const menuItemData = {\n url: '/contact/',\n title: t('Contact Us'),\n icon: ,\n trackerName: 'contactUsFromSearchNoResult'\n };\n\n return (\n \n );\n }\n\n return null;\n};\n\nSearchResultsFooter.propTypes = {\n searchTerm: PropTypes.string,\n count: PropTypes.number\n};\n\nSearchResultsFooter.defaultProps = {\n searchTerm: '',\n count: 0\n};\n\nexport default SearchResultsFooter;\n","import React from 'react';\nimport {\n arrayOf, bool, number, shape, string\n} from 'prop-types';\nimport { t } from '@jotforminc/translation';\nimport { IconFileFilled } from '@jotforminc/svg-icons';\nimport HelpMenuItem from './HelpMenuItem';\nimport SearchResultsFooter from './SearchResultsFooter';\n\nconst SearchResults = ({\n results, searchLoading, searchTerm, count\n}) => {\n if (searchLoading) {\n return (\n
    \n
    \n
    \n
    \n
    \n
    \n
    \n );\n }\n\n const translatedNoResultText = t('No search results for \"#{searchTerm}\"');\n const dynamicNoResultText = translatedNoResultText.replace('#{searchTerm}', searchTerm);\n\n if (count === 0) {\n return (\n <>\n {t('Search Results')}\n {dynamicNoResultText}\n \n \n );\n }\n\n return (\n <>\n {t('Search Results')}\n {results.map(item => (\n }\n highlightTerm={searchTerm}\n displayMode=\"searchResultItem\"\n />\n ))}\n \n \n );\n};\n\nSearchResults.propTypes = {\n count: number,\n searchTerm: string,\n searchLoading: bool,\n results: arrayOf(shape()).isRequired\n};\n\nSearchResults.defaultProps = {\n count: 0,\n searchTerm: '',\n searchLoading: false\n};\n\nexport default SearchResults;\n","import React from 'react';\nimport { t } from '@jotforminc/translation';\nimport { popularArticleItems } from '../constants';\nimport HelpMenuItem from './HelpMenuItem';\n\nconst PopularArticles = React.forwardRef((props, ref) => {\n return (\n <>\n
  • {t('Popular Articles')}
  • \n
  • \n
      \n {popularArticleItems.map(item => (\n \n ))}\n
    \n
  • \n \n );\n});\n\nexport default PopularArticles;\n","import React, { useState, useRef } from 'react';\nimport { handleCustomNavigation } from '@jotforminc/utils';\nimport {\n bool, func, shape, arrayOf\n} from 'prop-types';\nimport { formBuilderWalkthroughManager as walkthroughManager } from '@jotforminc/product-walkthrough';\nimport { DedicatedSupportAbTester } from '@jotforminc/enterprise-promotions';\nimport { MIN_SEARCH_TERM_LENGTH } from '../constants';\nimport SearchInput from './SearchInput';\nimport StaticMenuItems from './StaticMenuItems';\nimport SearchResults from './SearchResults';\nimport PopularArticles from './PopularArticles';\n\nconst HelpMenu = ({\n user,\n newVersion,\n isFirstOpen,\n toggleHelpMenu,\n handleShortcutOpenClick: onShortcutClick,\n showDedicatedSupportBanner,\n staticMenuItems\n}) => {\n const [searchResults, setSearchResults] = useState([]);\n const [searchResultCount, setSearchResultCount] = useState(0);\n const [searchResultsLoading, setSearchResultsLoading] = useState(false);\n const [searchInputFocus, setSearchInputFocus] = useState(false);\n const [searchTerm, setSearchTerm] = useState('');\n const logAbTestActionRef = useRef(f => f);\n\n // refs\n const helpItemContainerRef = useRef(null);\n const searchInputWrapperRef = useRef(null);\n\n const handleSearchInputFocus = () => { setSearchInputFocus(true); };\n\n const handleDropdownClick = e => {\n if (searchInputWrapperRef\n && searchInputWrapperRef.current\n && searchInputWrapperRef.current.contains(e.target)) {\n return;\n }\n\n if (helpItemContainerRef\n && helpItemContainerRef.current\n && !helpItemContainerRef.current.contains(e.target)) {\n setSearchInputFocus(false);\n }\n\n toggleHelpMenu();\n e.stopPropagation();\n };\n\n const handleSearchInputChange = value => { setSearchTerm(value); };\n const handleSearchResultsChange = (results, count) => {\n setSearchResults(results);\n setSearchResultCount(count);\n setSearchResultsLoading(false);\n };\n\n const handleWalkthrougOpenClick = e => {\n toggleHelpMenu();\n if (typeof walkthroughManager.walkthroughActions.startWalkthrough === 'function') {\n walkthroughManager.walkthroughActions.startWalkthrough(e);\n }\n logAbTestActionRef.current({ action: 'click', target: 'walkthorugh' });\n };\n\n const handleProfessionalServicesClick = async (e, item) => {\n logAbTestActionRef.current({ action: 'click', target: 'profServices' });\n handleCustomNavigation(`${window.location.origin}${item.url}`);\n };\n\n const handlePricingClick = async (e, item) => {\n logAbTestActionRef.current({ action: 'click', target: 'pricing' });\n handleCustomNavigation(`${window.location.origin}${item.url}`);\n };\n\n const handleShortcutClick = () => {\n onShortcutClick();\n logAbTestActionRef.current({ action: 'click', target: 'keyboardShortcuts' });\n };\n\n return (\n \n \n {/* static menu items */}\n {(searchTerm.length < MIN_SEARCH_TERM_LENGTH) && !searchInputFocus\n && (\n \n )}\n {/* popular articles */}\n {(searchTerm.length < MIN_SEARCH_TERM_LENGTH) && searchInputFocus\n && (\n \n )}\n {/* search results */}\n {(searchTerm.length >= MIN_SEARCH_TERM_LENGTH) && searchInputFocus\n && (\n \n )}\n {showDedicatedSupportBanner\n && (\n // A/B Test: formBuilderHelpMenuDedicatedSupportIII\n \n )}\n \n );\n};\n\nHelpMenu.propTypes = {\n newVersion: bool,\n user: shape().isRequired,\n toggleHelpMenu: func,\n handleShortcutOpenClick: func,\n showDedicatedSupportBanner: bool,\n isFirstOpen: bool,\n staticMenuItems: arrayOf(shape({}))\n};\n\nHelpMenu.defaultProps = {\n newVersion: false,\n toggleHelpMenu: f => f,\n handleShortcutOpenClick: f => f,\n showDedicatedSupportBanner: false,\n isFirstOpen: false,\n staticMenuItems: []\n};\n\nexport default HelpMenu;\n","import React, { useEffect, useRef, Fragment } from 'react';\nimport PropTypes from 'prop-types';\nimport { IconXmark } from '@jotforminc/svg-icons';\nimport { t } from '@jotforminc/translation';\n\nconst ShortcutModal = ({ shortcuts, onClose }) => {\n const modalContentRef = useRef();\n\n const isMacOS = () => {\n return global.navigator.appVersion.indexOf('Mac') !== -1;\n };\n\n useEffect(() => {\n if (!modalContentRef || !modalContentRef.current) return;\n\n const handleClickOutside = e => {\n if (!modalContentRef.current.contains(e.target)) {\n onClose();\n }\n };\n\n global.document.addEventListener('click', handleClickOutside);\n return () => { global.document.removeEventListener('click', handleClickOutside); };\n });\n\n const osKey = isMacOS() ? 'mac' : 'default';\n\n return (\n
    \n
    \n\n
    \n
    \n
    {t('Keyboard Shortcuts')}
    \n \n
    \n\n
    \n {shortcuts.filter(item => item.combinations[osKey]).map(({ id, title, combinations }) => (\n
    \n \n
    \n {combinations[osKey].map((keys, index) => (\n \n {!!index && ' or '}\n {keys.map((key, _index) => (\n \n {!!_index && ' + '}\n {key}\n \n ))}\n \n ))}\n
    \n
    \n ))}\n
    \n
    \n
    \n
    \n );\n};\n\nShortcutModal.propTypes = {\n onClose: PropTypes.func,\n shortcuts: PropTypes.arrayOf(PropTypes.shape({}))\n};\n\nShortcutModal.defaultProps = {\n onClose: f => f,\n shortcuts: []\n};\n\nexport default ShortcutModal;\n","import React, { useRef, useState } from 'react';\nimport {\n bool, func, shape, arrayOf, object\n} from 'prop-types';\nimport { t } from '@jotforminc/translation';\nimport { IconQuestionCircleFilled } from '@jotforminc/svg-icons';\nimport { Button } from '@jotforminc/magnet';\nimport { formBuilderWalkthroughManager as walkthroughManager } from '@jotforminc/product-walkthrough';\nimport { ActionLoggerContext } from '../context';\nimport { useFirstOpen, useWalkthrough } from '../hooks';\nimport HelpMenu from './HelpMenu';\nimport { staticMenuItems as staticMenuItemsConstant, shortcuts as shortcutsConstant } from '../constants';\nimport ShortcutModal from './ShortcutModal';\nimport '../styles/styles.scss';\n\nconst Help = ({\n user,\n newVersion,\n openHelpMenu,\n isPreviewModOn,\n isHelpMenuOpen,\n formBuilderActions,\n openCollaborationPopup,\n isCollaborationPopupOpen,\n logJotformAction,\n staticMenuItems,\n shortcuts,\n buttonProps,\n showDedicatedSupportBanner\n}) => {\n const [isshortcutModalShow, setIsShortcutModalShow] = useState(false);\n const isFirstOpen = useFirstOpen();\n\n const isHelpMenuSeenRef = useRef(false);\n\n useWalkthrough(user, formBuilderActions);\n\n const handleShortcutOpenClick = () => { setIsShortcutModalShow(true); };\n const handleShortcutCloseClick = () => { setIsShortcutModalShow(false); };\n\n const toggleHelpMenu = async () => {\n if (isPreviewModOn) return;\n\n openHelpMenu(!isHelpMenuOpen);\n\n if (isCollaborationPopupOpen) {\n openCollaborationPopup(false);\n }\n\n if (!isHelpMenuSeenRef.current) {\n logJotformAction({ action: 'seen', target: 'helpMenu' });\n isHelpMenuSeenRef.current = true;\n }\n };\n\n walkthroughManager.builderActions.toggleHelpMenu = toggleHelpMenu;\n\n return (\n
  • \n {/* help button */}\n \n {t('Help')}\n \n {/* shortcut modal */}\n {isshortcutModalShow && ()}\n {/* help menu */}\n {isHelpMenuOpen\n && (\n \n \n \n )}\n
  • \n );\n};\n\nHelp.propTypes = {\n user: shape(),\n newVersion: bool,\n openHelpMenu: func,\n isPreviewModOn: bool,\n isHelpMenuOpen: bool,\n formBuilderActions: shape(),\n openCollaborationPopup: func,\n isCollaborationPopupOpen: bool,\n logJotformAction: func,\n staticMenuItems: arrayOf(shape({})),\n shortcuts: arrayOf(shape({})),\n buttonProps: object,\n showDedicatedSupportBanner: bool\n};\n\nHelp.defaultProps = {\n user: {},\n newVersion: true,\n formBuilderActions: {},\n openHelpMenu: f => f,\n isPreviewModOn: false,\n isHelpMenuOpen: false,\n openCollaborationPopup: f => f,\n isCollaborationPopupOpen: false,\n logJotformAction: f => f,\n staticMenuItems: staticMenuItemsConstant,\n shortcuts: shortcutsConstant,\n buttonProps: {},\n showDedicatedSupportBanner: true\n};\n\nexport default Help;\n","import PropTypes from 'prop-types';\nimport React, { Component } from 'react';\nimport InlineEditor from './InlineEditor';\n\nclass Title extends Component {\n shouldComponentUpdate(nextProps) {\n if (this.props.title === nextProps.title) {\n return false;\n }\n global.document.querySelector('.jNewHeader-title .inlineEditor').scrollLeft = 0;\n return true;\n }\n\n render() {\n const { title = 'Header' } = this.props;\n let clx = 'jNewHeader-title';\n if (title.length > 42 && title.length < 84) {\n clx += ' isMid';\n } else if (title.length >= 84) {\n clx += ' isSmall';\n }\n\n return (\n
    \n \n
    \n );\n }\n}\n\nTitle.propTypes = { title: PropTypes.string, };\n\nexport default Title;\n","import PropTypes from 'prop-types';\nimport React from 'react';\nimport { t, tdate } from '@jotforminc/translation';\nimport { DotsLoader } from '@jotforminc/apploaders';\nimport { getUpdatedDate, getUpdatedDateWithTimezoneAdjusted } from '../libs/DateTimeHelper';\n\nclass PrimaryStatusBar extends React.Component {\n getDate(updatedAt, createdAt, user) {\n if (updatedAt) {\n /*\n if you are looking for why the time zone is GMT - 5 by default,\n it is the default time zone of all our servers.\n ask to: berkay, asil, irem or devops\n IMPORTANT: The method catches DST changes now\n */\n return getUpdatedDateWithTimezoneAdjusted(updatedAt, user.time_zone);\n }\n return getUpdatedDate(new Date(), user.time_zone);\n }\n\n sendToMobileApp(revisionText) {\n if (typeof global.sendMessageToJFMobile === 'function') {\n global.sendMessageToJFMobile({ type: 'revisionText', value: revisionText });\n }\n }\n\n render() {\n const {\n appStatus, handleRevisionHistoryPanel, currentLocation, toggleInfoPanel, revisionInfoPanel, updatedAt, createdAt, user, error, canOpenRevisionHistory\n } = this.props;\n if (error) {\n return (Unexpected error);\n }\n const editDate = this.getDate(updatedAt, createdAt, user);\n const isNewForm = updatedAt === createdAt;\n let dateString = '';\n if (editDate.yesterday) {\n dateString = isNewForm ? `${t('Created yesterday.')}` : `${t('Last edited yesterday.')}`;\n } else if (editDate.oldDate || editDate.today) {\n const newDate = editDate.oldDate ? tdate(editDate.oldDate) : tdate(editDate.today, { timeOnly: true });\n dateString = isNewForm ? `${t('Created at')} ${newDate}` : `${t('Last edited at')} ${newDate}`;\n }\n\n const savedText = `${t('All changes saved at')} ${tdate(getUpdatedDate(new Date(), user.time_zone).today, { timeOnly: true })}`;\n this.sendToMobileApp(appStatus === 'saved' ? savedText : dateString);\n const statusClassName = canOpenRevisionHistory ? 'status-info-button' : 'status-info-text';\n\n return (\n \n {appStatus === 'saving' && }\n {appStatus === 'saved'\n && (\n \n {savedText}\n \n )}\n {appStatus === 'error' && t('Error!')}\n {appStatus === 'offline' && t('Working Offline')}\n {appStatus === '' && isNewForm && (\n \n {dateString}\n \n )}\n {appStatus === '' && !isNewForm && (\n \n {dateString}\n \n )}\n { revisionInfoPanel &&
    {t(\"There aren't any saved revisions yet.\")}
    }\n
    \n );\n }\n}\n\nPrimaryStatusBar.propTypes = {\n updatedAt: PropTypes.string,\n createdAt: PropTypes.string,\n user: PropTypes.shape(),\n appStatus: PropTypes.string,\n currentLocation: PropTypes.string,\n handleRevisionHistoryPanel: PropTypes.func,\n toggleInfoPanel: PropTypes.func,\n revisionInfoPanel: PropTypes.bool,\n};\n\nexport default (PrimaryStatusBar);\n","import React from 'react';\nimport LoginFlow from './LoginFlow';\nimport '../styles/style.scss';\nimport '../temporary-duplicate/styles/SaveAndContinueLater/style.scss';\n\n// Trick to include styles in bundle\nconst LoginFlowWithStyles = props => ;\n\nexport default LoginFlowWithStyles;\n","import React, { useState, useEffect, useRef } from 'react';\nimport { shape, arrayOf } from 'prop-types';\nimport { t } from '@jotforminc/translation';\n\nconst generateKey = x => x.replace(/\\s/g, '-').toLowerCase();\n\nconst SignupSlider = ({\n content\n}) => {\n const [currentSlide, setCurrentSlide] = useState(0);\n const interval = useRef(null);\n\n const handleSlide = () => {\n interval.current = setInterval(() => (\n setCurrentSlide(currS => (currS + 1 === content.length ? 0 : currS + 1))\n ), 4000);\n };\n\n useEffect(() => {\n handleSlide();\n return () => clearInterval(interval.current);\n }, []);\n\n return (\n clearInterval(interval.current)}\n onMouseLeave={() => handleSlide()}\n >\n
    \n {content.map(({\n img,\n text,\n head,\n alt = ''\n }, i) => (\n \n {alt}\n
    {t(head)}
    \n

    {t(text)}

    \n
    \n ))}\n
    \n {content.map(({ head }, i) => (\n \n setCurrentSlide(i)}\n checked={currentSlide === i}\n />\n \n \n ))}\n
    \n
    \n
    \n );\n};\n\nSignupSlider.propTypes = {\n content: arrayOf(shape({})).isRequired\n};\n\nexport default SignupSlider;\n","import React from 'react';\nimport {\n func, shape, string, bool\n} from 'prop-types';\nimport { getAPIURL } from '@jotforminc/request-layer';\nimport { LoginFlowWithStyles } from '@jotforminc/login-flow';\nimport SignupSlider from './SignupSlider';\n\nconst SignupSliderModal = ({\n user,\n isImportedPdf = false,\n handleClose,\n setShowSlides = f => f,\n subtitle = 'Please sign up to start collecting data',\n showSlides = true,\n onUserLogin = () => {\n global.location.reload();\n },\n appName = 'formBuilder',\n buttonNames = {\n google: 'form-builder-modal-google-login-jfheader',\n facebook: 'form-builder-modal-facebook-login-jfheader',\n apple: 'form-builder-modal-apple-login-jfheader',\n emailLogin: 'form-builder-modal-standart-login-button',\n emailSignup: 'form-builder-modal-header-createmyaccount'\n }\n}) => {\n const SLIDER_CONTENT = importedPdf => [\n {\n head: 'Notification Emails',\n text: 'Signed up users receive an email when they get responses to their forms.',\n img: '//cdn.jotfor.ms/assets/img/v4/signup_prompt/signup_image_email.png',\n alt: ''\n },\n {\n head: importedPdf ? 'Mobile-friendly Forms' : 'Mobile Form Building',\n text: importedPdf ? (\n 'An easier form-filling experience that works seamlessly on desktop and mobile devices, even offline and in kiosk mode.'\n ) : 'Create, edit and publish online forms from any smartphone or tablet.',\n img: `//cdn.jotfor.ms/assets/img/v4/signup_prompt/${importedPdf ? 'signup_image_mobile_pdf.svg' : 'signup_image_mobile.png'}`,\n alt: ''\n },\n {\n head: 'Powerful Integrations',\n text: 'With powerful integrations you can easily build powerful forms.',\n img: '//cdn.jotfor.ms/assets/img/v4/signup_prompt/signup_image_integration.png',\n alt: ''\n },\n {\n head: 'Collect Payments',\n text: 'Turn your form into a powerful payment tool using payment gateways.',\n img: '//cdn.jotfor.ms/assets/img/v4/signup_prompt/signup_image_new_payment.png',\n alt: ''\n }\n ];\n\n const getReactRoot = () => {\n let rootEl = global.document.querySelector('.react-root');\n if (!rootEl) {\n rootEl = global.document.createElement('div');\n rootEl.className = 'react-root';\n global.document.body.appendChild(rootEl);\n }\n return rootEl;\n };\n\n return (\n
    \n
    \n {\n if (onUserLogin) {\n onUserLogin({ ...newUserInfo, newUser });\n }\n }}\n onClose={handleClose}\n forceUser={true}\n additionalScreens={{ epilogue: null }}\n appName={appName}\n greetingMessage={subtitle}\n isNewBranding={global.window.branding21}\n builderShowSlides={setShowSlides}\n buttonNames={buttonNames}\n />\n
    \n {showSlides && (\n
    \n \n
    \n )}\n
    \n );\n};\n\nSignupSliderModal.propTypes = {\n user: shape().isRequired,\n isImportedPdf: shape(),\n handleClose: shape(),\n setShowSlides: func,\n subtitle: string,\n showSlides: bool,\n onUserLogin: func,\n appName: string,\n buttonNames: shape()\n};\n\nexport default SignupSliderModal;\n","/* eslint-disable no-shadow */\nimport React, { forwardRef, useEffect, useRef } from 'react';\nimport { bool, func, node } from 'prop-types';\nimport { Modal, Hooks } from '@jotforminc/uikit';\nimport { StorageHelper } from '@jotforminc/storage-helper';\nimport '../assets/styles/ExitIntentSurveyModal.less';\nimport { logJotFormEvents } from '../libs/Utils';\n\nconst ExitIntentSurveyModal = forwardRef(({\n children,\n closeOnOutsideClick,\n onClose = f => f,\n isTemplateUser = false,\n formURL,\n templateUserFormURL,\n user\n}, ref) => {\n const innerModalRef = useRef();\n const combinedModalRef = Hooks.useCombinedRefs(innerModalRef, ref);\n\n const checkFirstSeenDone = () => {\n if (StorageHelper.getLocalStorageItem({ key: 'seenExitIntentSurvey' })) {\n return true;\n }\n return false;\n };\n const setFirstSeenDone = () => StorageHelper.setLocalStorageItem({ key: 'seenExitIntentSurvey', value: 1 });\n\n const logExitIntentSurvey = (action, target) => {\n const { username, accountType } = user;\n logJotFormEvents('exitIntenSurvey', {\n actor: username,\n action,\n target,\n }, accountType);\n };\n\n const DialogRenderer = ({ children }) => {\n return (\n
    \n {children}\n
    \n );\n };\n\n const ContentRenderer = ({ children }) => {\n return (\n
    \n {children}\n
    \n );\n };\n\n const handleExitIntentClose = () => {\n combinedModalRef?.current?.hide();\n logExitIntentSurvey('click', 'close');\n };\n\n useEffect(() => {\n const handleMouseOut = () => {\n if (!combinedModalRef?.current?.isVisible && !(checkFirstSeenDone())) {\n combinedModalRef?.current?.show();\n logExitIntentSurvey('seen', 'helpMenu');\n setFirstSeenDone();\n }\n };\n\n document.documentElement.addEventListener('mouseleave', handleMouseOut);\n return () => {\n document.documentElement.removeEventListener('mouseleave', handleMouseOut);\n };\n }, []);\n\n return (\n \n \n\n
    \n \n \n \n\n {\n const externalStyles = document.getElementById('externalStyles');\n e.target.contentWindow.document.querySelector('head').append(externalStyles);\n window.parent.scrollTo(0, 0);\n }}\n />\n\n {children}\n\n \n \n );\n});\n\nExitIntentSurveyModal.propTypes = {\n onClose: func,\n children: node.isRequired,\n isTemplateUser: bool\n};\n\nexport default ExitIntentSurveyModal;\n","import React, {\n useEffect,\n useMemo,\n useRef,\n useState\n} from 'react';\nimport {\n arrayOf,\n bool,\n element,\n func,\n number,\n shape,\n string\n} from 'prop-types';\nimport classNames from 'classnames';\nimport { Tooltip } from '@jotforminc/uikit';\nimport IconPrivate from '../assets/svg/faq.svg';\n\nconst TabTitle = ({\n activeTab,\n disabled,\n index,\n onTabClick,\n title,\n tooltip,\n icon\n}) => {\n const ttRef = useRef();\n\n const tabClasses = useMemo(() => classNames('jShareModalTabs-tab', {\n active: activeTab === index,\n disabled\n }), [activeTab, disabled]);\n\n return (\n \n {icon}\n \n {title}\n \n {tooltip && (\n <>\n disabled && e.stopPropagation()}\n />\n {tooltip}\n \n )}\n \n );\n};\n\nTabTitle.propTypes = {\n activeTab: number.isRequired,\n disabled: bool,\n index: number.isRequired,\n onTabClick: func.isRequired,\n title: string.isRequired,\n tooltip: element,\n icon: element.isRequired\n};\n\nTabTitle.defaultProps = {\n disabled: false,\n tooltip: null\n};\n\nconst SharePanelTabs = ({\n SharePanelComponent,\n Tabs\n}) => {\n const [activeTab, setActiveTab] = useState(0);\n const onTabClick = index => () => setActiveTab(index);\n useEffect(() => {\n setActiveTab(0);\n }, [Tabs]);\n return (\n <>\n
    \n {Tabs.map(({\n title, disabled, tooltip, icon\n }, index) => (\n \n ))}\n
    \n {Tabs.map(({ content, isShare, title }, index) => (\n \n {isShare ? SharePanelComponent : content}\n \n ))}\n \n );\n};\n\nSharePanelTabs.propTypes = {\n SharePanelComponent: element.isRequired,\n Tabs: arrayOf(shape({})).isRequired\n};\n\nSharePanelTabs.defaultProps = {\n};\n\nexport default SharePanelTabs;\n","import React, {\n useRef, useMemo, forwardRef, useImperativeHandle, useState, useEffect, useLayoutEffect\n} from 'react';\nimport {\n shape, node, func, oneOfType, arrayOf, element, string\n} from 'prop-types';\nimport { StyledModal as Modal } from '@jotforminc/styled-modal';\nimport { Button } from '@jotforminc/magnet';\nimport SharePanel from '.';\nimport SharePanelTabs from './SharePanelTabs';\n\nconst ShareButton = forwardRef(({\n modalProps, shareProps, buttonProps, children, onClick, Tabs\n}, buttonRef) => {\n const [page, setPage] = useState();\n const modalRef = useRef();\n const sharePanelRef = useRef();\n const isTabbed = useMemo(() => Tabs.length > 0);\n\n const showModalPage = newPage => {\n modalRef.current.show();\n setPage(newPage);\n };\n\n useEffect(() => {\n if (!page) return;\n\n switch (page) {\n case 'assignees':\n return buttonRef.current.assigneeModalRef.current.show();\n case 'settings':\n return buttonRef.current.settingsModalRef.current.show();\n default:\n }\n }, [page]);\n\n useLayoutEffect(() => {\n if (page) {\n setPage(null);\n }\n }, [page]);\n\n const onButtonClick = e => {\n modalRef.current.show();\n if (onClick) {\n onClick(e);\n }\n };\n\n const onCloseModal = () => {\n modalRef.current.hide();\n };\n\n const SharePanelComponent = (\n \n );\n\n useImperativeHandle(buttonRef, () => ({\n ...sharePanelRef.current,\n modalRef: modalRef.current,\n showModalPage\n }));\n\n return (\n <>\n \n {isTabbed && }\n {!isTabbed && SharePanelComponent}\n \n \n \n );\n});\n\nShareButton.propTypes = {\n modalProps: shape({}).isRequired,\n shareProps: shape({}).isRequired,\n buttonProps: shape({}).isRequired,\n children: oneOfType([\n arrayOf(node),\n node\n ]).isRequired,\n onClick: func,\n Tabs: arrayOf(shape({\n title: string,\n content: element\n }))\n};\n\nShareButton.defaultProps = {\n onClick: null,\n Tabs: []\n};\n\nexport default ShareButton;\n","import { useCallback, useMemo } from 'react';\nimport { logJotFormEvents } from './Utils';\n\n/**\n * Generate a function to log to watchman a share event.\n *\n * @param {string} shareSubEvent an identifier for the\n * specific share event, will be prefixed with CSIShareEvent\n * prior to being sent to watchman.\n * @return a function that when called will call a jotform event.\n */\nconst createFormBuilderShareEventDispatcher = (\n shareSubEvent,\n formID,\n username,\n accountTypeName\n) => () => {\n logJotFormEvents('form-builder-csi-events', {\n actor: username,\n action: `CSIFormBuilderShareEvent${shareSubEvent}`,\n target: formID,\n }, accountTypeName);\n};\n\n/**\n * Create dispatcher actions for share panel,\n * these are the functions that when called\n * inform watchman about a certain action\n * happening.\n */\nconst shareDispatchActions = ({\n formID,\n username,\n accountTypeName\n}) => ({\n dispatchLinkGenerationAction: createFormBuilderShareEventDispatcher('GenerateLink', formID, username, accountTypeName),\n dispatchLinkGenerationFailAction: createFormBuilderShareEventDispatcher('GenerateLinkFail', formID, username, accountTypeName),\n dispatchLinkRegenerationAction: createFormBuilderShareEventDispatcher('RegenerateLink', formID, username, accountTypeName),\n dispatchLinkRegenerationFailAction: createFormBuilderShareEventDispatcher('RegenerateLinkFail', formID, username, accountTypeName),\n dispatchInviteAction: createFormBuilderShareEventDispatcher('Invite', formID, username, accountTypeName),\n dispatchInviteFailAction: createFormBuilderShareEventDispatcher('InviteFail', formID, username, accountTypeName),\n dispatchModalOpenAction: createFormBuilderShareEventDispatcher('ShareButtonClicked', formID, username, accountTypeName)\n});\n\n/**\n * React hook that takes in normal onClick handlers\n * and injects tracking into them.\n */\nexport const useShareButtonTracking = ({\n onShareButtonClick,\n onGenerateLinkClick,\n onSendInvitationClick,\n shareLink,\n formID,\n user\n}) => {\n const { username = '', account_type: accountType = {} } = user;\n const accountTypeName = accountType?.name;\n\n // Create the tracking functions.\n const {\n dispatchLinkGenerationAction,\n dispatchLinkRegenerationAction,\n dispatchInviteAction,\n dispatchModalOpenAction,\n /** Fail actions. */\n dispatchLinkGenerationFailAction,\n dispatchLinkRegenerationFailAction,\n dispatchInviteFailAction\n } = useMemo(\n () => shareDispatchActions({ formID, username, accountTypeName }), [\n formID,\n username\n ]\n );\n\n // Intercept callbacks and inject the tracking functions to them.\n const onShareButtonClickWithTracking = useCallback((...props) => {\n onShareButtonClick(...props);\n dispatchModalOpenAction();\n }, [onShareButtonClick, dispatchModalOpenAction]);\n\n const onGenerateLinkClickWithTracking = useCallback((...props) => {\n // Both regeneration and generation occur from the same callback so we use\n // the link to distinguish it.\n const isFirstLinkGeneration = !shareLink;\n const dispatcher = isFirstLinkGeneration ? dispatchLinkGenerationAction : dispatchLinkRegenerationAction;\n const failDispatcher = isFirstLinkGeneration ? dispatchLinkGenerationFailAction : dispatchLinkRegenerationFailAction;\n return onGenerateLinkClick(...props).then(resp => {\n if (resp) {\n dispatcher();\n } else {\n failDispatcher();\n }\n return resp;\n });\n }, [\n shareLink,\n onGenerateLinkClick,\n dispatchLinkGenerationAction,\n dispatchLinkRegenerationAction,\n dispatchLinkGenerationFailAction,\n dispatchLinkGenerationFailAction\n ]);\n\n const onSendInvitationClickWithTracking = useCallback(\n (...props) => onSendInvitationClick(...props).then(\n resp => {\n if (resp) {\n dispatchInviteAction();\n } else {\n dispatchInviteFailAction();\n }\n return resp;\n }),\n [\n onSendInvitationClick,\n dispatchInviteAction,\n dispatchInviteFailAction\n ]\n );\n return {\n onSendInvitationClickWithTracking,\n onGenerateLinkClickWithTracking,\n onShareButtonClickWithTracking\n };\n};\n","/* eslint-disable react/destructuring-assignment */\nimport PropTypes from 'prop-types';\nimport React, { Suspense } from 'react';\nimport { bindActionCreators } from 'redux';\nimport find from 'lodash/find';\nimport { connect } from 'react-redux';\nimport { getUserAppList, Header } from '@jotforminc/header-components';\nimport { isFormUnpublished } from '@jotforminc/builder-components';\nimport { safeLazy } from '@jotforminc/safe-lazy-import';\nimport { t } from '@jotforminc/translation';\nimport { Help } from '@jotforminc/help';\nimport { Button } from '@jotforminc/magnet';\nimport {\n IconArrowsSwitchHorizontal, IconUserFilled, IconTriangleCircleFilled, IconCheckCircleFilled, IconAiFilled\n} from '@jotforminc/svg-icons';\nimport { featureFlag } from '@jotforminc/feature-flag';\nimport classnames from 'classnames';\nimport * as actions from '../actions';\nimport Title from './form/Title';\nimport { logJotFormEvents, redirectUrlAsLanguageCode } from '../libs/Utils';\nimport PrimaryStatusBar from './PrimaryStatusBar';\nimport SignupSliderModal from './SignupSliderModal';\nimport ExitIntentSurveyModal from './ExitIntentSurveyModal';\nimport ShareButton from './ShareButton';\nimport { CollaboratorAvatars } from './CollaborationPanel';\n\nconst HipaaPinModal = safeLazy(() => import(/* webpackChunkName: \"LazyHipaaPinModal\" */ './HipaaPinModal'));\nconst CollaborationPanel = safeLazy(() => import(/* webpackChunkName: \"CollaborationPanel\" */ './CollaborationPanel'));\nclass PrimaryHeader extends React.Component {\n constructor(props) {\n super(props);\n\n this.toggleDropdown = this.toggleDropdown.bind(this);\n this.toggleCollaborationPanel = this.toggleCollaborationPanel.bind(this);\n this.handleRevisionHistoryPanel = this.handleRevisionHistoryPanel.bind(this);\n this.toggleInfoPanel = this.toggleInfoPanel.bind(this);\n this.handleCopy = this.handleCopy.bind(this);\n this.isPanelVisable = this.isPanelVisable.bind(this);\n this.customConfigs = global.CUSTOMIZED_CONFIGS;\n this.hiddenPanels = this.customConfigs && this.customConfigs.HIDE_PRIMARY_HEADER_PANELS;\n const preventLogoRedirection = this.customConfigs && this.customConfigs.PREVENT_LOGO_REDIRECTION;\n const hideFields = this.hiddenPanels || [];\n const visibleNavigationApps = (this.customConfigs && this.customConfigs.VISIBLE_NAVIGATION_APPS) || [];\n this.enterpriseConfigs = global.JOTFORM_ENV === 'ENTERPRISE' ? {\n hideFields,\n preventLogoRedirection,\n visibleNavigationApps\n } : {};\n this.handleAppChangeLink = this.handleAppChangeLink.bind(this);\n this.renderPrimaryStatusBar = this.renderPrimaryStatusBar.bind(this);\n this.renderSwitchToOldButton = this.renderSwitchToOldButton.bind(this);\n this.renderCollaborationPanelContainer = this.renderCollaborationPanelContainer.bind(this);\n this.renderExtraPanelButtons = this.renderExtraPanelButtons.bind(this);\n this.handleClose = this.handleClose.bind(this);\n this.handleNavigationToggle = this.handleNavigationToggle.bind(this);\n this.getCollaborators = this.getCollaborators.bind(this);\n this.toggleJotformAIModal = this.toggleJotformAIModal.bind(this);\n\n this.state = {\n statusBarErrored: false,\n openedLogin: false,\n publishData: false // only used for animation\n };\n }\n\n get canOpenRevisionHistory() {\n const {\n user,\n team,\n formOwner,\n users\n } = this.props;\n\n // Allow admins\n if (user.accountType === 'ADMIN' || user.accountType === 'SUPPORT') {\n return true;\n }\n\n // Check for team role\n if (team.isTeamMember) {\n return user?.teamRoles?.includes('team_admin') || user?.teamRoles?.includes('form_collaborator');\n }\n\n // Check if owner\n const currentUser = find(users, q => q.username === user.username);\n if (formOwner && currentUser.username && formOwner.toLowerCase() === currentUser.username.toLowerCase()) {\n return true;\n }\n\n // Check if CSI collaborator\n if (global.csiCollaborator) {\n return true;\n }\n\n return false;\n }\n\n componentDidMount() {\n this.handleOpenLoginModalClickViewForm();\n\n const {\n pageTitleChanged, title, pagetitle, updatedAt, form\n } = this.props;\n\n this.setState({\n publishData: isFormUnpublished(form),\n });\n\n if (!updatedAt) { // if not updated, allow changing page title(new clones etc.)\n this.props.actions.updateFormProperty({ pageTitleChanged: 'No' });\n return;\n }\n if (!pageTitleChanged) {\n if (title !== pagetitle) {\n this.props.actions.updateFormProperty({ pageTitleChanged: 'Yes' });\n } else {\n this.props.actions.updateFormProperty({ pageTitleChanged: 'No' });\n }\n }\n }\n\n // eslint-disable-next-line react/sort-comp\n handleOpenLoginModalClickViewForm() {\n if (global.document.querySelector('[data-icon=\"forForm\"]') && !global.document.querySelector('[class=\"appItem\"]')) {\n global.document.querySelector('[data-icon=\"forForm\"]').addEventListener('click', e => {\n e.preventDefault();\n this.updateLoginFlow();\n });\n }\n }\n\n // lets implement a simple error boundaries\n componentDidCatch(error, { componentStack }) {\n if (componentStack && componentStack.indexOf('PrimaryStatusBar') > -1) {\n this.setState({\n statusBarErrored: true,\n });\n } // TO DO :: handle other sub components\n }\n\n isPanelVisable(panelName) {\n if (global.JOTFORM_ENV === 'ENTERPRISE'\n && Array.isArray(this.hiddenPanels)\n && this.hiddenPanels.length > 0\n ) {\n return this.hiddenPanels.indexOf(panelName) === -1;\n }\n return true;\n }\n\n toggleDropdown() {\n this.props.actions.openUserSettingsPopup(!this.props.ui.isUserSettingsPopupOpen);\n }\n\n toggleInfoPanel() {\n this.props.actions.toggleRevisionInfoPanel(!this.props.ui.revisionInfoPanel);\n }\n\n toggleCollaborationPanel(/* evt */) {\n if (!this.props.ui.isCollaborationPopupOpen) {\n this.props.actions.getNewToken();\n }\n\n this.props.actions.openCollaborationPopup(!this.props.ui.isCollaborationPopupOpen);\n this.props.actions.leftPanelToggle(false);\n }\n\n handleRevisionHistoryPanel() {\n if (this.props.ui.isRightPanelOpen && this.props.ui.rightPanelMode === 'revisionhistory') {\n this.props.actions.rightPanelToggle(false);\n return;\n }\n this.props.actions.fetchRevisionHistory(this.props.formID);\n this.props.actions.rightPanelToggle(true);\n this.props.actions.updateRightPanelMode('revisionhistory', true);\n }\n\n handleCopy() {\n const { user, formID } = this.props;\n\n this.setState({ isLinkCopiedToClipboard: true });\n // copy link action logs.\n logJotFormEvents('form-builder', {\n actor: user.username,\n action: 'CollaborationLinkCopied',\n target: formID,\n }, user.account_type.name);\n\n setTimeout(() => { this.setState({ isLinkCopiedToClipboard: false }); }, 3000);\n }\n\n toggleJotformAIModal() {\n const { ui: { isLeftPanelOpen, isRightPanelOpen }, AI: { ui }, actions: { toggleAIPanel, leftPanelToggle } } = this.props;\n if (isLeftPanelOpen && isRightPanelOpen) {\n leftPanelToggle(false);\n if (!ui.isOpened) {\n toggleAIPanel(!ui.isOpened);\n }\n return;\n }\n toggleAIPanel(!ui.isOpened);\n }\n\n handleAppChangeLink(link) {\n const { history } = this.props;\n history.push(`/${link}`);\n }\n\n handleClose() {\n this.setState({\n openedLogin: false,\n });\n }\n\n updateLoginFlow() {\n this.setState({\n openedLogin: true,\n });\n const signupElement = global.document.getElementsByClassName('signupPrompt-slides')?.[0];\n const loginModal = global.document.getElementsByClassName('xcl-contentWrapper')?.[0];\n loginModal?.appendChild(signupElement);\n }\n\n handleNavigationToggle(isNavigationOpen) {\n const {\n ui: { isAppPickerSideModeActive }, actions: { updateAppPickerTooltip, updateAppPickerPulse, updateUserSettings },\n user: { appPickerTooltipSeen }\n } = this.props;\n\n if (!isAppPickerSideModeActive) return;\n\n if (isNavigationOpen && appPickerTooltipSeen !== '1') {\n updateAppPickerTooltip(false);\n updateAppPickerPulse(false);\n updateUserSettings({ appPickerTooltipSeen: '1' });\n } else if (!isNavigationOpen && appPickerTooltipSeen === '1') {\n updateAppPickerPulse(false);\n }\n }\n\n renderPrimaryStatusBar() {\n const { handleRevisionHistoryPanel, toggleInfoPanel } = this;\n const {\n ui: { currentLocation, revisionInfoPanel } = {},\n updatedAt,\n createdAt,\n user,\n offlineMode,\n appStatus: appStatusProp,\n } = this.props;\n const { statusBarErrored } = this.state;\n const appStatus = offlineMode ? 'offline' : appStatusProp;\n\n return (\n \n );\n }\n\n renderSwitchToOldButton() {\n const { isNDT, handleSwitchThemeButtonClick } = this.props;\n const switchThemeButtonText = isNDT ? t('Switch to the Old Theme') : t('Switch to the New Theme');\n\n return (\n
  • \n \n {switchThemeButtonText}\n \n
    \n {switchThemeButtonText}\n
    \n
  • \n );\n }\n\n renderCollaborationPanelContainer(collabrativeUsersWithoutMe) {\n const {\n isSwitchToOldVisible,\n actions: {\n regenerateCollaborationToken\n },\n ui: {\n isCollaborationPopupOpen\n },\n user,\n isCollaborationTokenGenerated,\n formID,\n collaborationToken\n } = this.props;\n const { isLinkCopiedToClipboard } = this.state;\n return (\n
  • 0,\n withoutCollaborateWrapper: !collabrativeUsersWithoutMe.length > 0,\n withSTObutton: isSwitchToOldVisible,\n popupOpen: isCollaborationPopupOpen\n })}\n >\n
    \n \n {(collabrativeUsersWithoutMe.length === 0 && !isSwitchToOldVisible) && t('Add Collaborators')}\n \n
    \n {t('Invite Co-Workers to collaborate')}\n
    \n
    \n \n {isCollaborationPopupOpen ? (\n \n \n \n ) : undefined }\n \n
  • \n );\n }\n\n renderExtraPanelButtons(collabrativeUsersWithoutMe) {\n const {\n user,\n users,\n formOwner,\n isSwitchToOldVisible, actions: actionsProp, actions: { openCollaborationPopup, openHelpMenu },\n ui: {\n currentLocation, isHelpMenuOpen, isPreviewModOn, isCollaborationPopupOpen\n },\n team\n } = this.props;\n\n const currentUser = find(users, q => q.username === user.username);\n const isPDFUploadTab = currentLocation === 'upload';\n const isCurrentUserFormOwner = team.isTeamMember ? user?.teamRoles?.includes('team_admin') : formOwner && currentUser.username && formOwner.toLowerCase() === currentUser.username.toLowerCase();\n const isCollaborationDisabled = this.customConfigs?.FORM_BUILDER_COLLABORATION_DISABLED;\n const canSeeCollaborationPanel = this.isPanelVisable('CollaborationPanel') && isCurrentUserFormOwner && !isPDFUploadTab && !isCollaborationDisabled;\n\n const logHelpJotformEvents = ({ action, target }) => {\n const { username, accountType } = user;\n logJotFormEvents('helpOnBuilder2', {\n actor: username,\n action,\n target,\n }, accountType);\n };\n\n return (\n \n {\n this.props.isAiButtonVisible && (\n
  • \n \n Copilot\n \n
  • \n )\n }\n {isSwitchToOldVisible && this.renderSwitchToOldButton()}\n {canSeeCollaborationPanel && (\n featureFlag.getFeature(featureFlag.getList().FORM_BUILDER_NEW_SHARE)\n ? \n : this.renderCollaborationPanelContainer(collabrativeUsersWithoutMe)\n )}\n {global.JOTFORM_ENV !== 'ENTERPRISE' && (\n \n )}\n \n );\n }\n\n renderSignupSliderModal() {\n const { user, ui: { isImportedPdf } } = this.props;\n return (\n \n );\n }\n\n renderIntentionalPublishEnableButton() {\n const { actions: { updateFormProperty }, form } = this.props;\n const isUnpublished = isFormUnpublished(form);\n return (\n
    \n
    \n {\n updateFormProperty({\n status: 'ENABLED',\n publishData: 'headerButton'\n });\n setTimeout(() => {\n this.setState({ publishData: false });\n }, 1500);\n }}\n >\n {t(isUnpublished ? 'Enable Form' : 'Form Enabled')}\n \n
    \n {t('Enable your form to start receiving submissions')}\n
    \n
    \n
    \n );\n }\n\n /**\n * Take the users and parse them, ready-to-be-shown in the collaborators list.\n */\n getCollaborators() {\n const {\n users,\n user: currentUser,\n formOwner,\n } = this.props;\n const collaborators = users.filter(user => user.username !== currentUser.username);\n const parsedUsers = collaborators.map(user => ({\n ...user,\n role: (formOwner === user.username)\n ? 'owner'\n : user.role,\n }));\n return parsedUsers;\n }\n\n renderPrimaryHeaderButtons() {\n const { users, user } = this.props;\n const usersWithoutMe = users.filter(({ email = '' }) => email !== user.email);\n const collaborators = this.getCollaborators();\n const isEnableButtonAvailable = user.intentionalPublishNewUserABupdated === '22231'\n || user.intentionalPublishExistingUserABupdated === '22261'; // C Test Variant for both AB test\n return (\n
    \n
    \n {(this.state.publishData && isEnableButtonAvailable) && (this.renderIntentionalPublishEnableButton())}\n \n {this.renderExtraPanelButtons(usersWithoutMe)}\n
    \n
    \n );\n }\n\n render() {\n const {\n user, isHIPAAForm, formID, form, ui: {\n isPDFImporter, isAppPickerSideModeActive, isAppPickerPulseActive, isAppPickerTooltipActive, isPreviewModOn, currentLocation,\n }, onAppPickerTooltipCloseIconClicked, onAppPickerTooltipRendered,\n team: {\n id: teamID,\n properties: teamProperties,\n isTeamMember\n }\n } = this.props;\n const renderSignupSliderCondition = this.state.openedLogin && user.accountType === 'GUEST';\n\n return (\n
    \n
    \n\n {\n global.window.location.search.includes('exitIntentSurvey=true') && (\n \n )\n }\n\n f}\n form={form}\n navigationAppTitle={isPDFImporter ? 'Smart PDF Forms' : 'Form Builder'}\n TitleRenderer={Title}\n subTitle={this.renderPrimaryStatusBar}\n appList={getUserAppList(user, 'formBuilder', form)}\n backToMyFormsText={`Go Back to ${isTeamMember ? 'Team Workspace' : 'My Forms'}`}\n backToMyFormsLink={isTeamMember ? `/myteams/${teamProperties.slug || teamID}` : redirectUrlAsLanguageCode('myforms')}\n enterpriseConfigs={this.enterpriseConfigs}\n isAppPickerSideModeActive={isAppPickerSideModeActive}\n isAppPickerPulseActive={isAppPickerPulseActive}\n isAppPickerTooltipActive={isAppPickerTooltipActive && !isPreviewModOn}\n navigationToggleHandler={this.handleNavigationToggle}\n onAppPickerTooltipCloseIconClicked={onAppPickerTooltipCloseIconClicked}\n navigationToggleDisabled={!!global.csiCollaborator}\n onAppPickerTooltipRendered={onAppPickerTooltipRendered}\n {...(isTeamMember && { teamID })}\n mainContentLinkDestination={`#siteNav_id_${currentLocation === 'builder' ? 'build' : currentLocation}`}\n teamProperties={teamProperties}\n teamBadgeID={teamID}\n productType=\"Form\"\n isTeamMember={isTeamMember}\n >\n {this.renderPrimaryHeaderButtons()}\n \n
    \n { renderSignupSliderCondition && this.renderSignupSliderModal() }\n {this.props.ui.showHIPAAPINModal && (\n \n \n \n )}\n
    \n );\n }\n}\n\nPrimaryHeader.propTypes = {\n // formTitle: PropTypes.string,\n // appStatus: PropTypes.string,\n isCollaborationTokenGenerated: PropTypes.bool,\n collaborationToken: PropTypes.string,\n actions: PropTypes.shape({\n regenerateCollaborationToken: PropTypes.func,\n getNewToken: PropTypes.func,\n openCollaborationPopup: PropTypes.func,\n openHelpMenu: PropTypes.func,\n openUserSettingsPopup: PropTypes.func,\n fetchRevisionHistory: PropTypes.func,\n updateRightPanelMode: PropTypes.func,\n rightPanelToggle: PropTypes.func,\n leftPanelToggle: PropTypes.func,\n toggleRevisionInfoPanel: PropTypes.func,\n updateFormProperty: PropTypes.func,\n displaySignupPrompt: PropTypes.func,\n makeSignupPromptClosable: PropTypes.func\n }),\n formID: PropTypes.string,\n users: PropTypes.arrayOf(PropTypes.shape()),\n user: PropTypes.shape(),\n formOwner: PropTypes.string,\n ui: PropTypes.shape({\n isCollaborationPopupOpen: PropTypes.bool,\n isHelpMenuOpen: PropTypes.bool,\n isPreviewModOn: PropTypes.bool,\n isUserSettingsPopupOpen: PropTypes.bool,\n isRightPanelOpen: PropTypes.bool,\n rightPanelMode: PropTypes.string,\n currentLocation: PropTypes.string,\n revisionInfoPanel: PropTypes.bool,\n isAppNavigationOpen: PropTypes.bool\n }),\n updatedAt: PropTypes.string,\n createdAt: PropTypes.string,\n handleSwitchThemeButtonClick: PropTypes.func,\n isSwitchToOldVisible: PropTypes.bool,\n isNDT: PropTypes.bool,\n onAppPickerTooltipCloseIconClicked: PropTypes.func,\n onAppPickerTooltipRendered: PropTypes.func,\n team: PropTypes.object\n};\n\nPrimaryHeader.defaultProps = {\n isSwitchToOldVisible: false,\n isNDT: false,\n createdAt: '',\n handleSwitchThemeButtonClick: f => f,\n onAppPickerTooltipCloseIconClicked: f => f,\n onAppPickerTooltipRendered: f => f,\n team: {}\n};\n\nfunction mapDispatchToProps(dispatch) {\n return {\n actions: bindActionCreators(actions, dispatch)\n };\n}\n\nfunction mapStateToProps(state) {\n return {\n isCollaborationTokenGenerated: state.ui.isCollaborationTokenGenerated,\n collaborationToken: state.ui.collaborationToken,\n formID: `${state.formProperties.id}`,\n themeID: state.formProperties.themeID,\n formOwner: state.form.username,\n user: state.user,\n users: state.users,\n ui: state.ui,\n title: state.formProperties.title,\n pagetitle: state.formProperties.pagetitle,\n pageTitleChanged: state.formProperties.pageTitleChanged,\n isHIPAAForm: state.formProperties.isHIPAA === '1',\n form: state.formProperties,\n team: state.team,\n AI: state.AI\n };\n}\n\nexport default connect(mapStateToProps, mapDispatchToProps)(PrimaryHeader);\n","import PropTypes from 'prop-types';\nimport React, { Component } from 'react';\nimport { connect } from 'react-redux';\nimport { t } from '@jotforminc/translation';\nimport { IconPlus } from '@jotforminc/svg-icons';\nimport { a11yClickHandler } from '@jotforminc/utils';\nimport { PanelToggleWrapper, PanelToggleButton } from '@jotforminc/panel-components';\nimport classNames from 'classnames';\nimport { leftPanelToggle } from '../actions';\nimport { createCookie, readCookie, logJotFormEvents } from '../libs/Utils';\nimport { handleLeftPanelClick } from '../actions/pdfImport';\n\nclass LeftPanel extends Component {\n constructor(props) {\n super(props);\n\n this.handleClick = this.handleClick.bind(this);\n this.togglePanel = this.togglePanel.bind(this);\n }\n\n UNSAFE_componentWillReceiveProps(nextProps) {\n const { currentLocation, isLeftPanelOpen } = nextProps;\n\n if (currentLocation === 'builder' && isLeftPanelOpen) {\n global.window.addEventListener('click', this.handleClick, false);\n }\n }\n\n shouldComponentUpdate(nextProps) {\n // Unfortunately we are not rendering left panel by controlling leftpanelopen variable in settings or publish tab.\n // But we need to do it.\n if (nextProps.currentLocation !== 'builder') {\n return true;\n }\n return true;\n }\n\n componentWillUnmount() {\n global.window.removeEventListener('click', this.handleClick);\n }\n\n handleClick(e) {\n if (this.props.isPDFImporter) {\n this.props.handleLeftPanelClick(e.target, this.leftPanelRef);\n }\n }\n\n togglePanel() {\n this.props.leftPanelToggle(!this.props.isLeftPanelOpen);\n\n // discoverabilityTracking\n const { user: { username, accountType } } = this.props;\n logJotFormEvents('discoverabilityTracking', {\n actor: username,\n action: 'click',\n target: '[data-testid=\"panelToggle-formFields\"]'\n }, accountType);\n }\n\n handleKeyDown = event => {\n a11yClickHandler(event, this.togglePanel);\n };\n\n render() {\n const isMobileApp = global.navigator.userAgent.indexOf('JotForm Mobile') > -1 || global.navigator.userAgent.indexOf('JFCEMobile') > -1;\n\n let animationRemoved = readCookie('removeAddQuestionAnimation');\n\n if (!animationRemoved && this.props.questionAddCounter > 1) {\n createCookie('removeAddQuestionAnimation', 'true');\n animationRemoved = true;\n }\n const {\n currentLocation, isLeftPanelOpen, isRevisionPanel, builderTranslationReset, noTransition, selectedQuestion\n } = this.props;\n const mobileAppPanel = isMobileApp;\n const animatedButton = !animationRemoved;\n\n return (\n { this.leftPanelRef = ref; }}\n role=\"complementary\"\n >\n {currentLocation === 'builder' && (\n \n this.togglePanel()}\n onKeyDown={this.handleKeyDown}\n stickButton\n tabIndex={isLeftPanelOpen ? '-1' : '0'}\n >\n {t('Add Element')}\n \n \n )}\n {this.props.children}\n \n );\n }\n}\n\nLeftPanel.propTypes = {\n children: PropTypes.node,\n leftPanelToggle: PropTypes.func,\n handleLeftPanelClick: PropTypes.func,\n isLeftPanelOpen: PropTypes.bool,\n isRevisionPanel: PropTypes.bool,\n questionAddCounter: PropTypes.number,\n currentLocation: PropTypes.string,\n user: PropTypes.shape()\n};\n\nconst mapDispatchToProps = {\n leftPanelToggle,\n handleLeftPanelClick\n};\n\nconst mapStateToProps = state => ({\n isLeftPanelOpen: state.ui.isLeftPanelOpen,\n isRevisionPanel: state.ui.showRevisionPanel,\n questionAddCounter: state.ui.questionAddCounter,\n currentLocation: state.ui.currentLocation,\n isPDFImporter: state.ui.isPDFImporter,\n user: state.user\n});\n\nexport default connect(mapStateToProps, mapDispatchToProps)(LeftPanel);\n","import PropTypes from 'prop-types';\nimport React, { createRef } from 'react';\nimport debounce from 'lodash/debounce';\nimport { t, translationRenderer } from '@jotforminc/translation';\nimport { handleCustomNavigation } from '@jotforminc/utils';\nimport { isEnterprise } from '@jotforminc/enterprise-utils';\nimport { Link } from '@jotforminc/magnet';\nimport { initEpBuilderTooltipFirstLogoUpload } from '@jotforminc/enterprise-promotions';\nimport ImagePicker from '../../components/ImageUpload';\nimport DimensionPicker from '../question-properties-editor/customs/DimensionPicker';\nimport Line from '../../components/Line';\nimport RadioGroup from '../../components/RadioGroup';\nimport Column from '../../components/Column';\nimport { logJotFormEvents } from '../../utils/Utils';\n\nconst initialValues = {\n Upload: {\n text: 'Logo',\n hint: ''\n },\n logoSize: {\n text: 'Logo Size',\n hint: ''\n },\n Alignment: {\n text: 'Alignment',\n hint: 'Select how the image is aligned in the form.',\n options: [\n { text: 'Left', value: 'Left' },\n { text: 'Center', value: 'Center' },\n { text: 'Right', value: 'Right' }\n ]\n }\n};\nconst expectedImgHeight = 140; // px\nclass ImageCoverWizard extends React.Component {\n constructor(props) {\n super(props);\n this.handleUploadSuccess = this.handleUploadSuccess.bind(this);\n this.handleRemove = this.handleRemove.bind(this);\n this.handleDimensionChange = this.handleDimensionChange.bind(this);\n this.handleAlingmentChange = this.handleAlingmentChange.bind(this);\n this.removeImageInInjectCSS = this.removeImageInInjectCSS.bind(this);\n this.recordLogoVariant = debounce(this.recordLogoVariant, 500).bind(this);\n this.inputRef = createRef();\n this.state = {\n isOrganizationLogo: false,\n isFormLogoRemoved: false,\n proportion: 0,\n min: 80,\n max: props.formProperties?.formWidth || 720\n };\n }\n\n componentDidMount() {\n const { styleJSON = {} } = this.props.formProperties;\n\n const orgLogo = this.props.user?.company_logo;\n const formCoverImg = styleJSON['@formCoverImg'] || '';\n this.setState({ isOrganizationLogo: orgLogo && formCoverImg === orgLogo });\n\n if (styleJSON && styleJSON['@formCoverImg']) {\n const width = styleJSON['@formCoverImgWidth'] || 100;\n const height = styleJSON['@formCoverImgHeight'] || 100;\n this.setState({ proportion: height / width });\n }\n }\n\n componentDidUpdate(prevProps, prevState) {\n const { formProperties, user } = this.props;\n const { styleJSON = {} } = formProperties;\n\n if (prevState.proportion !== this.state.proportion) {\n this.handleDimensionChangeConfirm({ target: this.inputRef.current }, true);\n }\n\n if (user?.company_logo && user?.company_logo === styleJSON['@formCoverImg'] && !this.state.isOrganizationLogo) {\n this.setState({ isOrganizationLogo: true });\n }\n }\n\n render() {\n const { formProperties, isSlider, forceHideAccountWarning } = this.props;\n const { isOrganizationLogo } = this.state;\n const { styleJSON = {} } = formProperties;\n const isFormCoverAvailable = styleJSON['@formCover'] === '1';\n const formCoverLink = styleJSON['@formCoverImg'] || '';\n const width = styleJSON['@formCoverImgWidth'] || 100;\n const height = styleJSON['@formCoverImgHeight'] || 100;\n const formCoverTopPosition = styleJSON['@formCoverTopPosition'] || 'Center'; // eslint-disable-line\n const showOrganizationLogoWarning = isOrganizationLogo && isFormCoverAvailable && !forceHideAccountWarning;\n return (\n
    \n
    \n
    \n \n \n
    \n \n \n \n \n \n

    {t(initialValues.Upload.hint)}

    \n
    \n
    \n
    \n {showOrganizationLogoWarning && (\n \n
    \n \n

    \n {translationRenderer('This logo is set as your organizational logo. You can change it any time from [1[Account Settings.]]')({\n renderer1: text => (\n {\n e.preventDefault();\n this.recordLogoVariant('orglogo-accountsettingsclicked');\n handleCustomNavigation(`/${window.JOTFORM_ENV === 'ENTERPRISE' ? 'enterprise-admin/settings' : 'myaccount/profile'}`);\n }}\n target=\"_blank\"\n >\n {text}\n \n )\n })}\n

    \n
    \n
    \n
    \n )}\n
    \n {isFormCoverAvailable\n && (\n \n \n
    \n \n \n \n \n {\n isSlider ? (\n
    \n this.handleDimensionChangeSlider(e)}\n onMouseUp={e => this.handleDimensionChangeConfirm(e)}\n onTouchEnd={e => this.handleDimensionChangeConfirm(e)}\n min={this.state.min}\n max={this.state.max}\n type=\"range\"\n step={10}\n />\n
    \n ) : (\n \n )\n }\n

    {initialValues.logoSize.hint}

    \n
    \n
    \n
    \n
    \n )}\n {isFormCoverAvailable\n && (\n \n \n
    \n \n \n \n \n \n

    {t(initialValues.Alignment.hint)}

    \n
    \n
    \n
    \n
    \n )}\n
    \n
    \n
    \n );\n }\n\n updateStyles(styleJSON) {\n this.props.onUpdate({ styleJSON: JSON.stringify(styleJSON) });\n }\n\n updateInjectCSSAndStyles(injectCSS, styleJSON) {\n const { onUpdate } = this.props;\n onUpdate({ injectCSS: JSON.stringify(injectCSS), styleJSON: JSON.stringify(styleJSON) });\n }\n\n isNewUser() {\n return window.isNewUser;\n }\n\n recordLogoVariant(action) {\n const isTestWin = this.isNewUser();\n\n if (isTestWin) {\n logJotFormEvents('organizationLogo', {\n actor: this.props.user.username,\n action,\n target: 'form'\n }, this.props.user.accountType);\n }\n }\n\n async handleUploadSuccess(data) {\n // A/B: epBuilderTooltipFirstLogoUpload\n const { user, user: { company_logo: companyLogo } } = this.props;\n const alreadyUploadedCompanyLogo = companyLogo !== undefined;\n initEpBuilderTooltipFirstLogoUpload(user, alreadyUploadedCompanyLogo);\n\n let { url } = data;\n const localUrlPattern = /^\\//; // check starts with /\n const checkProtocolPattern = /^(http|https|ftp)/;\n // If url is local image, add jotform.com before\n if (url && localUrlPattern.test(url)) {\n url = `https://www.jotform.com${url}`;\n }\n if (url && !checkProtocolPattern.test(url)) { // we need to add protocol\n url = `http://${url}`; // or may be https?\n }\n let { formProperties: { styleJSON = {} } } = this.props;\n styleJSON = styleJSON && Array.isArray(styleJSON) ? { ...styleJSON } : styleJSON;\n\n let imgHeight = parseInt(data.dimensions.height, 10);\n let imgWidth = parseInt(data.dimensions.width, 10);\n const formWidth = styleJSON['@formWidth'] || this.props.formProperties.formWidth;\n let parsedFormWidth = formWidth ? formWidth.match(/\\d+/) : '';\n if (parsedFormWidth && parsedFormWidth[0]) {\n parsedFormWidth = parseInt(parsedFormWidth[0], 10);\n }\n if (imgHeight > expectedImgHeight) {\n const proportion = expectedImgHeight / imgHeight;\n imgWidth = Math.round(imgWidth * proportion);\n if (imgWidth.length === 0) {\n imgWidth = 0;\n }\n imgHeight = expectedImgHeight;\n }\n if (imgWidth > parsedFormWidth) { // if imgWidth is greater than form width, lets fix it to form width\n const proportion = parsedFormWidth / imgWidth;\n imgHeight = Math.round(imgHeight * proportion);\n if (imgHeight.length === 0) {\n imgHeight = 0;\n }\n imgWidth = parsedFormWidth;\n }\n styleJSON['@formCover'] = '1';\n styleJSON['@formCoverImg'] = url;\n styleJSON['@formCoverImgWidth'] = imgWidth;\n styleJSON['@formCoverImgHeight'] = imgHeight;\n styleJSON['@formCoverPosition'] = 'Top';\n styleJSON['@formCoverTopPosition'] = 'Center';\n styleJSON['@formCoverBottomMargin'] = 32;\n\n this.recordLogoVariant('fileuploaded');\n if (!this.props.user?.company_logo && this.isNewUser()) {\n if (!isEnterprise()) {\n this.props.updateUserSettings({ company_logo: url });\n }\n\n this.setState({ isOrganizationLogo: true });\n if (this.state.isFormLogoRemoved) {\n this.recordLogoVariant('orglogo-updated');\n this.setState({ isFormLogoRemoved: false });\n }\n }\n this.updateStyles(styleJSON);\n this.setState({ proportion: imgHeight / imgWidth });\n // Then lets cloe module if we are in mobile\n if (this.props.isMobile && this.props.closeModule) {\n this.props.closeModule();\n }\n }\n\n removeImageInInjectCSS(imgURL, injectCSS) {\n if (imgURL && injectCSS && typeof injectCSS === 'string' && injectCSS.includes(imgURL)) {\n return injectCSS.replace(`url(\"${imgURL}\")`, 'none');\n }\n return injectCSS;\n }\n\n handleRemove() {\n const { formProperties: { styleJSON, injectCSS } } = this.props;\n const imgURL = styleJSON['@formCoverImg'];\n const updatedInjectCSS = this.removeImageInInjectCSS(imgURL, injectCSS);\n\n delete styleJSON['@formCover'];\n delete styleJSON['@formCoverImg'];\n delete styleJSON['@formCoverImgWidth'];\n delete styleJSON['@formCoverImgHeight'];\n delete styleJSON['@formCoverPosition'];\n delete styleJSON['@formCoverTopPosition'];\n delete styleJSON['@formCoverBottomMargin'];\n\n if (injectCSS !== updatedInjectCSS) {\n this.updateInjectCSSAndStyles(updatedInjectCSS, styleJSON);\n } else {\n this.updateStyles(styleJSON);\n }\n\n this.recordLogoVariant('orglogo-removed');\n this.setState({ isOrganizationLogo: false, isFormLogoRemoved: true });\n }\n\n handleDimensionChange(e) {\n const { width, height } = e.target.value;\n const { styleJSON } = this.props.formProperties;\n styleJSON['@formCoverImgWidth'] = width;\n styleJSON['@formCoverImgHeight'] = height;\n\n this.updateStyles(styleJSON);\n }\n\n calculateSliderRatio(width, target) {\n const min = target.getAttribute('min');\n const max = target.getAttribute('max');\n const range = max - min;\n const ratio = (width - min) / range;\n target.style.setProperty('--ratio', ratio);\n }\n\n handleDimensionChangeConfirm(e, isFirst = false) {\n const { formProperties } = this.props;\n const { proportion } = this.state;\n\n const width = parseInt(e.target.value, 10);\n this.calculateSliderRatio(width, e.target);\n\n const { styleJSON } = formProperties;\n styleJSON['@formCoverImgWidth'] = width;\n styleJSON['@formCoverImgHeight'] = width * proportion;\n\n this.updateStyles(styleJSON);\n\n if (!isFirst) {\n this.recordLogoVariant('dimensionischanged');\n }\n }\n\n handleDimensionChangeSlider(e) {\n const { formProperties, onPropertyChange } = this.props;\n const { proportion } = this.state;\n\n const width = parseInt(e.target.value, 10);\n this.calculateSliderRatio(width, e.target);\n\n const { styleJSON } = formProperties;\n styleJSON['@formCoverImgWidth'] = width;\n styleJSON['@formCoverImgHeight'] = width * proportion;\n\n onPropertyChange({\n styleJSON: JSON.stringify(styleJSON)\n }, false, false);\n }\n\n handleAlingmentChange(e) {\n const { value } = e.target;\n const { styleJSON } = this.props.formProperties;\n styleJSON['@formCoverTopPosition'] = value;\n\n this.updateStyles(styleJSON);\n const alignmentVariants = {\n Right: 'alignmentright',\n Left: 'alignmentleft',\n Center: 'alignmentcentered'\n };\n this.recordLogoVariant(alignmentVariants[value]);\n }\n}\n\nImageCoverWizard.propTypes = {\n formProperties: PropTypes.shape(),\n onUpdate: PropTypes.func,\n closeModule: PropTypes.func,\n isMobile: PropTypes.bool,\n isSlider: PropTypes.bool,\n onPropertyChange: PropTypes.func,\n // When set to true, hide the organization logo warning.\n forceHideAccountWarning: PropTypes.bool\n};\n\nImageCoverWizard.defaultValue = {\n forceHideAccountWarning: false\n};\n\nexport default ImageCoverWizard;\n","import PropTypes from 'prop-types';\nimport React from 'react';\nimport { isEnterprise } from '@jotforminc/enterprise-utils';\nimport ImagePicker from '../../components/ImageUpload';\nimport IconSelector from '../../components/IconSelector';\nimport { Tab, Tabs } from '../../components/Tabs2';\nimport { logJotFormEvents } from '../../utils/Utils';\n\nclass WelcomePageWizard extends React.Component {\n constructor(props) {\n super(props);\n this.handleUploadSuccess = this.handleUploadSuccess.bind(this);\n this.handleRemove = this.handleRemove.bind(this);\n this.isNewUser = this.isNewUser.bind(this);\n this.recordLogoVariant = this.recordLogoVariant.bind(this);\n this.state = {\n activeTab: 'logo',\n orgLogoRemoved: false\n };\n }\n\n render() {\n const imageSrc = this.props.formProperties.welcomePage && this.props.formProperties.welcomePage[0].logo;\n return (\n
    \n this.setState({ activeTab: key })}>\n \n \n \n \n \n \n \n
    \n );\n }\n\n handleRemove() {\n const prop = { welcomePage: [{ logo: '' }] };\n this.props.onUpdate(prop);\n this.setState({ orgLogoRemoved: true });\n this.recordLogoVariant('orglogo-removed');\n }\n\n isNewUser() {\n return window.isNewUser;\n }\n\n recordLogoVariant(action) {\n const isTestWin = this.isNewUser();\n if (isTestWin) {\n logJotFormEvents('organizationLogo', {\n actor: this.props.user.username,\n action,\n target: 'form'\n }, this.props.user.accountType);\n }\n }\n\n handleUploadSuccess(data) {\n const { url } = data;\n const prop = { welcomePage: [{ logo: url }] };\n this.props.onUpdate(prop);\n if (!this.props.user?.company_logo && this.isNewUser()) {\n if (!isEnterprise()) {\n this.props.updateUserSettings({ company_logo: url });\n }\n }\n if (this.state.orgLogoRemoved) {\n this.recordLogoVariant('orglogo-updated');\n this.setState({ orgLogoRemoved: false });\n }\n this.recordLogoVariant('fileuploaded');\n }\n}\n\nWelcomePageWizard.propTypes = {\n onUpdate: PropTypes.func,\n updateUserSettings: PropTypes.func,\n formProperties: PropTypes.shape()\n};\n\nexport default WelcomePageWizard;\n","import {\n IconPaletteFilled, IconImageFilled, IconTriangleCircleFilled, IconFormCardFilled\n} from '@jotforminc/svg-icons';\n\nexport const getViewData = () => {\n return [\n {\n title: 'Color',\n value: 'color',\n SVGComponent: IconPaletteFilled\n },\n {\n title: 'Image',\n value: 'image',\n SVGComponent: IconImageFilled\n },\n {\n title: 'Video',\n value: 'video',\n SVGComponent: IconTriangleCircleFilled\n },\n {\n title: 'Layout',\n value: 'layout',\n SVGComponent: IconFormCardFilled\n }\n ];\n};\n","/*\n* @Author: Irem Ercan\n* @Date: 2018-02-15 17:09:54\n* @Last Modified by: Irem Ercan\n* @Last Modified time: 2018-02-15 18:36:12\n*/\nexport const ACCESSIBLE_PALETTES = ['5a857918cf3bfe39c66fe7b1', '5a857b6ccf3bfe7b18432671', '59760471cf3bfe617a1fa341', '5966315acf3bfe3413416f21', '59663090cf3bfe325f640051'];\n","import PropTypes from 'prop-types';\nimport React, { Component } from 'react';\nimport { a11yClickHandler } from '@jotforminc/utils';\nimport { IconCheck } from '@jotforminc/svg-icons';\nimport { translate } from '../../../mixins/Translation';\nimport { ACCESSIBLE_PALETTES } from '../constants';\n\nexport default class ThemeItem extends Component {\n constructor(props) {\n super(props);\n this.state = {\n hovered: false\n };\n }\n\n onMouseEnter = () => {\n this.setState({\n hovered: true\n });\n };\n\n renderColorThemeInner(item) {\n const paletteID = item.id;\n const beginColor = item.styleJSON['pageBg-colorBegin'];\n const endColor = item.styleJSON['pageBg-colorEnd'];\n const hasGradient = beginColor && endColor && beginColor !== endColor;\n const isAccessible = ACCESSIBLE_PALETTES.indexOf(paletteID) !== -1;\n return (\n \n { (isAccessible && this.props.accessibility === '1')\n && (\n
    \n \n \n \n \n \n \n \n \n \n {translate('Accessible')}\n
    {translate('Friendly colors for color-blind people.')}
    \n
    \n )}\n
    Text
    \n
    \n Button\n
    \n \n );\n }\n\n renderOverlay(item, isSelected) {\n const onSelectClick = event => {\n event.stopPropagation();\n this.props.onSelectFn(item);\n };\n const onSelectDefaultClick = event => {\n event.stopPropagation();\n this.props.onSelectDefaultFn(item, item.name);\n };\n const handleKeyDown = event => {\n a11yClickHandler(event, onSelectClick);\n };\n return (\n \n {false && !isSelected\n && (\n \n { translate('Use Theme') }\n \n )}\n {false && isSelected\n && (\n \n { translate('Set As Default') }\n \n )}\n \n );\n }\n\n render() {\n const { item, themeType, currentTheme } = this.props;\n const isSelected = currentTheme === item.id;\n const isColorTheme = themeType === 'color';\n const isVideoTheme = themeType === 'video';\n const isPublicTheme = item.public;\n const classNames = [\n 'colorPalette-itemContainer',\n isSelected ? 'isSelected' : '',\n !isColorTheme ? 'forThemes' : ''\n ];\n let screenShot = item.screenshots && item.screenshots.length > 0 ? item.screenshots[0] : null;\n let animatedGif = null;\n if (screenShot) {\n screenShot = screenShot.replace('1280.png', '320.png');\n if (isVideoTheme && item.screenshots.join('').indexOf('animated.gif') !== -1) {\n animatedGif = screenShot.replace('320.png', 'animated.gif');\n }\n }\n const overlay = this.renderOverlay(item, isSelected);\n return (\n \n
    \n
    \n \n
    \n
    \n
    \n {isColorTheme && this.renderColorThemeInner(item)}\n {!isColorTheme\n && (\n
    \n \"\"\n \"\"\n { isVideoTheme && animatedGif && this.state.hovered && }\n
    \n )}\n {!isColorTheme &&
    {translate(item.name)}
    }\n
    \n {overlay}\n \n );\n }\n}\n\nThemeItem.propTypes = {\n item: PropTypes.object,\n currentTheme: PropTypes.string,\n themeType: PropTypes.string,\n onSelectFn: PropTypes.func,\n onSelectDefaultFn: PropTypes.func,\n isAdmin: PropTypes.bool,\n accessibility: PropTypes.string\n};\n","import PropTypes from 'prop-types';\nimport React, { Component } from 'react';\nimport ThemeItem from './ThemeItem';\n\nexport default class ThemesTab extends Component {\n render() {\n const items = this.props.list.map((palette, idx) => {\n return (\n \n );\n });\n return (\n
    \n {items}\n
    \n );\n }\n}\n\nThemesTab.propTypes = {\n list: PropTypes.arrayOf(PropTypes.shape()),\n themeType: PropTypes.string,\n isAdmin: PropTypes.bool,\n currentTheme: PropTypes.string,\n onSelectFn: PropTypes.func,\n onSelectDefaultFn: PropTypes.func,\n accessibility: PropTypes.string\n};\n","import PropTypes from 'prop-types';\nimport React, { Component } from 'react';\nimport Dropdown from '../../../components/Dropdown';\nimport TextInput from '../../../components/TextInput';\nimport { ACCESSIBLE_PALETTES } from '../constants';\n\nexport default class CardDesignerAdmin extends Component {\n constructor(props) {\n super(props);\n this.state = {\n styleJSON: {},\n styleJSONValue: '',\n welcomePage: {},\n thankYouPage: {},\n error: '',\n showConfirmation: false,\n selected: 'color',\n isLoaded: false,\n themeOrder: 0\n };\n this.handleCreateNewTheme = this.handleCreateNewTheme.bind(this);\n this.handleUpdateTheme = this.handleUpdateTheme.bind(this);\n this.handleScreenshotUpdate = this.handleScreenshotUpdate.bind(this);\n this.handleStyleJSONChange = this.handleStyleJSONChange.bind(this);\n }\n\n UNSAFE_componentWillMount() {\n const themeID = this.props.formProperties.themeID;\n if (this.props.currentTheme) {\n const styleJSON = { ...this.props.currentTheme.styleJSON, ...this.props.formProperties.styleJSON };\n let selected = 'image';\n let order = 0;\n if (this.props.currentTheme.color_palette) { selected = 'color'; }\n if (this.props.currentTheme.video_background) { selected = 'video'; }\n if (this.props.currentTheme.order) { order = parseInt(this.props.currentTheme.order, 10); }\n this.setState({\n isLoaded: true, styleJSONValue: JSON.stringify(styleJSON, null, 2), selected: selected, themeOrder: order\n });\n } else {\n this.props.fetchThemeInfoFn(themeID).then(data => {\n const styleJSON = { ...data.content.styleJSON, ...this.props.formProperties.styleJSON };\n this.setState({ isLoaded: true, styleJSONValue: JSON.stringify(styleJSON, null, 2) });\n });\n }\n }\n\n getThemeProperties() {\n const themeOrder = parseInt(this.state.themeOrder, 10);\n if (this.state.selected === 'color') {\n return { color_palette: 1, video_background: 0, order: themeOrder };\n } if (this.state.selected === 'video') {\n return { video_background: 1, color_palette: 0, order: themeOrder };\n }\n return { color_palette: 0, video_background: 0, order: themeOrder };\n }\n\n renderTextArea() {\n if (this.state.isLoaded) {\n return (\n \n );\n }\n return (
    loading data...
    );\n }\n\n renderThemeSelection() {\n return (\n
    \n Theme Selection\n { this.setState({ selected: e.target.value }); }}\n value={this.state.selected}\n />\n
    \n );\n }\n\n renderOrderInput() {\n return (\n
    \n Order\n this.setState({ themeOrder: e.target.value })}\n value={this.state.themeOrder}\n />\n
    \n );\n }\n\n renderButtons() {\n const saveButton = ;\n const createButton = ;\n const openInNewTab = Open Parent Form ;\n const updateButton = (\n \n {' '}\n Update Screenshot\n {' '}\n \n );\n return (\n
    \n {saveButton}\n {createButton}\n {openInNewTab}\n {updateButton}\n
    \n );\n }\n\n render() {\n const area = this.renderTextArea();\n const error =
    {this.state.error}
    ;\n const buttons = this.renderButtons();\n return (\n
    \n
    \n {area}\n {this.renderThemeSelection()}\n {this.renderOrderInput()}\n {error}\n {buttons}\n
    \n
    \n );\n }\n\n handleStyleJSONChange(e) {\n const { value } = e.target;\n try {\n const styleJSON = JSON.parse(value);\n this.setState({ styleJSON, styleJSONValue: value, error: '' });\n this.props.onPropertyChangeFn({ styleJSON: JSON.stringify(styleJSON) });\n } catch (Ex) {\n this.setState({ error: 'Wrong JSON Format, Couldn\\'t parse JSON.' });\n }\n }\n\n handleCreateNewTheme(e) {\n e.stopPropagation();\n const response = global.prompt('Please enter the name of new theme or color palette', 'Untitled Theme');\n if (response) {\n const options = { name: response, styleJSON: JSON.parse(this.state.styleJSONValue), card_form: 1 };\n const data = { ...options, ...this.getThemeProperties() };\n this.props.createThemeFn(data);\n }\n }\n\n handleUpdateTheme(e) {\n e.stopPropagation();\n const response = global.confirm(`update ${this.props.currentTheme.name} ?`);\n if (response) {\n const options = { styleJSON: JSON.parse(this.state.styleJSONValue) };\n const data = { ...options, ...this.getThemeProperties() };\n if (this.props.formProperties.themeID) {\n this.props.updateThemeFn(this.props.formProperties.themeID, data);\n }\n }\n }\n\n handleScreenshotUpdate(e) {\n e.stopPropagation();\n this.props.updateThemeFn(this.props.currentTheme.id, { updateScreenShots: 1 });\n }\n\n get isSaveDisabled() {\n if (ACCESSIBLE_PALETTES.indexOf(this.props.currentTheme.id) !== -1) {\n return !this.props.canUpdateAccessibleThemes;\n }\n return false;\n }\n}\n\nCardDesignerAdmin.propTypes = {\n formProperties: PropTypes.object.isRequired,\n onPropertyChangeFn: PropTypes.func.isRequired,\n fetchThemeInfoFn: PropTypes.func.isRequired,\n updateThemeFn: PropTypes.func,\n createThemeFn: PropTypes.func,\n currentTheme: PropTypes.shape(),\n canUpdateAccessibleThemes: PropTypes.bool\n};\n","export const colorThemeCustomPanel = [\n {\n title: 'Page Background Style',\n code: 'backgroundStylesPanel',\n lines: [\n {\n columns: [\n {\n label: 'Start Color', key: 'pageBgStartColor', propPath: 'pageBg-colorBegin', type: 'color-picker'\n },\n {\n label: 'End Color', key: 'pageBgEndColor', propPath: 'pageBg-colorEnd', type: 'color-picker'\n }\n ]\n }\n ]\n }\n];\n\nexport const imageThemeCustomPanel = [\n {\n title: 'Page Background Style',\n code: 'backgroundStylesPanel',\n lines: [\n {\n columns: [\n {\n key: 'backgroundProps',\n type: 'image-picker',\n propPath: 'pageBg-image',\n lineLength: 'one',\n optimize: true\n }\n ]\n },\n {\n columns: [\n {\n label: 'Start Color', key: 'pageBgStartColor', propPath: 'pageBg-colorBegin', type: 'color-picker'\n },\n {\n label: 'End Color', key: 'pageBgEndColor', propPath: 'pageBg-colorEnd', type: 'color-picker'\n }\n ]\n }\n ]\n },\n {\n title: 'Background Effects',\n code: 'backgroundEffect',\n lines: [\n {\n columns: [\n {\n key: 'backgroundEffect',\n type: 'backgroud-effect-picker',\n lineLength: 'one',\n propPath: 'pageBg-filterEffect',\n subPropPath: 'welcome-backgroundOverlayColor',\n valuePropPath: 'pageBg-filterEffect-strength',\n defaultValue: 40\n }\n ]\n }\n ]\n }\n];\n\nexport const videoThemeCustomPanel = [\n {\n title: 'Page Background Style',\n code: 'backgroundStylesPanel',\n lines: [\n {\n columns: [\n {\n label: 'Start Color', key: 'pageBgStartColor', propPath: 'pageBg-colorBegin', type: 'color-picker'\n },\n {\n label: 'End Color', key: 'pageBgEndColor', propPath: 'pageBg-colorEnd', type: 'color-picker'\n }\n ]\n },\n {\n columns: [\n {\n key: 'backgroundProps',\n type: 'video-picker',\n propPath: 'pageBg-video',\n lineLength: 'one'\n }\n ]\n }\n ]\n },\n {\n title: 'Background Effects',\n code: 'backgroundEffect',\n lines: [\n {\n columns: [\n {\n key: 'backgroundEffect',\n type: 'backgroud-effect-picker',\n lineLength: 'one',\n propPath: 'pageBg-filterEffect',\n subPropPath: 'welcome-backgroundOverlayColor',\n valuePropPath: 'pageBg-filterEffect-strength'\n }\n ]\n }\n ]\n }\n];\n\nexport const defaultPanels = [\n {\n title: 'Font Families',\n code: 'fontFamilies',\n lines: [\n {\n columns: [\n {\n key: 'fontFamilies', type: 'font-picker', lineLength: 'one', propPath: 'form-fontFamily'\n }\n ]\n }\n ]\n },\n {\n title: 'Welcome & Section Page Properties',\n code: 'WelcomePagePanel',\n lines: [\n {\n columns: [\n {\n label: 'Title Color', key: 'welcomePageTitle', propPath: 'welcome-titleColor', type: 'color-picker'\n },\n {\n label: 'Subtitle Color', key: 'welcomePagesubTitle', propPath: 'welcome-descColor', type: 'color-picker'\n }\n ]\n },\n {\n columns: [\n {\n label: 'Button Color', key: 'welcomePageButtonBgcolor', propPath: 'welcomeButton-bgColor', type: 'color-picker'\n },\n {\n label: 'Button Text Color', key: 'welcomePageButtonColor', propPath: 'welcomeButton-color', type: 'color-picker'\n }\n ]\n },\n {\n columns: [\n {\n label: 'Background Color', key: 'welcomePageBgcolor', propPath: 'welcomePage-bgColor', type: 'color-picker'\n }\n ]\n }\n ]\n },\n {\n title: 'Thank You Page Properties',\n code: 'ThankYouPagePanel',\n lines: [\n {\n columns: [\n {\n label: 'Title Color', key: 'thankYouPageTitle', propPath: 'thankYou-titleColor', type: 'color-picker'\n },\n {\n label: 'Subtitle Color', key: 'thankYouPagesubTitle', propPath: 'thankYou-descColor', type: 'color-picker'\n }\n ]\n },\n {\n columns: [\n {\n label: 'Background Color', key: 'thankYouPageBgcolor', propPath: 'thankYouPage-bgColor', type: 'color-picker'\n }\n ]\n }\n ]\n },\n {\n title: 'Buttons Background Color',\n code: 'buttonBgPropsPanel',\n lines: [\n {\n columns: [\n {\n label: 'Background Color', key: 'buttonBgColor', propPath: 'actions-bg', type: 'color-picker'\n }\n ]\n }\n ]\n },\n {\n title: 'Buttons Text Colors',\n code: 'buttonTextPropsPanel',\n lines: [\n {\n columns: [\n {\n label: 'Previous Text Color', key: 'prevButtonTextColor', propPath: 'prevButtonColor', type: 'color-picker'\n },\n {\n label: 'Next Text Color', key: 'nextButtonTextColor', propPath: 'nextButtonColor', type: 'color-picker'\n }\n ]\n }\n ]\n },\n {\n title: 'Submit Text Color',\n code: 'submitButtonPropsPanel',\n lines: [\n {\n columns: [\n // { label: 'Background Color', key: 'submitButtonBgColor', propPath: 'buttonBgColor-success', type: 'color-picker' },\n {\n label: 'Text Color', key: 'submitButtonTextColor', propPath: 'submitButtonColor', type: 'color-picker'\n }\n ]\n }\n ]\n }\n];\n","import React from 'react';\n\nconst Title = function ({ children = [], style = {}, additionalClasses = '' }) {\n return (\n
    \n { children }\n
    \n );\n};\n\nTitle.displayName = 'Title';\n\nexport default Title;\n","import PropTypes from 'prop-types';\nimport React, { Component } from 'react';\nimport Tethered from './Tethered';\nimport './FontPicker.css';\nimport { addFontLink, toArrayName, toReadable } from '../utils/Utils';\n\nexport default class FontPicker extends Component {\n constructor(props) {\n super(props);\n this.renderJotformFonts = this.renderJotformFonts.bind(this);\n\n const fonts = {\n system: ['Arial', 'Arial+Black', 'Courier New', 'Helvetica', 'Lucida+Grande', 'Tahoma', 'Times New Roman', 'Trebuchet MS', 'Verdana', 'Comic Sans MS'],\n jotform: ['Roboto', 'Aclonica', 'Allan', 'Annie+Use+Your+Telescope', 'Anonymous+Pro', 'Allerta+Stencil', 'Allerta', 'Amaranth', 'Anton', 'Architects+Daughter', 'Arimo', 'Artifika', 'Arvo', 'Asset', 'Astloch', 'Bangers', 'Bentham', 'Bevan', 'Bigshot+One', 'Bowlby+One', 'Bowlby+One+SC', 'Brawler', 'Buda', 'Cabin', 'Calligraffitti', 'Candal', 'Cantarell', 'Cardo', 'Carter One', 'Caudex', 'Cedarville+Cursive', 'Cherry+Cream+Soda', 'Chewy', 'Coda', 'Coming+Soon', 'Copse', 'Corben', 'Cousine', 'Covered+By+Your+Grace', 'Crafty+Girls', 'Crimson+Text', 'Crushed', 'Cuprum', 'Damion', 'Dancing+Script', 'Dawning+of+a+New+Day', 'Didact+Gothic', 'Droid+Sans', 'Droid+Sans+Mono', 'Droid+Serif', 'EB+Garamond', 'Expletus+Sans', 'Fontdiner+Swanky', 'Forum', 'Francois+One', 'Geo', 'Give+You+Glory', 'Goblin+One', 'Goudy+Bookletter+1911', 'Gravitas+One', 'Gruppo', 'Hammersmith+One', 'Holtwood+One+SC', 'Homemade+Apple', 'Inconsolata', 'Indie+Flower', 'IM+Fell+DW+Pica', 'IM+Fell+DW+Pica+SC', 'IM+Fell+Double+Pica', 'IM+Fell+Double+Pica+SC', 'IM+Fell+English', 'IM+Fell+English+SC', 'IM+Fell+French+Canon', 'IM+Fell+French+Canon+SC', 'IM+Fell+Great+Primer', 'IM+Fell+Great+Primer+SC', 'Irish+Grover', 'Irish+Growler', 'Istok+Web', 'Josefin+Sans', 'Josefin+Slab', 'Judson', 'Jura', 'Just+Another+Hand', 'Just+Me+Again+Down+Here', 'Kameron', 'Kenia', 'Kranky', 'Kreon', 'Kristi', 'La+Belle+Aurore', 'Lato', 'League+Script', 'Lekton', 'Limelight', 'Lobster', 'Lora', 'Love+Ya+Like+A+Sister', 'Loved+by+the+King', 'Luckiest+Guy', 'Maiden+Orange', 'Mako', 'Maven+Pro', 'Meddon', 'MedievalSharp', 'Megrim', 'Merriweather', 'Metrophobic', 'Michroma', 'Miltonian Tattoo', 'Miltonian', 'Modern Antiqua', 'Monofett', 'Molengo', 'Mountains of Christmas', 'Muli', 'Neucha', 'Neuton', 'News+Cycle', 'Nixie+One', 'Nobile', 'Nova+Cut', 'Nova+Flat', 'Nova+Mono', 'Nova+Oval', 'Nova+Round', 'Nova+Script', 'Nova+Slim', 'Nova+Square', 'Nunito', 'OFL+Sorts+Mill+Goudy+TT', 'Old+Standard+TT', 'Open+Sans', 'Open+Sans+Condensed', 'Orbitron', 'Oswald', 'Over+the+Rainbow', 'Reenie+Beanie', 'Pacifico', 'Patrick+Hand', 'Paytone+One', 'Permanent+Marker', 'Philosopher', 'Play', 'Playfair+Display', 'Podkova', 'PT+Sans', 'PT+Sans+Narrow', 'PT+Sans+Narrow:regular,bold', 'PT+Serif', 'PT+Serif Caption', 'Puritan', 'Quattrocento', 'Quattrocento+Sans', 'Radley', 'Redressed', 'Rock+Salt', 'Rokkitt', 'Ruslan+Display', 'Schoolbell', 'Shadows+Into+Light', 'Shanti', 'Sigmar+One', 'Six+Caps', 'Slackey', 'Smythe', 'Sniglet', 'Special+Elite', 'Stardos+Stencil', 'Sue+Ellen+Francisco', 'Sunshiney', 'Swanky+and+Moo+Moo', 'Syncopate', 'Tangerine', 'Tenor+Sans', 'Terminal+Dosis+Light', 'The+Girl+Next+Door', 'Tinos', 'Ubuntu', 'Ultra', 'Unkempt', 'UnifrakturCook:bold', 'UnifrakturMaguntia', 'Varela', 'Varela Round', 'Vibur', 'Vollkorn', 'VT323', 'Waiting+for+the+Sunrise', 'Wallpoet', 'Walter+Turncoat', 'Wire+One', 'Yanone+Kaffeesatz', 'Yeseva+One', 'Zeyada'],\n cards: ['System Fonts', 'Roboto', 'Ubuntu', 'Arvo', 'Josefin Slab', 'Vollkorn', 'Merriweather', 'Quicksand', 'Libre Baskerville', 'Patrick Hand', 'Share Tech', 'Bree Serif', 'Concert One', 'Fredoka One', 'Rufina', 'Nunito', 'Orbitron', 'Jura', 'Abril Fatface', 'Squada One']\n };\n this.fonts = fonts;\n\n const { value } = this.props;\n\n this.state = {\n value,\n width: 300\n };\n }\n\n componentDidMount() {\n setTimeout(() => {\n const dims = this.dropdownHandle.getBoundingClientRect();\n this.setState({\n width: dims.width\n });\n }, 0);\n }\n\n UNSAFE_componentWillReceiveProps(nextProps) {\n // eslint-disable-next-line no-mixed-operators\n if (nextProps.value !== this.props.value || nextProps.type && nextProps.type !== this.props.type) {\n const { value } = nextProps;\n this.setState({ value: value });\n }\n }\n\n renderJotformFonts() {\n return this.fonts.jotform.map((font, idx) => {\n return (\n this.handleSelect('jotform', font)}\n />\n );\n });\n }\n\n renderCardFonts() {\n if (!this.fonts.cards) {\n return null;\n }\n\n return this.fonts.cards.map((font, idx) => {\n const isSelected = this.state.value === font;\n\n return (\n this.handleSelect('jotform', font)}\n />\n );\n });\n }\n\n renderSystemFonts() {\n return this.fonts.system.map((font, idx) => {\n return (\n this.handleSelect('system', font)}\n >\n {toReadable(font)}\n \n );\n });\n }\n\n renderList() {\n return (\n \n \n System Fonts\n \n {this.renderSystemFonts()}\n \n Jotform Fonts\n \n {this.renderJotformFonts()}\n \n );\n }\n\n handleSelect(type, font) {\n const isJotformFont = type === 'jotform' && font !== 'System Fonts';\n let value = toReadable(font);\n\n if (value === 'System Fonts') {\n value = '';\n }\n\n this.setState({ value }, () => {\n this.props.onChange({\n target: {\n name: 'font',\n value: {\n type,\n family: value,\n link: isJotformFont ? addFontLink(toArrayName(font)) : '',\n value\n }\n }\n });\n this.props.addActivityLogs(this.props.id, ['font'], value);\n });\n }\n\n renderCardList() {\n return (\n \n {this.renderCardFonts()}\n \n );\n }\n\n render() {\n const emptyText = this.props.forCards ? 'System Fonts' : 'Select a font';\n return (\n \n { this.dropdownHandle = el; }}\n className=\"m-dropdownWrapper\"\n >\n
    {this.state.value || emptyText}
    \n \n \n \n );\n }\n}\n\nFontPicker.propTypes = {\n value: PropTypes.string,\n type: PropTypes.string,\n onChange: PropTypes.func,\n forCards: PropTypes.bool,\n id: PropTypes.string,\n addActivityLogs: PropTypes.func\n};\n\nFontPicker.defaultProps = {\n addActivityLogs: () => {}\n};\n","export const colorNames = {\n aliceblue: '#f0f8ff',\n antiquewhite: '#faebd7',\n aqua: '#00ffff',\n aquamarine: '#7fffd4',\n azure: '#f0ffff',\n beige: '#f5f5dc',\n bisque: '#ffe4c4',\n black: '#000000',\n blanchedalmond: '#ffebcd',\n blue: '#0000ff',\n blueviolet: '#8a2be2',\n brown: '#a52a2a',\n burlywood: '#deb887',\n cadetblue: '#5f9ea0',\n chartreuse: '#7fff00',\n chocolate: '#d2691e',\n coral: '#ff7f50',\n cornflowerblue: '#6495ed',\n cornsilk: '#fff8dc',\n crimson: '#dc143c',\n cyan: '#00ffff',\n darkblue: '#00008b',\n darkcyan: '#008b8b',\n darkgoldenrod: '#b8860b',\n darkgray: '#a9a9a9',\n darkgreen: '#006400',\n darkgrey: '#a9a9a9',\n darkkhaki: '#bdb76b',\n darkmagenta: '#8b008b',\n darkolivegreen: '#556b2f',\n darkorange: '#ff8c00',\n darkorchid: '#9932cc',\n darkred: '#8b0000',\n darksalmon: '#e9967a',\n darkseagreen: '#8fbc8f',\n darkslateblue: '#483d8b',\n darkslategray: '#2f4f4f',\n darkslategrey: '#2f4f4f',\n darkturquoise: '#00ced1',\n darkviolet: '#9400d3',\n deeppink: '#ff1493',\n deepskyblue: '#00bfff',\n dimgray: '#696969',\n dimgrey: '#696969',\n dodgerblue: '#1e90ff',\n firebrick: '#b22222',\n floralwhite: '#fffaf0',\n forestgreen: '#228b22',\n fuchsia: '#ff00ff',\n gainsboro: '#dcdcdc',\n ghostwhite: '#f8f8ff',\n gold: '#ffd700',\n goldenrod: '#daa520',\n gray: '#808080',\n green: '#008000',\n greenyellow: '#adff2f',\n grey: '#808080',\n honeydew: '#f0fff0',\n hotpink: '#ff69b4',\n indianred: '#cd5c5c',\n indigo: '#4b0082',\n ivory: '#fffff0',\n khaki: '#f0e68c',\n lavender: '#e6e6fa',\n lavenderblush: '#fff0f5',\n lawngreen: '#7cfc00',\n lemonchiffon: '#fffacd',\n lightblue: '#add8e6',\n lightcoral: '#f08080',\n lightcyan: '#e0ffff',\n lightgoldenrodyellow: '#fafad2',\n lightgray: '#d3d3d3',\n lightgreen: '#90ee90',\n lightgrey: '#d3d3d3',\n lightpink: '#ffb6c1',\n lightsalmon: '#ffa07a',\n lightseagreen: '#20b2aa',\n lightskyblue: '#87cefa',\n lightslategray: '#778899',\n lightslategrey: '#778899',\n lightsteelblue: '#b0c4de',\n lightyellow: '#ffffe0',\n lime: '#00ff00',\n limegreen: '#32cd32',\n linen: '#faf0e6',\n magenta: '#ff00ff',\n maroon: '#800000',\n mediumaquamarine: '#66cdaa',\n mediumblue: '#0000cd',\n mediumorchid: '#ba55d3',\n mediumpurple: '#9370db',\n mediumseagreen: '#3cb371',\n mediumslateblue: '#7b68ee',\n mediumspringgreen: '#00fa9a',\n mediumturquoise: '#48d1cc',\n mediumvioletred: '#c71585',\n midnightblue: '#191970',\n mintcream: '#f5fffa',\n mistyrose: '#ffe4e1',\n moccasin: '#ffe4b5',\n navajowhite: '#ffdead',\n navy: '#000080',\n oldlace: '#fdf5e6',\n olive: '#808000',\n olivedrab: '#6b8e23',\n orange: '#ffa500',\n orangered: '#ff4500',\n orchid: '#da70d6',\n palegoldenrod: '#eee8aa',\n palegreen: '#98fb98',\n paleturquoise: '#afeeee',\n palevioletred: '#db7093',\n papayawhip: '#ffefd5',\n peachpuff: '#ffdab9',\n peru: '#cd853f',\n pink: '#ffc0cb',\n plum: '#dda0dd',\n powderblue: '#b0e0e6',\n purple: '#800080',\n rebeccapurple: '#663399',\n red: '#ff0000',\n rosybrown: '#bc8f8f',\n royalblue: '#4169e1',\n saddlebrown: '#8b4513',\n salmon: '#fa8072',\n sandybrown: '#f4a460',\n seagreen: '#2e8b57',\n seashell: '#fff5ee',\n sienna: '#a0522d',\n silver: '#c0c0c0',\n skyblue: '#87ceeb',\n slateblue: '#6a5acd',\n slategray: '#708090',\n slategrey: '#708090',\n snow: '#fffafa',\n springgreen: '#00ff7f',\n steelblue: '#4682b4',\n tan: '#d2b48c',\n teal: '#008080',\n thistle: '#d8bfd8',\n tomato: '#ff6347',\n turquoise: '#40e0d0',\n violet: '#ee82ee',\n wheat: '#f5deb3',\n white: '#ffffff',\n whitesmoke: '#f5f5f5',\n yellow: '#ffff00',\n yellowgreen: '#9acd32'\n};\n\nexport default colorNames;\n","import PropTypes from 'prop-types';\nimport React, { Component } from 'react';\nimport Rheostat from 'rheostat';\nimport debounce from 'lodash/debounce';\nimport Column from '../../../components/Column';\nimport Line from '../../../components/Line';\nimport Tethered from '../../../components/Tethered';\nimport ColorPicker from '../../../components/ColorPicker';\nimport colorNames from './colorNames';\n\nconst CustomHandle = props => {\n return (\n \n );\n};\n\nexport default class BackgroundEffectPicker extends Component {\n constructor(props) {\n super(props);\n const backgroundEffects = {\n none: 'None'.locale(),\n // 'softBlur': 'Soft Blur',\n // 'hardBlur': 'Hard Blur',\n blur: 'Blur'.locale(),\n monochrome: 'Monochrome'.locale(),\n sepia: 'Sepia'.locale(),\n lighten: 'Lighten'.locale(),\n darken: 'Darken'.locale(),\n overlayColor: 'Overlay Color'.locale()\n };\n\n this.backgroundEffects = backgroundEffects;\n this.state = {\n width: 300,\n visible: false\n };\n\n this.handleEffectStrengthChange = debounce(this.handleEffectStrengthChange, 500).bind(this);\n }\n\n componentDidMount() {\n const dims = this.dropdownHandle.getBoundingClientRect();\n const currentColor = (() => {\n const overlayColor = this.props.overlayColor;\n\n let returnValue;\n switch (true) {\n case this.isHexColor(overlayColor):\n returnValue = overlayColor;\n break;\n case this.isRGBAColor(overlayColor):\n returnValue = this.rgbaToHex(overlayColor);\n break;\n case this.isNamedColor(overlayColor):\n returnValue = colorNames[overlayColor];\n break;\n default:\n returnValue = '#000000';\n }\n\n return returnValue;\n })();\n\n this.setState({\n width: dims.width,\n currentOpacityLevel: this.getAlphaValue(this.props.overlayColor),\n currentColor\n });\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n if (this.state === nextState) {\n return false;\n }\n\n return true;\n }\n\n getAlphaValue(color) {\n let returnValue;\n switch (true) {\n case this.isHexColor(color):\n case this.isNamedColor(color):\n returnValue = 1;\n break;\n case this.isRGBAColor(color):\n returnValue = this.parseRgba(color).a;\n break;\n default:\n returnValue = 1;\n }\n\n return returnValue;\n }\n\n renderEffectList() {\n return Object.keys(this.backgroundEffects).map(effect => {\n const key = effect;\n const value = this.backgroundEffects[key];\n return (\n {\n if (key === 'overlayColor' || key === 'none') {\n this.setState({ visible: false });\n } else {\n this.setState({ visible: true });\n }\n this.handleEffectSelect(key);\n }}\n >\n {value}\n \n );\n });\n }\n\n renderBackgroundEffects() {\n return (\n
    \n {this.renderEffectList()}\n
    \n );\n }\n\n renderColorPicker() {\n return (\n {\n this.setState({\n currentOpacityLevel: this.getAlphaValue(e.value)\n });\n\n if (e && e.color && e.color.hex) {\n this.setState({\n currentColor: e.color.hex\n });\n }\n\n if (e && e.value && this.isNamedColor(e.value)) {\n const color = colorNames[e.value];\n this.setState({\n currentColor: color\n });\n }\n this.props.onChangeColor(e);\n }}\n />\n );\n }\n\n renderColorOpacityLevels() {\n const opacityLevels = [0.9, 0.8, 0.7, 0.6, 0.5, 0.4, 0.3, 0.2];\n\n return opacityLevels.map(level => {\n const currentState = parseFloat(this.state.currentOpacityLevel, 10) === level ? 'isActive' : '';\n return (\n
    \n {\n this.setState({\n currentOpacityLevel: level\n });\n this.handleOpacitySelect(level);\n }}\n />\n
    \n );\n });\n }\n\n renderColorOpacityBox() {\n return (\n
    \n
    \n {this.renderColorOpacityLevels()}\n
    \n
    \n );\n }\n\n renderOverlayColorPicker() {\n return (\n \n \n \n {this.renderColorPicker()}\n {this.renderColorOpacityBox()}\n \n \n );\n }\n\n renderRangeSlider() {\n return (\n \n \n \n {'Effect Strength'.locale()}\n \n
    \n
    \n \n
    \n
    \n
    \n
    \n );\n }\n\n render() {\n const emptyText = 'None'.locale();\n const dropdown = (\n \n this.dropdownHandle = el}\n className=\"m-dropdownWrapper\"\n >\n
    {this.props.currentEffect ? this.backgroundEffects[this.props.currentEffect] : emptyText}
    \n \n \n \n );\n\n return (\n
    \n {dropdown}\n {this.renderRangeSlider()}\n {this.props.currentEffect === 'overlayColor' && this.renderOverlayColorPicker()}\n
    \n );\n }\n\n handleOpacitySelect(level) {\n const currentColor = this.state.currentColor;\n const rgba = this.hexToRgba(currentColor);\n const value = `rgba(${rgba.r}, ${rgba.g}, ${rgba.b}, ${level})`;\n this.props.onChangeColor({ value });\n }\n\n isHexColor(color) {\n return color && color.trim().substring(0, 1) === '#';\n }\n\n isRGBAColor(color) {\n return color && color.trim().substring(0, 4) === 'rgba';\n }\n\n isNamedColor(color) {\n return colorNames[color] !== undefined;\n }\n\n parseRgba(rgba) {\n const parts = rgba.substring(rgba.indexOf('(') + 1, rgba.indexOf(')')).split(',').map(value => {\n return value.trim();\n });\n return {\n r: parts[0], g: parts[1], b: parts[2], a: parts[3]\n };\n }\n\n rgbaToHex(rgba) {\n const parts = rgba.substring(rgba.indexOf('(') + 1).split(',');\n let r = parseInt(parts[0].trim(), 10).toString(16);\n let g = parseInt(parts[1].trim(), 10).toString(16);\n let b = parseInt(parts[2].trim(), 10).toString(16);\n\n if (r === '0') { r = '00'; }\n if (g === '0') { g = '00'; }\n if (b === '0') { b = '00'; }\n\n return `#${r}${g}${b}`;\n }\n\n hexToRgba(color) {\n let hex = color;\n hex = hex.replace(/^#/, '');\n let alpha = 255;\n\n if (hex.length === 8) {\n alpha = parseInt(hex.slice(6, 8), 16);\n hex = hex.substring(0, 6);\n }\n\n if (hex.length === 4) {\n alpha = parseInt(hex.slice(3, 4).repeat(2), 16);\n hex = hex.substring(0, 3);\n }\n\n if (hex.length === 3) {\n hex = hex[0] + hex[0] + hex[1] + hex[1] + hex[2] + hex[2];\n }\n\n const num = parseInt(hex, 16);\n const red = num >> 16;\n const green = (num >> 8) & 255;\n const blue = num & 255;\n\n return {\n r: red, g: green, b: blue, a: alpha\n };\n }\n\n handleEffectSelect(effect) {\n if (!this.props.currentEffectStrength) {\n this.props.onChangeEffectWithDefaultValue(effect);\n } else {\n this.props.onChangeEffect({ value: effect });\n }\n }\n\n handleEffectStrengthChange({ values }) {\n const value = values[0];\n this.props.onChangeStrength({ value });\n }\n}\n\nBackgroundEffectPicker.propTypes = {\n currentEffect: PropTypes.string,\n deafultEffectStrength: PropTypes.number,\n currentEffectStrength: PropTypes.number,\n overlayColor: PropTypes.string,\n onChangeEffect: PropTypes.func,\n onChangeEffectWithDefaultValue: PropTypes.func,\n onChangeStrength: PropTypes.func,\n onChangeColor: PropTypes.func,\n visible: PropTypes.bool\n};\n","import PropTypes from 'prop-types';\nimport React, { Component } from 'react';\nimport { Button } from '@jotforminc/magnet';\nimport TextInput from './TextInput';\nimport { translate } from '../mixins/Translation';\n\nexport default class VideoUrlValidPicker extends Component {\n static propTypes = {\n videoLinkValid: PropTypes.func,\n value: PropTypes.string\n };\n\n constructor(props) {\n super(props);\n this.getStyles = this.getStyles.bind(this);\n this.handleButtonClick = this.handleButtonClick.bind(this);\n this.onUrlChange = this.onUrlChange.bind(this);\n this.state = {\n showStatus: false,\n url: ''\n };\n }\n\n onUrlChange(e) {\n this.setState({ url: e.target.value });\n }\n\n getStyles(element) {\n switch (element) {\n case 'button':\n return {\n width: '50%',\n textAlign: 'center',\n margin: '15px 0 -5px'\n };\n case 'icon':\n return {\n fontSize: '25px',\n marginRight: '10px',\n textAlign: 'center',\n color: 'white'\n };\n case 'img':\n return {\n margin: '-6px 12px -6px -20px'\n };\n case 'span':\n return {\n display: 'inline-block',\n margin: '20px 0 -20px'\n };\n default:\n // console.log('Undefined Style Request');\n return null;\n }\n }\n\n getStatusText() {\n const statusTextObj = {\n loading: 'Validating Video Url',\n validUrl: 'Video Url is valid',\n errorUrl: 'Invalid video link'\n };\n return statusTextObj[this.state.showStatus];\n }\n\n getIconSrc() {\n const progressObj = {\n loading: 'https://sharp.ph/wp-content/themes/sharp/images/circle-loading-gif.gif',\n validUrl: '✓',\n errorUrl: '⨯'\n };\n return progressObj[this.state.showStatus];\n }\n\n render() {\n const defValue = this.props.value && this.props.value.split('|')[1];\n return (\n
    \n \n \n { this.state.showStatus\n && (\n \n

    \n {this.getIconSrc()}\n {translate(this.getStatusText())}\n

    \n
    \n )}\n \n { translate('SAVE LINK') }\n \n
    \n );\n }\n\n checkUrl(url) {\n let typeOfUrl = 'html5';\n // First check for general URL validity\n const urlValidity = /(ftp|http|https):\\/\\/(\\w+:{0,1}\\w*@)?(\\S+)(:[0-9]+)?(\\/|\\/([\\w#!:.?+=&%@!\\-\\/]))?/;\n if (!urlValidity.test(url)) {\n this.setState({ showStatus: 'errorUrl' });\n return false;\n }\n // Youtube link check where we will use youtube's iFrame methods\n const yTRegex = /^(?:https?:\\/\\/)?(?:m\\.|www\\.)?(?:youtu\\.be\\/|youtube\\.com\\/(?:embed\\/|v\\/|watch\\?v=|watch\\?.+&v=))((\\w|-){11})(?:\\S+)?$/;\n if (url.match(yTRegex)) {\n typeOfUrl = 'youtube';\n this.setState({ showStatus: 'validUrl' });\n } else {\n // Check browsers capability to play the file extension\n const exV = document.createElement('video');\n const fileExtRegex = /\\w{3,4}($|\\?)/;\n const fileExt = this.state.url.match(fileExtRegex)[0];\n if (exV.canPlayType(`video/${fileExt}`)) {\n this.setState({ showStatus: 'validUrl' });\n } else {\n this.setState({ showStatus: 'errorUrl' });\n return false;\n }\n }\n return { value: `${typeOfUrl}|${url}` };\n }\n\n handleButtonClick() {\n if (this.state.url === '') {\n this.setState({ showStatus: false });\n return;\n }\n this.setState({ showStatus: 'loading' });\n const urlDataToSave = this.checkUrl(this.state.url);\n urlDataToSave && this.props.videoLinkValid(urlDataToSave);\n }\n}\n","import PropTypes from 'prop-types';\nimport React, { Component } from 'react';\nimport { Button } from '@jotforminc/magnet';\nimport Panel from '../../../components/Panel';\nimport Line from '../../../components/Line';\nimport Column from '../../../components/Column';\n// import Title from '../../../components/Title';\nimport TextInput from '../../../components/TextInput';\nimport Textarea from '../../../components/Textarea';\nimport { translate } from '../../../mixins/Translation';\n\nexport default class ThemePublishPanel extends Component {\n constructor(props) {\n super(props);\n this.state = {\n activeTab: 'palettes',\n showConfirmation: false,\n themeName: this.props.themeName || '',\n themeDescription: this.props.themeDescription || '',\n themeImages: this.props.themeImages || []\n };\n }\n\n renderThemeName() {\n return (\n \n \n \n \n \n this.setState({ themeName: e.target.value }))}\n />\n \n \n );\n }\n\n renderThemeDescription() {\n return (\n \n \n \n \n \n this.setState({ themeDescription: e.target.value }))}\n value={this.state.themeDescription}\n />\n \n \n );\n }\n\n renderThemeScreenshots() {\n return (\n \n
    img1
    \n
    img2
    \n
    \n );\n }\n\n renderInformationMessage() {\n return null;\n }\n\n renderButtons() {\n const isMobile = global.document.querySelector('body').classList.contains('isMobile');\n return (\n \n \n \n \n {translate('Back')}\n \n \n \n \n {translate('Save Theme')}\n \n \n \n \n );\n }\n\n renderNotificationMessage() {\n const { isThemeOwner, isCreatingNewTheme, themeName } = this.props;\n const ownerMessage = (!isThemeOwner && !isCreatingNewTheme) ? (
    NOTICE: THIS THEME IS NOT BELONG TO YOU! PLEASE BE CAREFUL!! THIS ACTION WILL BE IN HISTORY :)
    ) : null;\n const newThemeMessage = translate('This theme will be placed under themes tab.');\n let updateThemeMessage = translate('Your changes will be applied to {themeName} theme.');\n updateThemeMessage = updateThemeMessage.replace('{themeName}', themeName);\n return (\n
    \n {isCreatingNewTheme ? newThemeMessage : updateThemeMessage}\n {ownerMessage}\n
    \n );\n }\n\n render() {\n return (\n
    \n \n {this.renderThemeName()}\n {false && this.renderThemeDescription()}\n {false && this.renderThemeScreenshots()}\n {this.renderNotificationMessage()}\n {this.renderButtons()}\n \n
    \n );\n }\n\n handleBack(e) {\n e.stopPropagation();\n this.props.onCancel();\n }\n\n handleSave() {\n const { themeName, themeDescription } = this.state;\n const { isCreatingNewTheme } = this.props;\n if (isCreatingNewTheme) {\n this.props.onThemeCreate(themeName, themeDescription);\n } else {\n this.props.onThemeUpdate(themeName, themeDescription);\n }\n }\n}\n\nThemePublishPanel.propTypes = {\n onThemeCreate: PropTypes.func,\n onThemeUpdate: PropTypes.func,\n onTakeScreenShoots: PropTypes.func,\n onCancel: PropTypes.func,\n themeName: PropTypes.string,\n themeDescription: PropTypes.string,\n isCreatingNewTheme: PropTypes.bool,\n isThemeOwner: PropTypes.bool,\n themeImages: PropTypes.arrayOf(PropTypes.string)\n};\n","import PropTypes from 'prop-types';\nimport React, { Component } from 'react';\nimport { Button } from '@jotforminc/magnet';\nimport isObject from 'lodash/isObject';\nimport isEmpty from 'lodash/isEmpty';\nimport findIndex from 'lodash/findIndex';\nimport {\n colorThemeCustomPanel, defaultPanels, imageThemeCustomPanel, videoThemeCustomPanel\n} from './panels';\nimport Panel from '../../../components/Panel';\nimport Title from '../../../components/Title';\nimport Line from '../../../components/Line';\nimport Column from '../../../components/Column';\nimport ColorPicker from '../../../components/ColorPicker';\nimport TextInput from '../../../components/TextInput';\nimport Toggle from '../../../components/Toggle';\nimport ImagePicker from '../../../components/ImageUpload';\nimport FontPicker from '../../../components/FontPicker';\nimport BackgroundEffectPicker from '../customComponents/backgroundEffects';\nimport VideoURLPicker from '../../../components/VideoUrlValidPicker';\nimport ThemePublishPanel from './ThemePublishPanel';\nimport { translate } from '../../../mixins/Translation';\n\nexport default class CardDesignerCustom extends Component {\n constructor(props) {\n super(props);\n this.onPropertyChange = this.onPropertyChange.bind(this);\n this.renderFormElement = this.renderFormElement.bind(this);\n this.handleFontChange = this.handleFontChange.bind(this);\n this.handleUpdateTheme = this.handleUpdateTheme.bind(this);\n this.handleSaveAsTheme = this.handleSaveAsTheme.bind(this);\n this.updateCurrentTheme = this.updateCurrentTheme.bind(this);\n this.createTheme = this.createTheme.bind(this);\n\n this.state = { mode: 'custom' };\n }\n\n UNSAFE_componentWillMount() {\n const formStyleJSON = isObject(this.props.formProperties.styleJSON) ? this.props.formProperties.styleJSON : {};\n const themeStyleJSON = isObject(this.props.currentTheme.styleJSON) ? this.props.currentTheme.styleJSON : {};\n const style = { ...themeStyleJSON, ...formStyleJSON };\n const thankYouColors = this.findMissingThankYouStyles(style);\n const styleValues = { ...style, ...thankYouColors };\n this.setState({ styleValues });\n if (!style['thankYouPage-bgColor']) {\n this.props.updateFormPropertyFn({ styleJSON: JSON.stringify(styleValues) });\n }\n }\n\n onPropertyChange(propPath, e) {\n let changes = propPath;\n const hasMultipleUpdate = isObject(propPath);\n if (!hasMultipleUpdate) {\n changes = { [propPath]: e.value };\n }\n\n let styleJSON = { ...this.props.formProperties.styleJSON };\n const themeStyleJSON = isObject(this.props.currentTheme.styleJSON) ? this.props.currentTheme.styleJSON : {};\n Object.keys(changes).map(prop => {\n const changedProperties = this.getNewProperties(prop, changes[prop]);\n styleJSON = { ...styleJSON, ...changedProperties };\n });\n const styleValues = { ...themeStyleJSON, ...styleJSON };\n this.setState({ styleValues });\n this.props.updateFormPropertyFn({ styleJSON: JSON.stringify(styleJSON) });\n }\n\n getCustomPanelProperties(activeView) {\n if (activeView === 'video') {\n return videoThemeCustomPanel;\n } if (activeView === 'image') {\n return imageThemeCustomPanel;\n }\n return colorThemeCustomPanel;\n }\n\n getNewProperties(propPath, value) {\n const props = {};\n switch (propPath) {\n case 'pageBg-image': {\n props['pageBg-image'] = value;\n if (value) {\n props['pageBg-video'] = '';\n }\n break;\n }\n case 'pageBg-video': {\n props['pageBg-video'] = value;\n if (value) {\n props['pageBg-image'] = '';\n }\n break;\n }\n case 'buttonBgColor-prev': {\n props.buttonBorderColor = '';\n props['buttonBgColor-prev'] = value;\n break;\n }\n case 'buttonBgColor-success': {\n props['buttonBorderColor-success'] = '';\n props['buttonBgColor-success'] = value;\n break;\n }\n case 'buttonBgColor-next': {\n props['buttonBorderColor-next'] = '';\n props['buttonBgColor-next'] = value;\n break;\n }\n case 'welcomePage-bgColor': {\n this.handleThankYouPageProperties(props);\n props['welcomePage-bgColor'] = value;\n break;\n }\n case 'welcome-descColor': {\n this.handleThankYouPageProperties(props);\n props['welcome-descColor'] = value;\n break;\n }\n case 'welcome-titleColor': {\n this.handleThankYouPageProperties(props);\n props['welcome-titleColor'] = value;\n break;\n }\n default: {\n props[propPath] = value;\n break;\n }\n }\n this.showWelcomeIfNecessary(propPath);\n this.showThankYouIfNecessary(propPath);\n return props;\n }\n\n renderLines(lines) {\n return lines.map((line, i) => {\n return this.renderSingleLine(line, i);\n });\n }\n\n renderColumns(columns) {\n return columns.map((line, i) => {\n return this.renderSingleColumn(line, i);\n });\n }\n\n renderSinglePanel(panel, index, formProps) {\n const panelCode = panel.code;\n // Dont render welcome page panel if welcome page is not active\n // TO DO :: refactor -> move panel check to lifecyle methods\n if (panelCode === 'WelcomePagePanel'\n && !this.isWelcomeActive(formProps)\n && !this.hasAnySectionHeader()) {\n return null;\n } if (panelCode === 'ThankYouPagePanel' && !this.isThankyouActive(formProps)) {\n return null;\n }\n const lines = panel.lines && this.renderLines(panel.lines);\n const renderedTitle = panel.title ? (\n \n {' '}\n {translate(panel.title)}\n {' '}\n \n ) : null;\n return (\n
    \n {renderedTitle}\n \n {lines}\n \n
    \n );\n }\n\n renderSingleLine(line, index) {\n const columns = line.columns && this.renderColumns(line.columns);\n return (\n \n {columns}\n \n );\n }\n\n renderSingleColumn(column, index) {\n const formElementGroup = this.renderFormElementGroup(column, index);\n const lineLength = column.lineLength || 'two';\n const additionalClasses = column.additionalClasses ? column.additionalClasses : '';\n return (\n \n {formElementGroup}\n \n );\n }\n\n renderFormElementGroup(element) {\n const renderedElement = this.renderFormElement(element);\n return (\n
    \n \n \n \n \n {renderedElement}\n \n
    \n );\n }\n\n renderFormElement(element) {\n let elementProps = { value: this.state.styleValues[element.propPath] };\n elementProps.onChange = e => this.onPropertyChange(element.propPath, e);\n elementProps.id = element.key;\n let el = TextInput;\n switch (element.type) {\n case 'image-picker': {\n elementProps.onSuccess = image => this.onPropertyChange(element.propPath, { value: image.url });\n elementProps.onRemove = () => this.onPropertyChange(element.propPath, { value: false });\n elementProps.useTethered = false;\n elementProps.uploadPanelVisibility = true;\n elementProps.stayOpen = true;\n elementProps.value = this.state.styleValues[element.propPath];\n elementProps.xtraClass = 'card-designer-wizard-image';\n elementProps.optimize = element.optimize;\n el = ImagePicker;\n break;\n }\n case 'video-picker': {\n elementProps.videoLinkValid = e => this.onPropertyChange(element.propPath, e);\n el = VideoURLPicker;\n break;\n }\n case 'color-picker': {\n elementProps.isMobile = this.props.isMobile;\n elementProps.onChange = e => this.onPropertyChange(element.propPath, e);\n el = ColorPicker;\n break;\n }\n case 'font-picker':\n el = FontPicker;\n elementProps = {\n onChange: this.handleFontChange,\n forCards: true,\n value: this.state.styleValues[element.propPath]\n };\n break;\n case 'backgroud-effect-picker':\n el = BackgroundEffectPicker;\n elementProps = {\n currentEffect: this.state.styleValues[element.propPath],\n currentEffectStrength: this.state.styleValues[element.valuePropPath],\n overlayColor: this.state.styleValues[element.subPropPath]\n };\n elementProps.deafultEffectStrength = element.defaultValue;\n elementProps.onChangeEffect = e => this.onPropertyChange(element.propPath, e);\n elementProps.onChangeColor = e => this.onPropertyChange(element.subPropPath, e);\n elementProps.onChangeStrength = e => this.onPropertyChange(element.valuePropPath, e);\n elementProps.onChangeEffectWithDefaultValue = e => {\n this.onPropertyChange({\n [element.propPath]: e,\n [element.valuePropPath]: element.defaultValue\n });\n };\n break;\n case 'toggle':\n el = Toggle;\n elementProps = {\n valueUnchecked: 'No',\n valueChecked: 'Yes',\n initialValue: this.props.formProperties[element.propPath],\n onChange: value => this.props.updateFormPropertyFn({ [element.propPath]: value }),\n type: 'narrow',\n labelNameTrue: translate('ON'),\n labelNameFalse: translate('OFF'),\n description: { content: translate(element.content), key: element.key }\n };\n break;\n case 'hintText':\n return (\n \n );\n default: {\n console.log('Element type is undefined'); // eslint-disable-line\n break;\n }\n }\n return React.createElement(el, elementProps);\n }\n\n // Returns tab content for current mode.\n renderContent(mode) {\n let rendered;\n const panels = [...this.getCustomPanelProperties(this.props.activeView), ...defaultPanels];\n if (mode === 'custom') {\n rendered = panels.map((p, i) => {\n return this.renderSinglePanel(p, i, this.props.formProperties);\n });\n\n return (\n
    \n {rendered}\n { this.props.user && this.props.user.account_type && this.props.user.account_type.name !== 'GUEST' && !this.props.user.isCSICollaborator && this.renderThemeButtons()}\n
    \n );\n }\n const canUserUpdateTheme = this.canUserUpdateTheme(this.props.currentTheme, this.props.user);\n const isCreatingNewTheme = (mode !== 'updateTheme');\n const isThemeOwner = (this.props.currentTheme.owner === this.props.user.username);\n return (\n { this.setState({ mode: 'custom' }); }}\n />\n );\n }\n\n renderThemeButtons() {\n return (\n
    \n \n \n { this.canUserUpdateTheme(this.props.currentTheme, this.props.user)\n && (\n \n {translate('Update')}\n \n )}\n \n \n \n {translate('Save As Theme')}\n \n \n \n
    \n );\n }\n\n render() {\n const { mode } = this.state;\n const rendered = this.renderContent(mode);\n return (\n
    \n {rendered}\n
    \n );\n }\n\n scrollToDOMElement(DOM) {\n if (global && global.document && DOM && DOM[0]) { // this will not work on server-side\n const DomElement = DOM[0];\n const {\n top, left, bottom, right\n } = DomElement.getBoundingClientRect();\n const isElementInViewPort = (top >= 0 && left >= 0\n && bottom <= (window.innerHeight || document.documentElement.clientHeight)\n && right <= (window.innerWidth || document.documentElement.clientWidth));\n\n if (!isElementInViewPort && DomElement.scrollIntoView) {\n DomElement.scrollIntoView({ block: 'end', behavior: 'smooth' });\n }\n }\n }\n\n // if welcome props updated, open and show the welcome page.\n showWelcomeIfNecessary(propPath) {\n const welcomePageProps = ['welcome-titleColor', 'welcome-descColor', 'welcomeButton-bgColor', 'welcomeButton-color', 'welcomePage-bgColor'];\n if (welcomePageProps.indexOf(propPath) > -1) {\n if (this.props.isWelcomePageVisible) {\n return;\n }\n this.props.changeWelcomePageVisibility(true);\n const welcomeDOM = document && document.getElementsByClassName('welcome-page-wrapper');\n this.scrollToDOMElement(welcomeDOM);\n }\n }\n\n // if thank you props updated, open and show the thank you page.\n showThankYouIfNecessary(propPath) {\n const thankYouPageProps = ['thankYou-titleColor', 'thankYou-descColor', 'thankYouPage-bgColor'];\n if (thankYouPageProps.indexOf(propPath) > -1) {\n if (this.props.isThankYouPageVisible) {\n return;\n }\n this.props.changeThankYouPageVisibility(true);\n const thankYouDOM = document && document.getElementsByClassName('thankyou-page-wrapper');\n this.scrollToDOMElement(thankYouDOM);\n }\n }\n\n isWelcomeActive(formProps) {\n const props = formProps.welcomePage && formProps.welcomePage[0];\n const isWelcomeActive = props && props.isActive !== 0 && props.isActive !== '0';\n return isWelcomeActive;\n }\n\n hasAnySectionHeader() {\n const { questions } = this.props;\n if (!questions || !questions.length) {\n return false;\n }\n return findIndex(questions, { type: 'control_head' }) > -1;\n }\n\n isThankyouActive(formProps) {\n const isThankyouActive = formProps.activeRedirect && formProps.activeRedirect === 'thanktext';\n return isThankyouActive;\n }\n\n findMissingThankYouStyles(style) {\n const thankYouStyles = {};\n const propChange = ([prop, def]) => {\n if (style[prop] === undefined) thankYouStyles[prop] = style[def];\n };\n\n const propsArray = [\n ['thankYou-descColor', 'welcome-descColor'],\n ['thankYou-titleColor', 'welcome-titleColor'],\n ['thankYouPage-bgColor', 'welcomePage-bgColor']\n ];\n\n propsArray.forEach(props => propChange(props));\n\n return thankYouStyles;\n }\n\n // workaround for prevent changing thank you colors while changing welcome colors at first time\n handleThankYouPageProperties(props) {\n if (!isEmpty(this.state.styleValues['thankYouPage-bgColor'])\n && !isEmpty(this.state.styleValues['thankYou-descColor'])\n && !isEmpty(this.state.styleValues['thankYou-titleColor'])) {\n props['thankYouPage-bgColor'] = this.state.styleValues['thankYouPage-bgColor'];\n props['thankYou-descColor'] = this.state.styleValues['thankYou-descColor'];\n props['thankYou-titleColor'] = this.state.styleValues['thankYou-titleColor'];\n }\n }\n\n canUserUpdateTheme(theme, user) {\n if (theme.owner === user.username) {\n return true;\n }\n return false;\n }\n\n handleSaveAsTheme() {\n this.setState({ mode: 'newTheme' });\n }\n\n createTheme(themeName) {\n const { activeView } = this.props;\n if (themeName.length >= 3) {\n const data = {\n name: themeName,\n styleJSON: this.state.styleValues,\n card_form: 1,\n public: 0,\n color_palette: activeView === 'color' ? 1 : 0,\n video_background: activeView === 'video' ? 1 : 0\n };\n this.props.createThemeFn(data);\n const notification = {\n message: translate('Theme created and placed under themes tab.'),\n autoDismiss: 3\n };\n this.props.showNotificationFn(notification);\n this.setState({ mode: 'custom' });\n }\n }\n\n updateCurrentTheme(themeName) {\n if (themeName.length >= 3 && this.props.formProperties.themeID) {\n const data = {\n name: themeName,\n styleJSON: this.state.styleValues\n };\n this.props.updateThemeFn(this.props.formProperties.themeID, data);\n const notification = {\n message: 'Theme Updated!',\n autoDismiss: 3\n };\n this.props.showNotificationFn(notification);\n this.setState({ mode: 'custom' });\n }\n }\n\n handleUpdateTheme() {\n this.setState({ mode: 'updateTheme' });\n }\n\n handleFontChange(e) {\n const { value: { link, value } } = e.target;\n this.onPropertyChange({\n 'form-fontFamily': value,\n 'form-externalFont': link\n });\n }\n}\n\nCardDesignerCustom.propTypes = {\n formProperties: PropTypes.object.isRequired,\n currentTheme: PropTypes.shape(),\n updateFormPropertyFn: PropTypes.func,\n updateThemeFn: PropTypes.func,\n createThemeFn: PropTypes.func,\n showNotificationFn: PropTypes.func,\n activeView: PropTypes.string,\n user: PropTypes.shape(),\n changeWelcomePageVisibility: PropTypes.func,\n changeThankYouPageVisibility: PropTypes.func,\n isAdmin: PropTypes.bool,\n questions: PropTypes.arrayOf(PropTypes.shape()),\n isWelcomePageVisible: PropTypes.bool,\n isThankYouPageVisible: PropTypes.bool,\n isMobile: PropTypes.bool\n};\n\nCardDesignerCustom.defaultProps = {\n isMobile: false\n};\n","import PropTypes from 'prop-types';\nimport React, { Component } from 'react';\nimport { Tab, Tabs } from '../../components/Tabs2';\nimport Panel from '../../components/Panel';\nimport IconTabList from '../../components/IconTabList';\nimport { getViewData } from './viewData';\nimport { translate } from '../../mixins/Translation';\nimport Utils from '../../utils';\nimport ThemesTab from './themes/index';\nimport AdminTab from './admin/index';\nimport CustomTab from './custom/index';\nimport { logJotFormEvents } from '../../utils/Utils';\nimport LayoutPicker from '../minidesigner/customs/LayoutPicker';\n\nexport default class CardDesigner extends Component {\n constructor(props) {\n super(props);\n this.state = {\n activeView: this.getCurrentThemeType(this.props.currentTheme), // Options ['color', 'image', 'video']\n activeTab: this.props.disallowThemesTab ? 'custom' : 'themes' // Options ['themes', 'custom', 'admin'] - Admin options is admin only as u know :)\n };\n this.defaultThemes = {\n color: '59647bf8cf3bfe639c0b7cb1',\n image: '59672db8cf3bfe02ee5de351',\n video: '5a718888cf3bfe1f64716a51'\n };\n this.handleThemeSelect = this.handleThemeSelect.bind(this);\n this.handleViewChange = this.handleViewChange.bind(this);\n }\n\n getDataSourceForView(activeView) {\n if (activeView === 'video') {\n return this.props.videoThemes;\n } if (activeView === 'image') {\n return this.props.imageThemes;\n }\n return this.props.colorThemes;\n }\n\n getCurrentThemeType(currentTheme) {\n if (!currentTheme || currentTheme.color_palette) {\n return 'color';\n } if (currentTheme.video_background) {\n return 'video';\n }\n return 'image';\n }\n\n getPreviousData(viewType) {\n const isLocalStorageAvailable = Utils.isLocalStorageAvailable();\n const previousData = isLocalStorageAvailable ? Utils.getJSONFromLocalStorage(this.storedDataKey) : global[this.storedDataKey];\n if (previousData && previousData[viewType]) {\n return previousData[viewType];\n }\n return false;\n }\n\n renderCustomTab(activeView) {\n return (\n \n );\n }\n\n renderViewSelections(activeView) {\n return (\n \n );\n }\n\n renderAdminTab(activeTab) {\n return (\n \n
    \n { activeTab === 'admin' && (\n -1)}\n />\n ) }\n ;\n
    \n
    \n );\n }\n\n renderThemesTab(activeView) {\n return (\n \n );\n }\n\n renderLayoutPicker() {\n return (\n \n \n \n );\n }\n\n renderTabs() {\n const { activeView, activeTab, cardMaxHeight } = this.state;\n const { disallowThemesTab } = this.props;\n // Disallow access for common share infra collaborators.\n return (\n this.setState({ activeTab: key })}\n canChangeActiveKey\n >\n {disallowThemesTab ? null\n : (\n \n
    \n {activeTab === 'themes' && this.renderThemesTab(activeView)}\n
    \n \n )}\n \n
    \n {activeTab === 'custom' && this.renderCustomTab(activeView)}\n
    \n \n {this.isAdminTabVisible ? this.renderAdminTab(activeTab) : null}\n \n );\n }\n\n render() {\n const { activeView, error } = this.state;\n if (error) {\n return (
    An error occured and we have started working on this.
    );\n }\n return (\n
    \n {this.renderViewSelections(activeView)}\n {activeView === 'layout' ? this.renderLayoutPicker() : this.renderTabs()}\n
    \n );\n }\n\n componentDidCatch(error) {\n this.setState({\n error\n });\n }\n\n get storedDataKey() {\n return `old_style_${this.props.formProperties.id}`;\n }\n\n storeOldData(viewType, themeID, styleJSON) {\n const isLocalStorageAvailable = Utils.isLocalStorageAvailable();\n let oldData = false;\n if (isLocalStorageAvailable) {\n oldData = Utils.getJSONFromLocalStorage(this.storedDataKey);\n } else {\n oldData = global[this.storedDataKey];\n }\n let newData = { };\n newData[viewType] = { themeID, styleJSON };\n if (oldData) {\n newData = { ...oldData, ...newData };\n }\n if (isLocalStorageAvailable) {\n Utils.setJSONToLocalStorage(this.storedDataKey, newData);\n } else {\n global[this.storedDataKey] = newData;\n }\n }\n\n trackTabChangeEvent(key) {\n if (key === 'layout') {\n logJotFormEvents('form-builder', {\n actor: this.props.user.username,\n action: 'layoutTabOpened',\n target: `${this.props.formProperties.id}`\n }, this.props.user.accountType);\n }\n }\n\n handleViewChange(newView) {\n const { formProperties: { themeID, styleJSON }, disallowThemesTab } = this.props;\n this.storeOldData(this.state.activeView, themeID, styleJSON);\n this.setState({\n activeView: newView,\n activeTab: disallowThemesTab ? 'custom' : 'themes'\n }, () => this.trackTabChangeEvent(newView));\n }\n\n get isAdminTabVisible() {\n const allowedAdmins = ['card_form_themes'];\n const canISeePlease = global.heyPleaseOpenThisPanelIDontKnowPassOfThatAccout === 'ehOkey';\n return this.props.isAdmin && this.props.user && (allowedAdmins.indexOf(this.props.user.username) > -1 || canISeePlease);\n }\n\n handleThemeSelect(item) {\n this.props.updateFormTheme(item.id);\n }\n}\n\nCardDesigner.propTypes = {\n formProperties: PropTypes.object.isRequired,\n onPropertyChange: PropTypes.func.isRequired,\n updateThemeFn: PropTypes.func,\n createThemeFn: PropTypes.func,\n updateFormTheme: PropTypes.func,\n onSelectDefaultFn: PropTypes.func,\n fetchThemeInfoFn: PropTypes.func,\n user: PropTypes.object.isRequired,\n environment: PropTypes.string,\n isMobile: PropTypes.bool,\n isWelcomePageVisible: PropTypes.bool,\n isThankYouPageVisible: PropTypes.bool,\n isAdmin: PropTypes.bool,\n currentTheme: PropTypes.shape(),\n showNotificationFn: PropTypes.func,\n changeWelcomePageVisibility: PropTypes.func,\n changeThankYouPageVisibility: PropTypes.func,\n colorThemes: PropTypes.arrayOf((PropTypes.shape())),\n imageThemes: PropTypes.arrayOf((PropTypes.shape())),\n videoThemes: PropTypes.arrayOf((PropTypes.shape())),\n questions: PropTypes.arrayOf(PropTypes.shape()),\n disallowThemesTab: PropTypes.bool\n};\n","import PropTypes from 'prop-types';\nimport React, { Component, Suspense } from 'react';\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport { withRouter } from 'react-router-dom';\nimport isUndefined from 'lodash/isUndefined';\nimport debounce from 'lodash/debounce';\nimport cloneDeep from 'lodash/cloneDeep';\nimport {\n ImageCoverWizard,\n CardDesigner,\n WelcomePageWizard,\n ThankYouPageWizard,\n Dropdown as BuilderDropdown,\n Toggle as BuilderToggle,\n ImageUpload as BuilderImageUpload,\n PaymentActions\n} from '@jotforminc/builder-components';\nimport { BGColorLightness } from '@jotforminc/jotform-common';\nimport { t } from '@jotforminc/translation';\nimport { Loading } from '@jotforminc/loading';\nimport { Button } from '@jotforminc/magnet';\nimport { a11yClickHandler, isSalesforceEnv } from '@jotforminc/utils';\nimport { PanelToggleWrapper, PanelToggleButton } from '@jotforminc/panel-components';\n\nimport scrollIntoView from 'scroll-into-view';\nimport { safeLazy } from '@jotforminc/safe-lazy-import';\nimport { Feature, featureFlag } from '@jotforminc/feature-flag';\nimport {\n IconPaintRollerDiagonalFilled, IconXmark, IconChevronLeft, IconAiFilled, IconPuzzlePieceFilled\n} from '@jotforminc/svg-icons';\nimport { QUESTION_PROPS, QUESTION_PROPS_FOR_NEW_THEME } from '@jotforminc/question-props';\nimport '@jotforminc/jotform.css';\n// eslint-disable-next-line no-restricted-imports\nimport '@jotforminc/jotform.css/panel-variables.css';\nimport * as actions from '../actions';\nimport IconSVG from './IconSVG';\nimport DefaultTips, { extendedTips, extendedTipsForNewTheme } from '../constants/default_tips';\nimport specialOptions from '../constants/specialOptions';\nimport PaymentTypes, { ConnectionReferences } from '../constants/payment_types';\nimport {\n PaymentFields, PaymentCurrencies, FormFields, nativeWidgets\n} from '../constants/Fields';\nimport {\n isNewSCLAvailable,\n newSCLButtonQuestionProp,\n logJotFormEvents,\n isNewPaymentConnection,\n findActivePaymentConnection,\n checkGatewayConnection,\n isWriteOnlyPaymentConnectionGateway,\n correctProductsData,\n isRightPanelVisible,\n isLiteMode\n} from '../libs/Utils';\nimport PaymentDataCollector from '../libs/paymentDataCollector';\nimport { endpoints } from '../libs/api';\nimport { getPaymentMethodsOrder } from '../libs/PaymentUtils';\n\nconst RevisionHistory = safeLazy(() => import(/* webpackChunkName: \"RevisionHistory\" */ './revisionhistory/RevisionHistory'));\nconst SalesforceIntegrationList = safeLazy(() => import(/* webpackChunkName: \"SalesforceIntegrationList\" */ '../containers/salesforce/SalesforceIntegrationList'));\nconst SalesforceRightPanelButton = safeLazy(() => import(/* webpackChunkName: \"SalesforceRightPanelButton\" */ '../containers/salesforce/SalesforceRightPanelButton'));\nconst Themes = safeLazy(() => import(/* webpackChunkName: \"Themes\" */ '../containers/Themes'));\nconst LazyCalculationsWizard = safeLazy(() => import(/* webpackChunkName: \"LazyCalculationsWizard\" */ './lazyComponents/LazyCalculationsWizard'));\nconst LazyMiniDesignerWizard = safeLazy(() => import(/* webpackChunkName: \"LazyMiniDesignerWizard\" */ './lazyComponents/LazyMiniDesignerWizard'));\nconst LazyPaymentSettingsWizard = safeLazy(() => import(/* webpackChunkName: \"LazyPaymentSettingsWizard\" */ './lazyComponents/LazyPaymentSettingsWizard'));\nconst LazyQuestionPropertiesWizard = safeLazy(() => import(/* webpackChunkName: \"LazyQuestionPropertiesWizard\" */ './lazyComponents/LazyQuestionPropertiesWizard'));\nconst LazyWidgetSettingsWizard = safeLazy(() => import(/* webpackChunkName: \"LazyWidgetSettingsWizard\" */ './lazyComponents/LazyWidgetSettingsWizard'));\nconst PaymentPropertiesButton = safeLazy(() => import(/* webpackChunkName: \"LazyWidgetSettingsWizard\" */ './payment/PaymentPropertiesButton'));\nconst PaymentPropertiesPanel = safeLazy(() => import(/* webpackChunkName: \"PaymentPropertiesPanel\" */ './payment/PaymentPropertiesPanel'));\n\n/**\n * extend defaults with new tips\n */\nconst textKeys = [...Object.keys(extendedTips), ...Object.keys(DefaultTips)];\nconst mergedTexts = textKeys.reduce((texts, key) => {\n const { [key]: { title = '', tip: description = '' } = {} } = DefaultTips;\n const propTexts = { title, description, ...extendedTips[key] };\n return { ...texts, [key]: propTexts };\n}, {});\n\nconst clonedProperties = cloneDeep(QUESTION_PROPS());\nconst defaultProperties = isNewSCLAvailable() ? {\n ...clonedProperties,\n control_button: { ...clonedProperties.control_button, ...newSCLButtonQuestionProp }\n} : clonedProperties;\n\nconst extendedDefaults = Object.keys(defaultProperties).reduce((_acc, key) => {\n const acc = { ..._acc };\n acc[key] = defaultProperties[key];\n Object.keys(acc[key]).forEach(propKey => {\n Object.assign(acc[key][propKey], mergedTexts[propKey]);\n });\n return acc;\n}, {});\nconst miniDesignerTips = Object.keys(DefaultTips).reduce((acc, key) => {\n return { ...acc, [key]: DefaultTips[key].tip };\n}, {});\nclass RightPanel extends Component {\n constructor(props) {\n super(props);\n\n this.handleQuestionUpdate = this.handleQuestionUpdate.bind(this);\n this.handleFormPropertyChange = this.handleFormPropertyChange.bind(this);\n this.noop = () => { };\n this.handlePanelClose = this.handlePanelClose.bind(this);\n this.handlePanelBack = this.handlePanelBack.bind(this);\n this.handleWidgetPanelClose = this.handleWidgetPanelClose.bind(this);\n this.handleWidgetsUpdate = this.handleWidgetsUpdate.bind(this);\n this.handleWidgetCancel = this.handleWidgetCancel.bind(this);\n this.handleQuestionSave = this.handleQuestionSave.bind(this);\n this.handleQuestionSaveApi = this.handleQuestionSaveApi.bind(this);\n this.handleQuestionPropertiesTabChange = this.handleQuestionPropertiesTabChange.bind(this);\n this.togglePanel = this.togglePanel.bind(this);\n this.handleOpenQuestionProperties = this.handleOpenQuestionProperties.bind(this);\n this.handleOpenDesignPanel = this.handleOpenDesignPanel.bind(this);\n this.handleOpenSalesforcePanel = this.handleOpenSalesforcePanel.bind(this);\n this.handleOpenIntegrations = this.handleOpenIntegrations.bind(this); // A/B Test: formBuilderIntegrationsButton\n this.handleMiniDesignerSaveButton = this.handleMiniDesignerSaveButton.bind(this);\n this.handleWidgetUpdateQuestion = this.handleWidgetUpdateQuestion.bind(this);\n this.renderCardDesigner = this.renderCardDesigner.bind(this);\n this.handleQuestionPropertiesPanelChange = this.handleQuestionPropertiesPanelChange.bind(this);\n this.checkNegativeIconUsage = this.checkNegativeIconUsage.bind(this);\n this.openRichTextEditor = this.openRichTextEditor.bind(this);\n this.getPaymentQuestion = this.getPaymentQuestion.bind(this);\n this.isReusableConnection = this.isReusableConnection.bind(this);\n this.renderAIButtonMobile = this.renderAIButtonMobile.bind(this);\n this.debounceQuestionMap = {};\n this.customizedConfigs = global.JOTFORM_ENV === 'ENTERPRISE' && typeof global.CUSTOMIZED_CONFIGS === 'object' && global.CUSTOMIZED_CONFIGS;\n this.rightPanelRef = React.createRef(null);\n }\n\n UNSAFE_componentWillReceiveProps(nextProps) {\n if (isUndefined(nextProps.ui.selectedQuestionId)\n && ['design', 'salesforce', 'revisionhistory', 'coverimage', 'thankyoupagewizard', 'cardthankyoupagewizard', 'welcomepagewizard']\n .indexOf(nextProps.ui.rightPanelMode) === -1 && nextProps.ui.isRightPanelOpen) {\n // Close right panel if selected question is not specified and right panel mode is question settings.\n this.togglePanel();\n }\n\n if (!this.props.ui.isRightPanelOpen && nextProps.ui.isRightPanelOpen) {\n if (this.scrollView) {\n this.scrollView.scrollTop = 0;\n }\n }\n }\n\n shouldComponentUpdate(nextProps) {\n if (!this.props.ui.isTranslationLoaded && nextProps.ui.isTranslationLoaded) {\n return true;\n } if (['builder', 'settings'].indexOf(nextProps.ui.currentLocation) === -1 && this.props.user.accountType === 'ADMIN' && this.props.formProperties.defaultTheme !== 'v2') {\n return false;\n } if (nextProps.ui.formAccessibilityErrors !== this.props.ui.formAccessibilityErrors || nextProps.ui.questionAccessibilityErrors !== this.props.ui.questionAccessibilityErrors) {\n return true;\n }\n if (this.props.AI.ui.isOpened !== nextProps.AI.ui.isOpened) {\n return true;\n }\n if (nextProps.AI.ui.showAIAssistant) {\n return true;\n }\n if (this.props.ui.selectedQuestionId !== nextProps.ui.selectedQuestionId) {\n return true;\n }\n if (this.props.ui.isRightPanelOpen && !nextProps.ui.isRightPanelOpen) {\n return true;\n }\n if (!nextProps.ui.isRightPanelOpen) {\n return false;\n }\n return true;\n }\n\n componentDidUpdate(prevProps) {\n const selectedQuestion = this.getSelectedQuestion();\n const { isRightPanelOpen } = this.props.ui;\n if (!prevProps.ui.isRightPanelOpen && isRightPanelOpen && selectedQuestion) {\n if (this.rightPanelRef.current) {\n setTimeout(() => {\n this.rightPanelRef.current?.setAttribute('tabindex', '0');\n if (isRightPanelVisible(this.rightPanelRef.current)) {\n this.rightPanelRef.current?.focus();\n }\n }, 500);\n }\n }\n }\n\n get rightPanelLabel() {\n switch (this.props.ui.rightPanelMode) {\n case 'questionsettings': return this.getSelectedQuestion() ? this.getFieldDisplayName() : t('Right Panel');\n case 'design': return t('Form Designer Panel');\n case 'salesforce': return t('Salesforce Panel');\n case 'widgetsettings': return t('Widget Settings');\n case 'paymentsettings': return t('Payment Settings');\n case 'revisionhistory': return t('Revision History');\n case 'coverimage': return t('Logo Properties');\n case 'imagesettings': return t('Cover Image Panel');\n case 'welcomepagewizard': return t('Welcome Page Panel');\n case 'thankyoupagewizard': return t('Thank You Page Settings');\n case 'cardthankyoupagewizard': return t('Thank You Page Settings');\n default: return t('Right Panel');\n }\n }\n\n getSelectedQuestion() {\n const { selectedQuestionId } = this.props.ui;\n /* eslint-disable */ // (eqeqeq ===) can broke logic for now.\n const selectedQuestion = this.props.questions.find(q => q.qid == selectedQuestionId); // string , int\n /* eslint-enable */\n return selectedQuestion;\n }\n\n getFieldDisplayName() {\n let fieldDisplayName = null;\n const selectedQuestion = this.getSelectedQuestion();\n\n if (selectedQuestion.widgetType && selectedQuestion.widgetType === 'native') {\n const widget = nativeWidgets.find(nativeWidget => nativeWidget.type === selectedQuestion.type);\n const widgetName = widget ? widget.name : 'Question';\n return t(`${widgetName} Properties`);\n }\n\n for (let i = 0; i < FormFields.length; i++) {\n const { categoryFields } = FormFields[i];\n\n if (categoryFields) {\n for (let j = 0; j < categoryFields.length; j++) {\n if (categoryFields[j].type === selectedQuestion.type) {\n let categoryFieldName = categoryFields[j].name;\n if (selectedQuestion.type === 'control_matrix' && selectedQuestion.inputType === 'Emoji Slider') {\n categoryFieldName = selectedQuestion.inputType;\n }\n fieldDisplayName = t(`${categoryFieldName} Properties`);\n break;\n }\n }\n }\n\n if (fieldDisplayName) {\n break;\n }\n }\n\n if (!fieldDisplayName) {\n fieldDisplayName = t('Question Properties');\n }\n return fieldDisplayName;\n }\n\n getPaymentDisplayName() {\n const selectedQuestion = this.getSelectedQuestion();\n const name = prefix => t(`${prefix} Properties`);\n switch (selectedQuestion.paymentType) {\n case 'product':\n return name('Product List');\n case 'subscription':\n return name('Subscription');\n case 'donation':\n return selectedQuestion.nonprofit === 'No' ? name('User Defined Amount') : name('Donation');\n default:\n break;\n }\n }\n\n togglePanel() {\n this.props.actions.rightPanelToggle(!this.props.ui.isRightPanelOpen);\n }\n\n handleOpenQuestionProperties() {\n this.props.actions.updateRightPanelMode('questionsettings');\n this.togglePanel();\n }\n\n handleOpenDesignPanel() {\n this.props.actions.updateSelectedQuestion(undefined);\n this.props.actions.rightPanelToggle(true);\n this.props.actions.updateRightPanelMode('design');\n\n // discoverabilityTracking\n const { user: { username, accountType } } = this.props;\n logJotFormEvents('discoverabilityTracking', {\n actor: username,\n action: 'click',\n target: '[data-testid=\"panelToggle-designer\"]'\n }, accountType);\n }\n\n // A/B Test: formBuilderIntegrationsButton\n handleOpenIntegrations() {\n const { formProperties: { id: formID } = {}, history, logAbTestAction } = this.props;\n const searchParam = global.location && global.location.search;\n history?.push(`/${global.__BASE_ROUTE_PATH}/${formID}/settings/integrations${searchParam ? searchParam : ''}`);\n logAbTestAction({ action: 'click', target: 'integrationsButton' });\n }\n\n handleOpenSalesforcePanel() {\n this.props.actions.updateSelectedQuestion(undefined);\n this.props.actions.updateRightPanelMode('salesforce');\n this.props.actions.rightPanelToggle(true);\n\n // discoverabilityTracking\n const { user: { username, accountType } } = this.props;\n logJotFormEvents('discoverabilityTracking', {\n actor: username,\n action: 'click',\n target: '[data-testid=\"panelToggle-salesforce\"]'\n }, accountType);\n }\n\n handleQuestionUpdate(question, _changes) {\n let changes = _changes;\n if (changes && (changes.shrink === 'Yes')) {\n changes = { labelAlign: 'Top', ...changes };\n }\n\n this.props.actions.updateFormQuestion(question.qid, changes, true, false);\n this.handleQuestionSaveApi(question, changes);\n }\n\n handleWidgetUpdateQuestion(qid, _prop) {\n const prop = { ..._prop };\n delete prop.isTempQuestion; // ups ! we couldn't update this.\n this.props.actions.updateFormQuestion(qid, prop);\n }\n\n handleQuestionSaveApi(question, changes) {\n let func = this.debounceQuestionMap[question.qid];\n\n if (!func) {\n const debouncedFn = debounce(this.props.actions.saveFormQuestion, 500);\n this.debounceQuestionMap[question.qid] = debouncedFn;\n func = debouncedFn;\n }\n\n func(question.qid, changes);\n }\n\n checkNegativeIconUsage() {\n let tempBGcolor = '';\n let negativeIcon = false;\n if (global.location.href.match(/\\/#card/) !== null || global.buildermode === 'card') {\n tempBGcolor = (this.props.formProperties.styleJSON && this.props.formProperties.styleJSON['pageBg-colorBegin'])\n || (this.props.themes.currentTheme.styleJSON && this.props.themes.currentTheme.styleJSON['pageBg-colorBegin']);\n } else {\n tempBGcolor = this.props.formProperties.styleJSON && this.props.formProperties.styleJSON['@clrBg'];\n }\n negativeIcon = tempBGcolor ? BGColorLightness(tempBGcolor) : false;\n return negativeIcon;\n }\n\n // handleQuestionSave(question, callback) {\n // // TODO : Update UI\n // return callback();\n // }\n\n handleFormPropertyChange(changes, callAPI = true, saveToUndoStack = true) {\n this.props.actions.updateFormProperty(changes, saveToUndoStack, callAPI);\n }\n\n handlePanelClose() {\n if (this.rightPanelRef.current) {\n this.rightPanelRef.current?.setAttribute('tabindex', '-1');\n }\n this.props.actions.rightPanelToggle(false);\n this.props.actions.updateRightPanelMode('');\n }\n\n handlePanelBack() {\n this.props.actions.updateQuestionPropertiesActivePanel('general');\n }\n\n handleWidgetPanelClose(e) {\n const qid = e.target.getAttribute('data-qid');\n if (this.rightPanelRef.current) {\n this.rightPanelRef.current?.setAttribute('tabindex', '-1');\n }\n if (qid) {\n this.handleWidgetCancel(qid);\n }\n }\n\n handleWidgetsUpdate(toggle) {\n if (toggle === true) {\n this.togglePanel();\n }\n this.props.actions.commitStagedQuestions();\n }\n\n handleWidgetCancel(qid) {\n this.togglePanel();\n const selectedQuestion = this.getSelectedQuestion();\n const { isTempQuestion = false } = selectedQuestion;\n if (isTempQuestion) {\n // Delete Question if it is temp on cancel button click\n this.props.actions.deleteFormQuestion(qid);\n }\n }\n\n handleQuestionSave(question, callback) {\n // TODO : Update UI\n callback();\n this.togglePanel();\n }\n\n handleQuestionPropertiesTabChange(tab) {\n this.props.actions.updateQuestionPropertiesActiveTab(tab);\n this.props.actions.updateSelectedFITBFieldId('');\n }\n\n handleQuestionPropertiesPanelChange(panel) {\n this.props.actions.updateQuestionPropertiesActivePanel(panel);\n }\n\n checkIsMobileDevice() {\n const { device } = this.props.ui;\n const isMobile = device === 'isMobile' || device === 'isTablet';\n return isMobile;\n }\n\n handleMiniDesignerSaveButton() {\n if (this.props.ui.initializeInjectCss === true) {\n this.props.actions.initializeInjectCss(false);\n this.props.actions.rightPanelToggle(false, false); // !important disable hiding rightpanel\n } else {\n this.togglePanel();\n }\n }\n\n renderMiniDesigner() {\n const { initializeInjectCss } = this.props.ui;\n const isMobile = this.checkIsMobileDevice();\n let embeddedBuilderParam = '';\n if (this.customizedConfigs) {\n const embedConfigs = this.customizedConfigs.HIDE_BUILDER_HEADERS;\n if (embedConfigs && embedConfigs.embedParam) {\n embeddedBuilderParam = `?${embedConfigs.embedParam}=true`;\n }\n }\n return (\n
    \n
    \n \n \n \n

    {t('Form Designer')}

    \n
    \n this.props.history.push(`/${global.__BASE_ROUTE_PATH}/${this.props.formProperties.id}/design${embeddedBuilderParam}`)}\n isV4={true}\n initializeInjectCss={initializeInjectCss} // for fixing old forms, which has missing stylejson / injectcss\n // TODO: Themes are temporarily disabled for CSI collaborators until form user flow here is fixed.\n themeTab={!global.csiCollaborator && }>}\n isMobile={isMobile}\n userThemes={this.props.themes.userThemes.used}\n />\n
    \n );\n }\n\n openRichTextEditor() {\n const selectedQuestion = this.getSelectedQuestion();\n const { openRichTextFor } = this.props.ui;\n const { richTextOpened } = this.props.ui;\n const richTextField = global.document.querySelector(`li[data-qid=\"${selectedQuestion.qid}\"]`);\n scrollIntoView(richTextField, {\n time: 350,\n align: {\n top: global.buildermode === 'card' ? 0.25 : 0.5,\n left: -0.25\n },\n behavior: 'smooth'\n });\n if (!(openRichTextFor === selectedQuestion.qid && richTextOpened)) {\n this.props.actions.toggleRichTextEditorForQuestion(selectedQuestion.qid, true);\n }\n }\n\n renderQuestionPropertiesEditor() {\n const selectedQuestion = this.getSelectedQuestion();\n const isPayment = selectedQuestion && PaymentTypes.indexOf(selectedQuestion.type) >= 0;\n\n const fieldDisplayName = isPayment && this.isReusableConnection() ? this.getPaymentDisplayName() : this.getFieldDisplayName();\n const isMobile = this.checkIsMobileDevice();\n\n if (this.props.formProperties.defaultTheme === 'v2') {\n const widgetTypes = ['control_widget', 'control_signature', 'control_calculation'];\n widgetTypes.forEach(widgetType => {\n if (extendedDefaults[widgetType].labelAlign) {\n extendedDefaults[widgetType].labelAlign = QUESTION_PROPS_FOR_NEW_THEME.control_widget.labelAlign;\n }\n });\n const fieldTypes = ['control_number', 'control_textbox', 'control_email'];\n fieldTypes.forEach(fieldType => {\n if (extendedDefaults[fieldType] && extendedDefaults[fieldType].size && extendedDefaults[fieldType].size.hint) {\n extendedDefaults[fieldType].size.hint = extendedTipsForNewTheme.size.hint;\n }\n });\n }\n\n return (\n
    \n
    \n {this.props.ui.questionPropertiesActivePanel !== 'general' ? (\n \n \n \n ) : null}\n \n \n \n

    {fieldDisplayName}

    \n
    \n \n
    \n );\n }\n\n renderCalculationsWizard() {\n const selectedQuestion = this.getSelectedQuestion();\n return (\n \n );\n }\n\n renderWidgetsWizard() {\n const { selectedQuestionId } = this.props.ui;\n const selectedQuestion = this.getSelectedQuestion();\n const currentWidget = this.props.widgets.find(q => {\n return q.client_id === selectedQuestion.selectedField;\n });\n\n const openWidgetInfoWindow = e => {\n e.stopPropagation();\n this.props.actions.displayWidgetInfo(currentWidget.client_id);\n };\n\n // If widget is temp state, we need to initialize it.\n const initializeWidget = selectedQuestion && selectedQuestion.isTempQuestion === true;\n return (\n
    \n
    \n \n \n \n

    {t('Widget Settings')}

    \n
    \n \n
    \n );\n }\n\n renderPaymentWizard() {\n const selectedQuestion = this.getSelectedQuestion();\n const { selectedQuestionId } = this.props.ui;\n const paymentWizardMode = this.props.ui.paymentWizardMode ? this.props.ui.paymentWizardMode : selectedQuestion.type;\n const paymentPID = this.props.ui.paymentPID ? this.props.ui.paymentPID : null;\n const productStock = this.props.productStock ? this.props.productStock : null;\n const isNewConnectionFlow = isNewPaymentConnection(this.props.formProperties, selectedQuestion.type);\n const activePaymentConnection = findActivePaymentConnection(this.props.paymentConnection, selectedQuestion.type, this.props.formProperties.id);\n\n return (\n
    \n \n
    \n );\n }\n\n renderRevisionHistoryWizard() {\n return (\n }>\n \n \n );\n }\n\n renderCoverImageWizard() {\n const isMobile = this.checkIsMobileDevice();\n return (\n
    \n
    \n \n \n \n

    {t('Logo Properties')}

    \n
    \n
    \n \n
    \n
    \n );\n }\n\n renderWelcomePageWizard() {\n const isMobile = this.checkIsMobileDevice();\n return (\n
    \n
    \n \n \n \n

    {t('Welcome Image Properties')}

    \n
    \n
    \n \n
    \n
    \n );\n }\n\n renderThankYouPageWizard(openCardEditor = false) {\n const isMobile = this.checkIsMobileDevice();\n const headerName = (this.props.ui.currentLocation === 'builder' && !openCardEditor) ? t('Thank You Image Properties') : t('Thank You Page Settings');\n return (\n
    \n
    \n \n \n \n

    {headerName}

    \n
    \n
    \n \n
    \n
    \n );\n }\n\n renderPaymentPropertiesPanel() {\n const activeGatewaySettings = this.getPaymentQuestion();\n const {\n actions: {\n updateFormQuestion,\n updateFormProperty,\n updateRightPanelMode,\n updateSelectedQuestion,\n rightPanelToggle,\n addNewQuestion,\n deleteFormQuestion,\n fetchLeanRevisionHistory,\n setPaymentProductList,\n gatewayConnectionFlowToggle,\n openPaymentWizard,\n setPaymentBuilderButtonStatus,\n setPaymentConfigurationStatus\n },\n questions,\n formProperties: {\n id,\n products,\n formType\n },\n user\n } = this.props;\n return (\n (\n
    \n \n \n \n

    {t('Payment Properties')}

    \n
    \n )}\n questionProperties={activeGatewaySettings}\n BuilderDropdown={BuilderDropdown}\n BuilderToggle={BuilderToggle}\n BuilderImageUpload={BuilderImageUpload}\n formQuestions={questions}\n resource=\"FORM\"\n checkoutFormID={id}\n products={products}\n formType={formType}\n user={user}\n userIsResourceOwner={user.isFormOwner}\n onSaveGateway={({ qid, changedProps }) => {\n updateFormQuestion(qid, changedProps);\n\n if (activeGatewaySettings.paymentType === 'subscription') {\n // panel navigations\n try {\n const stripeCondition = changedProps.useStripeSubscriptions ? changedProps.useStripeSubscriptions === '1' : activeGatewaySettings.useStripeSubscriptions === '1';\n const paypalCondition = changedProps.usePaypalSubscriptions ? changedProps.usePaypalSubscriptions === 'Yes' : activeGatewaySettings.usePaypalSubscriptions === 'Yes';\n const FETCH_SUBS_MODE_SETTINGS = {\n control_braintree: {\n mode: 'braintreeselector',\n shouldNavigate: true\n },\n control_stripe: {\n mode: 'stripeselector',\n shouldNavigate: stripeCondition\n },\n control_stripeCheckout: {\n mode: 'stripeselector',\n shouldNavigate: stripeCondition\n },\n control_chargify: {\n mode: 'chargifyselector',\n shouldNavigate: () => true\n },\n control_paypalcomplete: {\n mode: 'paypalcompleteplanselector',\n shouldNavigate: paypalCondition\n }\n };\n const modeSettings = FETCH_SUBS_MODE_SETTINGS[activeGatewaySettings.type];\n if (modeSettings.shouldNavigate) {\n openPaymentWizard('', '');\n setTimeout(() => { PaymentActions.changeMode(modeSettings.mode); }, 100);\n }\n } catch (err) { /* Nothing */ }\n }\n }}\n onAutosaveGateway={({\n qid,\n key,\n val,\n gatewayType\n }) => {\n updateFormQuestion(qid, { [key]: val });\n\n if (gatewayType === 'control_paypalSPB' && key === 'paypalButton') {\n const submitButton = questions.find(q => q.type === 'control_button');\n\n if (submitButton) {\n updateFormQuestion(submitButton.qid, { paypalBt: val, buttonAlign: submitButton.buttonAlign === 'Auto' ? 'Center' : submitButton.buttonAlign }, true, true, false);\n updateFormQuestion(qid, { paypalButton: val, paypalButtonQid: submitButton.qid }, true, true, false);\n } else if (!submitButton && val === 'Yes') {\n addNewQuestion({\n type: 'control_button', paypalBt: 'Yes', buttonAlign: 'Center', willPaymentInit: false\n }, false, true, addedQuestion => {\n if (addedQuestion) {\n updateFormQuestion(qid, { paypalButton: val, paypalButtonQid: addedQuestion.qid }, true, true, false);\n }\n });\n }\n }\n }}\n onPaymentTypeChange={({\n qid,\n questionProps,\n formProps,\n paymentType\n }) => {\n updateFormQuestion(qid, questionProps, true, false);\n updateFormProperty(formProps, true, false);\n\n if (activeGatewaySettings.type === 'control_paypalcomplete') {\n const paymentmethodQuestion = questions.find(q => q.type === 'control_paymentmethods');\n\n if (paymentType === 'subscription') {\n deleteFormQuestion(paymentmethodQuestion.qid, true, false);\n } else if (!paymentmethodQuestion) {\n const pmOrder = getPaymentMethodsOrder(questions, false);\n addNewQuestion({ type: 'control_paymentmethods', paymentFieldType: 'control_paypalcomplete' }, pmOrder).then(() => {\n updateSelectedQuestion(qid);\n });\n }\n updateRightPanelMode('paymentproperties', true);\n rightPanelToggle(true);\n }\n\n PaymentActions.changePaymentType(paymentType);\n PaymentActions.changePaymentQuestionMultipleProps(questionProps);\n PaymentActions.clearProducts();\n }}\n onDetachConnection={({\n qid,\n props,\n checkoutFormID\n }) => {\n deleteFormQuestion(qid, true, false);\n addNewQuestion({ ...props, isConnectionDetached: true }, activeGatewaySettings.order);\n fetchLeanRevisionHistory(checkoutFormID);\n setPaymentProductList(false);\n }}\n getQidOnAddQuestion={async ({\n type,\n required,\n subfields\n }) => {\n const { question: { qid } } = await addNewQuestion({\n type,\n willPaymentInit: false,\n required,\n subfields\n }, undefined, false, false, true, false, true);\n\n return qid;\n }}\n updateBuilderButtonStatus={status => { setPaymentBuilderButtonStatus(status); }}\n updateGatewayConfigurationStatus={val => { setPaymentConfigurationStatus(val); }}\n togglePaymentConnectionModal={val => gatewayConnectionFlowToggle(val)}\n />\n );\n }\n\n // check RightPanelMode and render necessary wizard for it.\n // Render each component in it's own render method. Otherwise we couldn't see anything.\n renderNecessaryWizard(rightPanelMode, selectedQuestion, builderType) {\n const questionBasedPanels = ['questionsettings', 'imagesettings', 'widgetsettings', 'paymentsettings'];\n\n if (questionBasedPanels.includes(rightPanelMode) && isUndefined(selectedQuestion)) {\n this.handlePanelClose();\n return null;\n }\n\n switch (rightPanelMode) {\n case 'design':\n return builderType === 'card' ? this.renderCardDesigner() : this.renderMiniDesigner();\n case 'salesforce':\n return this.renderSalesforcePanel();\n case 'questionsettings':\n case 'imagesettings': {\n const editorType = selectedQuestion.type === 'control_ab' ? 'ab' : 'default';\n return this.renderQuestionPropertiesEditor(editorType);\n }\n case 'widgetsettings':\n return selectedQuestion.type === 'control_calculation' ? this.renderCalculationsWizard() : this.renderWidgetsWizard();\n case 'paymentsettings': {\n if (PaymentTypes.indexOf(selectedQuestion.type) >= 0) {\n return this.renderPaymentWizard();\n }\n return null;\n }\n case 'paymentproperties':\n if (this.getPaymentQuestion()) {\n return this.renderPaymentPropertiesPanel();\n }\n return null;\n case 'revisionhistory':\n return this.renderRevisionHistoryWizard();\n case 'coverimage':\n return this.renderCoverImageWizard();\n case 'welcomepagewizard':\n return this.renderWelcomePageWizard();\n case 'thankyoupagewizard':\n return this.renderThankYouPageWizard();\n case 'cardthankyoupagewizard':\n return this.renderThankYouPageWizard(true);\n default:\n return null;\n }\n }\n\n renderAIButtonMobile() {\n const {\n actions: { toggleAIPanel },\n ui: {\n isPDFImporter,\n isPreviewModOn,\n isComingFromJotFormMobile,\n currentLocation\n },\n AI: {\n ui: {\n showAIAssistant,\n isOpened\n }\n },\n formProperties\n } = this.props;\n const isImportedPdf = isPDFImporter && !!formProperties?.importedPDF;\n const isInBuilderMode = currentLocation === 'builder';\n const isJFMobileCopilotEnabled = isComingFromJotFormMobile ? !!window?.mobileCopilotEnabled : true;\n const shouldShow = !isLiteMode() && showAIAssistant && isInBuilderMode && !isImportedPdf && !isPreviewModOn && isJFMobileCopilotEnabled;\n\n if (!shouldShow) return null;\n\n return (\n {\n toggleAIPanel(!isOpened);\n }}\n className='ai-chat-button'\n >\n Copilot\n \n );\n }\n\n renderCardDesigner() {\n const isMobile = this.checkIsMobileDevice();\n const isAdmin = this.props.user.accountType === 'ADMIN';\n return (\n
    \n
    \n \n \n \n

    {t('Form Designer')}

    \n
    \n }>}\n currentTheme={this.props.themes.currentTheme}\n disallowThemesTab={global.csiCollaborator}\n />\n
    \n );\n }\n\n renderAccessibilityErrors() {\n if (this.props.formProperties.accessibility !== '1') {\n return null;\n }\n const { questionAccessibilityErrors, formAccessibilityErrors } = this.props.ui;\n let problemCount = questionAccessibilityErrors ? questionAccessibilityErrors.reduce(\n (currentValue, question) => {\n return question.accessibilityErrors ? (question.accessibilityErrors.length + currentValue) : currentValue;\n }, 0\n ) : 0;\n problemCount += formAccessibilityErrors ? formAccessibilityErrors.length : 0;\n if (problemCount === 0) {\n return null;\n }\n return (\n \n \n {(problemCount > 1 ? t('{number} Accessibility Problems') : t('{number} Accessibility Problem')).replace('{number}', problemCount)}\n \n );\n }\n\n handleKeyDown = event => {\n a11yClickHandler(event, this.handleOpenDesignPanel);\n };\n\n handleKeyDown2 = event => {\n a11yClickHandler(event, this.handleOpenIntegrations);\n };\n\n renderDesignerButton() {\n let colorStyle;\n if (isSalesforceEnv()) {\n colorStyle = 'navy-darkest';\n } else if (this.props.ui.isPDFImporter) {\n colorStyle = 'primary-light';\n } else {\n colorStyle = 'primary';\n }\n\n return (\n \n {t('Form Designer')}\n \n );\n }\n\n // A/B Test: formBuilderIntegrationsButton\n renderIntegrationsButton() {\n return (\n \n {t('Integrations')}\n \n );\n }\n\n renderSalesforcePanel() {\n return (\n
    \n
    \n \n \n \n

    {t('Salesforce Integration')}

    \n
    \n }>\n \n \n
    \n );\n }\n\n isReusableConnection() {\n return this.props.actions.isReusableConnectionEnabled() && this.getPaymentQuestion();\n }\n\n getPaymentQuestion() {\n const { questions } = this.props;\n return questions.find(q => PaymentTypes.indexOf(q.type) >= 0);\n }\n\n render() {\n const { noTransition, showIntegrationsShortcutButton } = this.props;\n const {\n builderType, currentLocation, rightPanelMode, selectedQuestionId\n } = this.props.ui;\n const selectedQuestion = this.getSelectedQuestion();\n const rendered = this.renderNecessaryWizard(rightPanelMode, selectedQuestion, builderType);\n const isWidget = selectedQuestion && selectedQuestion.type === 'control_widget' && selectedQuestion.widgetType;\n const isPayment = selectedQuestion && PaymentTypes.indexOf(selectedQuestion.type) >= 0 && rightPanelMode === 'paymentsettings';\n const isNewTheme = this.props && this.props.formProperties && this.props.formProperties.defaultTheme && this.props.formProperties.defaultTheme === 'v2';\n const isNegativeIcon = this.checkNegativeIconUsage();\n const isEncryptedForm = this.props && this.props.formProperties && this.props.formProperties.isEncrypted === 'Yes';\n const isSQLDropdown = selectedQuestion?.selectedField === 'd871f89eb5f97f510c2d4e4b';\n const isMobile = this.checkIsMobileDevice();\n const isMobileApp = global.navigator.userAgent.indexOf('JotForm Mobile') > -1 || global.navigator.userAgent.indexOf('JFCEMobile') > -1;\n const mobileAppPanel = isMobileApp;\n const selectedQuestionCheck = selectedQuestionId !== undefined;\n\n return (\n \n {currentLocation === 'builder' && (\n \n }>\n { this.renderAccessibilityErrors() }\n {!isLiteMode() && this.renderDesignerButton() }\n {/* A/B Test: formBuilderIntegrationsButton */}\n {!isMobile && !isLiteMode() && showIntegrationsShortcutButton && this.renderIntegrationsButton()}\n {isMobile && this.renderAIButtonMobile()}\n {\n this.isReusableConnection() && (\n }>\n \n \n )\n }\n {\n !isEncryptedForm && (\n \n }>\n \n \n \n )\n }\n \n \n )}\n { this.scrollView = e; }}\n className=\"rightPanelContent\"\n style={{\n position: 'relative',\n height: '100%',\n overflowY: rightPanelMode === 'questionsettings' ? 'scroll' : 'auto',\n overflowX: 'hidden'\n }}\n >\n
    \n }>\n {rendered}\n \n
    \n \n \n );\n }\n}\n\nRightPanel.propTypes = {\n actions: PropTypes.shape({\n rightPanelToggle: PropTypes.func,\n commitStagedQuestions: PropTypes.func,\n updateFormProperty: PropTypes.func,\n updateFormQuestion: PropTypes.func,\n saveFormQuestion: PropTypes.func,\n deleteFormQuestion: PropTypes.func,\n updateQuestionPropertiesActiveTab: PropTypes.func,\n updateSelectedQuestion: PropTypes.func,\n updateRightPanelMode: PropTypes.func,\n addNewQuestion: PropTypes.func,\n displayWidgetInfo: PropTypes.func,\n initializeInjectCss: PropTypes.func,\n updateSelectedFITBFieldId: PropTypes.func,\n updateUserSettings: PropTypes.func\n }),\n ui: PropTypes.shape({\n isRightPanelOpen: PropTypes.bool,\n isLeftPanelOpen: PropTypes.bool,\n selectedQuestionId: PropTypes.string,\n questionPropertiesActiveTab: PropTypes.string,\n questionPropertiesParentTab: PropTypes.string,\n rightPanelMode: PropTypes.string,\n device: PropTypes.string,\n isTranslationLoaded: PropTypes.bool,\n initializeInjectCss: PropTypes.bool, // for old forms.\n paymentWizardMode: PropTypes.string,\n paymentPID: PropTypes.string,\n selectedFITBFieldId: PropTypes.string\n }),\n questions: PropTypes.arrayOf(PropTypes.shape()),\n formProperties: PropTypes.shape(),\n user: PropTypes.shape(),\n widgets: PropTypes.arrayOf(PropTypes.shape()),\n themes: PropTypes.shape(),\n paymentConnection: PropTypes.arrayOf(PropTypes.shape()),\n hasSubmission: PropTypes.bool\n};\n\nfunction mapDispatchToProps(dispatch) {\n return {\n actions: bindActionCreators(actions, dispatch)\n };\n}\n\nfunction mapStateToProps(state) {\n return {\n ui: state.ui,\n questions: state.questions,\n themes: state.themes,\n formProperties: state.formProperties,\n user: state.user,\n widgets: state.widgets,\n paymentConnection: state.paymentConnection,\n productStock: state.productStock,\n hasSubmission: Number(state.form?.count) > 0,\n AI: state.AI\n };\n}\n\nexport default connect(mapStateToProps, mapDispatchToProps)(withRouter(RightPanel));\n","/* eslint\n react/destructuring-assignment: 0,\n jsx-a11y/click-events-have-key-events: 0\n*/\n\nimport PropTypes from 'prop-types';\nimport React, { Component } from 'react';\nimport { withRouter } from 'react-router-dom';\nimport scrollIntoView from 'scroll-into-view';\nimport { t } from '@jotforminc/translation';\nimport { a11yAnnounce } from '@jotforminc/utils';\nimport { formBuilderWalkthroughManager as walkthroughManager } from '@jotforminc/product-walkthrough';\nimport { JFSortable as ReactSortable } from '@jotforminc/builder-components';\nimport { IconArrowUpToLine } from '@jotforminc/svg-icons';\nimport isUndefined from 'lodash/isUndefined';\nimport { isBrightColor } from '../libs/Utils';\n\nclass Footer extends Component {\n constructor(props) {\n super(props);\n this.handleOpenDesignPanel = this.handleOpenDesignPanel.bind(this);\n this.handleAddNewPage = this.handleAddNewPage.bind(this);\n this.handleOpenThemes = this.handleOpenThemes.bind(this);\n this.scrollToTop = this.scrollToTop.bind(this);\n this.handlePageSortChange = this.handlePageSortChange.bind(this);\n this.approveReorder = this.approveReorder.bind(this);\n\n // Enterprise specific customized configurations\n const customConfigs = global.JOTFORM_ENV === 'ENTERPRISE' && typeof global.CUSTOMIZED_CONFIGS === 'object' && global.CUSTOMIZED_CONFIGS;\n this.hideOnFooter = customConfigs && customConfigs.HIDE_FIELDS_ON_FORM_BUILDER && customConfigs.HIDE_FIELDS_ON_FORM_BUILDER.footer;\n\n this.state = {\n isWaitingReorderConfirmation: false\n };\n\n // A/B Test: productWalkthroughV5\n walkthroughManager.builderActions.scrollToTop = () => {\n const { currentLocation } = this.props;\n if (currentLocation === 'builder') {\n this.scrollToTop();\n }\n };\n }\n\n onLinkClicked(e, route) {\n e.preventDefault();\n this.props.history.push(route);\n }\n\n // eslint-disable-next-line react/sort-comp\n handleOpenDesignPanel() {\n this.props.actions.updateSelectedQuestion(undefined);\n this.props.actions.rightPanelToggle(true);\n this.props.actions.updateRightPanelMode('design');\n }\n\n handleAddNewPage() {\n this.props.actions.updateSelectedQuestion(undefined);\n this.props.actions.addNewQuestion({ type: 'control_pagebreak' });\n }\n\n handleOpenThemes() {\n this.props.history.push(`/${global.__BASE_ROUTE_PATH}/${this.props.formID}/themes`);\n }\n\n scrollToTop() {\n const stage = global.document.getElementById('stage');\n this.scrollElementTo(stage, 0, 150);\n }\n\n scrollElementTo(elem, to, duration) {\n const element = elem;\n if (duration <= 0) return;\n const difference = to - element.scrollTop;\n const perTick = (difference / duration) * 10;\n\n setTimeout(() => {\n element.scrollTop += perTick;\n if (element.scrollTop === to) return;\n this.scrollElementTo(element, to, duration - 10);\n }, 10);\n }\n\n handlePageSortChange(order, sortable, { oldIndex, newIndex }) {\n const pagebreakType = 'control_pagebreak';\n\n if (oldIndex !== newIndex) {\n let currentPage = 0;\n const grouped = this.props.questions.reduce((acc, question) => {\n if (!acc[currentPage]) {\n acc.push([]);\n }\n if (question.type !== pagebreakType) {\n acc[currentPage].push(question);\n } else {\n acc[currentPage].push(question);\n currentPage = currentPage + 1;\n }\n\n return acc;\n }, []);\n\n if (this.props.questions.last().type === pagebreakType) {\n grouped.push([]);\n }\n\n const pageBreaks = grouped.map(p => p.find(q => q.type === pagebreakType));\n const groupedWithoutPagebreaks = grouped.map(p => p.filter(q => q.type !== pagebreakType));\n const removedGroup = groupedWithoutPagebreaks.splice(oldIndex, 1)[0];\n groupedWithoutPagebreaks.splice(newIndex, 0, removedGroup);\n\n const groupedWithPagebreaks = [...groupedWithoutPagebreaks];\n pageBreaks.forEach((p, index) => {\n if (p) {\n groupedWithPagebreaks[index].push(p);\n }\n });\n\n const reordered = groupedWithPagebreaks.reduce((acc, group) => {\n group.forEach(p => acc.push(p));\n return acc;\n }, []);\n\n const updatedQuestionsProps = reordered.map((question, index) => {\n return {\n qid: question.qid,\n order: index + 1,\n type: question.type\n };\n });\n\n const removedPage = this.pages.splice(oldIndex, 1)[0];\n this.pages.splice(newIndex, 0, removedPage);\n this.props.actions.updateMultipleFormQuestions(updatedQuestionsProps);\n }\n }\n\n approveReorder(isApproved) {\n const questionSource = isApproved ? this.props.questions : this.state.questions;\n const updatedQuestionsProps = questionSource.map((question, index) => {\n return {\n qid: question.qid,\n order: index + 1,\n type: question.type\n };\n });\n\n this.setState({\n isWaitingReorderConfirmation: false,\n questions: null,\n pages: null\n });\n\n this.props.actions.updateMultipleFormQuestions(updatedQuestionsProps, isApproved, isApproved);\n }\n\n renderPages(pageCount, activePage) {\n let pages = [];\n let pageText = '';\n if (pageCount < 10) pageText = t('Page');\n for (let i = 1; i <= pageCount; i++) {\n const isActive = (i === (activePage || 1)) ? 'isActive' : '';\n pages = [...pages, (\n {\n this.props.actions.updateSelectedQuestion(undefined);\n this.props.actions.setActiveFormPage(false);\n this.props.actions.displayActiveFormPage(i);\n setTimeout(() => {\n this.props.actions.setActiveFormPage(i);\n });\n const page = global.document.querySelector(`.page_${i}`);\n scrollIntoView(page, {\n align: { top: 0 },\n speed: 300\n });\n a11yAnnounce(t(`Active page set to Page ${i}. New questions will be added to this page.`));\n }}\n data-page-id={i}\n className={`formPagesNav-item formPagesNav-page-${i} ${isActive}`}\n key={`page_${i}`}\n role=\"tab\"\n aria-selected={i === (activePage || 1)}\n >\n {pageText}\n {' '}\n {i}\n \n )\n ];\n }\n\n this.pages = [...pages];\n return pages;\n }\n\n render() {\n const { pageCount, activePage, styleJSON } = this.props;\n const brightColor = !isUndefined(styleJSON) && isBrightColor(styleJSON['pageBg-colorEnd'] || styleJSON['@clrBg'], 0.8); // cardform background or classic form background\n const pagesBlock = this.state.isWaitingReorderConfirmation ? this.state.pages : this.renderPages(pageCount, activePage);\n\n let reorderConfirm = null;\n if (this.state.isWaitingReorderConfirmation) {\n reorderConfirm = (\n \n \n \n \n );\n }\n let showThanksButton = true;\n if (Array.isArray(this.hideOnFooter) && this.hideOnFooter.indexOf('thankYouPageButton') !== -1) {\n showThanksButton = false;\n }\n const scrollToTopButton = !this.props.isMobile && this.props.isScrollToTopVisible ? (\n \n \n {t('Go to top')}\n \n ) : null;\n\n return (\n
    \n \n \n \n {pagesBlock}\n \n
    \n {null && reorderConfirm}\n
    \n {showThanksButton && (\n this.onLinkClicked(e, `/${global.__BASE_ROUTE_PATH}/${this.props.formID}/settings/thankyou`)}\n >\n {t('Thank You Page')}\n \n )}\n \n {`+ ${t('Add New Page')}`}\n \n
    \n \n {scrollToTopButton}\n \n );\n }\n}\n\nFooter.propTypes = {\n formID: PropTypes.string,\n pageCount: PropTypes.number,\n activePage: PropTypes.number,\n questions: PropTypes.arrayOf(PropTypes.shape()),\n actions: PropTypes.shape({\n updateSelectedQuestion: PropTypes.func,\n updateRightPanelMode: PropTypes.func,\n addNewQuestion: PropTypes.func,\n displayActiveFormPage: PropTypes.func,\n setActiveFormPage: PropTypes.func,\n rightPanelToggle: PropTypes.func,\n updateMultipleFormQuestions: PropTypes.func,\n }),\n isMobile: PropTypes.bool,\n isScrollToTopVisible: PropTypes.bool,\n currentLocation: PropTypes.string\n};\n\nexport default withRouter(Footer);\n","import React from 'react';\nimport { node, string } from 'prop-types';\nimport classNames from 'classnames';\nimport '../../styles/settingsPanel.scss';\n\nconst SettingsPanelWrapper = ({\n listClasses, listWrapperClasses, children\n}) => {\n return (\n
    \n
      \n {children}\n
    \n
    \n );\n};\n\nSettingsPanelWrapper.propTypes = {\n listClasses: string,\n listWrapperClasses: string,\n children: node\n};\n\nSettingsPanelWrapper.defaultProps = {\n listClasses: null,\n listWrapperClasses: null,\n children: null\n};\n\nexport default SettingsPanelWrapper;\n","import React from 'react';\nimport { node } from 'prop-types';\n\nconst SettingsPanelListItem = ({\n children, ...props\n}) => {\n return (\n
  • \n {children}\n
  • \n );\n};\n\nSettingsPanelListItem.propTypes = {\n children: node\n};\n\nSettingsPanelListItem.defaultProps = {\n children: null\n};\n\nexport default SettingsPanelListItem;\n","import React from 'react';\nimport { bool, elementType, string } from 'prop-types';\nimport { Badge, Indicator } from '@jotforminc/magnet';\nimport { IconExclamation } from '@jotforminc/svg-icons';\nimport classNames from 'classnames';\n\nconst SettingsPanelListNavigation = ({\n badgeText, customBadgeText, badgeType, badgeClass, indicatorClass, description, hasError, icon: Icon, label, listNavigationClasses, showMsLaunchBadge, BadgeComponent, subLabel, ...props\n}) => {\n return (\n \n \n \n {badgeText !== null && ()}\n \n \n \n \n {label}\n {subLabel && (\n \n {subLabel}\n \n )}\n \n {badgeText !== null && (\n <>\n {badgeText}\n \n )}\n {\n (showMsLaunchBadge && customBadgeText) && (\n \n {customBadgeText}\n \n )\n }\n \n \n {description}\n \n \n {hasError && }\n
    \n );\n};\n\nSettingsPanelListNavigation.propTypes = {\n badgeText: string,\n badgeType: string,\n badgeClass: string,\n indicatorClass: string,\n description: string.isRequired,\n hasError: bool,\n icon: elementType.isRequired,\n label: string.isRequired,\n listNavigationClasses: string,\n showMsLaunchBadge: bool,\n customBadgeText: string,\n subLabel: string,\n BadgeComponent: elementType\n};\n\nSettingsPanelListNavigation.defaultProps = {\n badgeText: null,\n badgeType: 'secondary',\n badgeClass: '',\n indicatorClass: '',\n hasError: false,\n listNavigationClasses: null,\n showMsLaunchBadge: false,\n customBadgeText: null,\n subLabel: null,\n BadgeComponent: Badge\n};\n\nexport default SettingsPanelListNavigation;\n","import PropTypes from 'prop-types';\nimport React from 'react';\nimport { NavLink, withRouter } from 'react-router-dom';\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport filter from 'lodash/filter';\nimport { ABTestManager } from '@jotforminc/abtest-manager';\nimport Tracking from '@jotforminc/tracking';\nimport { t } from '@jotforminc/translation';\nimport { isEnterprise } from '@jotforminc/enterprise-utils';\nimport { a11yListNavigation, handleCustomNavigation } from '@jotforminc/utils';\nimport { Button } from '@jotforminc/magnet';\nimport {\n IconLinkDiagonal,\n IconAnglesSelectorSlashHorizontal,\n IconUsersFilled,\n IconEnvelopeClosedFilled,\n IconBarsProgressFilled,\n IconDocumentPdfFilled,\n IconLayersFilled,\n IconAiFilled\n} from '@jotforminc/svg-icons';\nimport { SettingsPanelListItem, SettingsPanelListNavigation, SettingsPanelWrapper } from '@jotforminc/panel-components';\nimport { PlatformNewBadge } from '@jotforminc/builder-components';\nimport classNames from 'classnames';\n\nimport * as actions from '../actions';\nimport { readCookie, logJotFormEvents } from '../libs/Utils';\n\nimport FormCopilotLogo from '../assets/icons/form-copilot-logo.svg';\n\nlet LinkObjects = [\n {\n key: 'publish-link',\n text: 'Quick Share',\n linkTo: 'link',\n desc: 'Direct form link and social share',\n Icon: IconLinkDiagonal,\n builderType: ['form', 'card'],\n },\n {\n key: 'form-copilot',\n text: 'AI FORM COPILOT',\n linkTo: 'formCopilot',\n desc: 'Create AI-Powered assistant',\n Icon: FormCopilotLogo,\n builderType: ['form', 'card'],\n badgeText: 'NEW',\n badgeType: 'primary',\n hideOnPDFImporter: true,\n hideOnWorkflow: true\n },\n {\n key: 'ai-form-agents',\n text: 'AI Form Agents',\n linkTo: 'agents',\n desc: 'Turn your forms into conversations.',\n Icon: IconAiFilled,\n builderType: ['form', 'card'],\n badgeText: 'NEW',\n badgeType: 'primary',\n hideOnPDFImporter: true,\n hideOnWorkflow: true\n },\n {\n key: 'publish-embed',\n text: 'Embed',\n linkTo: 'embed',\n desc: 'Various web page embed options',\n Icon: IconAnglesSelectorSlashHorizontal,\n builderType: ['form', 'card']\n },\n {\n key: 'publish-assign',\n text: 'Assign Form',\n linkTo: 'assign',\n desc: 'Assign your forms to others',\n Icon: IconUsersFilled,\n builderType: ['form', 'card']\n },\n {\n key: 'publish-email',\n text: 'Email',\n linkTo: 'email',\n desc: 'Reminders and instant sharing',\n Icon: IconEnvelopeClosedFilled,\n builderType: ['form', 'card'],\n },\n {\n key: 'publish-prefill',\n text: 'Prefill',\n linkTo: 'prefill',\n desc: 'Pre-populate your forms',\n Icon: IconBarsProgressFilled,\n builderType: ['form', 'card'],\n hideOnWorkflow: true\n },\n {\n key: 'publish-pdf',\n text: 'PDF',\n linkTo: 'pdf',\n desc: 'Download fillable PDF',\n Icon: IconDocumentPdfFilled,\n builderType: ['form', 'card'],\n hideOnPDFImporter: true,\n hideOnWorkflow: true,\n // Don't show on users coming from common share infra.\n hideForCSI: true\n },\n {\n key: 'publish-platforms',\n text: 'Platforms',\n linkTo: 'platforms',\n desc: 'Third-party publish options',\n Icon: IconLayersFilled,\n builderType: ['form', 'card'],\n badgeComponent: PlatformNewBadge,\n badgeText: 'NEW',\n indicatorClass: 'platform-new-indicator'\n },\n];\n\nclass PublishPanel extends React.Component {\n constructor(props) {\n super(props);\n if (global && global.JOTFORM_ENV !== 'DEVELOPMENT') {\n LinkObjects = LinkObjects.filter(a => a.developmentOnly !== true);\n }\n if (global.JOTFORM_ENV !== 'ENTERPRISE' && props.accountType !== 'ADMIN') {\n LinkObjects = LinkObjects.filter(a => a.adminOnly !== true);\n }\n this.handleOpenInNewTabClick = this.handleOpenInNewTabClick.bind(this);\n this.onLinkClicked = this.onLinkClicked.bind(this);\n\n this.state = {\n isAgentTestVariant: false,\n isFormCopilotTestVariant: false\n };\n }\n\n componentDidMount() {\n const isAdmin = ['ADMIN', 'SUPPORT'].indexOf(this.props.user?.account_type?.name) > -1 && !isEnterprise();\n const { user: { formCopilotNewSignUp = '', formCopilotExistingUsers = '' } } = this.props;\n\n if (window.location.href.includes('formCopilot') || formCopilotNewSignUp === '28181' || formCopilotExistingUsers === '28192' || formCopilotExistingUsers === '28571' || isAdmin) {\n if (formCopilotExistingUsers === '28571' || window.location.href.includes('formAssistant=1')) {\n const formCopilotObj = LinkObjects.find(obj => obj.text === 'AI FORM COPILOT');\n formCopilotObj.text = 'AI FORM ASSISTANT';\n formCopilotObj.desc = 'Create AI-Powered helper';\n }\n\n if (!isAdmin) {\n window.formCopilotEnabled = true;\n this.setState({\n isFormCopilotTestVariant: true,\n isAgentTestVariant: false\n });\n return true;\n }\n this.setState({\n isAgentTestVariant: true,\n isFormCopilotTestVariant: true\n });\n }\n if (!this.props.ui.isPDFImporter && !this.props.ui.isInsideWorkflowBuilder) {\n const { user } = this.props;\n const isNewUser = user?.created_at > '2024-07-09 18:00:00';\n const abTestManager = new ABTestManager({\n isTestEnabled: true,\n testName: isNewUser ? 'aiAgentNewUserAB' : 'aiAgentExistingUserAB',\n urlParam: 'aiAgentEnabled',\n controlVariantCode: isNewUser ? '26431' : '26411',\n testVariantCode: isNewUser ? '26441' : '26421',\n cacheVariantCodeAtLocalStorage: true,\n user,\n customUserChecks: {\n isNotAdmin: user?.account_type?.name !== 'ADMIN',\n isNotEnterprise: !isEnterprise(),\n isNotHIPAA: user?.isHIPAA !== '1' && this.props.formProperties?.isHIPAA !== '1',\n isNotEU: user?.euOnly !== '1' && this.props.formProperties?.isEUForm !== '1',\n isNotAIBuilder: user?.aiFormBuilderIncrementalUpdateTest !== '1',\n isNotMixedListingBeta: user?.mixedListingBetaUser !== '1'\n }\n });\n abTestManager\n .isTestVariant()\n .then(isTestVariant => {\n if (isTestVariant) {\n window.AIAgentABTestManager = abTestManager.registerABTestAction;\n abTestManager.registerABTestAction({ target: 'aiAgentPublishBanner', action: 'seen' });\n this.setState({ isAgentTestVariant: true });\n } else if (window.isAIAgentAllowed === true || user?.allowAIAgentFormFiller) {\n this.setState({ isAgentTestVariant: true });\n }\n });\n }\n }\n\n componentWillUnmount() {\n if (this.state.isAgentTestVariant && Tracking.FSisInitialized()) {\n Tracking.shutdown();\n }\n }\n\n onLinkClicked(e, route) {\n e.preventDefault();\n\n if (global.dontUseNavigationForMobileApp) {\n if (typeof global.sendMessageToJFMobile === 'function') {\n global.sendMessageToJFMobile({ type: 'show_pricing_modal' });\n }\n return;\n }\n\n if (global.showBaaModalForMobileApp) {\n if (typeof global.sendMessageToJFMobile === 'function') {\n global.sendMessageToJFMobile({ type: 'show_baa_modal' });\n }\n return;\n }\n\n if (route.indexOf('publish/pdf') > -1) {\n logJotFormEvents('fillable-pdf', {\n actor: this.props.userName,\n action: 'Click',\n target: `PDF Panel - Builder - ${this.props.formID}`,\n }, this.props.userAccountType);\n }\n const _stageScroller = global.document.querySelector('.stageScroller');\n if (_stageScroller) {\n _stageScroller.scrollTop = 0;\n }\n\n this.props.history.push(route);\n\n // discoverabilityTracking\n const { user: { username, accountType } } = this.props;\n const linkName = route.split('/').slice(-1).pop();\n logJotFormEvents('discoverabilityTracking', {\n actor: username,\n action: 'click',\n target: `publish-${linkName}`\n }, accountType);\n }\n\n getActiveClass(o) {\n const { leftSelection } = this.props.ui;\n if (this.props.ui.device !== 'isMobile') {\n const activeTab = {\n link: o.linkTo === leftSelection ? 'active' : '',\n embed: o.linkTo === leftSelection ? 'active' : '',\n assign: o.linkTo === leftSelection ? 'active' : '',\n email: o.linkTo === leftSelection ? 'active' : '',\n pdf: o.linkTo === leftSelection ? 'active' : '',\n platforms: o.linkTo === leftSelection ? 'active' : '',\n prefill: o.linkTo === leftSelection ? 'active' : '',\n agents: o.linkTo === leftSelection ? 'active' : '',\n formCopilot: o.linkTo === leftSelection ? 'active' : ''\n };\n\n if (\n o.linkTo === 'pdf'\n && leftSelection === 'default'\n && readCookie('came_from_fillable_pdf') === this.props.formID\n ) {\n return 'active';\n } if (\n o.linkTo === 'link'\n && leftSelection === 'default'\n && readCookie('came_from_fillable_pdf') !== this.props.formID\n ) {\n return 'active';\n }\n\n return activeTab[o.linkTo];\n }\n return '';\n }\n\n handleOpenInNewTabClick() {\n const { userName, userAccountType, displaySignupPrompt } = this.props;\n if (userAccountType === 'GUEST') {\n const target = 'mobile-open-in-new-tab-button';\n logJotFormEvents('enforceSignUpOnPublish', { actor: userName, action: 'clicked', target });\n if (displaySignupPrompt) {\n return displaySignupPrompt(true, t('Please sign up to start collecting data.'));\n }\n }\n handleCustomNavigation(this.props.formURL, '_blank', true);\n }\n\n onKeyDown = e => {\n a11yListNavigation(e, (nextEvent, nextElement) => this.onLinkClicked(nextEvent, nextElement?.dataset?.route), 'li > a');\n };\n\n render() {\n const {\n ui: {\n builderType,\n isPDFImporter,\n isInsideWorkflowBuilder,\n device,\n isComingFromJotFormMobile\n },\n formURL\n } = this.props;\n const links = filter(LinkObjects, link => {\n if (link.linkTo === 'agents' && !this.state.isAgentTestVariant) return false;\n if (link.linkTo === 'formCopilot' && !this.state.isFormCopilotTestVariant) return false;\n if (link.hideOnEnterprise && isEnterprise()) return false;\n if (link.hideOnPDFImporter && isPDFImporter) return false;\n if (link.hideOnWorkflow && isInsideWorkflowBuilder) return false;\n if (link.hideForCSI && global.csiCollaborator) return false;\n if (link.builderType.indexOf(builderType) > -1) return true;\n return false;\n });\n const searchParam = global.location && global.location.search;\n\n return (\n <>\n \n {device === 'isMobile' && (\n
  • \n
    \n
    \n
    \n {formURL}\n
    \n
    \n
    \n \n {isComingFromJotFormMobile ? t('Preview Form') : t('Open form in new tab')}\n \n
  • \n )}\n {\n links.map(({ ...link }) => (\n \n this.onLinkClicked(e, `/${global.__BASE_ROUTE_PATH}/${this.props.formID}/publish/${link.linkTo}${searchParam ? searchParam : ''}`)}\n tabIndex={this.getActiveClass(link)?.indexOf('active') > -1 ? '0' : '-1'}\n onKeyDown={this.onKeyDown}\n data-route={`/${global.__BASE_ROUTE_PATH}/${this.props.formID}/publish/${link.linkTo}`}\n >\n \n \n \n ))\n }\n
    \n \n );\n }\n}\n\nPublishPanel.propTypes = {\n formID: PropTypes.string,\n userName: PropTypes.string,\n userAccountType: PropTypes.string,\n displaySignupPrompt: PropTypes.func,\n ui: PropTypes.shape({\n device: PropTypes.string,\n leftSelection: PropTypes.string,\n builderType: PropTypes.string,\n isPDFImporter: PropTypes.bool\n }),\n user: PropTypes.shape()\n};\n\nfunction mapDispatchToProps(dispatch) {\n return {\n actions: bindActionCreators(actions, dispatch)\n };\n}\n\nfunction mapStateToProps(state) {\n return {\n ui: state.ui,\n accountType: state.user ? state.user.accountType : 'GUEST',\n user: state.user,\n formProperties: state.formProperties\n };\n}\n\nexport default connect(mapStateToProps, mapDispatchToProps)(withRouter(PublishPanel));\n","import React, { createContext, useContext } from 'react';\nimport {\n bool, func, node, oneOf, string\n} from 'prop-types';\nimport classNames from 'classnames';\nimport { Flex } from '@jotforminc/magnet';\nimport { IconChevronLeft, IconXmark } from '@jotforminc/svg-icons';\n\nconst NewPanelContext = createContext();\n\nconst Panel = ({\n backButton, backButtonId, backButtonLabel, panelHeaderBadge, children, className, closeButtonLabel,\n colorStyle, focus, panelBackClick = f => f, panelCloseClick = f => f, position, panelHeaderSubElement, theme, title, ...props\n}) => {\n const buttonClasses = 'w-9 h-9 flex justify-center items-center color-white radius-full bg-transparent hover:bg-gray-700 cursor-pointer border-0 duration-300';\n\n return (\n \n \n \n \n

    \n {title}\n

    \n {panelHeaderBadge && panelHeaderBadge}\n {backButton && (\n \n \n \n )}\n \n \n \n \n {panelHeaderSubElement &&
    {panelHeaderSubElement}
    }\n \n \n {children}\n \n \n \n );\n};\n\nPanel.propTypes = {\n backButton: bool,\n backButtonLabel: string,\n backButtonId: string,\n panelHeaderBadge: node,\n children: node,\n className: string,\n closeButtonLabel: string,\n colorStyle: oneOf(['approvals', 'apps', 'forms', 'pages', 'pdf', 'pdf-import', 'sign']),\n focus: bool,\n panelBackClick: func,\n panelCloseClick: func,\n position: oneOf(['left', 'right']),\n panelHeaderSubElement: node,\n theme: oneOf(['dark', 'light']),\n title: string\n};\n\nPanel.defaultProps = {\n backButton: false,\n backButtonId: null,\n backButtonLabel: 'Back',\n panelHeaderBadge: null,\n children: null,\n className: null,\n closeButtonLabel: 'Close Panel',\n colorStyle: 'forms',\n focus: false,\n panelBackClick: null,\n panelCloseClick: null,\n position: 'left',\n panelHeaderSubElement: null,\n theme: 'dark',\n title: 'Panel'\n};\n\nexport default Panel;\nexport const useNewPanelContext = () => useContext(NewPanelContext);\n","import React from 'react';\nimport { node, string } from 'prop-types';\nimport classNames from 'classnames';\nimport { useNewPanelContext } from '../Panel/Panel';\n\nconst FieldCategory = ({\n className, title, ...props\n}) => {\n const {\n theme\n } = useNewPanelContext();\n return (\n \n {title}\n \n );\n};\n\nFieldCategory.propTypes = {\n children: node,\n className: string,\n title: string\n};\n\nFieldCategory.defaultProps = {\n children: null,\n className: null,\n title: null\n};\n\nexport default FieldCategory;\n","import React from 'react';\nimport { func, string } from 'prop-types';\nimport classNames from 'classnames';\nimport { InputText } from '@jotforminc/magnet';\nimport { IconMagnifyingGlass, IconXmark } from '@jotforminc/svg-icons';\n\nconst PanelSearch = ({\n className, clearText, clearButtonClick = f => f, ...props\n}) => {\n return (\n
    \n \n
    \n );\n};\n\nPanelSearch.propTypes = {\n className: string,\n clearButtonClick: func,\n clearText: string\n};\n\nPanelSearch.defaultProps = {\n className: null,\n clearButtonClick: null,\n clearText: null\n};\n\nexport default PanelSearch;\n","import React from 'react';\nimport { node, string } from 'prop-types';\nimport classNames from 'classnames';\nimport '../../styles/panel.scss';\nimport { useNewPanelContext } from './Panel';\n\nconst PanelTabs = ({\n children, className, ...props\n}) => {\n const {\n theme\n } = useNewPanelContext();\n return (\n \n {children}\n \n );\n};\n\nPanelTabs.propTypes = {\n children: node,\n className: string\n};\n\nPanelTabs.defaultProps = {\n children: null,\n className: null\n};\n\nexport default PanelTabs;\n","import { cva } from 'class-variance-authority';\n\nconst panelTabIteDefaultClasses = 'newPanel-tabItem flex justify-center items-center pt-1 px-2 border-b-4 bg-transparent text-uppercase cursor-pointer duration-300 text-sm';\n\n// Classes\nexport const panelTabItemCVA = cva(panelTabIteDefaultClasses, {\n variants: {\n activeTab: {\n true: 'color-white',\n false: 'border-b-transparent'\n },\n compact: {\n false: 'w-full'\n }\n },\n compoundVariants: [\n {\n activeTab: true,\n theme: 'dark',\n className: 'color-white'\n },\n {\n activeTab: false,\n theme: 'dark',\n className: 'color-gray-100 hover:color-white'\n },\n {\n colorStyle: 'forms',\n activeTab: false,\n className: 'hover:border-b-forms-default'\n },\n {\n colorStyle: 'forms',\n activeTab: true,\n className: 'border-b-forms-default'\n },\n {\n colorStyle: 'approvals',\n activeTab: false,\n className: 'hover:border-b-approvals-default'\n },\n {\n colorStyle: 'approvals',\n activeTab: true,\n className: 'border-b-approvals-default'\n },\n {\n colorStyle: 'apps',\n activeTab: false,\n className: 'hover:border-b-apps-default'\n },\n {\n colorStyle: 'apps',\n activeTab: true,\n className: 'border-b-apps-default'\n },\n {\n colorStyle: 'pages',\n activeTab: false,\n className: 'hover:border-b-pages-default'\n },\n {\n colorStyle: 'pages',\n activeTab: true,\n className: 'border-b-pages-default'\n },\n {\n colorStyle: 'pdf',\n activeTab: false,\n className: 'hover:border-b-pdf-default'\n },\n {\n colorStyle: 'pdf',\n activeTab: true,\n className: 'border-b-pdf-default'\n },\n {\n colorStyle: 'pdf-import',\n activeTab: false,\n className: 'hover:border-b-blue-500'\n },\n {\n colorStyle: 'pdf-import',\n activeTab: true,\n className: 'border-b-blue-500'\n },\n {\n colorStyle: 'sign',\n activeTab: false,\n className: 'hover:border-b-sign-default'\n },\n {\n colorStyle: 'sign',\n activeTab: true,\n className: 'border-b-sign-default'\n }\n ]\n});\n","import React from 'react';\nimport { bool, node, string } from 'prop-types';\nimport { cx } from 'class-variance-authority';\nimport { panelTabItemCVA } from './panelTabs.cva';\nimport { useNewPanelContext } from './Panel';\n\nconst PanelToggleButton = ({\n activeTab, children, className, compact, ...props\n}) => {\n const {\n colorStyle, theme\n } = useNewPanelContext();\n const panelTabItemClasses = cx(panelTabItemCVA({\n activeTab, colorStyle, compact, theme\n }), className);\n return (\n \n {children}\n \n );\n};\n\nPanelToggleButton.propTypes = {\n activeTab: bool,\n children: node,\n className: string,\n compact: bool\n};\n\nPanelToggleButton.defaultProps = {\n activeTab: false,\n children: null,\n className: null,\n compact: false\n};\n\nexport default PanelToggleButton;\n","import React from 'react';\nimport {\n bool, func, node, string\n} from 'prop-types';\nimport classNames from 'classnames';\n\nconst PanelContent = ({\n children, className, noScroll, onScroll = f => f, ...props\n}) => {\n return (\n \n {children}\n \n );\n};\n\nPanelContent.propTypes = {\n children: node,\n className: string,\n noScroll: bool,\n onScroll: func\n};\n\nPanelContent.defaultProps = {\n children: null,\n className: null,\n noScroll: false,\n onScroll: null\n};\n\nexport default PanelContent;\n","import React from 'react';\nimport classNames from 'classnames';\nimport { connect } from 'react-redux';\n\nimport { t } from '@jotforminc/translation';\nimport { LIMIT_LEVELS } from '../../constants/limitDefaults';\n\nconst LimitationBadge = ({\n questions,\n ui: { limitLevel }\n}) => {\n if (!limitLevel) {\n return null;\n }\n\n const fieldPerForm = global.fieldPerFormLimitOfFormOwner;\n const badgeClass = classNames('limitation-badge shrink-0', {\n 'badge-warning': limitLevel === LIMIT_LEVELS.WARNING,\n 'badge-danger': limitLevel === LIMIT_LEVELS.DANGER,\n });\n\n const limitCount = fieldPerForm - questions.length;\n\n return (\n \n {limitLevel !== LIMIT_LEVELS.NORMAL && (\n \n \n \n \n \n \n \n )}\n {t('{limitCount} left').replace('{limitCount}', limitCount)}\n \n );\n};\n\nfunction mapStateToProps(state) {\n return {\n ui: state.ui,\n questions: state.questions,\n user: state.user\n };\n}\n\nexport default connect(mapStateToProps)(LimitationBadge);\n","import React from 'react';\nimport classnames from 'classnames';\nimport { connect } from 'react-redux';\nimport { t, translationRenderer } from '@jotforminc/translation';\nimport { IconChevronDown } from '@jotforminc/svg-icons';\nimport { bindActionCreators } from 'redux';\nimport * as actions from '../../actions';\nimport { LIMIT_LEVELS } from '../../constants/limitDefaults';\n\nconst LimitationProgress = ({\n questions,\n ui: { limitLevel, showDetails },\n user: { isFormOwner },\n form: { id: formId },\n actions: { setShowDetails }\n}) => {\n if (!limitLevel) {\n return null;\n }\n\n const fieldPerForm = global.fieldPerFormLimitOfFormOwner;\n const progressClass = classnames('limitation-progress-bar-inner', {\n 'limitation-progress-bar-success': limitLevel === LIMIT_LEVELS.NORMAL,\n 'limitation-progress-bar-warning': limitLevel === LIMIT_LEVELS.WARNING,\n 'limitation-progress-bar-danger': limitLevel === LIMIT_LEVELS.DANGER,\n });\n\n const limitPercent = (100 * (questions.length > fieldPerForm ? fieldPerForm : questions.length)) / fieldPerForm;\n const limitCount = fieldPerForm - questions.length;\n\n const handleToggleDetailsButton = () => {\n setShowDetails(!showDetails);\n };\n\n const limitMessageText = isFormOwner ? (\n translationRenderer('[1[Upgrade your plan]] to increase your limit.')({\n renderer1: text => (\n \n {text}\n \n )\n })\n ) : (\n translationRenderer('[1[Contact the form owner]] to increase your limit.')({\n renderer1: text => (\n \n \n {text}\n \n \n )\n })\n );\n\n return (\n <>\n
    \n
    \n
    \n
    \n
    \n {questions.length}\n /\n {fieldPerForm}\n
    \n
    \n {\n showDetails && (\n
    \n {\n limitLevel === LIMIT_LEVELS.DANGER\n ? { t('You have reached your limits!') }\n : { t('You can add {limitCount} more form elements.').replace('{limitCount}', limitCount) }\n }\n { limitMessageText }\n
    \n )\n }\n
    \n {t(showDetails ? 'Close details' : 'View details')}\n \n
    \n \n );\n};\n\nfunction mapStateToProps(state) {\n return {\n ui: state.ui,\n questions: state.questions,\n user: state.user,\n form: state.form\n };\n}\n\nfunction mapDispatchToProps(dispatch) {\n return {\n actions: bindActionCreators(actions, dispatch)\n };\n}\n\nexport default connect(mapStateToProps, mapDispatchToProps)(LimitationProgress);\n","import { cva } from 'class-variance-authority';\n\nconst fieldItemDefaultClasses = 'newPanel-fieldItem relative flex items-center group duration-300 ease-in-out';\nconst fieldIconDefaultClasses = 'w-14 h-14';\nconst fieldLabelDefaultClasses = 'newPanel-fieldItemLabel relative flex grow-1 h-14';\nconst fieldTitleDefaultClasses = 'flex items-center px-4 mr-auto break-word';\nconst fieldBadgeDefaultClasses = 'newPanel-fieldItemBadge flex items-center text-right shrink-0';\nconst fieldNotificationDefaultClasses = 'absolute max-w-full -left-full group-hover:left-2.5 flex items-center gap-1.5 px-2.5 py-2 text-xs border-sm duration-300 ease-in-out';\n\n// Classes\nexport const fieldItemCVA = cva(fieldItemDefaultClasses, {\n variants: {\n colorStyle: {\n forms: 'hover:bg-forms-default',\n apps: 'hover:bg-apps-default',\n approvals: 'hover:bg-approvals-default',\n pdf: 'hover:bg-pdf-default',\n 'pdf-import': 'hover:bg-blue-500',\n sign: 'hover:bg-sign-default',\n pages: 'hover:bg-pages-default'\n },\n theme: {\n dark: 'bg-gray-500 color-white'\n }\n },\n compoundVariants: [\n {\n isInUse: false,\n isPassive: false,\n className: 'cursor-move'\n },\n {\n isInUse: false,\n isPassive: true,\n className: 'cursor-not-allowed'\n },\n {\n isInUse: true,\n isPassive: true,\n className: 'cursor-auto'\n }\n ]\n});\n\nexport const fieldIconWrapperCVA = cva(fieldIconDefaultClasses, {\n variants: {\n iconType: {\n icon: 'newPanel-iconWrapper',\n image: 'newPanel-imageWrapper',\n logo: 'newPanel-logoWrapper bg-white'\n }\n },\n compoundVariants: [\n {\n iconType: ['icon', 'image'],\n className: 'duration-300 ease-in-out'\n },\n {\n theme: 'dark',\n iconType: ['icon', 'image'],\n className: 'bg-gray-600'\n },\n {\n theme: 'dark',\n iconType: 'logo',\n className: 'bg-white'\n },\n {\n colorStyle: 'forms',\n iconType: ['icon', 'image'],\n className: 'group-hover:bg-forms-light'\n },\n {\n colorStyle: 'apps',\n iconType: ['icon', 'image'],\n className: 'group-hover:bg-apps-light'\n },\n {\n colorStyle: 'approvals',\n iconType: ['icon', 'image'],\n className: 'group-hover:bg-approvals-light'\n },\n {\n colorStyle: 'pdf',\n iconType: ['icon', 'image'],\n className: 'group-hover:bg-pdf-light'\n },\n {\n colorStyle: 'pdf-import',\n iconType: ['icon', 'image'],\n className: 'group-hover:bg-blue-600'\n },\n {\n colorStyle: 'sign',\n iconType: ['icon', 'image'],\n className: 'group-hover:bg-sign-light'\n },\n {\n colorStyle: 'pages',\n iconType: ['icon', 'image'],\n className: 'group-hover:bg-pages-dark'\n },\n {\n isInUse: true,\n isPassive: true,\n className: 'pointer-events-none'\n },\n {\n isInUse: false,\n isPassive: true,\n className: 'opacity-50'\n }\n ]\n});\n\nexport const fieldBadgeCVA = cva(fieldBadgeDefaultClasses, {\n variants: {\n compact: {\n true: 'space-x-1',\n false: 'space-x-2'\n }\n },\n compoundVariants: [\n {\n isInUse: false,\n compact: true,\n className: 'pr-2'\n },\n {\n isInUse: false,\n compact: false,\n className: 'pr-3'\n }\n ]\n});\n\nexport const fieldLabelCVA = cva(fieldLabelDefaultClasses, {\n variants: {\n },\n compoundVariants: [\n {\n isInUse: false,\n isPassive: true,\n className: 'opacity-50'\n }\n ]\n});\n\nexport const fieldTitleCVA = cva(fieldTitleDefaultClasses, {\n variants: {\n },\n compoundVariants: [\n {\n isInUse: true,\n isPassive: true,\n className: 'pointer-events-none'\n }\n ]\n});\n\nexport const fieldNotificationCVA = cva(fieldNotificationDefaultClasses, {\n variants: {\n theme: {\n dark: 'bg-gray-500 color-gray-50'\n }\n }\n});\n","import React from 'react';\nimport {\n bool, node, oneOf, string\n} from 'prop-types';\nimport { Badge, Flex } from '@jotforminc/magnet';\nimport { IconExclamationTriangleFilled } from '@jotforminc/svg-icons';\nimport { cx } from 'class-variance-authority';\nimport {\n fieldBadgeCVA, fieldIconWrapperCVA, fieldItemCVA, fieldLabelCVA, fieldNotificationCVA, fieldTitleCVA\n} from './fieldItem.cva';\nimport { useNewPanelContext } from '../Panel/Panel';\n\nconst FieldItem = ({\n badgeText, badgeStyle, badgeInUseText, className, endElement, hasError, icon, iconType, iconWrapperClasses, isInUse, isPassive, label, notificationElement, ...props\n}) => {\n const {\n colorStyle, theme\n } = useNewPanelContext();\n const compact = (badgeText !== null && badgeInUseText !== null && endElement !== null) && true;\n const badgeSize = compact ? 'small' : 'medium';\n const fieldItemClasses = cx(fieldItemCVA({\n colorStyle, iconType, isInUse, isPassive, theme\n }), className);\n const fieldIconWrapperClasses = cx(fieldIconWrapperCVA({\n colorStyle, iconType, isInUse, isPassive, theme\n }), iconWrapperClasses);\n const fieldLabelClasses = cx(fieldLabelCVA({ isInUse, isPassive }));\n const fieldTitleClasses = cx(fieldTitleCVA({ isInUse, isPassive }));\n const fieldBadgeClasses = cx(fieldBadgeCVA({ compact, isInUse, isPassive }));\n const fieldNotificationClasses = cx(fieldNotificationCVA({ isInUse, isPassive, theme }));\n\n return (\n <>\n \n \n {iconType === 'image' ? (\n \n ) : icon}\n \n
    \n {label}\n {(badgeText !== null || badgeInUseText !== null || endElement !== null) && (\n \n {badgeText && {badgeText}}\n {badgeInUseText && {badgeInUseText}}\n {endElement && endElement}\n \n )}\n
    \n {notificationElement && (\n \n \n {notificationElement}\n \n )}\n \n \n );\n};\n\nFieldItem.propTypes = {\n badgeInUseText: string,\n badgeStyle: string,\n badgeText: string,\n className: string,\n description: string.isRequired,\n endElement: node,\n hasError: bool,\n icon: node.isRequired,\n iconType: oneOf(['icon', 'image', 'logo']),\n iconWrapperClasses: string,\n isInUse: bool,\n isPassive: bool,\n label: string.isRequired,\n listNavigationClasses: string,\n notificationElement: node,\n customBadgeText: string\n};\n\nFieldItem.defaultProps = {\n badgeInUseText: null,\n badgeStyle: null,\n badgeText: null,\n className: null,\n endElement: null,\n iconType: 'icon',\n iconWrapperClasses: null,\n isInUse: false,\n isPassive: false,\n hasError: false,\n listNavigationClasses: null,\n notificationElement: null,\n customBadgeText: null\n};\n\nexport default FieldItem;\n","import PropTypes from 'prop-types';\nimport React, { Component } from 'react';\nimport { connect } from 'react-redux';\nimport { bindActionCreators } from 'redux';\nimport unescape from 'lodash/unescape';\nimport isUndefined from 'lodash/isUndefined';\nimport scrollIntoView from 'scroll-into-view';\nimport { PaymentActions } from '@jotforminc/builder-components';\nimport { t } from '@jotforminc/translation';\nimport {\n IconWandMagicFilled, IconArrowsSwitchHorizontal, IconTrashFilled, IconEllipsisVertical, IconInfoCircle, IconStarFilled\n} from '@jotforminc/svg-icons';\nimport { a11yListNavigation, a11yClickHandler } from '@jotforminc/utils';\nimport { FieldItem } from '@jotforminc/panel-components';\nimport classNames from 'classnames';\nimport PaymentTypes from '../constants/payment_types';\nimport { LIMIT_LEVELS } from '../constants/limitDefaults';\nimport * as actions from '../actions';\n\nclass FieldsPanelItem extends Component {\n constructor(props) {\n super(props);\n this.getPaymentQuestion = this.getPaymentQuestion.bind(this);\n this.handlePaymentSettingsOnClick = this.handlePaymentSettingsOnClick.bind(this);\n this.handleSwitchToAnotherGatewayOnClick = this.handleSwitchToAnotherGatewayOnClick.bind(this);\n this.handleRemoveIntegrationOnClick = this.handleRemoveIntegrationOnClick.bind(this);\n }\n\n getPaymentQuestion() {\n const paymentQuestion = this.props.questions.find(q => {\n return PaymentTypes.indexOf(q.type) >= 0;\n });\n\n return paymentQuestion;\n }\n\n handlePaymentSettingsOnClick() {\n const { qid, type, isPaymentStoreInBasicFields } = this.getPaymentQuestion();\n const {\n actions: {\n updateRightPanelMode,\n isReusableConnectionEnabled,\n rightPanelToggle,\n updateSelectedQuestion,\n openPaymentWizard\n }\n } = this.props;\n\n if (isReusableConnectionEnabled && isReusableConnectionEnabled()) {\n updateSelectedQuestion(qid);\n updateRightPanelMode('paymentproperties');\n rightPanelToggle(true);\n return;\n }\n\n updateSelectedQuestion(qid);\n openPaymentWizard('', '');\n\n if (!isUndefined(isPaymentStoreInBasicFields) && (isPaymentStoreInBasicFields === true || isPaymentStoreInBasicFields === '1')) {\n try {\n setTimeout(() => {\n scrollIntoView(global.document.querySelector('li.form-line.isSelected'), { speed: 300 });\n PaymentActions.setAddPaymentButtonClickedFlag(true);\n PaymentActions.changeMode(type.replace('control', 'gateway'));\n }, 0);\n } catch (err) {\n // Nothing\n }\n } else {\n try {\n setTimeout(() => {\n scrollIntoView(global.document.querySelector('li.form-line.isSelected'), { speed: 300 });\n });\n } catch (e) {\n // Nothing.\n }\n }\n }\n\n handleSwitchToAnotherGatewayOnClick(e) {\n e.stopPropagation();\n this.props.actions.setSwitchAnotherGateway(true);\n }\n\n handleRemoveIntegrationOnClick(e) {\n e.stopPropagation();\n const { qid } = this.getPaymentQuestion();\n this.props.actions.deleteFormQuestion(qid, undefined, true);\n this.props.actions.addNewQuestion({ type: 'control_payment', isPaymentStoreInBasicFieldsRemoveAction: true });\n }\n\n handleItemClicked = () => {\n const {\n isPassive, ui, isInUse, onClick\n } = this.props;\n\n if ((isPassive || (ui.limitLevel === LIMIT_LEVELS.DANGER)) && !isInUse) {\n return;\n }\n onClick();\n };\n\n handleNavKeyEvent = event => {\n a11yClickHandler(event, this.handleItemClicked);\n a11yListNavigation(event);\n };\n\n renderPaymentEditElement(isPaymentEditActive, isPaymentStoreInBasicFields) {\n return (\n <>\n \n \n \n {isPaymentEditActive && (\n
      \n
    • \n \n {t('Payment settings')}\n
    • \n
    • \n \n {t('Switch to another gateway')}\n
    • \n {isPaymentStoreInBasicFields && (\n
    • \n \n {t('Remove Integration')}\n
    • \n )}\n
    \n )}\n \n );\n }\n\n renderWidgetEndElement() {\n return (\n <>\n { e.stopPropagation(); this.props.widgetProps.onDisplayInfo(this.props.widgetProps.widgetId); }}\n >\n \n \n {\n e.stopPropagation();\n this.props.actions.favoriteWidgets(this.props.widgetProps.widgetId, !this.props.widgetProps.isFaved);\n }}\n >\n \n \n \n );\n }\n\n render() {\n const fieldName = unescape(this.props.name);\n const captchaTooltip = this.props.isPassive && this.props.type === 'control_captcha';\n const cls = (this.props.isPassive || (this.props.ui.limitLevel === LIMIT_LEVELS.DANGER) ? 'field-item isPassive' : 'field-item') + (this.props.isInUse ? ' isInUse u-tooltipTrigger' : '');\n const paymentQuestion = this.props.questions.find(q => {\n return PaymentTypes.indexOf(q.type) >= 0;\n });\n const isPaymentStoreInBasicFields = !isUndefined(paymentQuestion) && (paymentQuestion.isPaymentStoreInBasicFields === true || paymentQuestion.isPaymentStoreInBasicFields === '1');\n const isPaymentTypesEqual = (!isUndefined(paymentQuestion) && paymentQuestion.paymentType && this.props.paymentType) && paymentQuestion.paymentType === this.props.paymentType;\n const showInUseMarkerForPayments = isPaymentTypesEqual && this.props.isPassive && isPaymentStoreInBasicFields && this.props.ui.fieldPanelActiveTab !== 'payments';\n const isHighlighted = this.props.highlighted;\n const isBeta = this.props.isBeta;\n const isReusableConnection = this.props?.actions?.isReusableConnectionEnabled?.();\n let endElement = null;\n\n if (this.props.isInUse && !isReusableConnection) {\n endElement = this.renderPaymentEditElement(this.props.isPaymentEditActive, isPaymentStoreInBasicFields);\n }\n\n if (this.props.isWidget) {\n endElement = this.renderWidgetEndElement();\n }\n\n const isPassive = typeof this.props.isPassive !== 'undefined' || this.props.isPassive !== false;\n\n let iconType = null;\n let icon = null;\n let badgeText = null;\n let badgeStyle = null;\n\n if (this.props.iconImg) {\n iconType = 'image';\n icon = this.props.iconImg;\n }\n\n if (this.props.logoSvg) {\n iconType = 'logo';\n icon = this.props.logoSvg;\n }\n\n if (this.props.iconNew) {\n iconType = 'icon';\n icon = this.props.iconNew;\n }\n\n if (!isPassive && isBeta) {\n badgeStyle = 'warning';\n badgeText = t('beta');\n }\n\n if (isHighlighted || this.props.isNewGateway) {\n badgeStyle = 'success';\n badgeText = t('NEW');\n }\n\n if (this.props.isDeprecated) {\n badgeStyle = 'error';\n badgeText = t('DEPRECATED');\n }\n\n return (\n // you should add isHidden prop as true to packages/apps/form-builder/src/constants/Fields.js to related gateway\n // to not render a gateway if it's deprecated\n !this.props.isHidden // shows removed gateways too, if including deprecated gateway in form\n && (\n \n \n \n )\n );\n }\n}\n\nFieldsPanelItem.propTypes = {\n name: PropTypes.string,\n ui: PropTypes.object,\n onClick: PropTypes.func,\n iconImg: PropTypes.string,\n iconNew: PropTypes.node,\n isPassive: PropTypes.bool,\n type: PropTypes.string,\n isWidget: PropTypes.bool,\n isInUse: PropTypes.bool,\n isPaymentEditActive: PropTypes.bool,\n showPassiveWarningText: PropTypes.bool,\n passiveWarningText: PropTypes.string,\n putId: PropTypes.bool, // Put id to dom element\n widgetProps: PropTypes.shape({\n widgetId: PropTypes.string,\n onDisplayInfo: PropTypes.func,\n isFaved: PropTypes.bool\n }),\n fieldIndex: PropTypes.number,\n paymentType: PropTypes.string\n};\n\nfunction mapDispatchToProps(dispatch) {\n return {\n actions: bindActionCreators(actions, dispatch)\n };\n}\n\nfunction mapStateToProps(state) {\n return {\n questions: state.questions,\n ui: state.ui\n };\n}\n\n/* eslint-disable */\nexport default connect(mapStateToProps, mapDispatchToProps)(FieldsPanelItem);\n","/* eslint-disable max-lines */\n/* eslint-disable complexity */\nimport PropTypes from 'prop-types';\nimport React, { Component } from 'react';\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport { isEnterprise } from '@jotforminc/enterprise-utils';\nimport { PaymentActions, JFSortable as ReactSortable } from '@jotforminc/builder-components';\nimport { GatewayRequestModal } from '@jotforminc/payment-gateways';\nimport {\n FieldCategory, Panel, PanelContent, PanelSearch, PanelTabItem, PanelTabs\n} from '@jotforminc/panel-components';\nimport isEmpty from 'lodash/isEmpty';\nimport isUndefined from 'lodash/isUndefined';\nimport debounce from 'lodash/debounce';\nimport filter from 'lodash/filter';\nimport isPlainObject from 'lodash/isPlainObject';\nimport scrollIntoView from 'scroll-into-view';\nimport Fuse from 'fuse.js';\nimport { t } from '@jotforminc/translation';\nimport { IconMagnifyingGlass, IconPlus } from '@jotforminc/svg-icons';\nimport { a11yListNavigation } from '@jotforminc/utils';\nimport LimitationBadge from './Limitation/Badge';\nimport LimitationProgress from './Limitation/Progress';\nimport FieldsPanelItem from './FieldsPanelItem';\nimport * as actions from '../actions';\nimport { FormFields, PaymentCurrencies } from '../constants/Fields';\nimport { getPaymentFieldsFilitered } from './SwitchAnotherGateway/Utils';\nimport PaymentTypes from '../constants/payment_types';\nimport getDragTarget from '../libs/get_drag_target';\nimport PaymentDataCollector from '../libs/paymentDataCollector';\nimport * as Utils from '../libs/Utils';\nimport { IGNORED_WIDGETS } from '../constants/cardFormFields';\nimport { sanitizeCategoryFields } from './pdfImporter/helpers';\nimport { getTimezoneOffset } from '../libs/DateTimeHelper';\n\nconst mobileResponsiveWidgetId = '5391144b1072cca44100002e';\n\nclass FieldsPanel extends Component {\n constructor(props) {\n super(props);\n this.setFilterText = this.setFilterText.bind(this);\n this.clearFilterText = this.clearFilterText.bind(this);\n this.filterWidgetAction = debounce(this.props.actions.filterWidgets, 200, { leading: true, trailing: true });\n this.filterWidgets = this.filterWidgets.bind(this);\n this.filterPayments = this.filterPayments.bind(this);\n // this.handleItemClick = debounce(this.handleItemClick, 500, { leading: true });\n this.handleDrop = this.handleDrop.bind(this);\n this.handleSortableChange = this.handleSortableChange.bind(this);\n this.handleAddNewQuestion = this.handleAddNewQuestion.bind(this);\n this.handleFieldsPanelDragStart = this.handleFieldsPanelDragStart.bind(this);\n this.handleScroll = this.handleScroll.bind(this);\n this.onWidgetFaved = this.onWidgetFaved.bind(this);\n this.onDisplayInfo = this.onDisplayInfo.bind(this);\n this.sortWidgets = this.sortWidgets.bind(this);\n this.renderSearchField = this.renderSearchField.bind(this);\n this.togglePaymentEditOnClick = this.togglePaymentEditOnClick.bind(this);\n this.handleWindowClick = this.handleWindowClick.bind(this);\n this.logPaymentTabActions = this.logPaymentTabActions.bind(this);\n this.logPaymentSearch = debounce(this.logPaymentTabActions, 1000, { leading: false });\n this.getPaymentQuestion = this.getPaymentQuestion.bind(this);\n const defaultVisibleWidgetCount = parseInt(global.innerHeight / 55, 10) || 30;\n // Enterprise customizations\n this.isEnterprise = isEnterprise();\n this.customizedConfigs = this.isEnterprise && typeof global.CUSTOMIZED_CONFIGS === 'object' && global.CUSTOMIZED_CONFIGS;\n this.hideUnmapplePDFImporterFields = this.props.ui.isPDFImporter && this.customizedConfigs && this.customizedConfigs.HIDE_UNMAPPABLE_PDF_IMPORTER_FIELDS === true;\n this.fieldsTabVisibilityCheck = this.fieldsTabVisibilityCheck.bind(this);\n this.filterWidgetsFromList = this.customizedConfigs && this.customizedConfigs.FILTER_WIDGETS;\n\n this.state = {\n filterText: this.props.ui.widgetFilterText,\n filterPaymentText: this.props.ui.paymentFilterText,\n widgetCount: this.props.widgets.length,\n currentVisibleWidgets: defaultVisibleWidgetCount,\n defaultVisibleWidgetCount,\n widgetIncrementCount: 20,\n widgets: this.sortWidgets(this.props.widgets),\n isPaymentEditActive: false,\n isPaymentEditTopCentered: false,\n showRequestGatewayModal: false\n };\n this.fieldsPanelRef = React.createRef(null);\n }\n\n componentDidMount() {\n global.window.document.addEventListener('click', this.handleWindowClick, false);\n }\n\n UNSAFE_componentWillReceiveProps(nextProps, nextState) {\n if (nextProps.ui.fieldPanelActiveTab === 'widgets' && this.props.ui.fieldPanelActiveTab !== 'widgets') {\n this.setState({ widgets: this.sortWidgets(this.props.widgets) });\n }\n if (this.state.widgetCount !== nextProps.widgets.length) {\n this.setState({ widgetCount: nextProps.widgets.length });\n }\n const defaultVisibleWidgetCount = parseInt(global.innerHeight / 55, 10) || 30;\n if (defaultVisibleWidgetCount !== nextState.defaultVisibleWidgetCount && nextProps.ui.fieldPanelActiveTab !== 'widgets') {\n this.setState({ defaultVisibleWidgetCount, currentVisibleWidgets: defaultVisibleWidgetCount });\n }\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n if (!this.props.ui.isTranslationLoaded && nextProps.ui.isTranslationLoaded) {\n return true;\n }\n // Render just if necessary props (tab or filter) is changed\n const { defaultVisibleWidgetCount, filterText, currentVisibleWidgets } = this.state;\n const { fieldPanelActiveTab } = this.props.ui;\n if (fieldPanelActiveTab !== nextProps.ui.fieldPanelActiveTab\n || nextState.defaultVisibleWidgetCount !== defaultVisibleWidgetCount\n || nextState.filterText !== filterText\n || nextState.currentVisibleWidgets !== currentVisibleWidgets) {\n return true;\n }\n // Don't render if left panel is closed.\n if (nextProps.ui.isLeftPanelOpen === false && this.props.ui.isLeftPanelOpen === false) {\n return false;\n }\n return true;\n }\n\n componentWillUnmount() {\n global.window.document.removeEventListener('click', this.handleWindowClick);\n }\n\n componentDidUpdate(prevProps) {\n if (!prevProps.ui.isLeftPanelOpen && this.props.ui.isLeftPanelOpen) {\n if (this.fieldsPanelRef.current) {\n setTimeout(() => {\n this.fieldsPanelRef.current?.focus();\n }, 500);\n }\n }\n }\n\n onWidgetFaved(widgetId, isFaved) {\n this.props.actions.favoriteWidgets(widgetId, isFaved);\n }\n\n onDisplayInfo(widgetId) {\n this.props.actions.displayWidgetInfo(widgetId);\n }\n\n setFilterText(fieldType, text) {\n if (fieldType === 'widgets') {\n this.filterWidgetAction(text);\n this.setState({ filterText: text, currentVisibleWidgets: this.state.defaultVisibleWidgetCount });\n } else {\n this.setState({ filterPaymentText: text });\n }\n }\n\n getPaymentFields(doesPaymentStoreInBasicExist = false) {\n const { questions } = this.props;\n const isWepay = !!(questions.find(q => q.type === 'control_wepay'));\n\n let paymentFields = getPaymentFieldsFilitered(\n this.props.user.accountType,\n this.props.userCountry,\n this.props.user.username,\n { isWepay }\n );\n if (this.isEnterprise && this.props.restrictedFormFields) {\n paymentFields = this.filterRestrictedFormFields(paymentFields);\n }\n\n if (doesPaymentStoreInBasicExist) {\n paymentFields = this.filterPaymentsIfProductListExist(paymentFields, 'control_payment');\n }\n\n return paymentFields;\n }\n\n getConvertedEmojiProps() {\n return ({\n emojiCount: '5',\n inputType: 'Emoji Slider',\n type: 'control_matrix'\n });\n }\n\n handleWindowClick(event) {\n if (\n this.state.isPaymentEditActive === true\n && !event.target.parentElement.classList.contains('isInUse')\n && !event.target.classList.contains('newPanel-fieldItemLabel')\n && !event.target.classList.contains('newPanel-fieldItemBadge')\n ) {\n this.setState({ isPaymentEditActive: false });\n }\n }\n\n togglePaymentEditOnClick(isPaymentEditTopCentered) {\n this.setState(\n {\n isPaymentEditActive: !this.state.isPaymentEditActive,\n isPaymentEditTopCentered: isPaymentEditTopCentered\n }\n );\n }\n\n sortWidgets(widgets) {\n const favedWidgets = [];\n const unfavedWidgets = [];\n const userFavedWidgets = this.props.user.favoriteWidgets ? this.props.user.favoriteWidgets.split(',') : [];\n\n // ////////// push mobile responsiveness to bottom ////////////////////\n const mobileResponsiveIndex = unfavedWidgets.indexOf(mobileResponsiveWidgetId);\n\n if (mobileResponsiveIndex > -1) {\n const widget = unfavedWidgets.splice(mobileResponsiveIndex, 1);\n unfavedWidgets.push(widget);\n }\n // ////////////////////////////////////////////////////////////////////\n\n widgets.forEach(p => {\n if (userFavedWidgets.indexOf(p.client_id) > -1) {\n favedWidgets.push(p);\n } else {\n unfavedWidgets.push(p);\n }\n });\n\n return [...favedWidgets, ...unfavedWidgets];\n }\n\n clearFilterText(type) {\n if (type === 'payments') {\n this.setState({ filterPaymentText: '' });\n } else {\n this.filterWidgetAction('');\n this.setState({ filterText: '' });\n }\n }\n\n filterPayments(payments, filterText) {\n let list;\n if (filterText) {\n if (!this.paymentFuse) {\n const opts = {\n threshold: 0.2,\n tokenize: true,\n matchAllTokens: true,\n keys: ['name', 'APMs']\n };\n\n // filter translated purchase order, as shown in the list\n const _payments = payments.reduce((prev, cur) => {\n const isPurchaseOrder = cur.type === 'control_payment' && cur.name === 'Purchase Order';\n if (isPurchaseOrder) {\n const _cur = { ...cur };\n _cur.name = t(cur.name);\n return [...prev, _cur];\n }\n return [...prev, cur];\n }, []);\n\n this.paymentFuse = new Fuse(_payments, opts);\n }\n\n list = this.paymentFuse.search(filterText).map(f => f.item);\n if (filterText.trim().length >= 3 && list && list.length <= 0) {\n this.logPaymentSearch('paymentTypeSearch', null, filterText);\n }\n } else {\n list = payments;\n }\n\n return list;\n }\n\n filterWidgets(widgets, filterText) {\n let list;\n if (filterText) {\n if (!this.fuse) {\n const opts = {\n threshold: 0.2,\n tokenize: true,\n matchAllTokens: true,\n keys: [{\n name: 'name',\n weight: 0.3\n }, {\n name: 'details.shortDescription',\n weight: 0.3\n }, {\n name: 'details.description',\n weight: 0.4\n }]\n };\n\n const translatedWidgets = widgets.map(w => {\n return {\n ...w,\n name: t(w.name),\n details: {\n ...w.details,\n shortDescription: t(w.details.shortDescription)\n }\n };\n });\n\n this.fuse = new Fuse(translatedWidgets, opts);\n }\n\n list = this.fuse.search(filterText).map(f => f.item);\n } else {\n list = widgets;\n }\n\n if (this.props.ui.builderType === 'card') {\n list = list.filter(l => IGNORED_WIDGETS.indexOf(l._id) < 0);\n }\n\n if (Array.isArray(this.filterWidgetsFromList) && this.filterWidgetsFromList.length > 0) {\n list = list.filter(l => this.filterWidgetsFromList.indexOf(l._id) < 0);\n }\n return list.slice(0, this.state.currentVisibleWidgets);\n }\n\n handleScroll(e) {\n // If we are at bottom, lets load more widget\n if (e.target.scrollTop >= (e.target.scrollHeight - e.target.offsetHeight) - 10) {\n const { widgetCount, currentVisibleWidgets } = this.state;\n if (widgetCount > currentVisibleWidgets) {\n this.setState({ currentVisibleWidgets: this.state.currentVisibleWidgets + this.state.widgetIncrementCount });\n }\n }\n }\n\n isPaymentQuestion(type) { return PaymentTypes.includes(type); }\n\n handleItemClick(field) {\n const { type, isSmart = false } = field;\n const { actions: { addNewQuestion } } = this.props;\n\n if (type === 'control_emojislider') {\n const convertedProps = this.getConvertedEmojiProps();\n addNewQuestion(convertedProps);\n } else {\n const questionProps = {\n type, ...(isSmart && { isSmart: true }), ...(type === 'control_payment' && { isProductListItem: true })\n };\n addNewQuestion(questionProps);\n }\n\n if (type === 'control_payment') {\n this.logPaymentTabActions('paymentFieldClick', 'Product List', null);\n }\n }\n\n handleDrop(type) {\n this.props.actions.newElementDropped(type);\n }\n\n handleSortableChange(order, sortable, evt) {\n const toPage = evt.to.className.match(/page_(\\d+)/)[1];\n const { dataset } = evt.item;\n const {\n fieldtype, widgetid, fieldname, apm, paymenttype\n } = dataset;\n let index = evt.newIndex;\n const { builderType } = this.props.ui;\n const isCardForm = builderType === 'card';\n\n if (!isCardForm && index === 2 && this.props.questions.length === 2 && this.props.ui.questionAddCounter < 1) {\n // If we have empty page indicator, this line fixes placing question after submit button.\n index = 1;\n } else if (isCardForm && this.props.questions.length === 0 && index !== 0) {\n index = 0;\n }\n\n this.handleAddNewQuestion(toPage, fieldtype, index, widgetid, fieldname, apm, paymenttype);\n\n if (\n fieldname === 'Product List'\n && fieldtype === 'control_payment'\n && paymenttype === 'product'\n && !apm\n ) {\n this.logPaymentTabActions('paymentFieldDrag', fieldname, null);\n }\n }\n\n handleFieldsPanelDragStart(event) {\n const isMobile = (this.props.ui.device === 'isMobile' || this.props.ui.device === 'isTablet');\n // this.props.actions.updateSelectedQuestion(undefined);\n if (isMobile) {\n this.props.actions.leftPanelToggle(false);\n\n try {\n setTimeout(() => {\n // damn chrome 56 bugs\n // This is a hacky solution for quick fix, I will re-factor here. //Berkay\n // Get last drag shadow if there is multiple\n const elems = global.document.getElementsByClassName('sortable-drag');\n const sortableDrag = elems && elems.length !== 0 ? elems[elems.length - 1] : undefined;\n if (sortableDrag) {\n sortableDrag.style.marginLeft = `${event.target.offsetWidth}px`;\n }\n });\n } catch (e) {\n // Nothing.\n }\n }\n }\n\n getPaymentQuestion() { return this.props.questions.find(q => PaymentTypes.indexOf(q.type) >= 0); }\n\n handleAddNewQuestion(toPage, type, newIndex, widgetID, fieldName, apm, paymenttype) {\n let question = Utils.extendQuestionWithDefaults({\n type: type,\n builderLabel: fieldName,\n }, this.props.defaultTheme, this.props.user);\n\n if (this.isPaymentQuestion(type)) {\n if (apm) {\n question.nameAPM = apm;\n }\n if (paymenttype) {\n question.paymentType = paymenttype;\n }\n }\n if (type === 'control_emojislider') {\n question = this.getConvertedEmojiProps();\n }\n if (type === 'control_appointment') {\n const timezone = this.props.user.time_zone || 'America/New_York';\n question.timezone = `${timezone} ${getTimezoneOffset(timezone)}`;\n question.startWeekOn = 'Sunday';\n question.timeFormat = 'AM/PM';\n }\n\n if (\n type === 'control_address'\n && this.customizedConfigs\n && typeof this.customizedConfigs.CUSTOM_FIELD_SETTINGS === 'object'\n ) {\n const { address: { states: defaultState = '' } = {} } = this.customizedConfigs.CUSTOM_FIELD_SETTINGS;\n if (defaultState) {\n question.states = defaultState;\n }\n }\n this.props.actions.newElementDropped(question, widgetID, toPage, newIndex);\n if (this.props.ui.builderType === 'card') {\n const newQuestionDOM = global.document.querySelector('.form-line.isBrandNew');\n if (newQuestionDOM) {\n scrollIntoView(newQuestionDOM, {\n time: 0,\n align: {\n top: 0.25,\n left: -0.25\n }\n });\n }\n }\n }\n\n handlePaymentFieldClick(isProductListWithAPM, doesPaymentExist, field, paymentQuestionInUse, paymentStoreInfo = {}) {\n if (!doesPaymentExist && !isProductListWithAPM) {\n this.setState({ isPaymentEditActive: false });\n\n let qProps = { type: field.type, builderLabel: field.name };\n if (field.nameAPM) { qProps = { ...qProps, nameAPM: field.nameAPM }; }\n\n if (isEmpty(paymentStoreInfo)) {\n this.props.actions.addNewQuestion(qProps);\n } else {\n this.props.actions.deleteFormQuestion(paymentStoreInfo.temp_qid, undefined, true);\n this.props.actions.addNewQuestion(qProps);\n try {\n setTimeout(function(fieldType) { // eslint-disable-line\n PaymentActions.setAddPaymentButtonClickedFlag(true);\n PaymentActions.changeMode(fieldType.replace('control', 'gateway'));\n }.bind(this, field.type), 0);\n } catch (err) {\n // Nothing\n }\n }\n this.logPaymentTabActions('paymentFieldClick', field.name, null);\n } else if (paymentQuestionInUse) {\n const fieldScrollerBottom = global.document.querySelector('.newPanel-content')\n .getBoundingClientRect().bottom;\n const { bottom: selectedItemBottom, height: selectedItemHeight } = global.document.querySelector('.fieldSection-list li.isInUse')\n .getBoundingClientRect();\n const bottomOffset = 10;\n\n // Payment dropdown has no sufficient space to expand\n if ((fieldScrollerBottom + bottomOffset) - (selectedItemBottom + (selectedItemHeight * 2)) < 0) {\n this.togglePaymentEditOnClick(true);\n } else {\n this.togglePaymentEditOnClick(false);\n }\n }\n }\n\n // Calculate item's direction, up or down;\n handleSortableMove(sortable, evt) {\n const target = getDragTarget(evt.target); // Gets drag target (questionWrapperElement)\n const isFirstTarget = target && target.getAttribute('data-order') == 1; // eslint-disable-line\n const actualHeightOffset = isFirstTarget && global.buildermode === 'card' ? 25 : 0;\n const { top, bottom } = target.getBoundingClientRect();\n const actualHeight = bottom - top - actualHeightOffset;\n const sensitivity = actualHeight * 0.65; // px (65% of height)\n const BEFORE = 1;\n const AFTER = -1;\n const retVal = ((evt.clientY - actualHeight) + sensitivity >= top) ? BEFORE : AFTER;\n // Check item position with sensivity and place before or after of target.\n return retVal;\n }\n\n get currentFormPercentage() {\n if (global.isMixedTestUser) {\n return 0; // Always open for test users\n }\n try {\n return ((parseInt(this.props.formID, 10) % 10) + 1) * 10;\n } catch (e) {\n return 100;\n }\n }\n\n // Filter fields according to current forms' type (card or legacy)\n filterFields(builderMode, isPDFImporter) {\n const parameter = builderMode === 'card' ? 'cardElement' : 'legacyElement';\n // Check if category is completely hidden for builder type.\n const filteredCategories = filter(FormFields, field => field[parameter] !== false);\n const filteredCategoriesWithoutPaymentFields = filteredCategories.map(field => ({ ...field, categoryFields: field.categoryFields.filter(fieldElement => fieldElement.type !== 'control_payment') }));\n const isAdmin = this.props.user.accountType === 'ADMIN' || this.props.user.accountType === 'SUPPORT';\n const host = global && global.location ? global.location.hostname : '';\n const isJotformers = host.indexOf('jotformers.com') !== -1;\n const isControlInlineTestUser = field => {\n if (field.type === 'control_inline') {\n return Utils.readCookie('pfcEnableAddingNewField');\n }\n return false;\n };\n const { serverBuilderCustomization } = this.props;\n\n const hideForEnterprise = hiddenEnterprise => !isJotformers && this.isEnterprise && hiddenEnterprise;\n const hideForFeatureFlag = isHidden => isHidden === true;\n // Filter items in category\n const newFilteredCategories = (this.isEnterprise && (serverBuilderCustomization?.paymentFeature === 'disabled')) ? filteredCategoriesWithoutPaymentFields : filteredCategories;\n const result = newFilteredCategories.map(categoryObject => {\n const current = categoryObject;\n let filteredList;\n const { currentFormPercentage } = this;\n if (!isAdmin) {\n filteredList = filter(categoryObject.categoryFields, field => field[parameter] !== false\n && (!field.adminOnly || isControlInlineTestUser(field))\n && (!field.testUsersPercentage || field.testUsersPercentage >= currentFormPercentage));\n } else {\n // eslint-disable-next-line max-len\n filteredList = filter(categoryObject.categoryFields, field => !hideForEnterprise(field.hiddenEnterprise) && !field.hiddenAdmins && field[parameter] !== false);\n }\n\n filteredList = filter(filteredList, field => !hideForFeatureFlag(field.isHidden));\n\n if (this.isEnterprise && this.props.restrictedFormFields) {\n filteredList = this.filterRestrictedFormFields(filteredList);\n }\n\n if (this.hideUnmapplePDFImporterFields) {\n filteredList = this.filterUnmappablePDFImporterFields(filteredList);\n }\n\n current.categoryFields = filteredList;\n return current;\n });\n\n if (builderMode === 'card') {\n const headType = result[0].categoryFields.find(p => p.type === 'control_head');\n if (headType) {\n headType.name = 'Section Header';\n }\n }\n\n // Remove all groups & elements which are not allowed on pdf imported mode.\n if (isPDFImporter) {\n return sanitizeCategoryFields(result, this.props.questions);\n }\n\n return result;\n }\n\n filterRestrictedFormFields(fields) {\n const { restrictedFormFields: restrictedFields } = this.props;\n if (Array.isArray(restrictedFields) && restrictedFields.length > 0) {\n return fields.filter(field => restrictedFields.indexOf(field.type) < 0);\n }\n return fields;\n }\n\n filterUnmappablePDFImporterFields(fields) {\n // Use this array for unmappable fields for now.\n // If it varies on different enterprise servers, then we will get the list from config.\n const unmappableFields = ['control_appointment', 'control_fileupload', 'control_payment', 'control_captcha', 'control_spinner', 'control_rating', 'control_scale'];\n return fields.filter(field => unmappableFields.indexOf(field.type) < 0);\n }\n\n filterPaymentsIfProductListExist(paymentFields, filtered) {\n const result = paymentFields.filter(field => field.type !== filtered || field.nameAPM);\n return result;\n }\n\n fieldsTabVisibilityCheck(tabName) {\n const { isPDFImporter } = this.props.ui;\n const { currentLocation } = this.props.ui;\n let visibilityConfig = [];\n\n if (this.isEnterprise && this.customizedConfigs && currentLocation === 'builder') {\n if (tabName === 'payments') {\n visibilityConfig = this.customizedConfigs.HIDE_PAYMENTS_TAB;\n } else if (tabName === 'widgets') {\n visibilityConfig = this.customizedConfigs.HIDE_WIDGETS_TAB;\n }\n\n if (visibilityConfig.length > 0) {\n if (visibilityConfig.indexOf('formBuilder') !== -1 && !isPDFImporter) {\n return false;\n }\n if (visibilityConfig.indexOf('PDFImporter') !== -1 && isPDFImporter) {\n return false;\n }\n }\n }\n return true;\n }\n\n logPaymentTabActions(action, addedGateway = '', currentText = '') {\n if (action) {\n const { user: { username: actor, accountType } } = this.props;\n let target = { searchText: '' };\n\n switch (action) {\n case 'paymentFieldClick':\n case 'paymentFieldDrag':\n target.searchText = (this.state && this.state.filterPaymentText) ? this.state.filterPaymentText : '';\n target.addedGateway = addedGateway;\n break;\n case 'paymentTypeSearch':\n target.searchText = currentText;\n break;\n default:\n break;\n }\n\n target = JSON.stringify(target);\n\n Utils.logJotFormEvents('leftPanelPaymentTabActions', {\n actor,\n action,\n target\n }, accountType);\n }\n }\n\n handleNavKeyEvent = event => {\n a11yListNavigation(\n event,\n (e, nextElement) => this.props.actions.handleFieldsPanelTabChange(nextElement?.dataset?.route)\n );\n };\n\n handleLeftPanelClose = () => {\n this.props.actions.leftPanelToggle(false);\n };\n\n handleLeftPanelCloseKeyDown = event => {\n const { which } = event;\n this.handleLeftPanelClose();\n if ((which === 13 || which === 32)) { // Enter/Space\n global?.document?.querySelector('.btn-add-form-logo')?.focus();\n event.preventDefault();\n }\n };\n\n renderFieldList() {\n const sortDelay = this.props.ui.deviceType === 'mouseOnly' ? 0 : 175;\n const availableFields = this.filterFields(this.props.ui.builderType, this.props.ui.isPDFImporter);\n const questionCount = this.props.questions ? this.props.questions.length : 0;\n\n return (\n <>\n {\n availableFields.map((category, ckey) => {\n return (\n \n { category.categoryFields && !category.isCategoryNameHidden && category.categoryName && category.categoryFields.length > 0\n && (\n \n )}\n {\n category.categoryFields.map((field, key) => {\n const doesCaptchaExist = this.props.questions.filter(q => {\n return q.type === 'control_captcha' && field.type === 'control_captcha';\n }).length > 0;\n const paymentQuestion = this.props.questions.find(q => {\n return PaymentTypes.indexOf(q.type) >= 0;\n });\n let isPaymentInBasic;\n if (paymentQuestion) {\n isPaymentInBasic = this.props.questions.filter(q => {\n return (paymentQuestion || q.type === 'control_payment') && field.type === 'control_payment';\n }).length > 0;\n }\n return (\n this.handleItemClick(field)}\n />\n );\n })\n }\n \n );\n })\n }\n \n );\n }\n\n requestGatewayPanel() {\n const { showRequestGatewayModal, filterPaymentText } = this.state;\n const { formID, user, user: { location } } = this.props;\n return (\n
    \n
    \n \n \n {t('No results found')}\n \n
    \n
    \n \n {t('We couldn’t find what you are looking for in our gateway list.')}\n \n this.setState({ showRequestGatewayModal: true })}\n onKeyDown={() => this.setState({ showRequestGatewayModal: true })}\n >\n \n \n {t('Request payment gateway')}\n \n
    \n
    \n {\n showRequestGatewayModal && (\n this.setState({ showRequestGatewayModal: false })}\n onCompleteRequest={() => this.setState({ showRequestGatewayModal: false, filterPaymentText: '' })}\n searchedKeyword={filterPaymentText}\n user={user}\n userLocation={location}\n modalSource='FORM'\n resourceId={formID}\n />\n )\n }\n
    \n );\n }\n\n renderPaymentFields() {\n // const isMobile = (this.props.ui.device === 'isMobile' || this.props.ui.device === 'isTablet');\n const sortDelay = this.props.ui.deviceType === 'mouseOnly' ? 0 : 100;\n const paymentStoreInfo = {};\n const paymentQuestion = this.props.questions.find(q => {\n return PaymentTypes.indexOf(q.type) >= 0;\n });\n const isProductListWithAPM = paymentQuestion && paymentQuestion.type === 'control_payment' && paymentQuestion.nameAPM;\n\n let doesPaymentExist = paymentQuestion ? true : false;\n const doesPaymentStoreInBasicExist = doesPaymentExist && !isUndefined(paymentQuestion.isPaymentStoreInBasicFields);\n const paymentQuestionType = doesPaymentExist ? paymentQuestion.type : false;\n const paymentStore = doesPaymentStoreInBasicExist && (paymentQuestion.isPaymentStoreInBasicFields === true || paymentQuestion.isPaymentStoreInBasicFields === '1');\n\n if (paymentQuestionType === 'control_payment' && paymentStore) {\n paymentStoreInfo.questionType = 'control_payment';\n paymentStoreInfo.temp_qid = paymentQuestion.qid;\n doesPaymentExist = false;\n }\n\n const { filterPaymentText } = this.state;\n let payments = this.getPaymentFields(paymentStore);\n const highlightedGateways = [];\n const highlightedGatewayTypes = [];\n\n if (paymentQuestionType === 'control_payment' && paymentStore) {\n payments = payments.filter(gateway => {\n const currencies = gateway.currencies.split(';');\n\n if (gateway.type === 'control_payu') {\n currencies.push(...gateway.currenciesPayUTR.split(';'));\n currencies.push(...gateway.currenciesPayUMoney.split(';'));\n }\n\n if (currencies.includes(paymentQuestion.currency)) {\n highlightedGateways.push(gateway);\n highlightedGatewayTypes.push(gateway.type);\n\n return false;\n }\n\n return true;\n });\n }\n\n payments = [...highlightedGateways, ...payments];\n const { serverPayments } = this.props;\n payments = isEnterprise() ? payments.filter(payment => serverPayments.includes(`${payment?.nameAPM ? `${payment.type}|apm:${payment.nameAPM}` : payment.type}`)) : payments;\n let list = this.filterPayments(payments, filterPaymentText);\n\n // Filter gateways according to currency\n if (Array.isArray(list) && list.length > 0 && paymentQuestionType === 'control_payment' && paymentStore) {\n const highlightedFilteredGateways = [];\n list = list.filter(listItem => {\n if (!listItem || typeof listItem.type === 'undefined') return false;\n if (highlightedGatewayTypes.includes(listItem.type)) highlightedFilteredGateways.push(listItem);\n return !highlightedGatewayTypes.includes(listItem.type);\n });\n list = [...highlightedFilteredGateways, ...list];\n } else if (!list) {\n list = payments;\n } else if (list.length === 0) {\n list = [];\n } else {\n list = [...list];\n }\n\n return (\n <>\n {\n this.handleSortableChange(order, sortable, evt);\n this.logPaymentTabActions('paymentFieldDrag', evt.item.dataset.fieldname, null);\n }}\n >\n {\n list.length > 0 ? list.map((field, key) => {\n if (!field || !isPlainObject(field)) { return null; }\n\n // 11-01-2023 FIX UPDATE: We're not listing PayPal Standart, Commerce Integrations so users cannot switch gateway from left panel, reverting it.\n // * Some PayPal fields duplicated with different names. Used this check for marking only the target field. *\n // const isPayPalFieldNameEquals = (field.type === 'control_paypal' || field.type === 'control_paypalcomplete')\n // ? (field.type === 'control_paypal' && field.name === 'PayPal Personal')\n // || (field.type === 'control_paypalcomplete' && field.name === 'PayPal Business')\n // : true;\n\n const sunsetPaymentGatewayLabels = ['PayPal Standard', 'PayPal Commerce', 'PayPal Pro', 'Clickbank', 'OneBip', 'First Data', 'Worldpay US']; // not to change structure we added this list for removed gateway exceptions\n const sunsetPaymentGatewayTypes = ['control_paypalexpress', 'control_dwolla', 'control_paypalpro', 'control_clickbank', 'control_onebip', 'control_firstdata', 'control_worldpayus'];\n\n let isFieldEqualsPaymentQuestionExactly = paymentQuestion && paymentQuestion.type === field.type\n && paymentQuestion.builderLabel && (paymentQuestion.builderLabel === field.name || sunsetPaymentGatewayLabels.includes(paymentQuestion.builderLabel)); // last condition for handling with APM's\n\n // Some of reason if someone creates a form from Templates/Product Order Form, the gateway was not selected in Left Panel, builderLabel comes undefined\n if (paymentQuestion && isUndefined(paymentQuestion.builderLabel) && isUndefined(isFieldEqualsPaymentQuestionExactly) && isUndefined(field.nameAPM)) {\n isFieldEqualsPaymentQuestionExactly = paymentQuestion && paymentQuestion.type === field.type;\n }\n\n // Checking removed gateways not to list on Payments tab except that already including gateways in the form\n if (paymentQuestion && sunsetPaymentGatewayTypes.indexOf(paymentQuestion.type) >= 0) {\n if (field.type === paymentQuestion.type) {\n // eslint-disable-next-line no-param-reassign\n field.isHidden = false;\n }\n }\n\n // if product list is selected, apms connected to product list will be unselected\n if (paymentQuestion && !paymentQuestion.nameAPM && paymentQuestion.type === 'control_payment') {\n if (field.type === 'control_payment' && field.nameAPM) {\n isFieldEqualsPaymentQuestionExactly = false;\n }\n }\n\n // if a gateway is selected from gatewayselectioneditor, apm with product list will be selected in the left panel\n if (paymentQuestion && paymentQuestion.nameAPM) {\n if (field.nameAPM && paymentQuestion.nameAPM === field.nameAPM) {\n isFieldEqualsPaymentQuestionExactly = true;\n }\n }\n\n const isNotHighlightedGateway = (highlightedGatewayTypes.length > 0 && field.type !== 'control_payment')\n ? !highlightedGatewayTypes.includes(field.type) : false;\n\n // activate 3-dots menu for selected gateway-apm\n let paymentQuestionInUse = null;\n if ((paymentQuestion && paymentQuestion.type === field.type) || (paymentQuestion && paymentQuestion.nameAPM && paymentQuestion.nameAPM === field.nameAPM)) {\n paymentQuestionInUse = paymentQuestion;\n }\n\n return (\n {\n this.handlePaymentFieldClick(isProductListWithAPM, doesPaymentExist, field, paymentQuestionInUse, paymentStoreInfo, event);\n }}\n />\n );\n }) : (\n this.requestGatewayPanel()\n )\n }\n \n \n /* */\n );\n }\n\n renderWidgets() {\n const sortDelay = this.props.ui.deviceType === 'mouseOnly' ? 0 : 100;\n\n let { widgets } = this.state;\n if (this.props.isHIPAA) {\n // HIPAA users can only use secured widgets.\n widgets = widgets.filter(widget => {\n if (['signature', 'calculation', 'birthdate'].indexOf(widget.slug) >= 0) {\n return true;\n }\n return widget.secure && widget.secure === 'Yes';\n });\n }\n\n const filteredWidgets = this.filterWidgets(widgets, this.props.ui.widgetFilterText).map((field, key) => {\n // skip widget restricted to specific users\n if (field.users && field.users !== '') {\n const allowedUsers = field.users.split('\\n');\n if (allowedUsers.indexOf(this.props.user.username) === -1) {\n return null;\n }\n } // skip widget restricted to enterprise accounts\n const restrictedEnterprises = field.enterprise?.split(',').map(item => item.trim());\n if (field.enterprise && !restrictedEnterprises.includes(window.location.host)) { // eslint-disable-line no-undef\n if (this.isEnterprise || field.developer !== this.props.user.username) {\n return null;\n }\n }\n // control for widgets that can be added only one time\n const doesWidgetExistInForm = this.props.questions.filter(q => {\n return q.type === 'control_widget' && q.selectedField === field.client_id && field.multipleInstance === 'No';\n }).length > 0;\n // We are handling native widgets in newElementDropped action in actions/index.js now\n // const dataType = field.type === 'native' ? `control_${field.slug}` : 'control_widget';\n const dataType = 'control_widget';\n\n const addWidgetCallback = () => {\n this.props.actions.addNewWidget(field);\n };\n\n const widgetProps = {\n widgetId: field.client_id,\n onDisplayInfo: this.onDisplayInfo,\n isFaved: this.props.user.favoriteWidgets ? this.props.user.favoriteWidgets.split(',').filter(p => p).indexOf(field.client_id) > -1 : false,\n };\n\n return (\n \n );\n });\n const emptyWidgetList = (\n
    \n {t('No widgets found.')}\n
    \n );\n return (\n <\n >\n \n {filteredWidgets.length > 0 ? filteredWidgets : emptyWidgetList}\n \n \n );\n }\n\n renderSearchField() {\n const activeTab = this.props.ui.fieldPanelActiveTab;\n const { filterPaymentText, filterText } = this.state;\n const inputPlaceholder = activeTab === 'payments'\n ? t('Search payment gateways')\n : t('Search widgets');\n\n const text = activeTab === 'payments' ? filterPaymentText : filterText;\n if (activeTab !== 'payments' && activeTab !== 'widgets') {\n return;\n }\n\n return (\n this.clearFilterText(activeTab)}\n clearText={text}\n onChange={e => this.setFilterText(activeTab, e.target.value)}\n placeholder={inputPlaceholder}\n tabIndex={this.props.ui.isLeftPanelOpen ? '0' : '-1'}\n value={text ? text : ''}\n />\n );\n }\n\n render() {\n const { builderType, limitLevel } = this.props.ui;\n const { isHIPAA } = this.props;\n const hasAnySecureWidgets = this.props.widgets.some(widget => widget.secure && widget.secure === 'Yes');\n const activeTab = this.props.ui.fieldPanelActiveTab;\n\n return (\n }\n panelKeyDown={this.handleLeftPanelCloseKeyDown}\n panelHeaderSubElement={}\n tabIndex={this.props.ui.isLeftPanelOpen ? '0' : '-1'}\n title={t('Form Elements')}\n colorStyle={this.props.ui.isPDFImporter ? 'pdf-importer' : 'forms'}\n >\n {['form', 'card'].indexOf(builderType) > -1 // Show tabs just in card & legacy form builder mode\n && (\n \n {\n this.props.actions.handleFieldsPanelTabChange('formFields');\n\n // discoverabilityTracking\n const { user: { username, accountType } } = this.props;\n Utils.logJotFormEvents('discoverabilityTracking', {\n actor: username,\n action: 'click',\n target: '#fieldsNav-fields'\n }, accountType);\n }}\n role=\"tab\"\n tabIndex={this.props.ui.isLeftPanelOpen && activeTab === 'formFields' ? '0' : '-1'}\n >\n {t('Basic')}\n \n {this.fieldsTabVisibilityCheck('payments')\n && (\n {\n this.props.actions.handleFieldsPanelTabChange('payments');\n PaymentDataCollector.sendEvent('payment_tab_click');\n\n // discoverabilityTracking\n const { user: { username, accountType } } = this.props;\n Utils.logJotFormEvents('discoverabilityTracking', {\n actor: username,\n action: 'click',\n target: '#fieldsNav-payments'\n }, accountType);\n }}\n role=\"tab\"\n tabIndex={this.props.ui.isLeftPanelOpen && activeTab === 'payments' ? '0' : '-1'}\n >\n {t('Payments')}\n \n )}\n {this.fieldsTabVisibilityCheck('widgets') && (!isHIPAA || hasAnySecureWidgets)\n && (\n {\n this.props.actions.handleFieldsPanelTabChange('widgets');\n\n // discoverabilityTracking\n const { user: { username, accountType } } = this.props;\n Utils.logJotFormEvents('discoverabilityTracking', {\n actor: username,\n action: 'click',\n target: '#fieldsNav-widgets'\n }, accountType);\n }}\n role=\"tab\"\n tabIndex={this.props.ui.isLeftPanelOpen && activeTab === 'widgets' ? '0' : '-1'}\n >\n {t('Widgets')}\n \n )}\n \n )}\n {this.renderSearchField()}\n {activeTab === 'formFields' && {this.renderFieldList()}}\n {activeTab === 'payments' && {this.renderPaymentFields()}}\n {activeTab === 'widgets' && {this.renderWidgets()}}\n \n );\n }\n}\n\nFieldsPanel.propTypes = {\n actions: PropTypes.shape(),\n ui: PropTypes.shape(),\n widgets: PropTypes.arrayOf(PropTypes.shape()),\n questions: PropTypes.arrayOf(PropTypes.shape()),\n user: PropTypes.shape({\n username: PropTypes.string,\n favoriteWidgets: PropTypes.string,\n accountType: PropTypes.string,\n }),\n formID: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n isHIPAA: PropTypes.bool,\n defaultTheme: PropTypes.string,\n restrictedFormFields: PropTypes.bool,\n serverPayments: PropTypes.arrayOf(PropTypes.string),\n serverBuilderCustomization: PropTypes.shape({\n paymentFeature: PropTypes.string,\n widgetFeature: PropTypes.string\n })\n};\n\nfunction mapDispatchToProps(dispatch) {\n return {\n actions: bindActionCreators(actions, dispatch)\n };\n}\n\nfunction mapStateToProps(state) {\n return {\n ui: state.ui,\n widgets: state.widgets,\n questions: state.questions,\n user: state.user,\n userCountry: state.user && state.user.location ? (state.user.location.country_code || '') : false,\n serverPayments: state.serverPayments,\n serverBuilderCustomization: state.serverBuilderCustomization\n };\n}\n\nexport default connect(mapStateToProps, mapDispatchToProps)(FieldsPanel);\n","import PropTypes from 'prop-types';\nimport React, { Component } from 'react';\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport { t } from '@jotforminc/translation';\nimport * as actions from '../actions';\nimport Icon from './Icon';\nimport { endpoints, r } from '../libs/api';\n\nclass Feedback extends Component {\n constructor(props) {\n super(props);\n this.state = this.getInitialState();\n this.close = this.close.bind(this);\n this.gotoV3 = this.gotoV3.bind(this);\n this.getInitialState = this.getInitialState.bind(this);\n this.sendAndSwitch = this.sendAndSwitch.bind(this);\n this.feedBackContainerClick = this.feedBackContainerClick.bind(this);\n }\n\n getInitialState() {\n return {\n message: ''\n };\n }\n\n close() {\n this.props.actions.showFeedback(false);\n }\n\n sendAndSwitch() {\n if (this.state.message) {\n const postData = {\n q5_canYou5: this.state.message,\n q3_username: this.props.user.username,\n q4_formUnique: this.props.form.id,\n q7_userEmail: this.props.user.email,\n q8_browserAgent: global.navigator.userAgent\n };\n\n const jotformID = 63061781659968;\n\n r.post(`/submit/${jotformID}`, postData);\n this.gotoV3();\n }\n\n this.gotoV3();\n }\n\n gotoV3() {\n return endpoints.updateBuilderVersion(false).then(() => {\n global.location = `${global.location.protocol}//${global.location.hostname}/?formID=${this.props.form.id}`;\n }).fail(err => {\n console.log(err); // eslint-disable-line\n global.location = `${global.location.protocol}//${global.location.hostname}/?formID=${this.props.form.id}`;\n });\n }\n\n feedBackContainerClick(e) {\n if (e && e.target && e.target.classList && e.target.classList.contains('feedback-container')) {\n this.close();\n }\n }\n\n renderSwitchFeedback() {\n return (\n
    \n
    \n \n
    \n

    \n { t('Tell Us Why') }\n

    \n
    \n
    \n
    { t('Before you go please tell us why you are switching to the old version of JotForm?') }
    \n this.setState({ message: e.target.value })}\n />\n
    \n
    \n \n
    \n
    \n
    \n );\n }\n\n render() {\n let form;\n\n if (this.props.ui.showFeedback === 'feedback') {\n /* eslint-disable */\n if (this.props.ui.builderType === 'card') {\n form =