1 line
No EOL
898 KiB
Text
1 line
No EOL
898 KiB
Text
{"version":3,"sources":["serviceWorker.js","assets/svg/dw-logo.svg","assets/icons/DwLogo.js","assets/svg/dw-claim.svg","assets/icons/DwClaim.js","components/Logo/Logo.js","components/Header/DesktopBanner.js","assets/svg/dw-logo-tablet.svg","assets/svg/dw-logo-mobile.svg","context/rtlContext.js","hooks/useRtl.js","components/I18n/I18nText.js","components/Header/MobileBanner.js","hooks/useToggle.js","assets/svg/icon-user-navi.svg","assets/svg/icon-language-world-w.svg","assets/svg/tick.svg","constants/userUrl.js","constants/feedback.js","utils/mappers/langMapper.js","config.js","utils/url/url.js","utils/mappers/placementTestCourseIds.js","utils/url/urlFactory.js","hooks/useLocalStorage.js","constants/menuLanguageCodes.js","hooks/useTimeout.js","hooks/useScripts.js","hooks/useChineseSimpleTraditionalSwitch.js","components/NavMenu/LanguageSelectionButton/LanguageSelectionButton.js","state/common/apiActions.js","constants/services.js","utils/url/urlUtils.js","utils/userUtils.js","services/userService.js","state/progress/utils.js","state/progress/serverDataFilterUtils.js","state/progress/learnProgress.js","services/learnProgressService.js","state/progress/learnProgressDuck.js","state/user/userDuck.js","state/user/userSelectors.js","context/GlobalsContext.js","components/NavMenu/NavMenu.js","assets/svg/nav-cross-black-md.svg","assets/svg/nav-cross-black-lg.svg","assets/svg/nav-cross-xs.svg","assets/svg/nav-cross-lg.svg","components/IconBar/IconBar.js","components/BurgerButton/BurgerButton.js","components/Header/NavigationContainer/OnlyDesktopBrand.js","components/Header/ChineseVariantSwitch.js","components/Header/NavigationContainer/NavigationContainer.js","components/Header/Header.js","components/RichText/RichText.js","utils/imgUtils.js","hooks/useFrontendConfig.js","components/Picture/Picture.js","components/DwPicture/DwPicture.js","utils/replacers/replaceCommons.js","utils/replacers/imageReplacer.js","utils/replacers/useImagePlaceholderReplacementEffect.js","components/ContentContainer/ContentHeadline/ContentHeadline.js","components/LegalNotice/LegalNotice.js","components/Footer/Footer.js","components/commons/LoadingMessage.js","components/commons/ErrorMessage.js","components/WithGraphQLQueryHandling/WithGraphQLQueryHandling.js","hooks/useMetadata.js","components/I18n/I18nConfigLoader.js","components/GdprLayer/BrowserOnly.js","components/GdprLayer/GdprLayer.js","constants/pageTypes.js","utils/pageMetadata.js","components/Page/PageMetaData.js","hooks/useMetaTitle.js","hooks/useMetaDescription.js","hooks/useMetaKeywords.js","utils/url/feedbackHelpers.js","hooks/useValidateTicketAndLoginUser.js","hooks/useRedirectAfterLogOut.js","components/Page/PageLayout.js","hooks/useCheckSessionTimeout.js","utils/mappers/rtlLanguages.js","state/progress/learnProgressSelectors.js","assets/images/bg-dw-desktop.jpg","assets/fonts/dw-theAntiquaB-W7Bold-web/DWTheAntiquaB-W7Bold.woff","assets/fonts/dw-theAntiquaB-W7Bold-web/DWTheAntiquaB-W7Bold.woff2","assets/fonts/dw-theAntiquaB-W5Plain-web/dwtheantiquab-w5plain.woff","assets/fonts/dw-theAntiquaB-W5Plain-web/dwtheantiquab-w5plain.woff2","assets/fonts/dw-theAntiquaB-W5PlainItalic-web/DWTheAntiquaB-W5PlainItalic.woff","assets/fonts/dw-theAntiquaB-W5PlainItalic-web/DWTheAntiquaB-W5PlainItalic.woff2","pages/MainPage.js","hooks/useLocationGetter.js","hooks/useSyncLessonProgress.js","components/GoogleTagManager/GtmLoadScript.js","components/GoogleTagManager/GtmNoScriptFallback.js","hooks/useLocationQueryParam.js","components/GoogleTagManager/hooks/useStaticInfoForGtm.js","components/GoogleTagManager/TrackingUtils.js","hooks/useCourseData.js","components/GoogleTagManager/GtmDataLayer.js","components/GoogleTagManager/GtmScriptWithDataLayer.js","components/GoogleTagManager/index.js","components/Page/PageContainer.js","pages/Default404Page.js","constants/isLtrContentOnly.js","components/HeroTemplate/HeroTemplate.js","components/Course/CourseHeroImage/CourseHeroImage.js","assets/svg/toggleableArrow.svg","assets/icons/ToggleableArrowIcon.js","components/ToggleableArrow/ToggleableArrow.js","components/Course/CourseList/CourseHeader/CourseHeader.js","components/Course/CourseList/LessionItem/LessonScore.js","components/Course/Progress/ProgressResetButton.js","components/ProgressIcon/progressIconColors.js","components/ProgressIcon/ProgressIcon.js","services/certificateService.js","utils/certificateUtils.js","assets/svg/icon-course-cert-gray.svg","components/ProgressIcon/CertificateIcon.js","assets/svg/star-white.svg","assets/svg/star-gray.svg","components/ProgressIcon/ProgressIconStar.js","components/LearnProgressIcon/LearnProgressIcon.js","components/Course/CourseList/LessionItem/LessonItem.js","components/Course/CourseList/LessonList/LessonList.js","components/Course/CourseList/CourseAccordion/CourseAccordion.js","components/Course/CourseList/CourseList.js","components/Modal/DisableScrollingStyles.js","components/Modal/ModalIntegration.js","components/StandardButton/StandardButton.js","components/Modal/Modal.js","components/Modal/ResetModal.js","components/Course/Progress/CourseProgress.js","utils/learningLevelUtils.js","components/Course/CourseOverview.js","components/ImageOGMetaData/ImageOGMetaData.js","pages/CoursePage.js","utils/replacers/htmlReplacer.js","components/WithRenderDelay/WithRenderDelay.js","components/Modal/KnowledgeModal/KnowledgeModal.js","components/Modal/KnowledgeModal/Knowledge.js","utils/replacers/knowledgeReplacer.js","components/Lesson/LessonKnowledge/LessonKnowledge.js","components/Modal/KnowledgeModal/useKnowledgePlaceholderReplacementEffect.js","components/GrammarItem/GrammarItem.js","pages/GrammarPage.js","assets/images/landing/course_landing-1200x675.jpg","assets/images/landing/course_landing-992x558.jpg","assets/images/landing/course_landing-768x432.jpg","assets/images/landing/course_landing-480x270.jpg","components/MainHeroImage/MainHeroImage.js","components/Dashboard/Tiles/Tile/Tile.js","components/Dashboard/Tiles/Tile/BlankTile.js","components/Dashboard/Tiles/Tile/MoreCoursesTile.js","constants/tileColors.js","utils/htmlUtils.js","components/Dashboard/Tiles/Tiles.js","components/Dashboard/Dashboard.js","pages/DashboardPage.js","components/GrammarOverview/GrammarOverviewHeader.js","components/Accordion/AccordionItem/AccordionItem.js","constants/grammarOverviewColors.js","components/Accordion/Accordion.js","components/GrammarOverview/GrammarOverview.js","pages/GrammarOverviewPage.js","utils/url/pathAnalyser.js","components/Lesson/LessonMenu/LessonMenuItem/LessonMenuItem.js","components/Lesson/LessonMenu/LessonTitleAndBurgerButton/LessonTitle.js","components/Lesson/LessonMenu/LessonTitleAndBurgerButton/LessonBurgerButton.js","constants/lessonParts.js","utils/lessonUtils.js","components/Lesson/LessonMenu/LessonMenu.js","assets/svg/icon-hint-circle-orange.svg","components/Lesson/LessonContentDescription/LessonContentDescription.js","utils/mappers/subtitlesLabel.js","video/videoTypeMatcher.js","video/videoPlugins.js","video/audioPlugins.js","video/videojs.js","video/api.js","video/useVideoPlayerEffect.js","components/GoogleTagManager/hooks/useMediaTracking.js","components/GoogleTagManager/hooks/useAddEmbeddingsToGtm.js","components/MediaInput/MediaInputVideo/MediaInputVideo.js","components/MediaInput/MediaInputImage/MediaInputImage.js","components/MediaInput/MediaInputAudio/MediaInputAudio.js","components/Lesson/MediaInputChooser/MediaInputChooser.js","components/Lesson/LessonInformation/LessonInformation.js","components/Lesson/LessonExercise/workflow/ExerciseProgress.js","components/Lesson/LessonExercise/LessonExerciseStats/LessonExerciseStats.js","components/ContentContainer/ContentNavTitle/ContentNavTitle.js","components/Lesson/LessonExercise/LessonExerciseHeadline/LessonExerciseHeadline.js","components/Lesson/LessonExercise/LessonExerciseHiddenAudio/LessonExerciseHiddenAudio.js","components/Lesson/LessonExercise/LessonExerciseHiddenAudio/LessonExerciseSoundFailureHiddenAudio.js","components/Lesson/LessonExercise/LessonExerciseHiddenAudio/LessonExerciseSoundSuccessHiddenAudio.js","context/AudioContext.js","components/Lesson/LessonExercise/LessonExerciseTextInput/LessonExerciseTextInput.js","hooks/useAudio.js","components/Lesson/LessonExercise/LessonExerciseQuestion/QuestionTypes/LessonExerciseQuestionAudio.js","components/Lesson/LessonExercise/LessonExerciseQuestion/QuestionTypes/LessonExerciseQuestionText.js","components/Lesson/LessonExercise/LessonExerciseQuestion/QuestionTypes/LessonExerciseQuestionImage.js","components/Lesson/LessonExercise/LessonExerciseQuestion/QuestionTypes/LessonExerciseQuestionVideo.js","utils/audioUtils.js","components/Lesson/LessonExercise/LessonExerciseQuestion/QuestionTypes/questionTypes.js","components/Lesson/LessonExercise/LessonExerciseQuestion/LessonExerciseQuestion.js","components/SolveCheckButton/ButtonTemplate.js","components/SolveCheckButton/SolveButton.js","components/SolveCheckButton/CheckButton.js","components/SolveCheckButton/SolveCheckButton.js","components/Lesson/LessonExercise/ClozeExercise/clozeExerciseUtils.js","components/Lesson/LessonExercise/workflow/inquiryState.js","components/Lesson/LessonExercise/ClozeExercise/ClozePulldown.js","components/Lesson/LessonExercise/ClozeExercise/usePlaceholderReplacementEffect.js","utils/replacers/exerciseReplacer.js","components/Lesson/LessonExercise/ClozeExercise/ExerciseRichText.js","components/Lesson/LessonExercise/ClozeExercise/AnswerTypes/PulldownAnswer.js","assets/svg/icon-hint.svg","components/Lesson/LessonExercise/LessonExerciseHint/LessonExerciseHint.js","components/Lesson/LessonExercise/ClozeExercise/AnswerTypes/ContainerTextContent.js","components/Lesson/LessonExercise/utils/exerciseUtils.js","components/Lesson/LessonExercise/ClozeExercise/AnswerTypes/ChooseAnswer.js","assets/svg/keyboard.svg","components/Lesson/LessonExercise/Keyboard/KeyboardIcon.js","components/Input/TextAreaInput/TextAreaInput.js","components/Lesson/LessonExercise/Keyboard/KeyboardWrapper.js","components/Lesson/LessonExercise/ClozeExercise/ClozeInput.js","components/Lesson/LessonExercise/ClozeExercise/AnswerTypes/WritingAnswer.js","components/Lesson/LessonExercise/workflow/useInquiryHandling.js","components/Lesson/LessonExercise/ClozeExercise/ClozeExerciseRow.js","components/Lesson/LessonExercise/ClozeExercise/ClozeExercise.js","components/Lesson/LessonExercise/DictationExercise/DictationExerciseRow.js","components/Lesson/LessonExercise/DictationExercise/DictationExercise.js","constants/inquiryMediaTypes.js","components/Lesson/LessonExercise/ManyToManyExercise/ManyToManyAnswer/ManyToManyAnswer.js","components/Lesson/LessonExercise/ManyToManyExercise/ManyToManyQuestionRow/manyToManyQuestionRowReducer.js","components/Lesson/LessonExercise/ManyToManyExercise/ManyToManyQuestionRow/ManyToManyQuestionRow.js","components/Lesson/LessonExercise/ManyToManyExercise/ManyToManyExercise.js","components/Lesson/LessonExercise/LessonExerciseAnswer/answerState.js","components/Lesson/LessonExercise/LessonExerciseAnswer/LessonExerciseTextAnswer/LessonExerciseTextAnswer.js","components/Lesson/LessonExercise/LessonExerciseAnswer/LessonExerciseImageAnswer/LessonExerciseImageAnswer.js","components/Lesson/LessonExercise/LessonExerciseAnswer/ExerciseAnswer.js","hooks/useIsMountedRef.js","components/Lesson/LessonExercise/MultiSelectionExercise/MultiSelectionQuestionRow.js","components/Lesson/LessonExercise/MultiSelectionExercise/MultiSelectionExercise.js","components/Lesson/LessonExercise/RepeatExercise/SelfAssessment/SelfAssessmentAnswer.js","components/Lesson/LessonExercise/RepeatExercise/SelfAssessment/SelfAssessmentQuestion.js","components/Lesson/LessonExercise/RepeatExercise/SelfAssessment/SelfAssessment.js","components/Lesson/LessonExercise/RepeatExercise/RepeatExerciseRow.js","components/Lesson/LessonExercise/RepeatExercise/RepeatExercise.js","components/Lesson/LessonExercise/SingleSelectionExercise/SingleSelectionQuestionRow/SingleSelectionQuestionRow.js","components/Lesson/LessonExercise/SingleSelectionExercise/SingleSelectionExercise.js","components/Lesson/LessonExercise/SortingExercise/SortingExerciseRow.js","components/Lesson/LessonExercise/SortingExercise/SortingExercise.js","components/Lesson/LessonExercise/LessonExerciseItem/ExerciseLeavingPrompt.js","components/ContentContainer/ContentContainer.js","components/ContentContainer/ContentBottomLine/ContentBottomLine.js","components/ContentContainer/AccordionContainer.js","components/Manuscript/Manuscript.js","components/Lesson/LessonExercise/LessonExerciseItem/LessonExerciseItem.js","state/mode/lessonExerciseModeDuck.js","state/mode/lessonExerciseModeSelectors.js","hooks/useExerciseManager.js","components/Lesson/LessonExercise/LessonExerciseNavigation/LessonExerciseNavigation.js","hooks/useScrollToTop.js","components/Lesson/LessonVocabulary/VocabularyRow/VocabularyRow.js","components/Lesson/LessonVocabulary/LessonVocabulary.js","utils/mappers/lessonPartToTranslationCode.js","components/Lesson/LessonKnowledgeNavigation/NavigationRow/NavigationRow.js","components/Lesson/LessonKnowledgeNavigation/LessonKnowledgeNavigation.js","pages/ManuscriptPage.js","components/ContentContainer/ContentSection/ContentSection.js","components/Lesson/LessonExtras/Links/ArticleLinks.js","components/Lesson/LessonExtras/Links/AudioLinks.js","components/Lesson/LessonExtras/Links/DownloadLinks.js","components/Lesson/LessonExtras/Links/VideoLinks.js","components/Lesson/LessonExtras/LessonExtras.js","pages/LessonExtrasPage.js","components/Lesson/LessonExercise/LessonExerciseResult/ExerciseAction.js","constants/marks.js","components/Lesson/LessonExercise/LessonExerciseResult/Summary.js","components/Lesson/LessonExercise/LessonExerciseResult/LessonExerciseResult.js","components/Lesson/LessonSummary/LessonSummary.js","pages/LessonSummaryPage.js","components/Lesson/Lesson.js","pages/LessonPage.js","components/RestrictedRoute/RestrictedRoute.js","components/user/ConfirmUserRegistrationContainer.js","utils/errorClassAssigner.js","utils/validation/validationMessages.js","components/Input/Input.js","components/Select/Select.js","components/Checkbox/Checkbox.js","components/Input/BirthDateInput/BirthDateInput.js","utils/validation/validators.js","components/ReCaptcha/ReCaptcha.js","constants/countries.js","constants/userInputOptions.js","components/user/Registration.js","services/passwordService.js","utils/mappers/passwordReset.js","components/Input/NewPassword/NewPasswordInputs.js","components/user/PasswordChange.js","components/user/PasswordReset.js","components/StatusFeedback/StatusFeedback.js","components/Modal/DeleteAccountModal/DeleteAccountModal.js","components/user/UserProfile.js","components/user/SetNewPassword.js","components/PlacementTest/PlacementTest.js","pages/PlacementTestPage.js","components/VocabularyTrainer/VocabularyTrainerStart.js","components/VocabularyTrainer/VocabularyTrainerStatus.js","components/VocabularyTrainer/BubbleContainer.js","components/VocabularyTrainer/VocabularyTrainerItem.js","assets/svg/smiley-positive.svg","assets/svg/smiley-negative.svg","assets/icons/Smiley.js","components/VocabularyTrainer/VocabularyTrainerSmileys.js","hooks/useTransition.js","components/VocabularyTrainer/VocabularyTrainerExercise.js","components/Vocabulary/VocabularyQuery.js","components/VocabularyTrainer/VocabularyTrainer.js","components/PlacementResult/PlacementAndFinalTestResult.js","pages/PlacementAndFinalTestResultPage.js","components/Help/Help.js","pages/HelpPage.js","pages/LegalPage.js","components/Vocabulary/VocabularySearch/duck/vocabularySearchDuck.js","hooks/vocabularySearchHooks.js","components/Vocabulary/VocabularySearch/VocabularySearch.js","hooks/useDebounce.js","components/Vocabulary/VocabularyMoreButton/VocabularyMoreButton.js","components/Vocabulary/VocabularyItem.js","components/Vocabulary/Vocabulary.js","pages/VocabularyPage.js","components/App.js","state/rootReducers.js","state/store.js","state/middlewares/apiMiddleware.js","index.js","utils/apolloClient.js","hooks/useTranslation.js","utils/globals.js","utils/commons.js","utils/ssr.js","utils/css.js","context/I18nContext.js","components/Text/Text.js","constants/keyCodes.js","utils/jsonPath.js","utils/i18n.js"],"names":["Boolean","window","location","hostname","match","_extends","Object","assign","target","i","arguments","length","source","key","prototype","hasOwnProperty","call","apply","this","_objectWithoutProperties","excluded","sourceKeys","keys","indexOf","_objectWithoutPropertiesLoose","getOwnPropertySymbols","sourceSymbolKeys","propertyIsEnumerable","className","fillRule","d","id","SvgDwLogo","_ref","svgRef","title","titleId","props","viewBox","xmlns","ref","ForwardRef","StyledLogo","styled","SvgDwClaim","style","StyledClaimLogo","url","href","aria-label","rel","colors","DW_DARK_BLUE","resolutions","min","tablet","desktop","DW_LIGHT_BLUE","StyledDesktopBanner","max","RtlContext","createContext","useRtlContext","useContext","I18nText","translation","isA","restProps","isRtl","label","useTranslation","Text","StyledMobileBanner","LG_TRANSPARENT_WHITE_15","LG_TRANSPARENT_BLACK_075","LG_WHITE","LG_GRAY_14","dwLogoMobile","LG_GRAY_15","LG_TRANSPARENT_WHITE_25","dwLogoTablet","LG_BLUE_5","useToggle","initialState","useState","isEnabled","setEnabled","toggleOnClick","useCallback","toggleOnKeyPress","e","stroke","strokeWidth","fill","opacity","transform","SvgIconUserNavi","width","height","xmlnsXlink","undefined","SvgIconLanguageWorldW","xmlSpace","clipRule","strokeLinejoin","strokeMiterlimit","SvgTick","domainWithProtocol","isServer","origin","USER","AS_URL","AS_URL_WITH_DOMAIN","PS_URL","LOGGED_USER_RESOURCE","TICKET_PARAM_NAME","FEEDBACK_TYPES","OTHER","LOGIN","LOGIN_ERROR","LOGIN_FB","LOGOUT","SESSION_TIMEOUT","PROFILE_SERVICE_UNAVAILABLE","MISSING_USER_PROFILE","FORCED_LOGOUT","PASSWORD_CHANGED","MAIL_CHANGED","MAIL_CHANGE_REQUEST","EMAIL_ALREADY_EXISTS","REGISTERED","REGISTRATION_CONFIRMED","DELETED","INVALID_TOKEN","PASSWORD_RESET_REQUESTED","PASSWORD_RESET_SET","PASSWORD_CHANGE_WRONG_PASSWORD","PROFILE_UPDATED","PASSWORD_CHANGE","INVALID_CERTIFICATE","VOCABULARY_TRAINER_UNAVAILABLE","VOCABULARY_TRAINER_NO_VOCABULARIES","CERTIFICATE_NO_TRANSCRIPTION","MISSING_TRANSCRIPTION","USER_ALREADY_EXISTS","USER_ALREADY_CONFIRMED","TYPES_WITH_PROFILE_PAGE_AS_TARGET","COMMON_FEEDBACK_TRANSLATION_KEYS","LANG_CODES","freeze","NEUTRAL","GERMAN","ENGLISH","RUSSIAN","CHINESE","PORTUGUESE_BRAZIL","ALBANIAN","AMHARIC","ARABIC","BENGALI","BOSNIAN","BULGARIAN","DARI","FRENCH","GREEK","HAUSA","HINDI","INDONESIAN","KISWAHILI","CROATIAN","MACEDONIAN","PASHTO","PERSIAN","POLISH","PORTUGUESE_AFRICA","ROMANIAN","SERBIAN","SPANISH","TURKISH","UKRANIAN","URDU","codeToLang","invert","toLangCode","lang","toUpperCase","toLang","code","toLowerCase","config","graphQL","baseUrl","process","dw","mobileUrl","reCaptcha","siteKey","download","videoBaseUrl","audioBaseUrl","typeToUrlPrefixMap","COURSE","GRAMMAR","LESSON","PLACEMENT","FINAL","urlPrefixToTypeMap","onlySpecialCharactersRegex","RegExp","values","general","numbers","whiteSpaces","allowedSpecial","arabic","cyrillic","greek_and_coptic","chinese","devanagari","bengali","ethiopian","join","normalizeUrlName","name","replace","encodeUrlNamePart","encodeURIComponent","getVideoDownloadUrl","videoUrl","getAudioDownloadUrl","audioUrl","getDownloadUrl","staticBaseHost","downloadId","filename","getArticleUrl","articleId","getDWStructureUrl","langCode","PLACEMENT_TEST_COURSE_IDS","getPlacementTestIdForLangCode","isPlacementTestCourse","courseId","includes","PAGE_OVERVIEW","PAGE_REGISTRATION","PAGE_PROFILE","PAGE_PASSWORD_CHANGE","PAGE_PASSWORD_RESET","PAGE_VOCABULARY_TRAINER","PAGE_VOCABULARY_TRAINER_START","STATUS_FEEDBACK","PAGE_GRAMMAR","PAGE_VOCABULARY","PAGE_LEGAL","PAGE_PLACEMENT_TEST","LESSON_VOCABULARY_URL_SUFFIX","ALPHABETICAL_ORDER_URL_SUFFIX","URL_SEARCH_PARAM_TARGET_PATH","getErrorCode","errorResponse","errorCode","getPrefixedLanguageUrl","getDashboardUrl","getGrammarUrl","getVocabularyPageUrl","getPlacementDashboardUrl","getLessonExerciseUrl","languageCode","lessonId","normalizedUrlName","lessonPartId","getLessonUrl","getUserProfileUrl","getPasswordChangeUrl","getCourseUrl","normalizedUrlCourseName","normalizedUrlLessonName","getFirstGrammarUrl","lessonUrl","firstGrammarId","getVocabularyUrl","getAlphabeticalOrderUrl","getFirstRegionalStudiesUrl","firstRegionalStudiesId","getExtrasUrl","getSummaryUrl","transformUrlContentPrefix","lessonPath","type","createLinkToResultPage","isFinalTest","getHelpUrl","getLegalUrl","getVocabularyTrainerStartPage","getFeedbackUrl","getLoginPage","targetPath","callbackUrl","getLoginRedirectUrl","withDomain","urlSearchParams","getLoginUrlSearchParamsString","substring","getCasLanguageParam","getContentUrl","language","__typename","langUrlPart","nameUrlPart","typeName","slice","typeToUrlPrefix","getFooterLinkForNamedUrl","namedUrl","getDwUrlWithLang","CUSTOM_LS_EVENT_NAME","readValue","JSON","parse","globals","localStorage","getItem","useLocalStorage","storedValue","setStoredValue","useEffect","handleStorageChange","addEventListener","removeEventListener","value","setItem","stringify","dispatchEvent","Event","CHINESE_SIMP_TRANSLATION_KEY","CHINESE_TRAD_TRANSLATION_KEY","MENU_LANGUAGES","translationKey","useTimeout","callback","delay","conditional","triggers","savedCallback","useRef","current","handleId","setTimeout","clearTimeout","loadScript","Promise","resolve","reject","tag","document","createElement","async","src","appendChild","once","tongwenScripts","TRADITIONAL_CHIN_LOCAL_STORAGE_KEY","URL_GET_PARAM_NAME","URL_GET_PARAM_SIMPLIFIED","URL_GET_PARAM_TRADITIONAL","useChineseSimpleTraditionalSwitch","toggleButtonId","isChineseLangCode","scripts","isScriptsLoaded","setScriptsLoaded","isTranslatedFirstTime","setTranslatedFirstTime","scriptUrls","cb","a","querySelectorForAllScriptTags","map","scriptUrl","querySelectorAll","all","body","then","useScripts","isTraditionalChin","setIsTraditionalChin","search","useLocation","setToggleButtonTextContent","content","getElementById","textContent","cleanedSearch","chineseVersionRequestParam","URLSearchParams","get","TongWen","trans2Trad","trans2Simp","trans2Simple","trans2Traditional","isLanguageSelected","languageTranslationKey","currentLanguage","getDashBoardUrlForLanguage","dashboardBaseUrl","LanguageSelectionButton","i18n","useI18nContext","StyledLanguageSelectionButton","role","t","classnames","hidden","LG_BLUE_4","API_CALL","apiAction","method","data","onSuccess","onFailure","headersOverride","payload","BASIC_JSON_CONTENT_TYPE_HEADER","headers","buildParamRegex","paramName","getFromUrl","regexBuilder","matchArray","exec","decodeURIComponent","removeSearchParam","paramRegex","rawWiththoutParam","getTicketFromUrlParam","getSearchParam","createDateOfBirth","year","dateOfBirth","LOGOUT_SUFFIX","PROFILE_SUFFIX","PS_PREFIX","NOT_LOGGED_USER_RESOURCE","CONFIRMATION_RESOURCE","registerUser","formattedData","userData","captchaToken","sex","firstName","lastName","email","password","country","teacher","newsletter","recaptcha","contactLanguage","formatRegistrationUserData","fetch","dataType","deleteUser","catch","msg","console","error","updateUserProfile","formatUserProfileData","response","ok","json","sumScore","contentsWithScore","scoreFieldName","reduce","acc","nextContentWithScore","filterLessonFields","filterExerciseFields","filterInquiryFields","filterDataFromService","filteredLessonData","removeObjectAttributes","exerciseProgresses","filteredExerciseProgresses","filterExerciseData","exerciseProgress","filteredExerciseProgress","inquiryProgresses","filteredInquiryProgresses","filterInquiryData","inquiryProgress","sourceObject","attributesToRemoveArray","targetObject","forEach","field","scoreFragment","fragment","addLearningMetaInfo","handicap","targetHandicap","gql","getLearningMetaInfoFragment","initializeLessonLearnProgressWithDataFromServer","lessonProgresses","lessons","lessonProgress","initializeCourseLearnProgressWithDataFromServer","courseProgresses","courses","updateLessonProgressFromService","filteredLessonProgress","findExistingLesson","otherLessons","filter","lesson","cosLessonId","deleteLessonProgressById","findExistingLessonById","deleteLessonProgressesByCourseId","cosCourseId","deleteCourseProgressById","findExistingCourseById","otherCourses","course","addCourseProgressData","courseProgress","find","generateLessonProgress","existingLesson","updateExistingLessonMetaData","createNewLessonMetaData","newExerciseProgresses","existingExercise","exercise","cosExerciseId","otherExercises","updateExerciseMetaData","createNewExerciseMetaData","updateExerciseMetaDataForExistingLesson","newDoneExerciseCount","updatedLesson","doneExerciseCount","resultPoints","allExerciseCount","maxPointsForAllExercises","newLesson","maxPoints","exerciseAchievableScore","cleanedExistingInquiryProgresses","some","newInquiryProgress","inquiryId","PROTECTED_URL","LESSON_TYPE","COURSE_TYPE","handleError","status","getProgress","contentType","text","getProgresses","ids","getLastEditedLessonsIds","numberOfLessons","ADD_LESSON_PROGRESS","READ_LESSON_PROGRESS","READ_LESSON_PROGRESSES","DELETE_LESSON_PROGRESS","READ_COURSE_PROGRESS","READ_COURSE_PROGRESSES","DELETE_COURSE_PROGRESS","DELETE_LESSON_PROGRESSES","REMOVE_LEARN_PROGRESS","LESSON_PROGRESS_SYNC_NEEDED","deleteLessonProgress","dispatch","deleteLProgress","deleteProgressOnServer","readLessonProgress","getState","user","isLoggedIn","progress","readProgress","readCourseProgress","addCourseProgress","initCourse","initialCourseData","initialCourseProgressData","setLessonProgressSyncNeeded","isSyncNeeded","syncLessonProgress","lessonProgressesData","learnProgress","readCProgresses","addProgress","readProgresses","deleteLessonProgresses","deleteCProgress","saveProgressOnServer","lessonProgressData","contentId","deleteLearnProgress","isSyncRequired","SET_USER","REMOVE_USER","API_ERROR","LOGOUT_REQUEST_CALLED_FLAG","removeUserData","removeUser","setUser","setApiError","hasLogOutRequestBeenCalled","apiErrorHasOccurred","userSelector","state","userDataSelector","GlobalsContext","useGlobalsContext","StyledNavMenu","isNavMenuOpen","toggleIsNavMenuOpen","isLanguageSubMenuOpen","setIsLanguageSubMenuOpen","useParams","useSelector","isLoggedInClass","useDispatch","handleLogoutClicked","preventDefault","aria-expanded","maxHeight","StyledNavigationList","to","onClick","StyledNavMenuIcon","data-toggle","data-parent","data-target","event","transition","visibility","borderBottom","onKeyUp","LG_BLUE_1","LG_TRANSPARENT_BLACK_40","LG_BLACK","LG_TRANSPARENT_BLACK_25","clearfix","StyledIconBar","LG_BLUE_6","defaultHoverStyles","navCrossXs","IconBar","mediaHoverDeviceDetection","StyledBurgerButton","aria-haspopup","aria-controls","mobile","navCrossBlackLg","navCrossLg","navCrossBlackMd","StyledOnlyDesktopBrand","StyledLink","Link","StyledChineseVariantSwitch","transFunction","StyledNavigationContainer","LG_TRANSPARENT_WHITE_10","StyledHeader","headerTitleKey","RichtextGlobalStyles","createGlobalStyle","RichText","isContainer","dangerouslySetInnerHTML","__html","ratioToPercentage","widthProportion","heightProportion","ASPECT_RATIO","landscape","landscape_legacy","portrait","square","imgWithFormatFn","imageId","imageBasePath","format","legacy","aspectRatio","free","sm","sm_richtext","md","md_richtext","lg","lg_richtext","full","frontendConfig","getFrontendConfig","FrontendConfigContext","useFrontendConfig","Picture","sources","fallbackUrl","alt","sourceAttributes","index","DwPicture","inProps","imgWithFormat","defaultProps","media","srcSet","tabletLandscape","replaceWithComponent","selector","componentFn","node","param","elementType","matchedElem","renderContainer","placeholderClassNames","setAttribute","trim","parentNode","replaceChild","componentToRender","ReactDOM","render","mapImgPlaceholderToPicComponent","rawImageFormat","getAttribute","isLegacy","isFree","imageAspectRatio","imagePropsText","imagePropsLegacy","imagePropsFree","paddingBottom","imageProps","replacePlaceholderImagesWithResponsivePictures","useImagePlaceholderReplacementEffect","trigger","ContentHeadline","children","isStandalone","standalone","legalFragment","StyledLegalNotice","legal","shortTitle","footerFragment","footerData","parameters","first","Date","getFullYear","aria","footer","policy","accessibility","StyledFooter","rtlClass","footerObject","LG_BLUE_7","StyledLoadingMessage","StyledErrorMessage","WithGraphQLQueryHandling","query","queryVariables","useQuery","variables","loading","refetch","message","item","hasData","metadata","FrontendMetadataContext","getMetadata","i18nConfigQuery","I18nConfigLoader","i18nQueryVariables","inFrontendConfig","inMetadata","setTranslations","iso639ByLang","BrowserOnly","GdprLayer","hasAcceptedGdpr","setHasAcceptedGdpr","left","PAGE_TYPES","HELP","VOCABULARY","ALPHABETICAL_ORDER","LEGAL","OVERVIEW","EXERCISE","LESSON_EXERCISE_RESULT","LESSON_SUMMARY","GRAMMAR_DETAIL","GRAMMAR_OVERVIEW","VOCABULARY_OVERVIEW","REGIONAL_STUDIES","PLACEMENT_TEST","FINAL_TEST","MANUSCRIPT","USER_PROFILE","PASSWORD_RESET","PASSWORD_SET","REGISTER_USER","FEEDBACK_STATUS","EXTRAS","PLACEMENT_DASHBOARD","VOCABULARY_TRAINER","NOT_FOUND_PAGE","GTM_NO_CONTENT_PAGE_IDS","LESSON_MENU_VOCABULARY_KEY","LESSON_EXERCISE_RESULT_TITLE_KEY","LESSON_MENU_GRAMMAR_KEY","LESSON_MENU_REGIONAL_STUDIES_KEY","LESSON_MANUSCRIPT_KEY","LESSON_MENU_EXTRAS_KEY","LESSON_EXERCISES_RESULT_GENERAL_KEY","PAGE_TYPE_TO_TITLE_TRANSLATION_KEYS","PAGE_TYPE_TO_DESCRIPTION_TRANSLATION_KEYS","PAGE_TYPE_TO_KEYWORDS_TRANSLATION_KEYS","createTitle","titleParts","createKeywords","keywords","html2text","html","metaDataFragment","PageMetaData","pageType","parentContentName","translationFirst","useOnlyCmsKeywords","useTeaserAsDescription","useDescriptionTranslation","addKeywordsAndDescription","contentName","keywordStrings","description","teaser","siteName","iso639Lang","pageTitleTranslationKeys","pageTitleTranslations","useMetaTitle","descriptionMeta","descriptionTranslation","useMetaDescription","keywordsString","defaultKeywords","additionalKeyword","useMetaKeywords","contentFullUrl","showDescription","property","feedbackHelper","getForErrorCode","getForPasswordChangeErrorCode","errorPasswordChange","forLogin","redirectUrl","forLogout","forUserDelete","forInvalidToken","forProfileServiceUnavailable","forSessionTimeout","forMissingUserProfile","forForcedLogout","forPasswordChanged","forMailChanged","forMailChangeRequest","forRegistered","forRegistrationConfirm","forPasswordResetRequest","forSetPassword","forProfileUpdated","forVocabularyTrainerUnavailable","forVocabularyTrainerNoVocabularies","forCertificateMissingTranscription","forInvalidCertificate","forGeneralError","getFeedbackContentKey","feedbackType","typeWithoutUnderline","s","useValidateTicketAndLoginUser","ticket","history","useHistory","ticketDomain","pathname","getTicketDomain","VALIDATE_TICKET_URL","validateUserTicket","Error","push","useRedirectAfterLogOut","userState","StyledPageLayout","useCheckSessionTimeout","rtlLanguages","isRtlByLangCode","findLessonLearnProgressSelector","findInquiryLearnProgressSelector","exerciseId","currentExerciseProgress","findInquiryProgress","findCourseLearnProgressSelector","isLessonProgressSyncRequiredSelector","GlobalStyles","bgDWDesktop","LG_GRAY_3","DWTheAntiquaBBoldWoff","DWTheAntiquaBBoldWoff2","DWTheAntiquaBSPlainWoff","DWTheAntiquaBSPlainWoff2","DWTheAntiquaBSPlainItalicWoff","DWTheAntiquaBSPlainItalicWoff2","MainPage","setLocation","setLangCode","locationFromWindow","pathnameFragments","split","langCodeFromLocation","useLocationGetter","isLessonProgressSyncRequired","useSyncLearnProgress","stylisPlugins","stylisRTLPlugin","GtmLoadScript","gtmId","GtmNoScriptFallback","obj","dataLayer","toString","display","useLocationQueryParam","from","getQueryParamValueFrom","useStaticInfoForGtm","pageUrl","macaParam","gtmLevel1Id","contentTitle","fullName","pickCategoryName","navs","gtmDataLayerPartial","partial","generateContentGtmInfo","list","level1Id","noContentPageId","navigations","navsToRoot","alignedNavs","nav","addCurrentNavToRootList","categoryLevel1","categoryLevel2","categoryLevel3","contentLanguage","gtmLanguageCode","pageOID","gtmContentType","date","gtmContentDate","subject","subjects","topicIds","topics","topic","originId","pageSID","departmentName","departments","categoryType","displayForm","level1ID","TrackingUtils","initDataLayerScript","datalayer","initialDataLayer","generateDataLayer","pageData","embeddings","pushToGoogleTagManager","datalayerObj","withReset","resetDataLayer","reset","CourseDataContext","gtmDataLayerFragment","GtmDataLayer","GtmScriptWithDataLayer","isGtmAlreadyInitialized","memo","NotMemoGtmScriptWithDataLayer","PageContainer","withPageContainerAndMetadata","TargetComponent","component","addDescriptionAndKeywordsMeta","Default404Page","NOT_FOUND","MONOLINGUAL_COURSES_IDS","isMonolingualCourse","StyledHeroTemplate","determineImage","StyledCourseHeroImage","HeroTemplate","points","SvgToggleableArrow","StyledToggleableArrowIcon","StyledToggleableArrow","isUp","classNames","up","StyledCourseHeader","groupNameTranslationKey","isOpen","onKeyPress","tabIndex","LG_GRAY_13","LG_GRAY_TRANSPARENT_1","StyledLessonScore","resultInPercentage","calculatePercentage","resultPointsClassName","LG_RED_SCORE","LG_GRAY_11","LG_GREEN_SCORE","StyledProgressResetButton","onClickReset","LG_GRAY_2","StyledSmallProgressResetButton","progressIconColors","progressState","EMPTY","HALF","FULL","translationKeyPrefix","StyledProgressIcon","color","getTitleTranslationKey","CERTIFICATE_URL","getCertificate","err","handleCertificateGeneration","blob","URL","createObjectURL","downloadLink","click","StyledCertificateIcon","handleOnCertificateClick","CertificateGray","starsMapping","StarGrey","StarWhite","StyledProgressIconStar","LearnProgressIcon","finalLessonId","finalTestPassed","getProgressIcon","StyledLessonItem","learningTargetHeadline","grammarDescription","LG_GRAY_8","LG_GRAY_9","StyledLessonList","groupedLessons","collapsed","CourseAccordion","isOnDesktop","innerWidth","StyledCourseList","onClickResetLesson","groupName","DisableScrollingStyles","ModalIntegration","componentToCreate","createPortal","StyledStandardButton","titleKey","handleClick","rtl","LG_GRAY_10","StyledModal","fadeIn","descriptionKey","leftButtonKey","rightButtonKey","onConfirmClicked","onCancelClicked","faded","classNameString","LeftButton","RightButton","LG_TRANSPARENT_BLACK_50","LG_TRANSPARENT_BLACK_20","LG_GRAY_4","StandardButton","ResetModal","StyledCourseProgress","onClickResetCourse","learningLevelMapper","0","2","4","8","16","sortByLearningLevel","coursesToSort","sort","b","dkLearningLevel","LTRContentCourseOverviewStyle","CourseOverview","isMonoLingualCourse","lessonContentLinks","contentLinks","mainContentImageLink","learningMetaInfo","achievableScore","exerciseCount","filteredContentLinks","removeContentLinksWithEmptyTarget","contentLink","isFinalTestPredicate","allLessonIds","groupBy","isResetModalOpen","setResetModalOpen","lessonIdToDelete","setLessonIdToDelete","lessonIds","progresses","data-course-id","targetId","imageOGMetaDataFragment","hasCorrectImageFormat","imageFormats","ImageOGMetaData","image","createImageSharingData","coursePageQuery","addMetaInfo","TABLE_WITH_ATTRIBUTES","OPEN_TABLE_TAG","CLOSE_TABLE_TAG","wrapTablesWithDiv","htmlString","removeAttributesFromTables","WithRenderDelay","delayTime","timeoutHandle","actionToBeDelayed","setState","prevState","Component","KnowledgeModal","knowledgeType","imageName","audioFile","subTitle","onClose","audioRef","closeModalRef","closeBackdropRef","initialSound","closeModal","classList","remove","closeButton","data-dismiss","aria-hidden","audioLink","linkTitle","play","playAudio","in","Knowledge","knowledge","wrapper","vocals","classMap","KnowledgeModalContainer","handleKeyPress","mainContentImage","audios","mp3Src","placeholderToKnowledgeComponent","matchedElement","knowledges","element","parseInt","dataset","replacePlaceholderMarkupWithKnowledges","knowledgesFragment","lessonKnowledgeQuery","LessonKnowledge","lessonName","lessonKeywordStrings","lessonKnowledgeQueryVariables","knowledgeId","lessonLang","knowledgeContent","dir","useKnowledgePlaceholderReplacementEffect","ignore","GrammarItem","markup","grammarPageQuery","StyledMainHeroImage","landingImgFull","LG_ORANGE_DARK","landingImgMobile","landingImgTablet","landingImgTabletLandscape","tileFragment","LinkWrapper","linkData","StyledTile","backgroundColor","LG_TRANSPARENT_WHITE_50","StyledBlankTile","StyledMoreCoursesTile","tileColors","LG_ORANGE","LG_PINK","LG_RED","LG_GREEN_LIGHT","LG_GREEN","scrollIntoViewCenter","htmlElement","scrollIntoView","behavior","block","inline","StyledTiles","tileData","tileElement","Math","random","substr","Dashboard","courseIds","readCourseProgresses","dashboardPageQuery","DashboardPage","dashboardPageQueryVariables","courseLang","amount","contentsByLang","contentsInGerman","StyledGrammarOverviewHeader","StyledAccordionItem","contents","scrollHeight","AccordionItemContent","LG_BAHAMA_BLUE","div","LG_GRAY_12","grammarOverviewColors","LG_GREEN_YELLOW","LG_RED_DARK","StyledAccordion","accordionData","headline","grammars","removeEmptyGrammars","grammarOverview","Array","isArray","GrammarOverview","grammarOverviewPageFragment","grammarOverviewPageQuery","GrammarOverviewPage","grammarPageQueryVariables","pathPartials","langCodeRegex","titlePathRegex","contentIdRegex","contentTypeRegex","knowledgeTypeRegex","knowledgeWithContentIdTypeRegex","feedbackTypes","LessonMenuItem","ariaLabel","StyledLessonMenuItem","LG_ORANGE1","LessonTitle","StyledLessonTitle","LessonBurgerButton","isMenuCollapsed","setIsMenuCollapsed","StyledLessonBurgerButton","buttonStyle","LESSON_PARTS","VOCABULARY_GLOSSARY","PHONEMIC_CHART","DOWNLOAD","hasLessonPart","lessonOverviewParts","lessonPart","part","getFirstIdOfLessonPart","targetOverviewPart","filterLessonExerciseOverviewItems","isFinalTestLesson","lessonContentLinksFromCourse","currentLessonId","finalTestLessonContentLink","assembleOverviewInfos","hasInfo","LessonMenu","courseName","isFromPlacementCourse","firstExercisePath","grammarAria","vocabularyAria","getFirstOfTypeId","hasExercisesReset","StyledLessonMenu","boxShadow","progressIconClass","SvgIconHintCircleOrange","lessonContentDescriptionFragment","LessonContentDescription","isHintHidden","lessonid","learningTargetDescription","subtitlesLabels","hasVideoPlayer","test","hasVideoPlaceholdersInRichText","hasAudioPlayer","hasAudioPlaceholdersInRichText","hasVideosOnly","hasAudiosOnly","importVideoPlugins","importAudioPlugins","importVideoJs","videojsModule","videojs","default","commonOptions","bigPlayButton","videoOptions","audioOptions","controlBar","pictureInPictureToggle","fullscreenToggle","playbackRates","importAllPlugins","importPlayerPlugins","getPlayerWithPlugins","initPluginsForPlayer","player","isAudio","seekButtons","forward","back","initAudio","hlsQualitySelector","initVideo","loadVideoJsApi","playerLib","init","renderVideoJsPlayers","durationBarComponentName","videoPlayButtonComponentName","playerNode","add","videoNode","tagName","addChild","useMediaTracking","dictionary","useAddEmbeddingsToGtm","mediaInputVideoFragment","MediaInputVideo","didCancel","loadedApi","convertVideoJsNodes","videos","subtitles","posterImageUrl","hlsVideoSrc","formattedDuration","preload","controls","poster","data-duration","subtitle","subtitleUrl","srcLang","srcLanguage","trackId","mediaInputImageFragment","MediaInputImage","mediaInputAudioFragment","MediaInputAudio","contentDate","audioResourceLinks","duration","size","cursor","xttype","xtrefresh","xtstream","xtlocation","xtmode","xtextension","xtplayer","content-date","xtrichname","xtduration","xtsize","mediaInputChooserFragment","MediaInputChooser","lessonInput","lessonInformationQuery","LessonInformation","isContentDescriptionHintVisible","ogImage","lessonInformationQueryVariables","EXERCISE_PROGRESS_ACTION_TYPES","ADD_DONE_INQUIRY","RESET","exerciseProgressReducer","action","score","maxScore","numberOfDoneInquiries","currentExerciseScore","ExerciseProgressContext","ExerciseProgressProvider","useReducer","exerciseStats","Provider","useExerciseProgress","addDoneInquiry","resetProgress","outOfText","numberOfPointsEarnedText","numberOfExercisesSolvedText","LessonExerciseStats","amountOfInquiries","isRtlLang","numberOfDoneInquiriesSpan","amountOfInquiriesSpan","scoreSpan","ltrStats","rtlStats","ContentNavTitle","top","bottom","direction","lessonExerciseHeadlineFragment","LessonExerciseHeadline","LessonExerciseHiddenAudio","forwardRef","LessonExerciseSoundFailureHiddenAudio","_","LessonExerciseSoundSuccessHiddenAudio","AudioContext","AudioProvider","questionAudiosRefArray","setQuestionAudiosRefArray","wrongAnswerAudioRef","correctAnswerAudioRef","LessonExerciseTextInput","inputText","useAudio","audiosRefArray","setAudiosRefArray","currentAudio","audio","pause","currentTime","stopOtherAudios","addRef","playWrongDefaultAudioFeedBack","playCorrectDefaultAudioFeedBack","LessonExerciseQuestionAudioGlobalStyles","LessonExerciseQuestionAudio","inquiryText","isPlaying","setIsPlaying","hasEnded","setHasEnded","playAudioLabel","audioLabel","onPlaying","onEnded","onPause","LessonExerciseQuestionTextGlobalStyles","LessonExerciseQuestionText","LessonExerciseQuestionImage","LessonExerciseQuestionVideo","findQuestionAudio","mainContent","findFeedbackAudio","isSolutionAudioFallbackMode","QUESTION_TYPES","TEXT","IMAGE","AUDIO","VIDEO","lessonExerciseQuestionFragment","exerciseQuestionTypeSelector","inquiry","LessonExerciseQuestion","useSubInquiryTextAsLabel","subInquiries","questionType","labelText","subInquiryText","questionAudio","StyledButtonTemplate","btnClass","disabled","fullWidth","aria-disabled","grayActiveFocus","LG_GRAY_1","StyledSolveButton","isDisabled","StyledCheckButton","StyledSolveCheckButton","isSolveButtonDisabled","isCheckButtonDisabled","handleSolveClicked","handleCheckClicked","placeholderConfig","placeholder","maxLength","createSingleSentenceAnswerContent","arrayJoinString","subInquiry","cleanupAndAddPlaceholderComponents","answertext","answerWithReplacePlaceholders","INQUIRY_STATE","INITIAL","WRONG","CORRECT","SOLVED","ClozePulldown","pulldownData","inquiryState","checkEntry","onHandleItemSelected","isToggled","setIsToggled","getInputClassName","selectedValue","alternatives","alternative","altIndex","data-answer-select","data-exercise-answer-id","data-index","alternativeText","usePlaceholderReplacementEffect","createComponent","scopeClassName","replacePlaceholderWithAnswerComponent","ExerciseRichText","update","StyledPulldownAnswer","onChange","clozeLayoutType","initialClozePulldownData","entry","isCorrect","clozePulldownData","setClozePulldownData","answer","newClozeData","createPulldown","partialComponent","answerContent","selectedClozeLayoutConfig","CONTINUOUS_TEXT","cmp","SINGLE_SENTENCE","SvgIconHint","LessonExerciseHintGlobalStyles","LessonExerciseHint","isSimpleIconHint","hintSVG","Tag","StyledContainerTextContent","MULTIPLE_WHITESPACES_REGEX","MINUS_CHARACTERS_REGEX","SPECIAL_CHARACTERS","WHITESPACE_BEFORE_SPECIAL_REGEX","WHITESPACE_AFTER_SPECIAL_REGEX","normalizeText","str","isNormalizedTextEqual","str1","str2","ChooseAnswerGlobalStyles","ChooseAnswer","initialClozeChooseData","selectedAnswer","initialSelectableAnswers","clozeChooseData","setClozeChooseData","selectableAnswers","setSelectableAnswers","handleAnswerClicked","answerText","answerId","isSelectedAnswer","clozeData","removeSelectedAnswer","newSelectableAnswers","addSelectableAnswer","updated","setSelectedAnswer","selectableAnswer","removeSelectableAnswer","answers","shuffle","EmptyPlaceholder","FilledPlaceholder","answerLink","PlaceHolder","createPlaceholder","getAnswerClasses","defaultClasses","aria-selected","aria-multiselectable","x","y","_ref11","SvgKeyboard","StyledKeyboardIcon","KeyboardIcon","TextAreaInput","input","isPlaceholderDisabled","translatedPlaceholder","StyledVerticalTextArea","aria-autocomplete","rows","borderColor","getBorderColor","textarea","css","layout","shift","KeyboardWrapper","inputMaxLength","inputValue","inputClassName","isTextArea","isKeyboardVisible","setKeyboardVisible","layoutName","setLayoutName","keyboardRef","inputRef","textAreaRef","setInput","focus","toggleKeyboard","onInputKeyPress","charCode","handleShift","onChangeInput","onChangeLocalInput","r","pressedKey","StyledKeyboardBackdrop","ClozeInput","handleOnInputChange","fieldNameId","userAnswer","setValue","setIsCorrect","handleChange","baseInputClassName","aria-required","autoComplete","WritingAnswerGlobalStyles","WritingAnswer","initialClozeWritingData","clozeWritingData","setClozeWritingData","newData","checkAnswer","innerText","useInquiryHandling","setSolveButtonDisabled","setCheckButtonDisabled","isMarkedAsDone","setMarkedAsDone","wrongAnswerCount","setWrongAnswerCount","setInquiryState","disableAllButtons","checkAndMarkAsDone","handleCorrectAnswer","handleWrongAnswer","correctSubInquiries","handleSolved","ClozeExerciseRow","initiallyCorrectInquiries","inquiryDescription","clozeType","setCorrectSubInquiries","feedbackAudioUrl","feedbackAudioRef","changeResult","playCorrectAudioFeedBack","answerComponent","getAnswerComponent","lessonExerciseHintPartial","data-type","data-exercise-id","clozeExerciseFragment","ClozeExercise","inquiries","DictationExerciseRow","solutionText","aria-atomic","newInput","DictationExercise","INQUIRY_MEDIA_TYPE","ManyToManyAnswerGlobalStyles","ManyToManyAnswer","answersBlocked","mediaType","isLeftAnswer","isMatched","onAnswerClicked","isImage","basicClass","isCorrectlyMatched","isSolved","checkedStatus","assignMatchedAnswerClass","isSelected","currentSideAnswersBlocked","assignAnswerClass","images","SHUFFLE_RIGHT_ANSWERS","MATCH_ANSWERS_PAIR","BLOCK_ANSWERS","RESET_MATCHED_ANSWERS_PAIR","CHECK_ANSWERS","SOLVE_ANSWERS","reducer","selectedId","isLeft","selectedIndex","initialLeftAnswers","shuffledRightAnswers","rightAnswers","leftMatchedAnswer","leftAnswers","rightMatchedAnswer","leftMatchedAnswers","rightMatchedAnswers","isLeftAnswerBlocked","isRightAnswerBlocked","updatedAnswers","isIdEqual","matchedAnswer","updatedLeftMatchedAnswers","updatedRightMatchedAnswers","isAllMatchedCorrectly","every","solvedWrongCounter","solvedMatchedAnswers","isSolvedCorrect","ManyToManyQuetsionRowGlobalStyles","ManyToManyQuestionRow","onMatchedAnswerClicked","onSolveClicked","onCheckClicked","ManyToManyExercise","ANSWER_STATE","SELECTED","LessonExerciseTextAnswerGlobalStyles","LessonExerciseTextAnswer","answerState","assignAnswerAriaLabel","getAnswerClass","LessonExerciseImageAnswer","lessonExerciseAnswerFragment","ExerciseAnswer","answerMediaType","useIsMountedRef","isMountedRef","setMounted","isMounted","MultiSelectionQuestionRow","correctAnswerAudioUrl","answersRefArray","answersFrozen","setAnswersFrozen","setAnswers","answersRef","updateAnswers","answersToUpdate","answerStateEvalFn","skipAnswerConditionalFn","playSuccessAudio","chosenAnswerIndex","blur","newAnswerState","selectOrUnselectAnswer","checkedAnswers","isSolvedCorrectly","MultiSelectionExercise","SelfAssessmentAnswer","answerLabel","SelfAssessmentQuestion","howWasItWithOnlyFeedbackAudio","howWasItLabel","feedbackAudio","lessonExerciseQuestionAudio","SelfAssessment","setSelected","updateSelected","RepeatExerciseRowGlobalStyles","RepeatExerciseRow","subInquiryDescription","RepeatExercise","SingleSelectionQuestionRow","getAnswerState","selectCurrentAnswer","SingleSelectionExercise","sortingExerciseFragment","SortingExerciseRowAnswerGlobalStyles","SortingExerciseRow","answerType","choosenAnswers","setChoosenAnswers","order","isCorrectOrder","isDuplicatedValue","playCorrectAudio","getAnswerLink","answerID","isInquiryMediaTypeText","classType","updateSelection","currentSelectableAnswers","currentChoosenAnswers","getFeedbackClass","sortObjectsByProp","SortingExercise","ExerciseLeavingPrompt","useBeforeunload","leaveMessage","ContentContainer","ContentBottomLine","AccordionContainerContent","StyledAccordionContainer","titleTranslation","manuscriptFragment","ManuscriptGlobalStyles","Manuscript","manuscript","ContainerComponent","AccordionContainer","lessonExerciseItemFragment","getExerciseComponentByType","inquiryType","selectionType","getExerciseComponentBySelectionType","LessonExerciseItem","exerciseCounter","manuscriptContent","contentComponent","mediaInputComponent","inputType","getExerciseMediaInputComponentByType","SET_IMPROVE_MODE_FOR_LESSON","REMOVE_IMPROVE_MODE_FOR_LESSON","LESSON_EXERCISE_MODE","IMPROVE","addLessonMode","mode","removeLessonMode","isLessonInImproveModeSelector","lessonExerciseMode","useExerciseManager","lessonExerciseOverviewItems","isLessonInImproveMode","generateNextExercisePath","nextItem","exerciseName","mapToFlatLessonExercises","lessonExerciseItems","filterExercisesWithNoFullScore","lessonExercises","lessonExercise","existingProgress","getCurrentIndex","currentExerciseItem","firstExerciseLink","isImproveMode","firstExerciseItem","exerciseIdsWithProgress","getFirstExercisePath","nextExerciseLink","remainingLessonExercises","splice","remainingExercisesWithNoFullScore","getNextExercisePath","isFullScoreAchieved","currentExerciseCount","filterExerciseDataIfInImproveMode","remainingInquiries","filterExercises","lessonExerciseQuery","LessonExerciseNavigation","lessonAchievableScore","scrollTo","useScrollToTop","lessonIdNumber","exerciseIdNumber","unlisten","listen","lessonExerciseNavQueryVariables","handleNextButtonClick","progressMetaData","createLearnProgressData","nextPath","filteredData","VocabularyRow","audioSource","isValidImage","lessonVocabularyQuery","LessonVocabularyGlobalStyles","LessonVocabulary","lessonVocabularyQueryVariables","vocabularies","vocabularyItem","LESSON_PART_TRANSLATION_CODES","getArrowAriaLabel","NavigationRow","position","currentItem","previousItem","moveTo","LESSON_PARTS_SUFFIX","LessonKnowledgeNavigation","lessonKnowledgeOverviewItems","currentItemIndex","normalizedName","getLessonGrammarUrl","getLessonRegionalStudiesUrl","getLessonPhonemicChartUrl","getLessonVocabularyUrl","getCurrentComponent","ManuscriptQuery","ManuscriptPage","ManuscriptPageQueryVariables","ContentSection","ArticleLinks","targetName","AudioLinks","getAudioLinkTitle","variant","getMediaFileSizeInKBorMB","capitalize","DownloadLinks","videoResourceLinksFragment","VideoLinks","concat","video","videoResourceLinks","videoLink","techFormat","getVideoLinksByFormat","link","getVideoLinkTitle","lessonExtrasFragment","filterContentByType","targetType","LessonExtras","downloads","articles","hasDownloads","hasVideos","hasAudios","hasArticles","LessonExtrasQuery","LessonExtrasPage","LessonExtraPageQueryVariables","EXERCISE_ACTION_TYPES","CONTINUE","SAVE","ExerciseAction","actionType","onClickAction","actionKey","translationPrefix","generateActionKey","MARKS","GOOD","MEDIUM","BAD","Summary","showFeedback","showTitle","percentile","randomNumber","generateRandomNumber","getFeedBackText","LessonResultAndSummaryGlobalStyles","LessonExerciseResult","assembledInfos","info","filteredAssembledInfos","showImproveButton","resultPrefix","infos","exerciseInfos","generateExerciseInfos","nextUrl","hintKey","loginLink","firstExerciseLinkInImproveMode","LessonSummary","currentLessonLink","currentLessonIndex","nextLessonContentLink","redirectMessage","generateRedirectInfos","lessonSummaryPageQuery","LessonSummaryPage","LessonSummaryQueryVariables","lessonOverviewPartsFragment","scope","handicapArg","LtrContentLessonStyle","Lesson","overviewParts","lessonMainImage","filterLessonKnowledgeOverviewItems","path","useRouteMatch","lessonIdString","contentsByType","courseMainImage","exact","lessonPageQuery","LessonPage","RestrictedRoute","params","ConfirmUserRegistrationContainer","confirmationId","confirmUserRegistration","hasErrorClassAssigner","CUSTOM_ERROR_TRANSLATION_KEYS","buildKey","suffix","getTranslatedValidationMessage","validationErrorTranslationKey","validationType","customErrorTranslationKey","Input","titleTranslationKey","placeholderTranslationKey","register","validationError","isLabelVisible","aria-live","Select","defaultOptionKey","options","option","optionName","ariaKey","Checkbox","BirthDateInput","errors","initialDateOfBirth","initYear","datePartials","month","day","deconstructDateOfBirth","hasErrors","placeholderLabel","aria-labelledby","defaultValue","emailPattern","transcriptionPattern","namePattern","passwordValid","numberOfFulfilledConditions","pattern","passwordRetypeValid","passwordRetype","passwordDiffersFromEmail","subString","template","captcha","captchaError","isCaptchaPassed","ReCaptcha","onExpired","hl","sitekey","token","countries","contactLanguageOptions","profileEditKeyPath","professionKeyPath","sexOptions","professionOptions","languageLevelKeyPath","languageLevelOptions","writingReadingLevelKeyPath","writingReadingLevelOptions","handicapKeyPath","handicapOptions","learningTypeKeyPath","learningTypeOptions","Registration","captchaRef","useForm","reValidateMode","handleSubmit","getValues","formState","captchaMessage","captchaValidationMessage","createLink","createPrivacyPolicyLink","createAgbLink","checkboxes","labelTextFunc","dataPrivacyPolicy","conditionsOfParticipation","required","gdpr","onSubmit","responseJson","data-id","validate","differsFromEmail","checkbox","cancelRegistration","PASSWORD_RESOURCE_PUBLIC_RESET","PASSWORD_RESOURCE_PUBLIC_RESET_REQUEST","PASSWORD_RESOURCE_PROTECTED","requestResetPassword","formatPasswordResetUserData","NewPasswordInputs","passwordTitleKey","passwordPlaceholderKey","passwordRepeatTitleKey","passwordRepeatPlaceholderKey","PasswordChange","oldPassword","oldUserPassword","userPassword","newPassword","changePasswordResponse","jsonResponse","PasswordReset","textAlign","StatusFeedback","feedbackContentKey","targetPageUrl","getTargetPageUrl","DeleteAccountModal","confirmDeleteLabel","UserProfile","isDeleteModalOpen","setDeleteModalOpen","additionalSelectInputs","translationKeySuffix","removeEmptySelectValues","cleanedData","selectInputName","updatedData","toggleDeleteAccountModal","firstNameTranscription","lastNameTranscription","streetName","postalCode","city","defaultChecked","SetNewPassword","setEmail","res","log","getUserByConfirmationId","userEmailResponse","passwordResetToken","PlacementTile","level","PlacementTestGlobalStyles","PlacementTest","placementTestPageQuery","PlacementTestPage","placementTestPageQueryVariables","SCOPE","LAST_LESSON","LAST_THREE_LESSONS","LAST_TEN_LESSONS","ALL_LESSONS","scopeToTranslationKeyMapping","VocabularyTrainerStart","setLastLessonsIds","setNumberOfVocabularies","handleExerciseStart","setNumberOfLessons","handleChangeScope","lastEditedLessonIds","onBlur","StyledVocabularyTrainerStatus","number","total","rtlText","data-value","ltrText","BubbleContainer","VocabularyTrainerItemGlobalStyles","StyledVocabularyTrainerItem","vocabulary","onSolved","isHidden","setSolved","audioStatus","setAudioStatus","setDisabled","autoPlay","SvgSmileyPositive","cx","cy","SvgSmileyNegative","StyledSmileyPositive","SmileyPositive","StyledSmileyNegative","SmileyNegative","StyledVocabularyTrainerSmileys","setAnswerState","TRANSITION_STATUS","BUSY","READY","StyledVocabularyTrainerExercise","handleExerciseEnd","correctAnswers","setCorrectAnswers","trainerVocabularies","setTrainerVocabularies","nextVocabulary","newTrainerVocabularies","slicedTrainerVocabularies","setTransition","onTransitionEnd","transitionStatus","startTransition","newTransition","useTransition","operator","getCondition","searchQuery","getQueryVariables","offset","originalCondition","translationCondition","vocabularyFragment","searchResultFragment","searchQueryPart","vocabularySearchQuery","vocabularyTrainerQuery","makeQueryVariables","VocabularyTrainer","lastLessonsIds","numberOfVocabularies","isStarted","setStarted","getVocabularyTrainerPage","getRandomVocabularies","flat","uniqueVocabularies","Set","placementResultFragment","PlacementAndFinalTestResult","allDkCourses","dkCourses","courseDkLearningLevel","result","learningLevel","targetCourse","getFirstCourseOfEachLevel","dwLinks","lessonDkLearningLevel","finalTest","nextLevel","levelValues","currentIndex","nextLevelRecommendation","nextCourseUrl","nextCourse","dkCourse","getRecommendedCourseURL","showCertificateButton","PageMetaDataComponent","placementResultPageQuery","PlacementAndFinalTestResultPage","placementResultPageQueryVariables","dkCoursesInGerman","currentCourse","helpFragment","StyledHelp","help","helpPageQuery","HelpPage","helpPageQueryVariables","legalPageQuery","LegalPage","TYPE_SET_INPUT","TYPE_GET_CACHED_RESULTS","TYPE_SET_HINTS_DATA","TYPE_SET_HINTS_OPENED","TYPE_SET_HINTS_CLOSED","TYPE_SET_CURSOR_ARROW_UP","TYPE_SET_CURSOR_ARROW_DOWN","TYPE_KEY_ESCAPE_CLICKED","TYPE_KEY_BACKSPACE_CLICKED","TYPE_ANY_CHARACTER_TYPED","TYPE_ITEM_CLICKED","TYPE_KEY_ENTER_CLICKED","vocabularyItems","recentlySearched","isOpened","isEscapeClicked","isEnterClicked","set","cursorUp","cursorDown","combineVocabularyData","mergedVocabularyData","original","hits","idSet","has","specialCharactersRegex","StyledVocabularySearch","onItemSelected","Map","vocabularyOverviewPlaceholder","vocabularyOverviewAria","debouncedSearchQuery","debouncedValue","setDebouncedValue","handler","useDebounce","useGetCachedHintsResponse","useGetHintsResponseAndCacheIt","searchInput","cleanSearchQuery","wordsRegex","suggestions","vocabularyText","matches","distinctSuggestions","keyCode","KEY_ARROW_UP","KEY_ARROW_DOWN","KEY_ENTER","conditionalSearchQuery","KEY_ESCAPE","KEY_BACKSPACE","onFocus","suggestion","onMouseDown","m","VocabularyMoreButton","VocabularyItem","Vocabulary","startValue","setStartValue","vocabularyData","setVocabularyData","isNotEmptyResp","setIsNotEmptyResp","setSearchQuery","findAdditionalData","shouldConcat","resp","combinedVocabularyData","newSearchQuery","VocabularyPage","vocabularyPageQueryVariables","typeToPage","coursePageQueryVariables","ContentPage","typeId","pageDef","App","rootReducer","combineReducers","storage","engine","createEngine","storageMiddleware","store","__REDUX_DEVTOOLS_EXTENSION_COMPOSE__","compose","applyMiddleware","next","dataOrParams","thunk","composeEnhancers","createStore","createStoreWithMiddleware","load","cache","InMemoryCache","possibleTypes","ModelAspect","DeliveryAspect","NamedAspect","AssociationsAspect","TextualAspect","ContactAspect","MetadataAspect","DkMetadataAspect","GeographicLocationAspect","TreeAspect","DeletionAspect","PlaybackResourceAspect","BinaryDataAspect","SocialMediaAspect","FooterAspect","BetaLayerAspect","UrlAspect","PersonRelatedContent","Content","addTypename","createPersistedQueryLink","sha256","useGETForHashedQueries","createHttpLink","uri","client","ApolloClient","ssrForceFetchDelay","restore","__APOLLO_STATE__","hydrate","navigator","serviceWorker","ready","registration","unregister","isPlainKey","normalizeTranslation","global","noop","inMap","entries","array","additionalInformation","charAt","fileSizeInBytes","floor","j","fraction","round","prop","module","exports","zero","Number","MAX_SAFE_INTEGER","wrapInMedia","sizes","mediaMin","wrapInHoverPointerMedia","hover","pointer","mediaDevice","mouse","touch","DW_BLUE","LG_BLUE_2","LG_BLUE_3","LG_GRAY_5","LG_GRAY_6","LG_GRAY_7","LIGHT_KHAKI","LG_GRAY_TRANSPARENT_15","LG_TRANSPARENT_BLACK_30","composition","even","odd","_369","_258","_4710","notFirst","notLast","topElements","numberOfElements","justNElements","clearTranslations","hasTranslations","I18nContext","StyledText","StyledTextGray12","keyCodes","TAB","ENTER","SPACEBAR","ARROW_LEFT","ARROW_RIGHT","ESCAPE","accessPathByArr","keysArr","objPartial","accessPath","pathStr","translations","inTranslations","retrieveLabel","nextVar","varNameRegex","replaceInPattern"],"mappings":"wPAYoBA,QACW,cAA7BC,OAAOC,SAASC,UAEe,UAA7BF,OAAOC,SAASC,UAEhBF,OAAOC,SAASC,SAASC,MAAM,2D,+CCjBnC,SAASC,IAA2Q,OAA9PA,EAAWC,OAAOC,QAAU,SAAUC,GAAU,IAAK,IAAIC,EAAI,EAAGA,EAAIC,UAAUC,OAAQF,IAAK,CAAE,IAAIG,EAASF,UAAUD,GAAI,IAAK,IAAII,KAAOD,EAAcN,OAAOQ,UAA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E,EAAE/Y,EAAKmiE,GACrB,IAAM3+D,EArBc,SAAAxD,GAEpB,OADoBk+E,EAAWl+E,EAAKo+E,IAE3Bp+E,EAkBKs+E,CAAct+E,GAC5B,OAAOmiE,EA5BuB,SAACsB,EAAStB,GAAV,OAC9B1iE,OAAOgB,KAAK0hE,GAASplD,QAAO,SAACC,EAAKuhE,GAChC,IAAMC,EAAe,IAAIryE,OAAO,MAAMpM,OAASw+E,EAAU,IAAIx+E,OAAQ,KACrE,OAAOid,EAAI7P,QAAQqxE,EAAcrc,EAAQoc,MACxC9a,GAwBcgb,CAAiBj7E,EAAO2+D,GAAW3+D,K","file":"static/js/main.6c5fc115.chunk.js","sourcesContent":["// This optional code is used to register a service worker.\n// register() is not called by default.\n\n// This lets the app load faster on subsequent visits in production, and gives\n// it offline capabilities. However, it also means that developers (and users)\n// will only see deployed updates on subsequent visits to a page, after all the\n// existing tabs open on the page have been closed, since previously cached\n// resources are updated in the background.\n\n// To learn more about the benefits of this model and instructions on how to\n// opt-in, read https://bit.ly/CRA-PWA\n\nconst isLocalhost = Boolean(\n window.location.hostname === 'localhost' ||\n // [::1] is the IPv6 localhost address.\n window.location.hostname === '[::1]' ||\n // 127.0.0.1/8 is considered localhost for IPv4.\n window.location.hostname.match(/^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/),\n);\n\nexport function register(config) {\n if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {\n // The URL constructor is available in all browsers that support SW.\n const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href);\n if (publicUrl.origin !== window.location.origin) {\n // Our service worker won't work if PUBLIC_URL is on a different origin\n // from what our page is served on. This might happen if a CDN is used to\n // serve assets; see https://github.com/facebook/create-react-app/issues/2374\n return;\n }\n\n window.addEventListener('load', () => {\n const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;\n\n if (isLocalhost) {\n // This is running on localhost. Let's check if a service worker still exists or not.\n checkValidServiceWorker(swUrl, config);\n\n // Add some additional logging to localhost, pointing developers to the\n // service worker/PWA documentation.\n navigator.serviceWorker.ready.then(() => {\n console.log(\n 'This web app is being served cache-first by a service ' +\n 'worker. To learn more, visit https://bit.ly/CRA-PWA',\n );\n });\n } else {\n // Is not localhost. Just register service worker\n registerValidSW(swUrl, config);\n }\n });\n }\n}\n\nfunction registerValidSW(swUrl, config) {\n navigator.serviceWorker\n .register(swUrl)\n .then(registration => {\n registration.onupdatefound = () => {\n const installingWorker = registration.installing;\n if (installingWorker == null) {\n return;\n }\n installingWorker.onstatechange = () => {\n if (installingWorker.state === 'installed') {\n if (navigator.serviceWorker.controller) {\n // At this point, the updated precached content has been fetched,\n // but the previous service worker will still serve the older\n // content until all client tabs are closed.\n console.log(\n 'New content is available and will be used when all ' +\n 'tabs for this page are closed. See https://bit.ly/CRA-PWA.',\n );\n\n // Execute callback\n if (config && config.onUpdate) {\n config.onUpdate(registration);\n }\n } else {\n // At this point, everything has been precached.\n // It's the perfect time to display a\n // \"Content is cached for offline use.\" message.\n console.log('Content is cached for offline use.');\n\n // Execute callback\n if (config && config.onSuccess) {\n config.onSuccess(registration);\n }\n }\n }\n };\n };\n })\n .catch(error => {\n console.error('Error during service worker registration:', error);\n });\n}\n\nfunction checkValidServiceWorker(swUrl, config) {\n // Check if the service worker can be found. If it can't reload the page.\n fetch(swUrl)\n .then(response => {\n // Ensure service worker exists, and that we really are getting a JS file.\n const contentType = response.headers.get('content-type');\n if (\n response.status === 404 ||\n (contentType != null && contentType.indexOf('javascript') === -1)\n ) {\n // No service worker found. Probably a different app. Reload the page.\n navigator.serviceWorker.ready.then(registration => {\n registration.unregister().then(() => {\n window.location.reload();\n });\n });\n } else {\n // Service worker found. Proceed as normal.\n registerValidSW(swUrl, config);\n }\n })\n .catch(() => {\n console.log('No internet connection found. App is running in offline mode.');\n });\n}\n\nexport function unregister() {\n if ('serviceWorker' in navigator) {\n navigator.serviceWorker.ready.then(registration => {\n registration.unregister();\n });\n }\n}\n","function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport * as React from \"react\";\n\nvar _ref2 = /*#__PURE__*/React.createElement(\"g\", {\n className: \"logoBox\",\n fillRule: \"evenodd\"\n}, /*#__PURE__*/React.createElement(\"g\", {\n className: \"logoLogo\"\n}, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M15.5929091,3.39736364 C22.287,3.39736364 27.714,8.82381818 27.714,15.5184545 C27.714,22.2125455 22.287,27.6392727 15.5929091,27.6392727 C8.89881818,27.6392727 3.47181818,22.2125455 3.47181818,15.5184545 C3.47181818,8.82381818 8.89881818,3.39736364 15.5929091,3.39736364 L15.5929091,3.39736364 Z M26.9959091,5.16463636 C29.8276364,1.99527273 33.9458182,0 38.5303636,0 C47.0694545,0 53.9920909,6.92236364 53.9920909,15.4617273 C53.9920909,24.0010909 47.0694545,30.9234545 38.5303636,30.9234545 C33.9458182,30.9234545 29.8276364,28.9281818 26.9959091,25.7585455 C24.1644545,28.9281818 20.046,30.9234545 15.4614545,30.9234545 C6.92209091,30.9234545 0,24.0010909 0,15.4617273 C0,6.92236364 6.92209091,1.93784382e-15 15.4614545,1.93784382e-15 C20.046,1.93784382e-15 24.1644545,1.99527273 26.9959091,5.16463636 L26.9959091,5.16463636 Z M15.9913636,13.0819091 L12.6553636,13.0819091 L12.6553636,18.0845455 L15.9913636,18.0845455 C18.4150909,18.0845455 19.2714545,17.0787273 19.2714545,15.5833636 C19.2714545,14.088 18.4085455,13.0819091 15.9913636,13.0819091 L15.9913636,13.0819091 Z M16.4511818,9.59536364 C19.8250909,9.59536364 23.2835455,11.292 23.2835455,15.5828182 C23.2835455,19.8739091 19.8250909,21.5705455 16.4511818,21.5705455 L8.886,21.5705455 L8.886,9.59536364 L16.4511818,9.59536364 L16.4511818,9.59536364 Z M35.4119983,15.9318147 L37.5403715,10.1204985 L40.4334297,10.1204985 L42.5618029,15.9318147 L44.2678615,10.1204985 L48.0692727,10.1204985 L44.4908946,21.3263197 L41.2676315,21.3263197 L38.9674938,15.9016908 L36.7070387,21.3263197 L33.483486,21.3263197 L29.9048182,10.1204985 L33.7062294,10.1204985 L35.4119983,15.9318147 L35.4119983,15.9318147 Z\",\n id: \"Shape\"\n})));\n\nfunction SvgDwLogo(_ref, svgRef) {\n var title = _ref.title,\n titleId = _ref.titleId,\n props = _objectWithoutProperties(_ref, [\"title\", \"titleId\"]);\n\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n viewBox: \"0 0 54 31\",\n xmlns: \"http://www.w3.org/2000/svg\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _ref2);\n}\n\nvar ForwardRef = /*#__PURE__*/React.forwardRef(SvgDwLogo);\nexport default __webpack_public_path__ + \"static/media/dw-logo.ff9012af.svg\";\nexport { ForwardRef as ReactComponent };","import styled from 'styled-components';\nimport { ReactComponent as Logo } from '../svg/dw-logo.svg';\n\nexport const StyledLogo = styled(props => <Logo {...props} />)``;\n","function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport * as React from \"react\";\n\nfunction SvgDwClaim(_ref, svgRef) {\n var title = _ref.title,\n titleId = _ref.titleId,\n props = _objectWithoutProperties(_ref, [\"title\", \"titleId\"]);\n\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n viewBox: \"225 40 330 35\",\n xmlns: \"http://www.w3.org/2000/svg\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, /*#__PURE__*/React.createElement(\"g\", {\n className: \"claimBox\"\n }, /*#__PURE__*/React.createElement(\"g\", {\n className: \"claimClaim\"\n }, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M268.479,73.127l0,-1.301c-0.655,-0.522 -1.526,-1.045 -2.443,-1.435l-3.042,-23.86c1.13,-0.305 2.35,-0.913 3.31,-1.478l0,-1.305l-8.012,0l-8.704,23.028l-8.882,-23.028l-8.007,0l0,1.305c0.999,0.523 2.222,1.131 3.348,1.478l-2.999,23.948c-0.743,0.263 -1.614,0.785 -2.354,1.347l0,1.301l8.793,0l0,-1.301c-0.824,-0.522 -1.741,-0.996 -3.046,-1.347l1.568,-21.769l0.043,0l9.4,24.417l2.481,0l9.184,-24.68l0.046,0l2.438,21.901c-1.134,0.305 -2.311,0.916 -3.224,1.478l0,1.301l10.102,0ZM290.589,69.346c-1.305,0.391 -2.35,0.478 -2.35,0.478c0,0 -0.352,-0.867 -0.352,-2.7l0,-9.88c0,-4.354 -2.733,-6.181 -7.478,-6.181c-2.832,0 -5.142,0.519 -7.186,1.304l0,5.659l1.525,0c0,0 0.956,-1.529 1.564,-3.967c0,0 1.265,-0.913 3.18,-0.913c2.922,0 4.312,1.919 4.312,4.88l0,2.438c-7.666,-0.04 -12.102,3.61 -12.102,7.14c0,3.44 2.392,5.918 5.917,5.918c2.701,0 5.402,-1.739 6.618,-4.041l0.046,0c0,0 0.043,2.259 1.173,4.132c3.174,-0.919 5.697,-2.871 5.697,-2.871l-0.564,-1.396ZM283.804,65.821c0,2.871 -2.439,4.79 -4.49,4.79c-1.954,0 -3.44,-1.568 -3.44,-3.789c0,-2.224 1.614,-4.447 7.93,-4.315l0,3.314ZM316.618,71.35c-1.78,-0.306 -3.042,-0.785 -3.042,-0.785l0,-29.467c-4.264,-0.093 -7.399,0.56 -7.399,0.56l0,1.348c2.001,0.348 3.312,0.781 3.312,0.781l0,7.581c0,0 -1.83,-0.213 -3.75,-0.213c-6.528,0 -11.49,4 -11.49,12.187c0,6.092 3.085,10.18 8.182,10.18c3.657,0 6.315,-2.303 7.36,-4.873l0.046,0.043c0,-0.004 -0.305,1.869 -0.263,4.566c3.956,0.132 7.044,-0.525 7.044,-0.525l0,-1.383ZM309.489,63.514c0,4.004 -2.445,7.139 -5.356,7.139c-3.617,0 -5.622,-3.355 -5.622,-8.231c0,-6.01 2.398,-9.144 6.443,-9.144c1.876,0 3.355,0.433 4.535,1.222l0,9.014ZM337.997,60.162c0,-5.488 -2.695,-9.099 -8.487,-9.099c-6.27,0 -9.792,4.741 -9.792,11.576c0,7.098 3.522,10.84 9.71,10.84c3.265,0 6.262,-1.219 8.569,-3l-0.74,-1.699c-1.567,1.083 -4.13,1.873 -6.27,1.873c-4.399,0 -6.966,-2.744 -6.966,-8.278l0,-0.607l13.976,0l0,-1.606ZM333.649,59.81l-9.539,0c0.306,-3.743 1.912,-6.664 4.962,-6.664c3.096,0 4.616,2.882 4.577,6.664ZM367.076,47.274l0,-5.793c-1.222,-0.298 -2.654,-0.476 -4.048,-0.476c-5.487,0 -8.049,2.957 -8.049,7.705l0,2.744l-4.18,0l0,2.087l4.18,0l0,16.985c-2.087,0.521 -3.527,1.3 -3.527,1.3l0,1.301l11.225,0l0,-1.301c0,0 -1.522,-0.736 -3.615,-1.3l0,-16.985l5.747,0l0,-2.087l-5.747,0l0,-3.219c0,-3.356 0.696,-5.229 3.398,-5.229c0.568,0 1.172,0.085 1.698,0.26c0.345,2.047 1.39,4.008 1.39,4.008l1.528,0ZM387.793,61.776c0,-6.842 -3.824,-10.713 -9.966,-10.713c-6.269,0 -11.529,4.134 -11.529,11.707c0,6.881 3.82,10.752 9.966,10.752c6.269,0 11.529,-4.173 11.529,-11.746ZM383.446,62.553c0,5.666 -2.263,8.576 -5.967,8.576c-4.396,0 -6.834,-3.699 -6.834,-9.141c0,-5.666 2.263,-8.576 5.92,-8.576c4.397,0 6.881,3.739 6.881,9.141ZM407.337,51.543c-0.824,-0.305 -1.954,-0.522 -3.088,-0.522c-2.741,0 -4.443,2.128 -5.616,5.476l-0.132,0c0.264,-1.691 0.349,-3.39 0.349,-5.171c-2.385,-0.088 -5.349,0.128 -7.265,0.522l0,1.344c1.088,0.171 2.311,0.476 3.309,0.824l0,16.51c-1.215,0.304 -2.26,0.738 -3.309,1.3l0,1.301l10.837,0l0,-1.301c-1.088,-0.522 -2.222,-0.957 -3.441,-1.3l0,-8.407c0,-3.746 1.483,-7.313 4.4,-7.313c1.305,0 2.389,0.432 3.394,0.909l0.562,-4.172ZM457.531,73.127l0,-1.301c0,0 -1.35,-0.824 -2.957,-1.3c0,0 0.175,-4.052 0.175,-9.799c0,-6.536 -2.307,-9.664 -6.874,-9.664c-3.664,0 -6.493,2.083 -7.581,4.869l-0.046,0c-0.437,-2.569 -2.389,-4.869 -6.525,-4.869c-3.441,0 -6.273,2.129 -7.361,4.788l-0.086,0c0,0 0.303,-1.835 0.303,-4.525c-4.169,-0.131 -7.35,0.522 -7.35,0.522l0,1.344c1.956,0.349 3.309,0.824 3.309,0.824l0,16.51c-1.788,0.429 -3.309,1.3 -3.309,1.3l0,1.301l10.186,0l0,-1.255c0,0 -1.4,-0.782 -2.793,-1.307l0,-9.535c0,-3.391 2.093,-7.231 5.622,-7.231c3.526,0 4.265,2.965 4.265,5.752l0,11.014c-1.087,0.437 -2.093,0.959 -2.786,1.307l0,1.255l9.663,0l0,-1.255c-0.697,-0.301 -1.741,-0.87 -2.786,-1.307l0,-9.535c0,-3.391 2.047,-7.231 5.705,-7.231c3.308,0 4.353,3.139 4.353,8.016c0,4.918 -0.171,8.75 -0.171,8.75c-1.528,0.525 -2.79,1.307 -2.79,1.307l0,1.255l9.834,0ZM468.72,44.573c0,-1.563 -1.13,-2.741 -2.741,-2.741c-1.567,0 -2.74,1.178 -2.74,2.741c0,1.525 1.173,2.698 2.74,2.698c1.611,0 2.741,-1.173 2.741,-2.698ZM471.072,73.127l0,-1.301c0,0 -1.396,-0.824 -3.052,-1.3l0,-19.2c-4.254,-0.131 -7.393,0.522 -7.393,0.522l0,1.344c1.916,0.349 3.306,0.824 3.306,0.824l0,16.51c-1.739,0.429 -3.306,1.3 -3.306,1.3l0,1.301l10.445,0ZM498.628,73.127l0,-1.301c0,0 -1.355,-0.824 -2.965,-1.3c0,0 0.221,-4.098 0.221,-9.799c0,-6.536 -2.26,-9.664 -7.009,-9.664c-3.831,0 -6.532,2.218 -7.577,4.788l-0.085,0c0,0 0.302,-1.835 0.302,-4.525c-4.173,-0.131 -7.354,0.522 -7.354,0.522l0,1.344c1.966,0.349 3.313,0.824 3.313,0.824l0,16.51c-1.83,0.476 -3.313,1.3 -3.313,1.3l0,1.301l10.321,0l0,-1.255c0,0 -1.353,-0.782 -2.921,-1.307l0,-9.535c0,-3.438 2.089,-7.231 5.793,-7.231c3.441,0 4.4,3.139 4.4,8.016c0,4.918 -0.178,8.75 -0.178,8.75c-1.567,0.525 -2.918,1.307 -2.918,1.307l0,1.255l9.97,0ZM524.395,71.35c-1.781,-0.306 -3.046,-0.785 -3.046,-0.785l0,-29.467c-4.258,-0.093 -7.396,0.56 -7.396,0.56l0,1.348c2,0.348 3.313,0.781 3.313,0.781l0,7.581c0,0 -1.834,-0.213 -3.75,-0.213c-6.533,0 -11.491,4 -11.491,12.187c0,6.092 3.089,10.18 8.185,10.18c3.654,0 6.316,-2.303 7.353,-4.873l0.047,0.043c0,-0.004 -0.305,1.869 -0.263,4.566c3.955,0.132 7.048,-0.525 7.048,-0.525l0,-1.383ZM517.266,63.514c0,4.004 -2.446,7.139 -5.357,7.139c-3.618,0 -5.622,-3.355 -5.622,-8.231c0,-6.01 2.395,-9.144 6.445,-9.144c1.875,0 3.353,0.433 4.534,1.222l0,9.014ZM542.812,66.949c0,-7.228 -10.406,-5.483 -10.406,-11.013c0,-1.653 1.049,-2.698 2.917,-2.698c1.266,0 2.401,0.303 3.05,0.647c0.31,1.27 0.742,2.57 1.305,3.572l1.563,0l0,-5.829c-1.304,-0.348 -3.128,-0.565 -5.001,-0.565c-4.662,0 -7.837,2.605 -7.837,5.961c0,7.445 10.319,5.576 10.319,11.017c0,2.09 -1.309,2.961 -3.227,2.961c-1.607,0 -3,-0.437 -4.045,-0.871c-0.26,-1.174 -0.821,-2.488 -1.308,-3.572l-1.603,0l0,6.223c1.734,0.437 3.604,0.654 5.829,0.654c4.401,0 8.444,-2.694 8.444,-6.487ZM552.995,70.781c0,-1.567 -1.174,-2.693 -2.698,-2.693c-1.564,0 -2.74,1.126 -2.74,2.693c0,1.565 1.176,2.741 2.74,2.741c1.524,0 2.698,-1.176 2.698,-2.741Z\",\n style: {\n fillRule: \"nonzero\"\n }\n }))));\n}\n\nvar ForwardRef = /*#__PURE__*/React.forwardRef(SvgDwClaim);\nexport default __webpack_public_path__ + \"static/media/dw-claim.dad03c02.svg\";\nexport { ForwardRef as ReactComponent };","import styled from 'styled-components';\nimport { ReactComponent as ClaimLogo } from '../svg/dw-claim.svg';\n\nexport const StyledClaimLogo = styled(props => <ClaimLogo {...props} />)``;\n","import styled from 'styled-components';\nimport { StyledLogo as LogoIcon } from '../../assets/icons/DwLogo';\nimport { StyledClaimLogo as ClaimIcon } from '../../assets/icons/DwClaim';\nimport { colors, resolutions } from '../../utils/css';\n\nexport const Logo = ({ className, url = 'https://dw.com' }) => {\n return (\n <a\n className={className}\n href={url}\n aria-label=\"common.header.logo\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n <LogoIcon className=\"logo\" />\n <ClaimIcon className=\"claim\" />\n </a>\n );\n};\n\nexport const StyledLogo = styled(Logo)`\n display: inline-block;\n margin: 0 20px;\n direction: ltr;\n\n svg.logo {\n width: 40px;\n height: 23px;\n fill: ${colors.DW_DARK_BLUE};\n transition: fill 80ms cubic-bezier(0.43, 0, 0.09, 1) 67ms;\n }\n\n svg.claim {\n display: none;\n }\n\n @media (min-width: ${resolutions.min.tablet}px) {\n svg.logo {\n width: 54px;\n height: 31px;\n }\n\n svg.claim {\n display: none;\n }\n }\n\n @media (min-width: ${resolutions.min.desktop}px) {\n svg.logo {\n width: 88px;\n height: 50px;\n }\n\n svg.claim {\n display: inline-block;\n margin: 0 12px;\n width: 140px;\n height: 50px;\n fill: ${colors.DW_LIGHT_BLUE};\n transition: fill 80ms cubic-bezier(0.43, 0, 0.09, 1) 67ms;\n }\n }\n`;\n","import styled from 'styled-components';\nimport { resolutions } from '../../utils/css';\nimport { StyledLogo as Logo } from '../Logo/Logo';\n\nexport const DesktopBanner = ({ className }) => {\n return (\n <aside className={className}>\n <Logo url=\"http://dw.com/en\" target=\"_blank\" />\n </aside>\n );\n};\n\nexport const StyledDesktopBanner = styled(DesktopBanner)`\n display: grid;\n height: 110px;\n margin-left: -20px;\n margin-right: -20px;\n padding: 26px 15px;\n width: 100%;\n\n @media (max-width: ${resolutions.max.tablet}px) {\n display: none !important;\n }\n`;\n","export default __webpack_public_path__ + \"static/media/dw-logo-tablet.ac032dbb.svg\";","export default __webpack_public_path__ + \"static/media/dw-logo-mobile.7e6e58ec.svg\";","import { createContext, useState } from 'react';\n\n/**\n * @deprecated since we use StylisRTLPlugin in MainPage we should not need to distinguish between\n * ltr/rtl in components because it's managed globally. This context still exists for old copy&paste\n * components because it has not been removed yet. The isRtl result of this provider is now always\n * undefined because the value is not set anymore.\n */\nexport const RtlContext = createContext({});\n\nexport const RtlProvider = props => {\n const { initialIsRtl = false, children } = props;\n\n const [isRtl, setIsRtlValue] = useState(initialIsRtl);\n const setIsRtl = isRtlValue => setIsRtlValue(isRtlValue);\n\n const isRtlContext = {\n isRtl,\n setIsRtl,\n };\n\n return <RtlContext.Provider value={isRtlContext}>{children}</RtlContext.Provider>;\n};\n","import { useContext } from 'react';\nimport { RtlContext } from '../context/rtlContext';\n\n/**\n * @deprecated since we use StylisRTLPlugin in MainPage we should not need to distinguish between\n * ltr/rtl in components because it's managed globally. This context still exists for old copy&paste\n * components because it has not been removed yet. The isRtl result of this provider is now always\n * undefined because the value is not set anymore.\n */\nexport const useRtlContext = () => useContext(RtlContext);\n","import { StyledText as Text } from '../Text/Text';\nimport { useTranslation } from '../../hooks/useTranslation';\nimport { useRtlContext } from '../../hooks/useRtl';\n\nexport const I18nText = ({ translation, isA, className, ...restProps }) => {\n const { isRtl } = useRtlContext();\n const label = useTranslation(translation);\n\n return <Text {...{ className, isA, isRtl, ...restProps }}>{label}</Text>;\n};\n","import styled from 'styled-components';\nimport { colors, resolutions } from '../../utils/css';\nimport dwLogoTablet from '../../assets/svg/dw-logo-tablet.svg';\nimport dwLogoMobile from '../../assets/svg/dw-logo-mobile.svg';\nimport { I18nText } from '../I18n/I18nText';\n\nexport const MobileBanner = ({ className, title }) => {\n return (\n <aside className={className}>\n <div className=\"mobile-banner\">\n {/* eslint-disable-next-line jsx-a11y/anchor-has-content */}\n <a\n className=\"mobile-banner-logo\"\n href=\"http://dw.com/en\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n />\n <div className=\"mobile-banner-brand\">\n <I18nText translation={title} />\n </div>\n </div>\n </aside>\n );\n};\n\nexport const StyledMobileBanner = styled(MobileBanner)`\n border-width: 0 0 1px;\n box-shadow: inset 0 1px 0 ${colors.LG_TRANSPARENT_WHITE_15},\n 0 1px 5px ${colors.LG_TRANSPARENT_BLACK_075};\n line-height: 23px;\n position: fixed;\n left: 0px;\n right: 0px;\n top: 0px;\n z-index: 1030;\n\n @media (min-width: ${resolutions.min.tablet}px) {\n border-radius: 0px;\n height: 80px;\n }\n\n @media (min-width: ${resolutions.min.desktop}px) {\n display: none !important;\n }\n\n .mobile-banner {\n background: ${colors.LG_WHITE};\n border-bottom: 1px solid ${colors.LG_GRAY_14};\n height: 60px;\n margin-bottom: 0px;\n min-height: 50px;\n position: relative;\n width: 100%;\n z-index: 100;\n\n &:before,\n &:after {\n display: table;\n content: ' ';\n }\n\n @media (min-width: ${resolutions.min.tablet}px) {\n height: 80px;\n }\n }\n\n .mobile-banner-logo {\n background: url(${dwLogoMobile});\n color: ${colors.LG_GRAY_15};\n display: inline-block;\n /*! @noflip */\n float: left;\n font-size: 18px;\n font-weight: 400;\n height: 23px;\n line-height: 20px;\n margin: 17px 15px 0 15px;\n padding: 0;\n text-shadow: 0 1px 0 ${colors.LG_TRANSPARENT_WHITE_25};\n width: 40px;\n\n @media (min-width: ${resolutions.min.tablet}px) and (max-width: ${resolutions.max.tablet}px) {\n background: url(${dwLogoTablet});\n height: 31px;\n margin-top: 24px;\n width: 54px;\n }\n }\n\n .mobile-banner-brand {\n color: ${colors.LG_BLUE_5};\n font-size: 17px;\n margin: 19px auto 0 auto;\n position: relative;\n text-align: center;\n text-transform: uppercase;\n width: auto;\n\n @media (min-width: ${resolutions.min.tablet}px) and (max-width: ${resolutions.max.tablet}px) {\n font-size: 27px;\n margin: 23px auto 0 auto;\n padding-top: 8px;\n width: 300px;\n }\n }\n`;\n","/* eslint-disable no-shadow */\nimport { useCallback, useState } from 'react';\n\nexport const useToggle = ({ initialState = false, key = 'Enter' } = {}) => {\n const [isEnabled, setEnabled] = useState(initialState);\n const toggleOnClick = useCallback(() => {\n setEnabled(isEnabled => !isEnabled);\n }, []);\n\n const toggleOnKeyPress = useCallback(\n e => {\n if (e.key === key) {\n setEnabled(isEnabled => !isEnabled);\n }\n },\n [key],\n );\n\n return [isEnabled, { toggleOnClick, toggleOnKeyPress }];\n};\n","function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport * as React from \"react\";\n\nvar _ref2 = /*#__PURE__*/React.createElement(\"desc\", null, \"Person Icon\");\n\nvar _ref3 = /*#__PURE__*/React.createElement(\"g\", {\n id: \"Seiten\",\n stroke: \"none\",\n strokeWidth: 1,\n fill: \"none\",\n fillRule: \"evenodd\",\n opacity: 1\n}, /*#__PURE__*/React.createElement(\"g\", {\n id: \"06-desk-lektionsinfo+burger\",\n transform: \"translate(-1146.000000, -501.000000)\",\n fill: \"#FFFFFF\"\n}, /*#__PURE__*/React.createElement(\"g\", {\n id: \"burgernavi-d\",\n transform: \"translate(920.000000, 170.000000)\"\n}, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M241.86087,345.655072 C239.603853,344.603859 238.150728,344.078261 237.501449,344.078261 L233.976812,345.284058 L230.35942,344.078261 C230.081158,344.078261 229.578748,344.209661 228.852174,344.472464 C228.1256,344.735267 227.468602,344.990337 226.881159,345.237681 L226,345.655072 L226,347 L241.86087,347 L241.86087,345.655072 Z M229.988406,340.507246 C231.008701,342.64059 232.338156,343.707246 233.976812,343.707246 C235.584549,343.707246 236.898546,342.64059 237.918841,340.507246 C238.289857,340.383574 238.591303,339.997105 238.823188,339.347826 C239.055074,338.698547 239.155556,338.072467 239.124638,337.469565 C239.09372,336.866664 238.954591,336.565217 238.707246,336.565217 C239.047345,335.606758 239.047345,334.802902 238.707246,334.153623 C238.676328,334.060869 238.629952,333.944928 238.568116,333.805797 C238.50628,333.666666 238.343963,333.419325 238.081159,333.063768 C237.818356,332.708211 237.524639,332.391306 237.2,332.113043 C236.875361,331.834781 236.427056,331.579711 235.855072,331.347826 C235.283089,331.115941 234.657008,331 233.976812,331 C232.925599,331 231.998072,331.262799 231.194203,331.788406 C230.390334,332.314012 229.849277,332.839611 229.571014,333.365217 L229.2,334.153623 L229.153623,334.292754 C229.122705,334.35459 229.099517,334.455072 229.084058,334.594203 C229.068599,334.733334 229.05314,334.887922 229.037681,335.057971 C229.022222,335.22802 229.029952,335.444443 229.06087,335.707246 C229.091788,335.97005 229.138164,336.256037 229.2,336.565217 C228.952656,336.565217 228.813527,336.866664 228.782609,337.469565 C228.751691,338.072467 228.852173,338.698547 229.084058,339.347826 C229.315943,339.997105 229.617389,340.383574 229.988406,340.507246 L229.988406,340.507246 Z M230.127536,335.776812 C230.127536,335.684058 230.166183,335.591305 230.243478,335.498551 C230.320773,335.405797 230.552655,335.282126 230.93913,335.127536 C231.325606,334.972946 231.889851,335.05024 232.631884,335.35942 C233.373917,335.637683 234.085021,335.714976 234.765217,335.591304 C235.445414,335.467632 235.971013,335.313044 236.342029,335.127536 C236.713045,334.942028 236.991303,334.756523 237.176812,334.571014 C237.331402,334.571014 237.462801,334.764249 237.571014,335.150725 C237.679228,335.5372 237.733333,335.869564 237.733333,336.147826 L237.733333,337.353623 C237.918842,337.353623 238.042512,337.369082 238.104348,337.4 C238.166184,337.430918 238.197101,337.570047 238.197101,337.817391 C238.197101,338.064736 238.135266,338.435746 238.011594,338.930435 C237.733332,339.456041 237.455074,339.718841 237.176812,339.718841 C237.084058,339.966185 236.952658,340.259902 236.782609,340.6 C236.61256,340.940098 236.257008,341.403862 235.715942,341.991304 C235.174877,342.578747 234.595172,342.872464 233.976812,342.872464 C233.358451,342.872464 232.786476,342.609664 232.26087,342.084058 C231.735263,341.558451 231.364252,341.032853 231.147826,340.507246 L230.823188,339.718841 C230.699516,339.718841 230.560387,339.649276 230.405797,339.510145 C230.251207,339.371014 230.127537,339.239614 230.034783,339.115942 L229.895652,338.930435 C229.61739,337.879222 229.694684,337.353623 230.127536,337.353623 L230.127536,335.776812 Z\",\n id: \"Shape\"\n}))));\n\nfunction SvgIconUserNavi(_ref, svgRef) {\n var title = _ref.title,\n titleId = _ref.titleId,\n props = _objectWithoutProperties(_ref, [\"title\", \"titleId\"]);\n\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n width: \"16px\",\n height: \"16px\",\n viewBox: \"0 0 16 16\",\n xmlns: \"http://www.w3.org/2000/svg\",\n xmlnsXlink: \"http://www.w3.org/1999/xlink\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title === undefined ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, \"Avatar\") : title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _ref2, _ref3);\n}\n\nvar ForwardRef = /*#__PURE__*/React.forwardRef(SvgIconUserNavi);\nexport default __webpack_public_path__ + \"static/media/icon-user-navi.68643217.svg\";\nexport { ForwardRef as ReactComponent };","function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport * as React from \"react\";\n\nfunction SvgIconLanguageWorldW(_ref, svgRef) {\n var title = _ref.title,\n titleId = _ref.titleId,\n props = _objectWithoutProperties(_ref, [\"title\", \"titleId\"]);\n\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n width: \"16px\",\n height: \"16px\",\n viewBox: \"0 0 16 16\",\n xmlns: \"http://www.w3.org/2000/svg\",\n xmlnsXlink: \"http://www.w3.org/1999/xlink\",\n xmlSpace: \"preserve\",\n style: {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n strokeLinejoin: \"round\",\n strokeMiterlimit: 1.41421\n },\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M7.976,0.026c-1.443,0 -2.784,0.36 -4.021,1.082c-1.208,0.707 -2.165,1.665 -2.872,2.873c-0.722,1.252 -1.083,2.599 -1.083,4.043c0,1.443 0.361,2.784 1.083,4.021c0.707,1.208 1.664,2.165 2.872,2.872c1.237,0.722 2.578,1.083 4.021,1.083c1.444,0 2.784,-0.361 4.021,-1.083c1.208,-0.707 2.166,-1.664 2.873,-2.872c0.736,-1.237 1.104,-2.578 1.104,-4.021c0,-1.444 -0.36,-2.784 -1.082,-4.021c-0.707,-1.208 -1.665,-2.166 -2.873,-2.873c-1.252,-0.736 -2.599,-1.104 -4.043,-1.104Zm3.005,6.451c1.208,-0.25 2.268,-0.641 3.182,-1.171c0.383,0.855 0.574,1.76 0.574,2.718c0,1.149 -0.272,2.209 -0.817,3.181c-0.973,-0.486 -1.974,-0.832 -3.005,-1.038c0.088,-0.692 0.132,-1.407 0.132,-2.143c0,-0.53 -0.022,-1.046 -0.066,-1.547Zm2.629,-2.165c-0.942,0.398 -1.878,0.677 -2.806,0.84c-0.25,-1.429 -0.648,-2.659 -1.193,-3.69c0.825,0.206 1.584,0.556 2.276,1.049c0.692,0.494 1.267,1.094 1.723,1.801Zm-3.734,3.712c0,0.781 -0.037,1.429 -0.11,1.944c-0.634,-0.073 -1.23,-0.11 -1.79,-0.11c-0.56,0 -1.156,0.037 -1.789,0.11c-0.074,-0.692 -0.111,-1.34 -0.111,-1.944c0,-0.309 0.015,-0.759 0.044,-1.348c0.516,0.074 1.138,0.111 1.867,0.111c0.729,0 1.344,-0.037 1.845,-0.111c0.03,0.589 0.044,1.039 0.044,1.348Zm-1.414,-6.739c0.589,1.178 0.995,2.526 1.215,4.043c-0.736,0.059 -1.303,0.089 -1.701,0.089c-0.398,0 -0.965,-0.03 -1.701,-0.089c0.236,-1.517 0.641,-2.865 1.215,-4.043c0.103,-0.015 0.265,-0.022 0.486,-0.022c0.221,0 0.383,0.007 0.486,0.022Zm-2.121,0.177c-0.56,1.09 -0.957,2.32 -1.193,3.69c-0.972,-0.192 -1.907,-0.472 -2.806,-0.84c0.471,-0.707 1.05,-1.307 1.734,-1.801c0.685,-0.493 1.44,-0.843 2.265,-1.049Zm-4.551,3.844c0.942,0.53 2.003,0.921 3.181,1.171c-0.044,0.501 -0.066,1.017 -0.066,1.547c0,0.736 0.044,1.451 0.133,2.143c-1.032,0.206 -2.033,0.552 -3.005,1.038c-0.531,-0.986 -0.796,-2.047 -0.796,-3.181c0,-0.943 0.184,-1.849 0.553,-2.718Zm0.906,6.894c0.824,-0.324 1.679,-0.56 2.563,-0.707c0.235,1.119 0.596,2.143 1.082,3.071c-0.722,-0.192 -1.395,-0.49 -2.021,-0.895c-0.627,-0.405 -1.168,-0.895 -1.624,-1.469Zm4.794,2.541c-0.486,-0.973 -0.854,-2.114 -1.105,-3.425c0.531,-0.044 1.068,-0.066 1.613,-0.066c0.545,0 1.068,0.022 1.569,0.066c-0.25,1.311 -0.619,2.452 -1.105,3.425c-0.103,0.014 -0.265,0.022 -0.486,0.022c-0.221,0 -0.383,-0.008 -0.486,-0.022Zm2.121,-0.177c0.486,-0.928 0.847,-1.952 1.083,-3.071c0.898,0.147 1.76,0.383 2.585,0.707c-0.471,0.589 -1.02,1.086 -1.646,1.491c-0.626,0.405 -1.3,0.696 -2.022,0.873Z\",\n style: {\n fill: \"#fff\",\n fillRule: \"nonzero\"\n }\n }));\n}\n\nvar ForwardRef = /*#__PURE__*/React.forwardRef(SvgIconLanguageWorldW);\nexport default __webpack_public_path__ + \"static/media/icon-language-world-w.bb8502bb.svg\";\nexport { ForwardRef as ReactComponent };","function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport * as React from \"react\";\n\nvar _ref2 = /*#__PURE__*/React.createElement(\"g\", {\n fill: \"none\",\n fillRule: \"evenodd\"\n}, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M-2.5-2.5h17v17h-17z\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n fill: \"#FFF\",\n d: \"M12.906 1.219C7.434 4.9 5.47 10.25 5.47 10.25H4.406S2.581 7.472.688 6.531l.53-1.062c2.089.469 3.72 1.593 3.72 1.593s1.78-3.61 7.437-6.906l.531 1.063z\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M-4 16h20V-4H-4z\"\n}));\n\nfunction SvgTick(_ref, svgRef) {\n var title = _ref.title,\n titleId = _ref.titleId,\n props = _objectWithoutProperties(_ref, [\"title\", \"titleId\"]);\n\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n width: 13,\n height: 11,\n viewBox: \"0 0 13 11\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _ref2);\n}\n\nvar ForwardRef = /*#__PURE__*/React.forwardRef(SvgTick);\nexport default __webpack_public_path__ + \"static/media/tick.adf0c598.svg\";\nexport { ForwardRef as ReactComponent };","import { isServer } from '../utils/ssr';\n\nconst domainWithProtocol = isServer() ? '' : window.location.origin;\n\nexport const USER = {\n AS_URL: '/auth/',\n AS_URL_WITH_DOMAIN: `${domainWithProtocol}/auth/`,\n PS_URL: `${domainWithProtocol}/profiles/`,\n LOGGED_USER_RESOURCE: `${domainWithProtocol}/profiles/protected/user`,\n TICKET_PARAM_NAME: 'ticket',\n};\n","export const FEEDBACK_TYPES = {\n OTHER: 'OTHER',\n LOGIN: 'LOGIN',\n LOGIN_ERROR: 'LOGIN_ERROR',\n LOGIN_FB: 'LOGIN_FB',\n LOGOUT: 'LOGOUT',\n SESSION_TIMEOUT: 'SESSION_TIMEOUT',\n PROFILE_SERVICE_UNAVAILABLE: 'PROFILE_SERVICE_UNAVAILABLE',\n MISSING_USER_PROFILE: 'MISSING_USER_PROFILE',\n FORCED_LOGOUT: 'FORCED_LOGOUT',\n PASSWORD_CHANGED: 'PASSWORD_CHANGED',\n MAIL_CHANGED: 'MAIL_CHANGED',\n MAIL_CHANGE_REQUEST: 'MAIL_CHANGE_REQUEST',\n EMAIL_ALREADY_EXISTS: 'EMAIL_ALREADY_EXISTS',\n REGISTERED: 'REGISTERED',\n REGISTRATION_CONFIRMED: 'REGISTRATION_CONFIRMED',\n DELETED: 'DELETED',\n INVALID_TOKEN: 'INVALID_TOKEN',\n PASSWORD_RESET_REQUESTED: 'PASSWORD_RESET_REQUESTED',\n PASSWORD_RESET_SET: 'PASSWORD_RESET_SET',\n PASSWORD_CHANGE_WRONG_PASSWORD: 'PASSWORD_CHANGE_WRONG_PASSWORD',\n PROFILE_UPDATED: 'PROFILE_UPDATED',\n PASSWORD_CHANGE: 'PASSWORD_CHANGE_',\n INVALID_CERTIFICATE: 'INVALID_CERTIFICATE',\n VOCABULARY_TRAINER_UNAVAILABLE: 'VOCABULARY_TRAINER_UNAVAILABLE',\n VOCABULARY_TRAINER_NO_VOCABULARIES: 'VOCABULARY_TRAINER_NO_VOCABULARIES',\n CERTIFICATE_NO_TRANSCRIPTION: 'CERTIFICATE_NO_TRANSCRIPTION',\n MISSING_TRANSCRIPTION: 'MISSING_TRANSCRIPTION',\n USER_ALREADY_EXISTS: 'USER_ALREADY_EXISTS',\n USER_ALREADY_CONFIRMED: 'USER_ALREADY_CONFIRMED',\n};\n\nexport const TYPES_WITH_PROFILE_PAGE_AS_TARGET = [\n FEEDBACK_TYPES.PASSWORD_CHANGE_WRONG_PASSWORD,\n FEEDBACK_TYPES.PASSWORD_CHANGED,\n FEEDBACK_TYPES.EMAIL_ALREADY_EXISTS,\n FEEDBACK_TYPES.PROFILE_UPDATED,\n FEEDBACK_TYPES.CERTIFICATE_NO_TRANSCRIPTION,\n];\n\nexport const TYPES_WITH_HOME_PAGE_AS_TARGET = [\n FEEDBACK_TYPES.OTHER,\n FEEDBACK_TYPES.MAIL_CHANGED,\n FEEDBACK_TYPES.MAIL_CHANGE_REQUEST,\n FEEDBACK_TYPES.REGISTERED,\n FEEDBACK_TYPES.REGISTRATION_CONFIRMED,\n FEEDBACK_TYPES.PASSWORD_RESET_REQUESTED,\n FEEDBACK_TYPES.PASSWORD_RESET_SET,\n FEEDBACK_TYPES.USER_ALREADY_EXISTS,\n];\n\nexport const COMMON_FEEDBACK_TRANSLATION_KEYS = {\n TITLE: 'common.feedback',\n OK_BUTTON: 'common.ok',\n};\n","import { invert } from '../commons';\n\nexport const LANG_CODES = Object.freeze({\n NEUTRAL: '',\n GERMAN: 'de',\n ENGLISH: 'en',\n RUSSIAN: 'ru',\n CHINESE: 'zh',\n PORTUGUESE_BRAZIL: 'pt-br',\n ALBANIAN: 'sq',\n AMHARIC: 'am',\n ARABIC: 'ar',\n BENGALI: 'bn',\n BOSNIAN: 'bs',\n BULGARIAN: 'bg',\n DARI: 'fa-af',\n FRENCH: 'fr',\n GREEK: 'el',\n HAUSA: 'ha',\n HINDI: 'hi',\n INDONESIAN: 'id',\n KISWAHILI: 'sw',\n CROATIAN: 'hr',\n MACEDONIAN: 'mk',\n PASHTO: 'ps',\n PERSIAN: 'fa-ir',\n POLISH: 'pl',\n PORTUGUESE_AFRICA: 'pt-002',\n ROMANIAN: 'ro',\n SERBIAN: 'sr',\n SPANISH: 'es',\n TURKISH: 'tr',\n UKRANIAN: 'uk',\n URDU: 'ur',\n});\n\nconst codeToLang = invert(LANG_CODES);\n\nexport const toLangCode = lang => lang && LANG_CODES[lang.toUpperCase()];\nexport const toLang = code => code && codeToLang[code.toLowerCase()];\n","const config = {\n graphQL: {\n baseUrl: process.env.REACT_APP_GRAPHQL_BASE_URL || '/graphql',\n },\n dw: {\n baseUrl: 'https://www.dw.com',\n mobileUrl: 'https://m.dw.com',\n },\n reCaptcha: {\n siteKey: process.env.REACT_APP_RECAPTCHA_SITEKEY || '6Ld5YwUTAAAAAJnUx8sjEIS5VSJ94AdGcC0BfDXV',\n },\n // static urls used on download page. Will be replaced with webapi based solution (LG-719).\n download: {\n videoBaseUrl: 'https://tvdownloaddw-a.akamaihd.net/downloads/Events/mp4/',\n audioBaseUrl: 'https://radiodownloaddw-a.akamaihd.net/downloads/Events/dwelle/',\n },\n};\n\nexport default config;\n","import { invert } from '../commons';\nimport { isServer } from '../ssr';\nimport globals from '../globals';\nimport config from '../../config';\n\nconst typeToUrlPrefixMap = {\n COURSE: 'c',\n GRAMMAR: 'gr',\n LESSON: 'l',\n PLACEMENT: 'placement',\n FINAL: 'final',\n};\nconst urlPrefixToTypeMap = invert(typeToUrlPrefixMap);\n\nexport const typeToUrlPrefix = type => {\n const typeName = type\n .replace(/([A-Z])/g, '_$1')\n .slice(1)\n .toUpperCase();\n return typeToUrlPrefixMap[type] || typeToUrlPrefixMap[typeName] || type.toLowerCase();\n};\n\nexport const urlPrefixToType = typeId => urlPrefixToTypeMap[typeId] || typeId.toUpperCase();\n\n// If it gets too complex here, then maybe better to avoid negative match\n// and list special characters. But then watch out for very special characters ◕◡◕ 😛\nconst allowedUrlCharactersRegexParts = {\n general: 'a-zA-Z',\n numbers: '0-9',\n whiteSpaces: ' ',\n allowedSpecial: '\\\\-äöüÄÖÜß',\n arabic: '\\\\u0600-\\\\u06FF',\n cyrillic: '\\\\u0400-\\\\u04FF',\n greek_and_coptic: '\\\\u0370-\\\\u03FF',\n chinese: '\\\\u4E00-\\\\u9FFF',\n devanagari: '\\\\u0900-\\\\u097F',\n bengali: '\\\\u0980-\\\\u09FF',\n ethiopian: '\\\\u1200-\\\\u137F',\n};\nconst onlySpecialCharactersRegex = new RegExp(\n `[^${Object.values(allowedUrlCharactersRegexParts).join('')}]`,\n 'g',\n);\n\nexport const normalizeUrlName = name =>\n name.replace(onlySpecialCharactersRegex, '').replace(/\\s/g, '-').toLowerCase();\n\nexport const encodeUrlNamePart = name => encodeURIComponent(normalizeUrlName(name));\n\nexport const urlForNav = ({ id }) => `/s-${id}`;\n\nexport const urlHostNameFromString = ({ url }) => {\n try {\n return new URL(url).hostname;\n } catch (e) {\n console.log(`error parsing url : ${url}\\n`, e);\n return false;\n }\n};\n\nexport const mainContentFullUrl = () => (isServer() ? null : globals.window.location.href);\n\nexport const getVideoDownloadUrl = ({ videoUrl }) => `${config.download.videoBaseUrl}${videoUrl}`;\n\nexport const getAudioDownloadUrl = ({ audioUrl }) => `${config.download.audioBaseUrl}${audioUrl}`;\n\nexport const getDownloadUrl = ({ staticBaseHost, downloadId, filename }) =>\n `${staticBaseHost}/downloads/${downloadId}/${filename.toLowerCase()}`;\n\nexport const getArticleUrl = ({ articleId, name }) =>\n `${config.dw.baseUrl}/de/${normalizeUrlName(name)}/a-${articleId}`;\n\nexport const getDWStructureUrl = ({ id, name, langCode }) =>\n `${config.dw.baseUrl}/${langCode}/${normalizeUrlName(name)}/s-${id}`;\n\nexport const getQueryParamValueFrom = ({ from = globals.window.location.search, value }) =>\n new URLSearchParams(from).get(value);\nexport const objectToQueryParams = obj => new URLSearchParams(obj).toString();\n","import { LANG_CODES } from './langMapper';\n\nconst PLACEMENT_TEST_COURSE_IDS = Object.freeze({\n [LANG_CODES.ENGLISH]: 36519788,\n [LANG_CODES.GERMAN]: 36519653,\n [LANG_CODES.ARABIC]: 36519905,\n [LANG_CODES.PERSIAN]: 45477054,\n [LANG_CODES.PORTUGUESE_BRAZIL]: 45476784,\n [LANG_CODES.RUSSIAN]: 45476947,\n [LANG_CODES.SPANISH]: 47994050,\n [LANG_CODES.FRENCH]: 47994032,\n [LANG_CODES.CHINESE]: 47993840,\n [LANG_CODES.POLISH]: 50080753,\n});\n\nexport const getPlacementTestIdForLangCode = langCode => PLACEMENT_TEST_COURSE_IDS[langCode];\n\nexport const isPlacementTestCourse = courseId => {\n const allIds = Object.values(PLACEMENT_TEST_COURSE_IDS);\n return allIds.includes(courseId);\n};\n","import { USER } from '../../constants/userUrl';\nimport { FEEDBACK_TYPES, TYPES_WITH_PROFILE_PAGE_AS_TARGET } from '../../constants/feedback';\nimport { toLangCode } from '../mappers/langMapper';\nimport { encodeUrlNamePart, typeToUrlPrefix } from './url';\nimport {\n getPlacementTestIdForLangCode,\n isPlacementTestCourse,\n} from '../mappers/placementTestCourseIds';\nimport config from '../../config';\n\nexport const PAGE_OVERVIEW = '/overview';\nexport const PAGE_REGISTRATION = '/user/register';\nexport const PAGE_PROFILE = '/user/profile';\nexport const PAGE_PASSWORD_CHANGE = '/user/password/change';\nexport const PAGE_PASSWORD_RESET = '/user/password/reset';\nexport const PAGE_VOCABULARY_TRAINER = '/user/vocabularyTrainer';\nexport const PAGE_VOCABULARY_TRAINER_START = '/user/vocabularyTrainerStart';\nexport const STATUS_FEEDBACK = '/user/feedback/status';\nexport const PAGE_GRAMMAR = '/grammar';\nconst PAGE_HELP = '/help';\nexport const PAGE_VOCABULARY = '/vocabulary';\nexport const PAGE_LEGAL = '/legal';\nexport const PAGE_PLACEMENT_TEST = '/placementDashboard';\nexport const EXERCISES_RESULT_URL_SUFFIX = 'ler';\nconst COURSE_PREFIX = 'c-';\nconst LESSON_PREFIX = 'l-';\nconst EXERCISE_PREFIX = 'e-';\nconst LESSON_GRAMMAR_URL_SUFFIX = 'gr-';\nexport const LESSON_VOCABULARY_URL_SUFFIX = 'lv';\nconst LESSON_REGIONAL_STUDIES_SUFFIX = 'rs-';\nexport const ALPHABETICAL_ORDER_URL_SUFFIX = 'la';\nexport const LESSON_MANUSCRIPT_SUFFIX = 'lm';\nexport const LESSON_EXTRAS_SUFFIX = 'le';\nexport const LESSON_EXERCISE_RESULT_SUFFIX = 'ler';\nexport const LESSON_SUMMARY_SUFFIX = 'sum';\nconst SUMMARY_URL_SUFFIX = 'sum';\nexport const URL_SEARCH_PARAM_TARGET_PATH = 'target';\n\nexport const getErrorCode = errorResponse => errorResponse && errorResponse.errorCode;\n\nexport const getPrefixedLanguageUrl = (url, langCode) => `/${langCode}${url}`;\nexport const getCasLanguageParam = langCode => {\n if (!langCode) {\n return null;\n }\n return langCode.includes('-') ? langCode.substring(0, langCode.indexOf('-')) : langCode;\n};\n\nexport const getDashboardUrl = langCode => getPrefixedLanguageUrl(PAGE_OVERVIEW, langCode);\n\nexport const getGrammarUrl = langCode => getPrefixedLanguageUrl(PAGE_GRAMMAR, langCode);\n\nexport const getVocabularyPageUrl = langCode => getPrefixedLanguageUrl(PAGE_VOCABULARY, langCode);\n\nexport const getPlacementDashboardUrl = langCode =>\n getPrefixedLanguageUrl(PAGE_PLACEMENT_TEST, langCode);\n\nexport const getLessonExerciseUrl = (languageCode, lessonId, normalizedUrlName, lessonPartId) =>\n `${getLessonUrl(lessonId, languageCode, normalizedUrlName)}/${EXERCISE_PREFIX}${lessonPartId}`;\n\nexport const getLessonGrammarUrl = (languageCode, lessonId, normalizedUrlName, lessonPartId) =>\n `${getLessonUrl(\n lessonId,\n languageCode,\n normalizedUrlName,\n )}/${LESSON_GRAMMAR_URL_SUFFIX}${lessonPartId}`;\n\nexport const getLessonPhonemicChartUrl = (languageCode, lessonId, normalizedUrlName) =>\n `${getLessonUrl(lessonId, languageCode, normalizedUrlName)}/${ALPHABETICAL_ORDER_URL_SUFFIX}`;\n\nexport const getLessonVocabularyUrl = (languageCode, lessonId, normalizedUrlName) =>\n `${getLessonUrl(lessonId, languageCode, normalizedUrlName)}/${LESSON_VOCABULARY_URL_SUFFIX}`;\n\nexport const getLessonRegionalStudiesUrl = (\n languageCode,\n lessonId,\n normalizedUrlName,\n lessonPartId,\n) =>\n `${getLessonUrl(\n lessonId,\n languageCode,\n normalizedUrlName,\n )}/${LESSON_REGIONAL_STUDIES_SUFFIX}${lessonPartId}`;\n\nexport const getRegisterUrl = langCode => getPrefixedLanguageUrl(PAGE_REGISTRATION, langCode);\n\nexport const getUserProfileUrl = langCode => getPrefixedLanguageUrl(PAGE_PROFILE, langCode);\n\nexport const getPasswordChangeUrl = langCode =>\n getPrefixedLanguageUrl(PAGE_PASSWORD_CHANGE, langCode);\n\nexport const getPasswordResetUrl = langCode =>\n getPrefixedLanguageUrl(PAGE_PASSWORD_RESET, langCode);\n\nexport const getCourseUrl = (courseId, langCode, normalizedUrlCourseName) =>\n getPrefixedLanguageUrl(`/${normalizedUrlCourseName}/${COURSE_PREFIX}${courseId}`, langCode);\n\nexport const getLessonUrl = (lessonId, languageCode, normalizedUrlLessonName) =>\n getPrefixedLanguageUrl(`/${normalizedUrlLessonName}/${LESSON_PREFIX}${lessonId}`, languageCode);\n\nexport const getLessonExercisesResultUrl = lessonUrl =>\n `${lessonUrl}/${EXERCISES_RESULT_URL_SUFFIX}`;\n\nexport const getFirstGrammarUrl = (lessonUrl, firstGrammarId) =>\n `${lessonUrl}/gr-${firstGrammarId}`;\n\nexport const getVocabularyUrl = lessonUrl => `${lessonUrl}/${LESSON_VOCABULARY_URL_SUFFIX}`;\n\nexport const getAlphabeticalOrderUrl = lessonUrl => `${lessonUrl}/${ALPHABETICAL_ORDER_URL_SUFFIX}`;\n\nexport const getFirstRegionalStudiesUrl = (lessonUrl, firstRegionalStudiesId) =>\n `${lessonUrl}/${LESSON_REGIONAL_STUDIES_SUFFIX}${firstRegionalStudiesId}`;\n\nexport const getManuscriptUrl = lessonUrl => `${lessonUrl}/${LESSON_MANUSCRIPT_SUFFIX}`;\n\nexport const getExtrasUrl = lessonUrl => `${lessonUrl}/${LESSON_EXTRAS_SUFFIX}`;\n\nexport const getSummaryUrl = lessonUrl => `${lessonUrl}/${SUMMARY_URL_SUFFIX}`;\n\nexport const getPlacementTestResultUrl = ({ langCode, id, name }) =>\n getPrefixedLanguageUrl(`/${name}/placement-${id}`, langCode);\n\nexport const transformUrlContentPrefix = (lessonPath, type) =>\n lessonPath.replace('/l-', `/${type}-`);\n\nexport const createLinkToResultPage = ({ courseId, isFinalTest, lessonPath }) => {\n if (isFinalTest) return transformUrlContentPrefix(lessonPath, 'final');\n\n if (isPlacementTestCourse(courseId)) return transformUrlContentPrefix(lessonPath, 'placement');\n\n return getLessonExercisesResultUrl(lessonPath);\n};\n\nexport const getHelpUrl = langCode => getPrefixedLanguageUrl(PAGE_HELP, langCode);\nexport const getLegalUrl = langCode => getPrefixedLanguageUrl(PAGE_LEGAL, langCode);\n\nexport const getCourseCertificateUrl = paramUrl =>\n getPrefixedLanguageUrl(`/certificate/${paramUrl}`);\n\nexport const getVocabularyTrainerStartPage = langCode =>\n getPrefixedLanguageUrl(PAGE_VOCABULARY_TRAINER_START, langCode);\n\nexport const getVocabularyTrainerPage = langCode =>\n getPrefixedLanguageUrl(PAGE_VOCABULARY_TRAINER, langCode);\n\nexport const getTargetPageUrl = (type, langCode) => {\n return TYPES_WITH_PROFILE_PAGE_AS_TARGET.includes(type)\n ? getPrefixedLanguageUrl(PAGE_PROFILE, langCode)\n : getDashboardUrl(langCode);\n};\n\nexport const getFeedbackUrl = (type, langCode) =>\n getPrefixedLanguageUrl(`${STATUS_FEEDBACK}/${type}`, langCode);\n\nexport const getLoginPage = (origin, langCode, targetPath) => {\n const callbackUrl = origin + getFeedbackUrl(FEEDBACK_TYPES.LOGIN, langCode);\n return getLoginRedirectUrl(callbackUrl, langCode, false, targetPath);\n};\n\nconst getLoginUrlSearchParamsString = (langCode, targetPath) => {\n return targetPath ? `?${URL_SEARCH_PARAM_TARGET_PATH}=${encodeURIComponent(targetPath)}` : '';\n};\n\nexport const getLoginRedirectUrl = (callbackUrl, langCode, withDomain, targetPath) => {\n const urlSearchParams = getLoginUrlSearchParamsString(langCode, targetPath);\n const AUTH_SERVICE_PREFIX = withDomain ? USER.AS_URL_WITH_DOMAIN : USER.AS_URL;\n return `${AUTH_SERVICE_PREFIX}login?service=${encodeURIComponent(\n `${callbackUrl}${urlSearchParams}`,\n )}&locale=${getCasLanguageParam(langCode)}`;\n};\n\nexport const getContentUrl = ({ id, name, language, __typename }) => {\n const langCode = toLangCode(language);\n const langUrlPart = language ? `/${langCode}` : '';\n\n if (id === getPlacementTestIdForLangCode(langCode)) {\n return getPlacementDashboardUrl(langCode);\n }\n\n const nameUrlPart = name ? `/${encodeUrlNamePart(name)}` : '';\n return `${langUrlPart}${nameUrlPart}/${typeToUrlPrefix(__typename)}-${id}`;\n};\n\nexport const getFooterLinkForNamedUrl = ({ namedUrl }) => `${config.dw.mobileUrl}${namedUrl}`;\n\nexport const getDwUrlWithLang = ({ langCode }) => `${config.dw.baseUrl}/${langCode}`;\n\nexport const getDwContactUrl = () => `${config.dw.mobileUrl}/contact`;\n","import { useState, useEffect } from 'react';\nimport globals from '../utils/globals';\nimport { isServer } from '../utils/ssr';\n\nconst CUSTOM_LS_EVENT_NAME = 'local-storage';\n\nconst readValue = key => {\n if (isServer()) {\n return null;\n }\n return JSON.parse(globals.localStorage.getItem(key));\n};\n\nexport const useLocalStorage = key => {\n const [storedValue, setStoredValue] = useState(readValue(key));\n\n const setValue = value => {\n if (!isServer()) {\n globals.localStorage.setItem(key, JSON.stringify(value));\n setStoredValue(value);\n\n // We dispatch a custom event so every useLocalStorage hook are notified\n globals.window.dispatchEvent(new Event(CUSTOM_LS_EVENT_NAME));\n }\n };\n\n useEffect(() => {\n const handleStorageChange = () => {\n setStoredValue(readValue(key));\n };\n\n // this only works for other documents, not the current one\n globals.window.addEventListener('storage', handleStorageChange);\n // this is a custom event, triggered in writeValueToLocalStorage\n globals.window.addEventListener(CUSTOM_LS_EVENT_NAME, handleStorageChange);\n\n return () => {\n globals.window.removeEventListener('storage', handleStorageChange);\n globals.window.removeEventListener(CUSTOM_LS_EVENT_NAME, handleStorageChange);\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n return [storedValue, setValue];\n};\n","import { LANG_CODES } from '../utils/mappers/langMapper';\n\nconst CHINESE_SIMP_POSTFIX = '_simp';\nconst CHINESE_TRAD_POSTFIX = '_trad';\n\nexport const CHINESE_SIMP_TRANSLATION_KEY = `${LANG_CODES.CHINESE}${CHINESE_SIMP_POSTFIX}`;\nexport const CHINESE_TRAD_TRANSLATION_KEY = `${LANG_CODES.CHINESE}${CHINESE_TRAD_POSTFIX}`;\n\nexport const MENU_LANGUAGES = [\n { translationKey: LANG_CODES.GERMAN, langCode: LANG_CODES.GERMAN },\n { translationKey: LANG_CODES.ENGLISH, langCode: LANG_CODES.ENGLISH },\n { translationKey: LANG_CODES.ARABIC, langCode: LANG_CODES.ARABIC },\n { translationKey: LANG_CODES.RUSSIAN, langCode: LANG_CODES.RUSSIAN },\n { translationKey: LANG_CODES.PERSIAN, langCode: LANG_CODES.PERSIAN },\n { translationKey: LANG_CODES.SPANISH, langCode: LANG_CODES.SPANISH },\n { translationKey: LANG_CODES.PORTUGUESE_BRAZIL, langCode: LANG_CODES.PORTUGUESE_BRAZIL },\n { translationKey: LANG_CODES.POLISH, langCode: LANG_CODES.POLISH },\n { translationKey: LANG_CODES.FRENCH, langCode: LANG_CODES.FRENCH },\n { translationKey: CHINESE_SIMP_TRANSLATION_KEY, langCode: LANG_CODES.CHINESE },\n { translationKey: CHINESE_TRAD_TRANSLATION_KEY, langCode: LANG_CODES.CHINESE },\n { translationKey: LANG_CODES.TURKISH, langCode: LANG_CODES.TURKISH },\n];\n","import { useEffect, useRef } from 'react';\nimport { isServer } from '../utils/ssr';\nimport globals from '../utils/globals';\n\nexport const useTimeout = ({ callback, delay = 100, conditional = true }, triggers = []) => {\n const savedCallback = useRef();\n\n useEffect(() => {\n // eslint-disable-next-line fp/no-mutation\n savedCallback.current = callback;\n }, [callback]);\n\n useEffect(() => {\n const tick = () => savedCallback.current();\n if (isServer() || !conditional) {\n return undefined;\n }\n const handleId = globals.window.setTimeout(tick, delay);\n return () => globals.window.clearTimeout(handleId);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [delay, conditional, ...triggers]);\n};\n","/* eslint-disable fp/no-mutation, react-hooks/exhaustive-deps */\nimport { useEffect } from 'react';\nimport globals from '../utils/globals';\n\nconst loadScript = (url, target) =>\n new Promise((resolve, reject) => {\n const tag = globals.document.createElement('script');\n tag.async = false;\n tag.src = url;\n target.appendChild(tag);\n tag.addEventListener('load', resolve, {\n once: true,\n });\n tag.addEventListener('error', reject, {\n once: true,\n });\n });\n\nexport const useScripts = (scriptUrls = [], cb) => {\n useEffect(async () => {\n if (scriptUrls.length > 0) {\n const querySelectorForAllScriptTags = scriptUrls.map(\n scriptUrl => `script[src=\"${scriptUrl}\"]`,\n );\n const existingScriptTags = globals.document.querySelectorAll(querySelectorForAllScriptTags);\n if (existingScriptTags.length !== scriptUrls.length) {\n Promise.all(scriptUrls.map(url => loadScript(url, globals.document.body))).then(cb);\n } else {\n cb();\n }\n }\n }, [scriptUrls]);\n};\n","/* eslint-disable no-undef, react-hooks/exhaustive-deps */\nimport { useEffect, useState } from 'react';\nimport { useLocation } from 'react-router-dom';\nimport { useLocalStorage } from './useLocalStorage';\nimport { useTimeout } from './useTimeout';\nimport globals from '../utils/globals';\nimport { useScripts } from './useScripts';\nimport { LANG_CODES } from '../utils/mappers/langMapper';\n\n// located in public folder\n// @VisibleForTesting\nexport const tongwenScripts = [\n '/tongwen/tongwen_core.min.js',\n '/tongwen/tongwen_table_s2t.min.js',\n '/tongwen/tongwen_table_t2s.min.js',\n '/tongwen/tongwen_table_ps2t.min.js',\n '/tongwen/tongwen_table_pt2s.min.js',\n];\n\nexport const TRADITIONAL_CHIN_LOCAL_STORAGE_KEY = 'isTraditionalChin';\nexport const URL_GET_PARAM_NAME = 'zhongwen';\nexport const URL_GET_PARAM_SIMPLIFIED = 'simp';\nexport const URL_GET_PARAM_TRADITIONAL = 'trad';\n\nconst TOGGLE_BUTTON_SIMPLE_TEXT_CONTENT = '简';\nconst TOGGLE_BUTTON_TRADITIONAL_TEXT_CONTENT = '繁';\n\nexport const useChineseSimpleTraditionalSwitch = (langCode, toggleButtonId) => {\n const isChineseLangCode = langCode === LANG_CODES.CHINESE;\n const scripts = isChineseLangCode ? tongwenScripts : [];\n const [isScriptsLoaded, setScriptsLoaded] = useState(false);\n const [isTranslatedFirstTime, setTranslatedFirstTime] = useState(false);\n useScripts(scripts, () => setScriptsLoaded(true));\n\n const [isTraditionalChin, setIsTraditionalChin] = useLocalStorage(\n TRADITIONAL_CHIN_LOCAL_STORAGE_KEY,\n );\n const { search } = useLocation();\n\n const setToggleButtonTextContent = content => {\n // eslint-disable-next-line fp/no-mutation\n globals.document.getElementById(toggleButtonId).textContent = content;\n };\n\n // used to consider url request param if available\n useEffect(() => {\n if (search) {\n const cleanedSearch = search.replace('?', '');\n const urlParams = new URLSearchParams(cleanedSearch);\n const chineseVersionRequestParam = urlParams.get(URL_GET_PARAM_NAME);\n if (chineseVersionRequestParam === URL_GET_PARAM_SIMPLIFIED) {\n setIsTraditionalChin(false);\n } else if (chineseVersionRequestParam === URL_GET_PARAM_TRADITIONAL) {\n setIsTraditionalChin(true);\n }\n }\n }, []);\n\n // translate content on first load related to current local storage value\n useTimeout({\n callback: () => {\n if (isChineseLangCode && isScriptsLoaded) {\n isTraditionalChin\n ? TongWen.trans2Trad(globals.document)\n : TongWen.trans2Simp(globals.document);\n setTranslatedFirstTime(true);\n }\n },\n delay: 300,\n });\n\n // if translated initially or later with toggling button - we need to set button content again\n // because the simple one is also translated into the traditional one.\n useTimeout(\n {\n callback: () => {\n if (isTraditionalChin) {\n setToggleButtonTextContent(TOGGLE_BUTTON_SIMPLE_TEXT_CONTENT);\n } else {\n setToggleButtonTextContent(TOGGLE_BUTTON_TRADITIONAL_TEXT_CONTENT);\n }\n },\n delay: 300,\n },\n [isTraditionalChin, isTranslatedFirstTime],\n );\n\n const trans2Simple = () => {\n if (isScriptsLoaded) {\n TongWen.trans2Simp(globals.document);\n setIsTraditionalChin(false);\n }\n };\n\n const trans2Traditional = () => {\n if (isScriptsLoaded) {\n TongWen.trans2Trad(globals.document);\n setIsTraditionalChin(true);\n }\n };\n\n return { isTraditionalChin, trans2Simple, trans2Traditional };\n};\n","import classnames from 'classnames';\nimport styled from 'styled-components';\nimport { ReactComponent as TickImg } from '../../../assets/svg/tick.svg';\nimport { getDashboardUrl } from '../../../utils/url/urlFactory';\nimport { useI18nContext } from '../../../context/I18nContext';\nimport { useLocalStorage } from '../../../hooks/useLocalStorage';\nimport { LANG_CODES } from '../../../utils/mappers/langMapper';\nimport {\n CHINESE_SIMP_TRANSLATION_KEY,\n CHINESE_TRAD_TRANSLATION_KEY,\n} from '../../../constants/menuLanguageCodes';\nimport {\n TRADITIONAL_CHIN_LOCAL_STORAGE_KEY,\n URL_GET_PARAM_NAME,\n URL_GET_PARAM_SIMPLIFIED,\n URL_GET_PARAM_TRADITIONAL,\n} from '../../../hooks/useChineseSimpleTraditionalSwitch';\nimport { colors, resolutions } from '../../../utils/css';\n\nconst isLanguageSelected = ({ languageTranslationKey, currentLanguage, isTraditionalChin }) => {\n const isCurrentLanguageChinese = currentLanguage === LANG_CODES.CHINESE;\n if (isCurrentLanguageChinese) {\n return (\n (isTraditionalChin && languageTranslationKey === CHINESE_TRAD_TRANSLATION_KEY) ||\n (!isTraditionalChin && languageTranslationKey === CHINESE_SIMP_TRANSLATION_KEY)\n );\n }\n return languageTranslationKey === currentLanguage;\n};\n\nconst getDashBoardUrlForLanguage = ({ languageTranslationKey, language }) => {\n const dashboardBaseUrl = getDashboardUrl(language);\n if (languageTranslationKey === CHINESE_SIMP_TRANSLATION_KEY) {\n return `${dashboardBaseUrl}?${URL_GET_PARAM_NAME}=${URL_GET_PARAM_SIMPLIFIED}`;\n }\n if (languageTranslationKey === CHINESE_TRAD_TRANSLATION_KEY) {\n return `${dashboardBaseUrl}?${URL_GET_PARAM_NAME}=${URL_GET_PARAM_TRADITIONAL}`;\n }\n return dashboardBaseUrl;\n};\n\nexport const LanguageSelectionButton = ({\n language,\n translationKey: languageTranslationKey,\n langCode: currentLanguage,\n}) => {\n const { i18n } = useI18nContext();\n const [isTraditionalChin] = useLocalStorage(TRADITIONAL_CHIN_LOCAL_STORAGE_KEY);\n\n return (\n <StyledLanguageSelectionButton className={`lang-${languageTranslationKey}`}>\n <a\n className=\"lang-nav\"\n href={getDashBoardUrlForLanguage({ languageTranslationKey, language })}\n role=\"button\"\n >\n <span>\n {`${i18n.t(`header.menu.language.${languageTranslationKey}`)} - ${i18n.t(\n `header.menu.language.native.${languageTranslationKey}`,\n )}`}\n </span>\n <span\n className={classnames('icon', {\n hidden: !isLanguageSelected({\n languageTranslationKey,\n currentLanguage,\n isTraditionalChin,\n }),\n })}\n >\n <i>\n <TickImg />\n </i>\n </span>\n </a>\n </StyledLanguageSelectionButton>\n );\n};\n\nexport const StyledLanguageSelectionButton = styled('li')`\n border-bottom: 1px solid ${colors.LG_BLUE_4};\n display: block;\n float: left;\n width: 100%;\n\n &:first-child {\n border-top: 1px solid ${colors.LG_BLUE_4};\n }\n\n span {\n padding: 0 10px;\n }\n\n .lang-nav {\n display: inline-block;\n padding: 20px 25px;\n width: 100%;\n\n @media (min-width: ${resolutions.min.tablet}px) {\n padding: 20px;\n }\n }\n`;\n","export const API_CALL = 'API_CALL';\n\nexport const apiAction = ({\n url = '',\n method = 'GET',\n data = null,\n onSuccess = () => {},\n onFailure = () => {},\n headersOverride = null,\n}) => ({\n type: API_CALL,\n payload: {\n url,\n method,\n data,\n onSuccess,\n onFailure,\n headersOverride,\n },\n});\n","export const JSON_CONTENT_TYPE = 'application/json';\n\nexport const BASIC_JSON_CONTENT_TYPE_HEADER = {\n headers: {\n 'Content-Type': JSON_CONTENT_TYPE,\n },\n};\n","export const buildParamRegex = paramName =>\n new RegExp(`[?&]${encodeURIComponent(paramName)}=([^&]*)`);\n\n// eslint-disable-next-line consistent-return\nexport const getFromUrl = (url, name, regexBuilder) => {\n const paramRegex = regexBuilder(name);\n const matchArray = paramRegex.exec(url);\n if (matchArray) {\n return decodeURIComponent(matchArray[1]);\n }\n};\n\nexport const getSearchParam = (location, name) =>\n getFromUrl(location.search, name, buildParamRegex);\n\nexport const removeSearchParam = (location, name) => {\n const paramRegex = buildParamRegex(name);\n const rawWiththoutParam = location.search ? location.search.replace(paramRegex, '') : '';\n if (rawWiththoutParam && rawWiththoutParam[0] !== '?') {\n return `?${rawWiththoutParam.substring(1)}`;\n }\n return rawWiththoutParam;\n};\n\nexport const containsSearchParam = (location, name) => {\n const paramRegex = buildParamRegex(name);\n return paramRegex.test(location.search);\n};\n\nexport const getPathVariable = (location, name) =>\n getFromUrl(location.pathname, name, buildPathVariableRegex);\n\nconst buildPathVariableRegex = pathVariablePrefix =>\n new RegExp(`${encodeURIComponent(pathVariablePrefix)}-(\\\\d*)`);\n\nexport const isPathInExerciseNavigationWhiteList = pathname => {\n const permittedNavigationPathsRegexp = new RegExp(\n /(\\/e-[0-9]+|\\/ler|\\/placement-[0-9]+|\\/final-[0-9]+)$/,\n 'g',\n );\n return permittedNavigationPathsRegexp.test(pathname);\n};\n","import { getSearchParam, removeSearchParam } from './url/urlUtils';\nimport { USER } from '../constants/userUrl';\n\nexport const getTicketFromUrlParam = location => getSearchParam(location, USER.TICKET_PARAM_NAME);\n\nexport const getTicketDomain = (origin, location) =>\n encodeURIComponent(\n origin + location.pathname + removeSearchParam(location, USER.TICKET_PARAM_NAME),\n );\n\nexport const formatRegistrationUserData = ({ userData, captchaToken, langCode }) => {\n const {\n sex,\n firstName,\n lastName,\n email,\n password,\n country,\n teacher,\n newsletter,\n year,\n } = userData;\n\n return {\n sex,\n firstName,\n lastName,\n email,\n password,\n country,\n 'g-recaptcha-response': captchaToken,\n teacher,\n newsletter,\n recaptcha: captchaToken,\n contactLanguage: langCode,\n ...(year && createDateOfBirth({ year })),\n };\n};\n\nexport const formatUserProfileData = ({ data }) => {\n const { year, ...restProps } = data;\n\n return {\n ...restProps,\n ...(year && createDateOfBirth({ year })),\n };\n};\n\nconst createDateOfBirth = ({ year }) => ({\n dateOfBirth: `${year}-01-01`,\n});\n\nexport const deconstructDateOfBirth = dateOfBirth => {\n if (!dateOfBirth) return {};\n\n const datePartials = dateOfBirth.split('-');\n\n return {\n year: datePartials[0],\n month: datePartials[1],\n day: datePartials[2],\n };\n};\n","import { USER } from '../constants/userUrl';\nimport { BASIC_JSON_CONTENT_TYPE_HEADER } from '../constants/services';\nimport { formatRegistrationUserData, formatUserProfileData } from '../utils/userUtils';\n\nexport const LOGOUT_SUFFIX = 'public/logout';\nconst NOT_LOGGED_USER_SUFFIX = 'public/user';\nconst LOGGED_USER_SUFFIX = 'protected/user';\nexport const PROFILE_SUFFIX = 'profile';\nconst REGISTRATION_SUFFIX = 'registration';\nexport const PS_PREFIX = USER.PS_URL;\nconst NOT_LOGGED_USER_RESOURCE = `${PS_PREFIX}${NOT_LOGGED_USER_SUFFIX}`;\nexport const LOGGED_USER_RESOURCE = `${PS_PREFIX}${LOGGED_USER_SUFFIX}`;\nexport const CONFIRMATION_RESOURCE = `${PS_PREFIX}public/registration/confirmation`;\n\nexport const registerUser = ({ userData, captchaToken, langCode }) => {\n const formattedData = formatRegistrationUserData({ userData, captchaToken, langCode });\n return fetch(`${NOT_LOGGED_USER_RESOURCE}/${REGISTRATION_SUFFIX}`, {\n method: 'POST',\n body: JSON.stringify(formattedData),\n dataType: 'json',\n ...BASIC_JSON_CONTENT_TYPE_HEADER,\n });\n};\n\nexport const deleteUser = () =>\n fetch(LOGGED_USER_RESOURCE, {\n method: 'DELETE',\n }).catch(msg => {\n console.error(`Something went wrong: ${JSON.stringify(msg)}`);\n });\n\nexport const checkUserProfile = () =>\n fetch(`${LOGGED_USER_RESOURCE}/${PROFILE_SUFFIX}`, {\n ...BASIC_JSON_CONTENT_TYPE_HEADER,\n }).catch(response => {\n console.error(`Unable to retrieve user:${JSON.stringify(response)}`);\n });\n\nexport const getUserProfile = () =>\n fetch(`${LOGGED_USER_RESOURCE}/${PROFILE_SUFFIX}`, {\n ...BASIC_JSON_CONTENT_TYPE_HEADER,\n })\n .then(response => response.json())\n .catch(response => {\n console.error(`Unable to retrieve user:${JSON.stringify(response)}`);\n });\n\nexport const updateUserProfile = data => {\n const userData = formatUserProfileData({ data });\n return fetch(`${LOGGED_USER_RESOURCE}/${PROFILE_SUFFIX}`, {\n ...BASIC_JSON_CONTENT_TYPE_HEADER,\n method: 'POST',\n body: JSON.stringify(userData),\n }).then(response => (response.ok ? response.json() : Promise.reject(response)));\n};\n\nexport const validateUserTicket = (ticket, ticketDomain) => {\n const VALIDATE_TICKET_URL = `${PS_PREFIX}public/login?ticket=${ticket}&ticketDomain=${ticketDomain}`;\n\n return fetch(VALIDATE_TICKET_URL);\n};\n\nexport const getUserByToken = token => fetch(`${NOT_LOGGED_USER_RESOURCE}/mail?token=${token}`);\n\nexport const confirmUserRegistration = confirmationId => {\n return fetch(`${CONFIRMATION_RESOURCE}?confirmationId=${confirmationId}`, {\n ...BASIC_JSON_CONTENT_TYPE_HEADER,\n method: 'POST',\n });\n};\n\nexport const userService = {\n deleteUser,\n updateUserProfile,\n};\n","export const sumScore = (contentsWithScore, scoreFieldName) =>\n contentsWithScore.reduce(\n (acc, nextContentWithScore) => acc + nextContentWithScore[scoreFieldName],\n 0,\n );\n","const filterLessonFields = ['userId', 'lastModifiedDate', 'cosLessonVersion'];\nconst filterExerciseFields = ['cosExerciseVersion'];\nconst filterInquiryFields = ['minCorrectScore'];\n\n/**\n * Function which is responsible for removing currently not needed/wanted attributes from\n * server response on all hierarchy levels (lesson->exercise->inquiry). Those attributes\n * are provided from the server due to the current data model.\n *\n * @param payload - the server response with lesson progress data\n * @returns {*&{exerciseProgresses}}\n */\nexport const filterDataFromService = payload => {\n const filteredLessonData = removeObjectAttributes(payload, filterLessonFields);\n const { exerciseProgresses } = filteredLessonData;\n const filteredExerciseProgresses = filterExerciseData(exerciseProgresses);\n\n return { ...filteredLessonData, exerciseProgresses: filteredExerciseProgresses };\n};\n\nconst filterExerciseData = exerciseProgresses => {\n return exerciseProgresses.map(exerciseProgress => {\n const filteredExerciseProgress = removeObjectAttributes(exerciseProgress, filterExerciseFields);\n const { inquiryProgresses } = filteredExerciseProgress;\n const filteredInquiryProgresses = filterInquiryData(inquiryProgresses);\n\n return { ...filteredExerciseProgress, inquiryProgresses: filteredInquiryProgresses };\n });\n};\n\nconst filterInquiryData = inquiryProgresses => {\n return inquiryProgresses.map(inquiryProgress =>\n removeObjectAttributes(inquiryProgress, filterInquiryFields),\n );\n};\n\nconst removeObjectAttributes = (sourceObject, attributesToRemoveArray) => {\n const targetObject = { ...sourceObject };\n attributesToRemoveArray.forEach(field => {\n if (field in targetObject) {\n // eslint-disable-next-line fp/no-delete\n delete targetObject[field];\n }\n });\n return targetObject;\n};\n","import gql from 'graphql-tag';\nimport { sumScore } from './utils';\nimport { filterDataFromService } from './serverDataFilterUtils';\n\n/**\n * the following data structure is generated here as lesson progress state for the global state\n{\n cosLessonId: 37250531,\n cosCourseId: 36519789,\n doneExerciseCount: 1,\n allExerciseCount: 12,\n maxPointsForAllExercises: 35,\n resultPoints: 1,\n exerciseProgresses: [\n {\n cosExerciseId: 42382962,\n resultPoints: 1,\n maxPoints: 2,\n inquiryProgresses: [\n {\n inquiryId: 42382995,\n score: 1,\n maxScore: 1,\n },\n {\n inquiryId: 42382999,\n score: 0,\n maxScore: 1,\n }\n ]\n }],\n}\n */\n\nconst getLearningMetaInfoFragment = (name, type, handicap) => {\n const targetHandicap = handicap ? `(handicap: ${handicap})` : '';\n\n return gql`fragment ${type}${name}${handicap || ''} on ${type} {\n learningMetaInfo${targetHandicap} {\n achievableScore\n exerciseCount\n }\n }\n `;\n};\n\nexport const scoreFragment = {\n name: 'Score',\n fragment({ type, addLearningMetaInfo = true, handicap }) {\n return addLearningMetaInfo\n ? getLearningMetaInfoFragment(this.name, type, handicap)\n : gql`fragment ${type}${this.name}${handicap || ''} on ${type} {\n id\n }\n `;\n },\n};\n\nexport const createInquiryProgressMetaData = ({ inquiryId, score, achievableScore }) => {\n return { inquiryId, score, maxScore: achievableScore };\n};\n\nexport const createLearnProgressData = ({\n langCode,\n lessonId,\n courseId,\n lessonAchievableScore,\n exerciseId,\n allExerciseCount,\n exerciseProgress,\n exerciseAchievableScore,\n}) => {\n return {\n language: langCode,\n cosLessonId: lessonId,\n cosCourseId: courseId,\n maxPointsForAllExercises: lessonAchievableScore,\n cosExerciseId: exerciseId,\n allExerciseCount,\n exerciseProgress,\n exerciseAchievableScore,\n };\n};\n\nexport const initializeLessonLearnProgressWithDataFromServer = ({ lessonProgresses = [] }) => {\n const filteredLessonProgresses = lessonProgresses.map(lessonProgress =>\n filterDataFromService(lessonProgress),\n );\n return { lessons: filteredLessonProgresses };\n};\n\nexport const initializeCourseLearnProgressWithDataFromServer = ({ courseProgresses = [] }) => {\n return { courses: courseProgresses };\n};\n\nexport const updateLessonProgressFromService = ({ lessons, lessonProgress }) => {\n const filteredLessonProgress = filterDataFromService(lessonProgress);\n const existingLesson = findExistingLesson({ lessons, lessonProgress: filteredLessonProgress });\n if (existingLesson) {\n const otherLessons = lessons.filter(\n lesson => lesson.cosLessonId !== filteredLessonProgress.cosLessonId,\n );\n return { lessons: [...otherLessons, filteredLessonProgress] };\n }\n return {\n lessons: [...lessons, filteredLessonProgress],\n };\n};\n\nexport const deleteLessonProgressById = ({ lessons, lessonId }) => {\n const lessonProgressToDelete = findExistingLessonById({ lessons, lessonId });\n if (!lessonProgressToDelete) {\n return { lessons };\n }\n const otherLessons = lessons.filter(lesson => lesson.cosLessonId !== lessonId);\n return { lessons: [...otherLessons] };\n};\n\nexport const deleteLessonProgressesByCourseId = ({ lessons, courseId }) => {\n return { lessons: lessons.filter(lesson => lesson.cosCourseId !== courseId) };\n};\n\nexport const deleteCourseProgressById = ({ courses, courseId }) => {\n const courseProgressToDelete = findExistingCourseById({ courses, courseId });\n if (!courseProgressToDelete) {\n return { courses };\n }\n const otherCourses = courses.filter(course => course.cosCourseId !== courseId);\n return { courses: [...otherCourses] };\n};\n\nexport const addCourseProgressData = ({ courses, courseProgress }) => {\n const existingCourseProgress = findExistingCourseById({\n courses,\n courseId: courseProgress.cosCourseId,\n });\n\n if (existingCourseProgress) {\n const otherCourses = courses.filter(\n course => course.cosCourseId !== courseProgress.cosCourseId,\n );\n return {\n courses: [...otherCourses, courseProgress],\n };\n }\n\n return { courses: [...courses, courseProgress] };\n};\n\nexport const findExistingLessonById = ({ lessons, lessonId }) => {\n return lessons.find(lesson => lesson.cosLessonId === lessonId);\n};\n\nexport const findExistingCourseById = ({ courses, courseId }) => {\n return courses.find(course => course.cosCourseId === courseId);\n};\n\nexport const findExistingLesson = ({ lessons, lessonProgress }) => {\n return lessons.find(lesson => lesson.cosLessonId === lessonProgress.cosLessonId);\n};\n\nexport const findInquiryProgress = ({ lessons, lessonId, exerciseId }) => {\n const lesson = findExistingLessonById({ lessons, lessonId });\n if (!lesson) {\n return [];\n }\n const { exerciseProgresses } = lesson;\n\n const currentExerciseProgress = exerciseProgresses.find(\n exerciseProgress => exerciseProgress.cosExerciseId === exerciseId,\n );\n\n if (!currentExerciseProgress) {\n return [];\n }\n const { inquiryProgresses = [] } = currentExerciseProgress;\n return inquiryProgresses;\n};\n\nexport const generateLessonProgress = ({ lessons, lessonProgress }) => {\n const { exerciseProgress } = lessonProgress;\n if (exerciseProgress.inquiryProgresses.length === 0) {\n return { lessons };\n }\n const existingLesson = findExistingLesson({ lessons, lessonProgress });\n if (existingLesson) {\n const otherLessons = lessons.filter(\n lesson => lesson.cosLessonId !== lessonProgress.cosLessonId,\n );\n return {\n lessons: [...otherLessons, updateExistingLessonMetaData(existingLesson, lessonProgress)],\n };\n }\n return {\n lessons: [...lessons, createNewLessonMetaData(lessonProgress)],\n };\n};\n\nconst updateExerciseMetaDataForExistingLesson = (existingLesson, lessonProgress) => {\n const { exerciseProgresses } = existingLesson;\n const existingExercise = exerciseProgresses.find(\n exercise => exercise.cosExerciseId === lessonProgress.cosExerciseId,\n );\n if (existingExercise) {\n const otherExercises = exerciseProgresses.filter(\n exercise => exercise.cosExerciseId !== lessonProgress.cosExerciseId,\n );\n return [...otherExercises, updateExerciseMetaData(existingExercise, lessonProgress)];\n }\n return [...exerciseProgresses, createNewExerciseMetaData(lessonProgress)];\n};\n\nconst updateExistingLessonMetaData = (existingLesson, lessonProgress) => {\n const newExerciseProgresses = [\n ...updateExerciseMetaDataForExistingLesson(existingLesson, lessonProgress),\n ];\n const newDoneExerciseCount = newExerciseProgresses.length;\n\n const updatedLesson = {\n ...existingLesson,\n doneExerciseCount: newDoneExerciseCount,\n exerciseProgresses: newExerciseProgresses,\n };\n return {\n ...updatedLesson,\n resultPoints: sumScore(updatedLesson.exerciseProgresses, 'resultPoints'),\n };\n};\n\nconst createNewLessonMetaData = lessonProgress => {\n const exerciseProgresses = [createNewExerciseMetaData(lessonProgress)];\n const {\n cosLessonId,\n cosCourseId,\n allExerciseCount,\n maxPointsForAllExercises,\n language,\n } = lessonProgress;\n const newLesson = {\n language,\n cosLessonId,\n cosCourseId,\n allExerciseCount,\n doneExerciseCount: exerciseProgresses.length,\n maxPointsForAllExercises,\n exerciseProgresses,\n };\n\n return { ...newLesson, resultPoints: sumScore(newLesson.exerciseProgresses, 'resultPoints') };\n};\n\nconst createNewExerciseMetaData = lessonProgress => {\n const { cosExerciseId, exerciseProgress, exerciseAchievableScore } = lessonProgress;\n return {\n cosExerciseId,\n maxPoints: exerciseAchievableScore,\n resultPoints: sumScore(exerciseProgress.inquiryProgresses, 'score'),\n inquiryProgresses: exerciseProgress.inquiryProgresses,\n };\n};\n\nconst updateExerciseMetaData = (existingExercise, lessonProgress) => {\n const { cosExerciseId, exerciseProgress, exerciseAchievableScore } = lessonProgress;\n\n const cleanedExistingInquiryProgresses = existingExercise.inquiryProgresses.filter(\n inquiryProgress =>\n !exerciseProgress.inquiryProgresses.some(\n newInquiryProgress => newInquiryProgress.inquiryId === inquiryProgress.inquiryId,\n ),\n );\n\n const inquiryProgresses = [\n ...cleanedExistingInquiryProgresses,\n ...exerciseProgress.inquiryProgresses,\n ];\n\n return {\n cosExerciseId,\n maxPoints: exerciseAchievableScore,\n resultPoints: sumScore(inquiryProgresses, 'score'),\n inquiryProgresses,\n };\n};\n","import { BASIC_JSON_CONTENT_TYPE_HEADER } from '../constants/services';\nimport { USER } from '../constants/userUrl';\n\nconst COURSE_PROGRESS = 'course/progress';\nconst LESSON_PROGRESS = 'lesson/progress';\nconst LESSON_PROGRESSES = 'lesson/progresses';\nconst PROTECTED_URL = `${USER.PS_URL}protected`;\n\nexport const LESSON_TYPE = 'lesson';\nexport const COURSE_TYPE = 'course';\n\nconst handleError = response =>\n console.error(\n `Something went wrong on service call: ${response.url}, status code: ${response.status}`,\n );\n\nexport const getProgress = (id, type) => {\n const contentType = type.toLowerCase();\n return fetch(`${PROTECTED_URL}/${contentType}/progress/${id}`, {\n ...BASIC_JSON_CONTENT_TYPE_HEADER,\n })\n .then(response => (response.ok ? response.text() : Promise.reject(response)))\n .then(text => (text ? JSON.parse(text) : null))\n .catch(handleError);\n};\n\nexport const getProgresses = (ids, type) => {\n const contentType = type.toLowerCase();\n return fetch(`${PROTECTED_URL}/${contentType}/progress`, {\n method: 'POST',\n body: JSON.stringify({ ids }),\n ...BASIC_JSON_CONTENT_TYPE_HEADER,\n })\n .then(response => response.json())\n .catch(handleError);\n};\n\nexport const deleteLearnProgress = (id, type) => {\n const contentType = type.toLowerCase();\n return fetch(`${PROTECTED_URL}/${contentType}/progress/reset/${id}`, {\n method: 'DELETE',\n }).catch(handleError);\n};\n\nexport const saveLessonProgress = lessonProgressData => {\n return fetch(`${PROTECTED_URL}/${LESSON_PROGRESS}/save`, {\n method: 'POST',\n body: JSON.stringify(lessonProgressData),\n dataType: 'json',\n ...BASIC_JSON_CONTENT_TYPE_HEADER,\n }).catch(handleError);\n};\n\nexport const saveLessonProgresses = lessonProgressesData => {\n return fetch(`${PROTECTED_URL}/${LESSON_PROGRESSES}/save`, {\n method: 'POST',\n body: JSON.stringify(lessonProgressesData),\n dataType: 'json',\n ...BASIC_JSON_CONTENT_TYPE_HEADER,\n }).catch(handleError);\n};\n\nexport const getLastEditedLessonsIds = (numberOfLessons, language) => {\n return fetch(`${PROTECTED_URL}/lesson?last=${numberOfLessons}&lang=${language}`, {\n ...BASIC_JSON_CONTENT_TYPE_HEADER,\n })\n .then(response => response.json())\n .catch(handleError);\n};\n\nexport const initCourseProgress = initialCourseProgressData => {\n return fetch(`${PROTECTED_URL}/${COURSE_PROGRESS}/init`, {\n method: 'POST',\n body: JSON.stringify(initialCourseProgressData),\n ...BASIC_JSON_CONTENT_TYPE_HEADER,\n })\n .then(response => response.json())\n .catch(handleError);\n};\n","import {\n addCourseProgressData,\n deleteCourseProgressById,\n deleteLessonProgressById,\n deleteLessonProgressesByCourseId,\n findExistingLesson,\n generateLessonProgress,\n initializeCourseLearnProgressWithDataFromServer,\n initializeLessonLearnProgressWithDataFromServer,\n updateLessonProgressFromService,\n} from './learnProgress';\nimport {\n COURSE_TYPE,\n deleteLearnProgress,\n getProgress,\n getProgresses,\n initCourseProgress,\n LESSON_TYPE,\n saveLessonProgress,\n saveLessonProgresses,\n} from '../../services/learnProgressService';\n\nexport const ADD_LESSON_PROGRESS = 'ADD_LESSON_PROGRESS';\nexport const READ_LESSON_PROGRESS = 'READ_LESSON_PROGRESS';\nexport const READ_LESSON_PROGRESSES = 'READ_LESSON_PROGRESSES';\nexport const DELETE_LESSON_PROGRESS = 'DELETE_LESSON_PROGRESS';\nexport const READ_COURSE_PROGRESS = 'ADD_COURSE_PROGRESS';\nexport const READ_COURSE_PROGRESSES = 'READ_COURSE_PROGRESSES';\nexport const DELETE_COURSE_PROGRESS = 'DELETE_COURSE_PROGRESS';\nexport const DELETE_LESSON_PROGRESSES = 'DELETE_LESSON_PROGRESSES';\nexport const REMOVE_LEARN_PROGRESS = 'REMOVE_LEARN_PROGRESS';\nexport const LESSON_PROGRESS_SYNC_NEEDED = 'LESSON_PROGRESS_SYNC_NEEDED';\n\n// external used actions\nexport const addLessonProgress = lessonProgress => {\n return dispatch => {\n dispatch(addProgress(lessonProgress));\n dispatch(saveProgressOnServer(lessonProgress));\n };\n};\n\nexport const deleteLessonProgress = lessonId => {\n return dispatch => {\n dispatch(deleteLProgress(lessonId));\n dispatch(deleteProgressOnServer(lessonId, LESSON_TYPE));\n };\n};\n\nexport const readLessonProgress = lessonId => {\n return (dispatch, getState) => {\n const { user } = getState();\n if (user.isLoggedIn) {\n getProgress(lessonId, LESSON_TYPE).then(progress => dispatch(readProgress(progress)));\n }\n };\n};\n\nexport const readLessonProgresses = lessonIds => {\n return (dispatch, getState) => {\n const { user } = getState();\n if (user.isLoggedIn) {\n getProgresses(lessonIds, LESSON_TYPE).then(progresses =>\n dispatch(readProgresses(progresses)),\n );\n }\n };\n};\n\nexport const readCourseProgress = courseId => {\n return (dispatch, getState) => {\n const { user } = getState();\n if (user.isLoggedIn) {\n getProgress(courseId, COURSE_TYPE).then(courseProgress => {\n if (courseProgress) {\n dispatch(addCourseProgress(courseProgress));\n }\n });\n }\n };\n};\n\nexport const readCourseProgresses = courseIds => {\n return (dispatch, getState) => {\n const { user } = getState();\n if (user.isLoggedIn) {\n getProgresses(courseIds, COURSE_TYPE).then(courseProgresses => {\n if (courseProgresses) {\n dispatch(readCProgresses(courseProgresses));\n }\n });\n }\n };\n};\n\nexport const initCourse = initialCourseData => {\n return (dispatch, getState) => {\n const { user } = getState();\n if (user.isLoggedIn) {\n initCourseProgress(initialCourseData).then(courseProgress =>\n dispatch(readCourseProgress(courseProgress.cosCourseId)),\n );\n }\n };\n};\n\nexport const deleteCourseProgress = courseId => {\n return dispatch => {\n dispatch(deleteCProgress(+courseId));\n dispatch(deleteProgressOnServer(courseId, COURSE_TYPE));\n dispatch(deleteLessonProgresses(+courseId));\n };\n};\n\nexport const removeProgress = () => ({\n type: REMOVE_LEARN_PROGRESS,\n});\n\nexport const setLessonProgressSyncNeeded = isSyncNeeded => ({\n type: LESSON_PROGRESS_SYNC_NEEDED,\n payload: isSyncNeeded,\n});\n\nexport const syncLessonProgress = () => {\n return (dispatch, getState) => {\n const { learnProgress } = getState();\n const { lessons } = learnProgress;\n return saveLessonProgresses(lessons).then(() => dispatch(setLessonProgressSyncNeeded(false)));\n };\n};\n\n// internal actions\n\nconst addCourseProgress = courseProgress => ({\n type: READ_COURSE_PROGRESS,\n payload: courseProgress,\n});\n\nconst readCProgresses = courseProgresses => ({\n type: READ_COURSE_PROGRESSES,\n payload: courseProgresses,\n});\n\nconst addProgress = lessonProgress => ({\n type: ADD_LESSON_PROGRESS,\n payload: lessonProgress,\n});\n\nconst readProgress = lessonProgress => ({\n type: READ_LESSON_PROGRESS,\n payload: lessonProgress,\n});\n\nconst readProgresses = lessonProgresses => ({\n type: READ_LESSON_PROGRESSES,\n payload: lessonProgresses,\n});\n\nconst deleteLessonProgresses = courseId => ({\n type: DELETE_LESSON_PROGRESSES,\n payload: courseId,\n});\n\nconst deleteLProgress = lessonId => ({\n type: DELETE_LESSON_PROGRESS,\n payload: lessonId,\n});\n\nconst deleteCProgress = courseId => ({\n type: DELETE_COURSE_PROGRESS,\n payload: courseId,\n});\n\n// @VisibleForTesting\nexport const saveProgressOnServer = lessonProgress => {\n return (dispatch, getState) => {\n const {\n user,\n learnProgress: { lessons },\n } = getState();\n if (user.isLoggedIn) {\n const progress = findExistingLesson({ lessons, lessonProgress });\n return progress ? saveLessonProgress(progress) : Promise.resolve('no progress available');\n }\n return Promise.resolve('nothing to do');\n };\n};\n\n// @VisibleForTesting\nexport const deleteProgressOnServer = (contentId, type) => {\n return (dispatch, getState) => {\n const { user } = getState();\n if (user.isLoggedIn) {\n return deleteLearnProgress(contentId, type);\n }\n return Promise.resolve('nothing to do');\n };\n};\n\nconst initialState = { lessons: [], courses: [], isSyncRequired: false };\n\nexport const learnProgressReducer = (state = initialState, action) => {\n switch (action.type) {\n case ADD_LESSON_PROGRESS:\n // eslint-disable-next-line no-case-declarations\n const lessonProgress = generateLessonProgress({\n lessons: state.lessons,\n lessonProgress: action.payload,\n }) || { lessons: [] };\n return {\n ...state,\n ...lessonProgress,\n };\n case READ_LESSON_PROGRESS:\n if (!action.payload) {\n return state;\n }\n return {\n ...state,\n ...updateLessonProgressFromService({\n lessons: state.lessons,\n lessonProgress: action.payload,\n }),\n };\n case READ_LESSON_PROGRESSES:\n return {\n ...state,\n ...initializeLessonLearnProgressWithDataFromServer({\n lessonProgresses: action.payload,\n }),\n };\n case DELETE_LESSON_PROGRESS:\n return {\n ...state,\n ...deleteLessonProgressById({\n lessons: state.lessons,\n lessonId: action.payload,\n }),\n };\n case READ_COURSE_PROGRESS:\n return {\n ...state,\n ...addCourseProgressData({ courses: state.courses, courseProgress: action.payload }),\n };\n case READ_COURSE_PROGRESSES:\n return {\n ...state,\n ...initializeCourseLearnProgressWithDataFromServer({\n courseProgresses: action.payload,\n }),\n };\n case DELETE_COURSE_PROGRESS:\n return {\n ...state,\n ...deleteCourseProgressById({\n courses: state.courses,\n courseId: action.payload,\n }),\n };\n case DELETE_LESSON_PROGRESSES:\n return {\n ...state,\n ...deleteLessonProgressesByCourseId({ lessons: state.lessons, courseId: action.payload }),\n };\n case LESSON_PROGRESS_SYNC_NEEDED:\n return {\n ...state,\n isSyncRequired: action.payload,\n };\n case REMOVE_LEARN_PROGRESS:\n return initialState;\n default:\n return state;\n }\n};\n","import { apiAction } from '../common/apiActions';\nimport {\n LOGGED_USER_RESOURCE,\n LOGOUT_SUFFIX,\n PROFILE_SUFFIX,\n PS_PREFIX,\n} from '../../services/userService';\nimport { BASIC_JSON_CONTENT_TYPE_HEADER } from '../../constants/services';\nimport { removeProgress } from '../progress/learnProgressDuck';\n\nexport const SET_USER = 'SET_USER';\nexport const REMOVE_USER = 'REMOVE_USER';\nexport const API_ERROR = 'API_ERROR';\nconst LOGOUT_REQUEST_CALLED_FLAG = 'LOGOUT_REQUEST_CALLED_FLAG';\nconst SESSION_TIMEOUT = 'SESSION_TIMEOUT';\n\nexport const logInUser = () =>\n apiAction({\n url: `${LOGGED_USER_RESOURCE}/${PROFILE_SUFFIX}`,\n onSuccess: setUser,\n onFailure: setApiError,\n headersOverride: { ...BASIC_JSON_CONTENT_TYPE_HEADER },\n });\n\nexport const logOutUser = () =>\n apiAction({\n url: `${PS_PREFIX}${LOGOUT_SUFFIX}`,\n onSuccess: removeUserData,\n onFailure: setApiError,\n });\n\nexport const deleteUserAccount = () =>\n apiAction({\n url: `${PS_PREFIX}${LOGOUT_SUFFIX}`,\n onSuccess: removeUserData,\n onFailure: setApiError,\n });\n\nexport const removeUserData = () => {\n return dispatch => {\n dispatch(removeUser());\n dispatch(removeProgress());\n };\n};\n\nexport const setUser = data => ({\n type: SET_USER,\n payload: data,\n});\n\nexport const removeUser = () => ({\n type: REMOVE_USER,\n});\n\nexport const setApiError = () => ({\n type: API_ERROR,\n});\n\nexport const setHasLogOutRequestBeenCalled = hasBeenCalled => ({\n type: LOGOUT_REQUEST_CALLED_FLAG,\n payload: hasBeenCalled,\n});\n\nexport const loginTimeout = () => ({\n type: SESSION_TIMEOUT,\n});\n\nconst initialState = {\n userData: null,\n isLoggedIn: false,\n hasLogOutRequestBeenCalled: false,\n apiErrorHasOccurred: false,\n};\n\nexport const userReducer = (state = initialState, action) => {\n switch (action.type) {\n case SET_USER:\n return {\n userData: action.payload,\n isLoggedIn: true,\n apiErrorHasOccurred: false,\n };\n case REMOVE_USER:\n return {\n ...initialState,\n hasLogOutRequestBeenCalled: true,\n };\n case API_ERROR:\n return {\n ...state,\n apiErrorHasOccurred: true,\n };\n case LOGOUT_REQUEST_CALLED_FLAG:\n return {\n ...state,\n hasLogOutRequestBeenCalled: action.payload,\n };\n case SESSION_TIMEOUT:\n return initialState;\n default:\n return state;\n }\n};\n","export const userSelector = state => state.user;\nexport const userDataSelector = state => state.user.userData;\n","import { createContext, useContext } from 'react';\nimport globals from '../utils/globals';\n\nexport const GlobalsContext = createContext(globals);\n\nexport const useGlobalsContext = () => useContext(GlobalsContext);\n","/* eslint-disable jsx-a11y/anchor-is-valid,jsx-a11y/no-static-element-interactions */\nimport { Link } from 'react-router-dom';\nimport { useDispatch, useSelector } from 'react-redux';\nimport { useParams } from 'react-router';\nimport styled from 'styled-components';\nimport { colors, resolutions, clearfix } from '../../utils/css';\nimport { ReactComponent as IconUserNavi } from '../../assets/svg/icon-user-navi.svg';\nimport { ReactComponent as IconLanguageWorldW } from '../../assets/svg/icon-language-world-w.svg';\nimport { I18nText } from '../I18n/I18nText';\nimport { LanguageSelectionButton } from './LanguageSelectionButton/LanguageSelectionButton';\nimport { MENU_LANGUAGES } from '../../constants/menuLanguageCodes';\nimport {\n getDashboardUrl,\n getGrammarUrl,\n getHelpUrl,\n getLoginPage,\n getUserProfileUrl,\n getVocabularyPageUrl,\n getVocabularyTrainerStartPage,\n} from '../../utils/url/urlFactory';\nimport { logOutUser } from '../../state/user/userDuck';\nimport { userSelector } from '../../state/user/userSelectors';\nimport { useGlobalsContext } from '../../context/GlobalsContext';\n\nexport const NavMenu = ({\n isNavMenuOpen,\n toggleIsNavMenuOpen,\n isLanguageSubMenuOpen,\n setIsLanguageSubMenuOpen,\n className,\n}) => {\n const { origin } = useGlobalsContext().window.location;\n const { langCode } = useParams();\n const { isLoggedIn } = useSelector(userSelector);\n const isLoggedInClass = !isLoggedIn ? 'hidden' : undefined;\n const dispatch = useDispatch();\n\n const handleLogoutClicked = e => {\n e.preventDefault();\n dispatch(logOutUser());\n };\n\n return (\n <div\n id=\"nav-user-menu\"\n className={className}\n aria-expanded={isNavMenuOpen}\n style={{\n maxHeight: isNavMenuOpen ? 1500 : 0,\n }}\n >\n <StyledNavigationList aria-label=\"Main navigation submenu\">\n <li>\n <Link to={getDashboardUrl(langCode)} className=\"course-nav\" onClick={toggleIsNavMenuOpen}>\n <I18nText translation=\"header.menu.home\" />\n </Link>\n </li>\n <li>\n <Link to={getGrammarUrl(langCode)} className=\"course-nav\" onClick={toggleIsNavMenuOpen}>\n <I18nText translation=\"header.menu.grammar\" />\n </Link>\n </li>\n <li>\n <Link\n to={getVocabularyPageUrl(langCode)}\n className=\"course-nav\"\n onClick={toggleIsNavMenuOpen}\n >\n <I18nText translation=\"header.menu.vocabulary\" />\n </Link>\n </li>\n <li id=\"vocabularyTrainerButton\" className={isLoggedInClass}>\n <Link\n to={getVocabularyTrainerStartPage(langCode)}\n onClick={toggleIsNavMenuOpen}\n className=\"course-nav\"\n >\n <I18nText translation=\"header.menu.vocabularyTrainer\" />\n </Link>\n </li>\n <li id=\"profileButton\" className={isLoggedInClass}>\n <Link\n to={getUserProfileUrl(langCode)}\n className=\"course-nav\"\n onClick={toggleIsNavMenuOpen}\n >\n <I18nText translation=\"header.menu.myArea\" />\n <StyledNavMenuIcon>\n <i>\n <IconUserNavi />\n </i>\n </StyledNavMenuIcon>\n </Link>\n </li>\n <li>\n <Link to={getHelpUrl(langCode)} className=\"course-nav\" onClick={toggleIsNavMenuOpen}>\n <I18nText translation=\"metadata.help\" />\n </Link>\n </li>\n <li id=\"languageMenu\">\n <nav>\n <Link\n id=\"languageMenuButton\"\n className={`course-nav ${isLanguageSubMenuOpen ? 'collapsed' : 'collapse in'}`}\n data-toggle=\"collapse\"\n data-parent=\"languageMenu\"\n to=\"#\"\n data-target=\"#nav-lang-menu\"\n onClick={event => {\n event.preventDefault();\n setIsLanguageSubMenuOpen(!isLanguageSubMenuOpen);\n }}\n >\n <I18nText translation=\"header.menu.language.title\" />\n <StyledNavMenuIcon>\n <i>\n <IconLanguageWorldW />\n </i>\n </StyledNavMenuIcon>\n </Link>\n <div id=\"navbar-lang\" className=\"nav-list navbar-collapse\">\n <div\n id=\"nav-lang-menu\"\n className=\"collapse in\"\n style={{\n transition: 'all 0.35s ease-in-out',\n maxHeight: isLanguageSubMenuOpen ? Object.keys(MENU_LANGUAGES).length * 85 : 1,\n visibility: isLanguageSubMenuOpen ? 'visible' : 'hidden',\n }}\n >\n <ul>\n {MENU_LANGUAGES.map((language, i) => (\n <LanguageSelectionButton\n key={i}\n {...{\n langCode,\n }}\n language={language.langCode}\n translationKey={language.translationKey}\n />\n ))}\n </ul>\n </div>\n </div>\n </nav>\n </li>\n <li\n id=\"signInButton\"\n className={isLoggedIn ? 'hidden' : undefined}\n style={{ borderBottom: 0 }}\n >\n <a className=\"course-nav\" href={getLoginPage(origin, langCode)}>\n <I18nText translation=\"header.menu.login\" />\n <StyledNavMenuIcon>\n <i>\n <IconUserNavi />\n </i>\n </StyledNavMenuIcon>\n </a>\n </li>\n <li id=\"signOutButton\" className={isLoggedInClass} style={{ borderBottom: 0 }}>\n <a className=\"course-nav\" onKeyUp={handleLogoutClicked} onClick={handleLogoutClicked}>\n <I18nText translation=\"header.menu.logout\" />\n </a>\n </li>\n </StyledNavigationList>\n </div>\n );\n};\n\nexport const StyledNavMenu = styled(NavMenu)`\n background-color: ${colors.LG_BLUE_1};\n border-top: 1px solid ${colors.LG_BLUE_4};\n box-shadow: ${props =>\n props.isNavMenuOpen ? `0 9px 10px ${colors.LG_TRANSPARENT_BLACK_40}` : 'hidden'};\n display: block;\n visibility: ${props => (props.isNavMenuOpen ? 'visible' : 'hidden')};\n overflow: hidden;\n position: relative;\n right: 0;\n transition: all 0.3s linear;\n z-index: 100;\n\n @media (min-width: ${resolutions.min.tablet}px) {\n top: -5px;\n }\n @media (min-width: ${resolutions.min.desktop}px) {\n position: absolute;\n /*! @noflip */\n right: 0;\n top: 85px;\n width: 400px;\n }\n\n .course-nav {\n display: inline-block;\n padding: 20px;\n width: 100%;\n }\n\n #languageMenu {\n padding: 0;\n &:hover {\n background: ${colors.LG_BLACK};\n }\n }\n`;\n\nexport const StyledNavigationList = styled('ul')`\n box-shadow: 1px 10px 20px 0 ${colors.LG_TRANSPARENT_BLACK_25};\n float: left;\n margin: 0;\n padding: 0;\n text-align: left;\n width: 100%;\n\n ${clearfix}\n\n > li {\n border-bottom: 1px solid ${colors.LG_BLUE_4};\n display: block;\n padding: 0;\n width: 100%;\n }\n\n a {\n background-color: ${colors.LG_BLUE_1};\n color: ${colors.LG_WHITE};\n display: block;\n font-size: 18px;\n font-weight: 700;\n line-height: 23px;\n padding: 20px;\n text-decoration: none;\n text-transform: uppercase;\n\n &:hover,\n &:active {\n background-color: ${colors.LG_BLACK};\n }\n\n @media (min-width: ${resolutions.min.tablet}px) {\n font-size: 22px;\n line-height: 43px;\n }\n\n @media (min-width: ${resolutions.min.desktop}px) {\n font-size: 18px;\n line-height: 23px;\n }\n }\n\n #navbar-lang {\n padding: 0;\n\n ul {\n margin-top: 0;\n padding-left: 0;\n }\n }\n\n .collapse.in {\n overflow: hidden;\n display: block;\n }\n`;\n\nexport const StyledNavMenuIcon = styled('span')`\n margin-left: 10px;\n margin-top: -1px;\n opacity: 0.7;\n position: absolute;\n`;\n","export default __webpack_public_path__ + \"static/media/nav-cross-black-md.f5825c8f.svg\";","export default __webpack_public_path__ + \"static/media/nav-cross-black-lg.4c2e3c0d.svg\";","export default __webpack_public_path__ + \"static/media/nav-cross-xs.fec778ad.svg\";","export default __webpack_public_path__ + \"static/media/nav-cross-lg.a759f43e.svg\";","import styled from 'styled-components';\nimport { colors, resolutions } from '../../utils/css';\n\nexport const StyledIconBar = styled('span')`\n margin-top: 4px;\n display: block;\n border-radius: 0;\n background-color: ${colors.LG_WHITE};\n width: 21px;\n height: 3px;\n\n @media (max-width: ${resolutions.max.tablet}px) {\n width: 14px;\n height: 2px;\n background-color: ${colors.LG_BLUE_6};\n }\n\n @media (min-width: ${resolutions.min.tablet}px) and (max-width: ${resolutions.max.tablet}px) {\n margin-top: 5px;\n width: 21px;\n height: 3px;\n background-color: ${colors.LG_BLUE_6};\n }\n`;\n","import styled from 'styled-components';\nimport { colors, resolutions } from '../../utils/css';\nimport navCrossBlackMd from '../../assets/svg/nav-cross-black-md.svg';\nimport navCrossBlackLg from '../../assets/svg/nav-cross-black-lg.svg';\nimport navCrossXs from '../../assets/svg/nav-cross-xs.svg';\nimport navCrossLg from '../../assets/svg/nav-cross-lg.svg';\nimport { StyledIconBar as IconBar } from '../IconBar/IconBar';\n\nexport const BurgerButton = ({\n isNavMenuOpen,\n toggleIsNavMenuOpen,\n setIsLanguageSubMenuOpen,\n className,\n}) => (\n <button\n onClick={() => {\n toggleIsNavMenuOpen();\n setIsLanguageSubMenuOpen(false);\n }}\n type=\"button\"\n className={className}\n data-toggle=\"collapse\"\n data-target=\"#nav-user-menu\"\n aria-haspopup=\"true\"\n aria-controls=\"navbar\"\n aria-expanded={isNavMenuOpen}\n >\n {isNavMenuOpen && <span className=\"close-menu\" />}\n <span className=\"screen-reader-only\">Toggle navigation</span>\n\n {!isNavMenuOpen && (\n <>\n <IconBar />\n <IconBar />\n <IconBar />\n </>\n )}\n </button>\n);\n\nconst defaultHoverStyles = `\n &:hover {\n .close-menu {\n background: url(${navCrossXs});\n background-size: cover;\n }\n }\n &:hover {\n ${IconBar} {\n background-color: ${colors.LG_BLACK};\n }\n }\n`;\n\n/*\n CSS parsed by a string helper function to return css string with styling blocks as arguments,\n could not be tested with jest-styled-components.\n It reads the media option correctly (media: (hover:hover)). But it throws an unknown error.\n While using string templates passes with known media option.\n*/\nconst mediaHoverDeviceDetection = `\n @media (hover: hover) and (pointer: fine) {\n ${defaultHoverStyles}\n }\n @media (hover: none) and (pointer: coarse) {\n ${defaultHoverStyles}\n }\n`;\n\nconst closeMenuMobile = `\n height: 12px;\n width: 13px;\n`;\n\nconst closeMenuTablet = `\n height: 21px;\n width: 22px;\n`;\n\nexport const StyledBurgerButton = styled(BurgerButton)`\n z-index: 3000;\n display: block;\n position: fixed;\n background-color: transparent;\n background-image: none;\n padding: 0;\n /*! @noflip */\n right: 20px;\n top: 13px;\n\n border: none;\n border-radius: 0;\n\n -webkit-appearance: button;\n cursor: pointer;\n\n @media (max-width: ${resolutions.max.mobile}px) {\n top: 20px;\n &:hover {\n .close-menu {\n ${closeMenuMobile}\n }\n }\n }\n\n @media (min-width: ${resolutions.min.tablet}px) and (max-width: ${resolutions.max.tablet}px) {\n top: 28px;\n &:hover {\n .close-menu {\n ${closeMenuTablet}\n }\n }\n }\n\n @media (min-width: ${resolutions.min.desktop}px) {\n margin-top: 32px;\n z-index: 1;\n position: absolute;\n top: 0;\n /*! @noflip */\n right: 30px;\n }\n\n ${mediaHoverDeviceDetection}\n\n &:focus {\n outline: 0;\n .close-menu {\n background: url(${navCrossBlackLg});\n background-size: cover;\n }\n }\n\n .close-menu {\n background: url(${navCrossLg});\n display: block;\n height: 21px;\n margin-top: 5px;\n /*! @noflip */\n right: 15px;\n width: 22px;\n\n @media (max-width: ${resolutions.min.desktop}px) {\n background: url(${navCrossXs});\n height: 12px;\n width: 13px;\n }\n\n @media (min-width: ${resolutions.min.tablet}px) and (max-width: ${resolutions.max.tablet}px) {\n background: url(${navCrossBlackMd});\n height: 21px;\n margin-top: 5px;\n width: 22px;\n }\n\n @media (min-width: ${resolutions.min.desktop}px) {\n background: url(${navCrossBlackMd});\n height: 21px;\n margin-top: 0px;\n position: absolute;\n /*! @noflip */\n right: 0px;\n width: 22px;\n }\n }\n\n .screen-reader-only {\n border: none;\n clip: rect(0, 0, 0, 0);\n height: 1px;\n margin: -1px;\n overflow: hidden;\n padding: 0;\n position: absolute;\n width: 1px;\n }\n`;\n","import { Link } from 'react-router-dom';\nimport styled from 'styled-components';\nimport { colors, resolutions } from '../../../utils/css';\nimport { getDashboardUrl } from '../../../utils/url/urlFactory';\nimport { I18nText } from '../../I18n/I18nText';\n\nexport const OnlyDesktopBrand = ({ langCode, title, className }) => {\n return (\n <div id=\"main-nav\" className={className}>\n <StyledLink to={getDashboardUrl(langCode)}>\n <I18nText translation={title} />\n </StyledLink>\n </div>\n );\n};\n\nconst makeRoomForRtl = '85px';\n\nexport const StyledOnlyDesktopBrand = styled(OnlyDesktopBrand)`\n align-items: center;\n display: flex;\n height: 85px;\n justify-content: flex-start;\n /*! @noflip */\n padding-left: 5px;\n /*! @noflip */\n padding-right: ${makeRoomForRtl};\n\n @media (max-width: ${resolutions.max.mobile}px) {\n display: none;\n }\n`;\n\nexport const StyledLink = styled(Link)`\n color: ${colors.LG_WHITE};\n font-family: Arial;\n font-size: 23px;\n font-weight: 600;\n opacity: 1;\n text-decoration: none;\n text-transform: uppercase;\n padding: 15px;\n\n &:hover,\n &:focus,\n &:active {\n color: ${colors.LG_WHITE};\n text-decoration: none;\n }\n`;\n","import styled from 'styled-components';\nimport { useChineseSimpleTraditionalSwitch } from '../../hooks/useChineseSimpleTraditionalSwitch';\nimport { colors } from '../../utils/css';\n\n// @VisibleForTesting\nexport const toggleButtonId = 'zh-convert';\n\nexport const ChineseVariantSwitch = ({ className, langCode }) => {\n const { isTraditionalChin, trans2Simple, trans2Traditional } = useChineseSimpleTraditionalSwitch(\n langCode,\n toggleButtonId,\n );\n\n const transFunction = isTraditionalChin ? trans2Simple : trans2Traditional;\n\n return <button id={toggleButtonId} className={className} onClick={transFunction} />;\n};\n\nexport const StyledChineseVariantSwitch = styled(ChineseVariantSwitch)`\n background-color: ${colors.LG_WHITE};\n padding: 9px 0;\n margin-right: 0;\n position: absolute;\n right: 43px;\n top: 11px;\n z-index: 10000;\n color: ${colors.LG_BLUE_6};\n text-decoration: none;\n border: none;\n\n @media (max-width: 767px) {\n margin-top: 0;\n margin-right: 10px;\n }\n\n @media (max-width: 1200px) {\n margin-right: 0;\n }\n\n @media (max-width: 1199px) and (min-width: 768px) {\n top: 25px;\n margin-right: 30px;\n font-size: 30px;\n }\n\n @media (min-width: 1200px) {\n background-color: ${colors.DW_LIGHT_BLUE};\n z-index: 1;\n display: block;\n float: right;\n padding: 24px 0;\n margin-right: 26px;\n margin-bottom: 4px;\n font-size: 30px;\n text-decoration: none;\n color: ${colors.LG_WHITE};\n }\n`;\n","import { useState } from 'react';\nimport { useParams } from 'react-router';\nimport styled from 'styled-components';\nimport { colors, resolutions } from '../../../utils/css';\nimport { useToggle } from '../../../hooks/useToggle';\nimport { StyledNavMenu as NavMenu } from '../../NavMenu/NavMenu';\nimport { StyledBurgerButton as BurgerButton } from '../../BurgerButton/BurgerButton';\nimport { StyledOnlyDesktopBrand as OnlyDesktopBrand } from './OnlyDesktopBrand';\nimport { LANG_CODES } from '../../../utils/mappers/langMapper';\nimport { StyledChineseVariantSwitch as ChineseVariantSwitch } from '../ChineseVariantSwitch';\n\nexport const NavigationContainer = ({ className, title }) => {\n const [isNavMenuOpen, { toggleOnClick: toggleIsNavMenuOpen }] = useToggle();\n const [isLanguageSubMenuOpen, setIsLanguageSubMenuOpen] = useState(false);\n const { langCode } = useParams();\n\n return (\n <nav className={className} role=\"navigation\" aria-label=\"Main navigation\">\n {langCode === LANG_CODES.CHINESE && <ChineseVariantSwitch langCode={langCode} />}\n <OnlyDesktopBrand langCode={langCode} title={title} />\n <BurgerButton\n {...{\n isNavMenuOpen,\n toggleIsNavMenuOpen,\n setIsLanguageSubMenuOpen,\n }}\n />\n <div id=\"navbar\" className=\"navigation-container\">\n <NavMenu\n {...{\n isNavMenuOpen,\n toggleIsNavMenuOpen,\n isLanguageSubMenuOpen,\n setIsLanguageSubMenuOpen,\n }}\n />\n </div>\n </nav>\n );\n};\n\nexport const StyledNavigationContainer = styled(NavigationContainer)`\n position: relative;\n\n @media (max-width: ${resolutions.max.mobile}px) {\n margin-bottom: 0px;\n }\n\n @media (min-width: ${resolutions.min.tablet}px) and (max-width: ${resolutions.max.tablet}px) {\n margin-bottom: -7px;\n }\n\n @media (min-width: ${resolutions.min.desktop}px) {\n background-color: ${colors.LG_BLUE_1};\n height: 85px;\n left: 0px;\n margin-left: 0px;\n margin-right: 0px;\n position: relative;\n right: inherit;\n top: inherit;\n }\n\n .navigation-container {\n border-top: 1px solid transparent;\n box-shadow: inset 0 1px 0 ${colors.LG_TRANSPARENT_WHITE_10};\n overflow-x: visible;\n padding: 0px;\n -webkit-overflow-scrolling: touch;\n\n @media (max-width: ${resolutions.max.mobile}px) {\n padding: 60px 0 0 0;\n }\n\n @media (max-width: ${resolutions.max.tablet}px) {\n border: none;\n }\n }\n`;\n","import styled from 'styled-components';\nimport { StyledDesktopBanner as DesktopBanner } from './DesktopBanner';\nimport { StyledMobileBanner as MobileBanner } from './MobileBanner';\nimport { StyledNavigationContainer as NavigationContainer } from './NavigationContainer/NavigationContainer';\nimport { colors, resolutions } from '../../utils/css';\n\nexport const Header = ({ className }) => {\n const headerTitleKey = 'header.bar';\n return (\n <header className={className}>\n <MobileBanner title={headerTitleKey} />\n <DesktopBanner />\n <NavigationContainer title={headerTitleKey} />\n </header>\n );\n};\n\nexport const StyledHeader = styled(Header)`\n display: grid;\n background: ${colors.LG_WHITE};\n background-image: none;\n border: none;\n height: auto;\n min-height: 50px;\n\n @media (min-width: ${resolutions.min.tablet}px) {\n border-radius: 4px;\n margin-bottom: 0px;\n }\n\n @media (min-width: ${resolutions.min.desktop}px) {\n border: none;\n height: 200px;\n margin: 0;\n margin-bottom: 20px;\n }\n`;\n","import classnames from 'classnames';\nimport { createGlobalStyle } from 'styled-components';\nimport { Text } from '../Text/Text';\n\nconst RichtextGlobalStyles = createGlobalStyle`\n /* @noflip */\n .richtext-content-container > span > p[dir=ltr] {\n text-align: left;\n }\n`;\n\nexport const RichText = ({ content, isContainer = true, className }) => (\n <div className={classnames({ 'richtext-content-container': isContainer }, className)}>\n <RichtextGlobalStyles />\n <Text\n dangerouslySetInnerHTML={{\n __html: content,\n }}\n />\n </div>\n);\n","const ratioToPercentage = (widthProportion, heightProportion) =>\n (heightProportion / widthProportion) * 100;\n\nconst ASPECT_RATIO = {\n landscape: ratioToPercentage(16, 9),\n landscape_legacy: ratioToPercentage(4, 3),\n portrait: ratioToPercentage(3, 4),\n square: ratioToPercentage(1, 1),\n};\n\nexport const imgWithFormatFn = (imageId, imageBasePath) => format =>\n `${imageBasePath}/${imageId}_${format.id}.jpg`;\n\nexport const format = Object.freeze({\n legacy: {\n id: 4,\n aspectRatio: [ASPECT_RATIO.landscape_legacy, ASPECT_RATIO.portrait],\n },\n free: {\n id: 7,\n },\n sm: {\n id: 503,\n aspectRatio: ASPECT_RATIO.landscape,\n },\n sm_richtext: {\n id: 503,\n aspectRatio: [ASPECT_RATIO.landscape, ASPECT_RATIO.portrait],\n },\n md: {\n id: 505,\n aspectRatio: ASPECT_RATIO.landscape,\n },\n md_richtext: {\n id: 505,\n aspectRatio: [ASPECT_RATIO.landscape, ASPECT_RATIO.portrait],\n },\n lg: {\n id: 507,\n aspectRatio: ASPECT_RATIO.landscape,\n },\n lg_richtext: {\n id: 507,\n aspectRatio: [ASPECT_RATIO.landscape, ASPECT_RATIO.portrait],\n },\n full: {\n id: 509,\n aspectRatio: ASPECT_RATIO.landscape,\n },\n});\n\nexport const getFormatForWidth = ({ innerWidth, sources = [] }) => {\n const source = sources.find(w => innerWidth >= w.minWidth && innerWidth <= w.maxWidth);\n return source ? source.imgFormat : format.lg;\n};\n\nexport const getImgUrlForWidth = ({ innerWidth, sources = [], imageId, imageBasePath }) => {\n const useFormat = getFormatForWidth({ innerWidth, sources });\n return imgWithFormatFn(imageId, imageBasePath)(useFormat);\n};\n","import { createContext, useContext } from 'react';\n\n// eslint-disable-next-line fp/no-let\nlet frontendConfig = null;\n\nexport function hasFrontendConfig() {\n return !!frontendConfig;\n}\n\nexport function setFrontendConfig(inFrontendConfig) {\n frontendConfig = inFrontendConfig; // eslint-disable-line fp/no-mutation\n}\n\nexport function getFrontendConfig() {\n return frontendConfig;\n}\n\nexport function clearFrontendConfig() {\n frontendConfig = null; // eslint-disable-line fp/no-mutation\n}\n\n// CONTEXT\nexport const FrontendConfigContext = createContext({ getFrontendConfig });\n\n// USAGE HOOK\nexport const useFrontendConfig = () => useContext(FrontendConfigContext).getFrontendConfig();\n","export const Picture = ({ sources, fallbackUrl, alt, className, aspectRatio }) => (\n <picture className={className} style={aspectRatio}>\n {sources.map((sourceAttributes, index) => (\n <source {...sourceAttributes} key={index} />\n ))}\n <img className=\"img-responsive\" src={fallbackUrl} alt={alt} />\n </picture>\n);\n","import { useFrontendConfig } from '../../hooks/useFrontendConfig';\nimport { imgWithFormatFn, format } from '../../utils/imgUtils';\nimport { resolutions } from '../../utils/css';\nimport { Picture } from '../Picture/Picture';\n\nexport const DwPicture = ({ imageId, ...inProps }) => {\n const { imageBasePath } = useFrontendConfig();\n\n const imgWithFormat = imgWithFormatFn(imageId, imageBasePath);\n\n const defaultProps = {\n fallbackUrl: imgWithFormat(format.full),\n sources: [\n {\n media: `(min-width: ${resolutions.min.full}px)`,\n srcSet: imgWithFormat(format.full),\n },\n {\n media: `(min-width: ${resolutions.min.tabletLandscape}px)`,\n srcSet: imgWithFormat(format.lg),\n },\n {\n media: `(min-width: ${resolutions.min.tablet}px)`,\n srcSet: imgWithFormat(format.md),\n },\n {\n media: `(min-width: ${resolutions.min.mobile}px)`,\n srcSet: imgWithFormat(format.sm),\n },\n ],\n };\n\n const props = { ...defaultProps, ...inProps };\n\n return <Picture {...props} />;\n};\n","import ReactDOM from 'react-dom';\nimport globals from '../globals';\n\nexport const replaceWithComponent = ({\n selector,\n componentFn,\n node,\n param = null,\n elementType = 'span',\n}) => {\n [...node.querySelectorAll(selector)].forEach((matchedElem, index) => {\n const renderContainer = globals.document.createElement(elementType);\n const placeholderClassNames = matchedElem.className;\n renderContainer.setAttribute('class', `render-container ${placeholderClassNames}`.trim());\n matchedElem.parentNode.replaceChild(renderContainer, matchedElem);\n const componentToRender = param\n ? componentFn(matchedElem, param, index)\n : componentFn(matchedElem, index);\n ReactDOM.render(componentToRender, renderContainer);\n });\n return { document: globals.document };\n};\n","import { imgWithFormatFn, format } from '../imgUtils';\nimport { resolutions } from '../css';\nimport { DwPicture } from '../../components/DwPicture/DwPicture';\nimport { getFrontendConfig } from '../../hooks/useFrontendConfig';\nimport { replaceWithComponent } from './replaceCommons';\n\nexport const mapImgPlaceholderToPicComponent = matchedElem => {\n const { imageBasePath } = getFrontendConfig();\n const rawImageFormat = matchedElem.getAttribute('data-format');\n const isLegacy = rawImageFormat.includes('LEGACY');\n const isFree = rawImageFormat === 'FREE_IMAGE';\n const imageId = matchedElem.getAttribute('data-id');\n const imgWithFormat = imgWithFormatFn(imageId, imageBasePath);\n const imageAspectRatio = matchedElem.getAttribute('data-aspect-ratio');\n\n const imagePropsText = {\n fallbackUrl: imgWithFormat(format.md_richtext),\n sources: [\n {\n media: `(min-width: ${resolutions.min.desktop}px)`,\n srcSet: imgWithFormat(format.lg_richtext),\n },\n {\n media: `(min-width: ${resolutions.min.tablet}px)`,\n srcSet: imgWithFormat(format.md_richtext),\n },\n {\n media: `(max-width: ${resolutions.max.mobile}px)`,\n srcSet: imgWithFormat(format.sm_richtext),\n },\n ],\n };\n\n const imagePropsLegacy = {\n fallbackUrl: imgWithFormat(format.legacy),\n sources: [\n {\n srcSet: imgWithFormat(format.legacy),\n },\n ],\n };\n\n const imagePropsFree = {\n fallbackUrl: imgWithFormat(format.free),\n sources: [\n {\n srcSet: imgWithFormat(format.free),\n },\n ],\n aspectRatio: { paddingBottom: `${imageAspectRatio}%`, height: 0 },\n };\n\n const getImageDisplayProps = () => {\n if (isLegacy) {\n return imagePropsLegacy;\n }\n if (isFree) {\n return imagePropsFree;\n }\n return imagePropsText;\n };\n\n const imageProps = {\n ...{\n imageId,\n alt: matchedElem.getAttribute('alt'),\n },\n ...getImageDisplayProps(),\n };\n return <DwPicture className={rawImageFormat} {...imageProps} />;\n};\n\n// leave content as parameter as might be needed in future cases\n// eslint-disable-next-line no-unused-vars\nexport const replacePlaceholderImagesWithResponsivePictures = content => {\n replaceWithComponent({\n selector: '.placeholder-image img',\n node: document,\n componentFn: mapImgPlaceholderToPicComponent,\n elementType: 'div',\n });\n};\n","import { replacePlaceholderImagesWithResponsivePictures } from './imageReplacer';\nimport { useTimeout } from '../../hooks/useTimeout';\n\nexport const useImagePlaceholderReplacementEffect = ({ trigger = 'staticTrigger' }) => {\n useTimeout(\n {\n callback: () => {\n replacePlaceholderImagesWithResponsivePictures();\n },\n delay: 10,\n },\n [trigger],\n );\n};\n","import classnames from 'classnames';\n\nexport const ContentHeadline = ({ children, isStandalone = false }) => {\n return (\n <div className=\"headline-container row\">\n <div className=\"col-sm-offset-1 col-sm-10 col-lg-offset-2 col-lg-8 \">\n <div className={classnames('exercise-headline', { standalone: isStandalone })}>\n {children}\n </div>\n </div>\n </div>\n );\n};\n","import styled from 'styled-components';\nimport classnames from 'classnames';\nimport { RichText } from '../RichText/RichText';\nimport { useImagePlaceholderReplacementEffect } from '../../utils/replacers/useImagePlaceholderReplacementEffect';\nimport { ContentHeadline } from '../ContentContainer/ContentHeadline/ContentHeadline';\n\nexport const legalFragment = {\n name: 'Legal',\n partial() {\n return `legal(appName: \"mdl\") {\n ... on Article {\n id\n shortTitle\n text\n }\n }\n `;\n },\n};\n\nexport const LegalNotice = ({ className, legal }) => {\n useImagePlaceholderReplacementEffect({});\n const { text, shortTitle } = legal || {};\n\n return (\n <div className={classnames('section exercise-container vocabulary copy', className)}>\n <ContentHeadline isStandalone={true}>\n <h2>{shortTitle}</h2>\n </ContentHeadline>\n <div className=\"row\">\n <div className=\"col-sm-offset-1 col-sm-10 col-lg-offset-2 col-lg-8\">\n <RichText content={text} />\n </div>\n </div>\n </div>\n );\n};\n\nexport const StyledLegalNotice = styled(LegalNotice)`\n .img-caption {\n display: none;\n }\n`;\n","import styled from 'styled-components';\nimport gql from 'graphql-tag';\nimport { useParams } from 'react-router-dom';\nimport { colors, resolutions } from '../../utils/css';\nimport { I18nText } from '../I18n/I18nText';\nimport {\n getDwContactUrl,\n getDwUrlWithLang,\n getFooterLinkForNamedUrl,\n getLegalUrl,\n} from '../../utils/url/urlFactory';\nimport { useRtlContext } from '../../hooks/useRtl';\nimport { legalFragment } from '../LegalNotice/LegalNotice';\n\nexport const footerFragment = {\n name: 'Footer',\n fragment() {\n return gql`fragment ${this.name} on Query {\n footer(lang: $lang) {\n accessibility(appName: \"mdl\") {\n namedUrl\n }\n policy(appName: \"mdl\") {\n namedUrl\n }\n ${legalFragment.partial()}\n }\n }\n `;\n },\n};\n\nexport const Footer = ({ className, data }) => {\n const { isRtl } = useRtlContext();\n const { langCode } = useParams();\n\n const rtlClass = isRtl ? 'rtl' : '';\n return (\n <footer className={`${className} ${rtlClass}`} aria-label=\"Main Footer\">\n <ul className={rtlClass}>\n {footerData({ langCode, data }).map(footerObject => (\n <li key={footerObject.id} className={rtlClass}>\n <I18nText\n isA=\"a\"\n className=\"footer-link\"\n translation={footerObject.translation}\n href={footerObject.href}\n target={footerObject.target}\n role={footerObject.role}\n aria-label={footerObject.aria}\n />\n </li>\n ))}\n </ul>\n </footer>\n );\n};\n\nconst footerData = ({ langCode, data }) => [\n {\n translation: {\n key: 'footer.copyright',\n parameters: { first: new Date().getFullYear() },\n },\n id: 0,\n aria: 'footer.copyright',\n role: 'Firm name',\n },\n {\n translation: 'footer.dw',\n id: 1,\n href: getDwUrlWithLang({ langCode }),\n target: '_blank',\n aria: 'footer.dw',\n role: 'link',\n },\n {\n translation: 'footer.privacyPolicy',\n id: 2,\n href: getFooterLinkForNamedUrl({ namedUrl: data.footer.policy.namedUrl }),\n target: '_blank',\n aria: 'footer.privacyPolicy',\n role: 'link',\n },\n {\n translation: 'footer.accessibility',\n id: 3,\n href: getFooterLinkForNamedUrl({ namedUrl: data.footer.accessibility.namedUrl }),\n target: '_blank',\n aria: 'footer.accessibility',\n role: 'link',\n },\n {\n translation: 'footer.legal',\n id: 4,\n href: getLegalUrl(langCode),\n target: '',\n aria: 'footer.legal',\n role: 'link',\n },\n {\n translation: 'footer.contact',\n id: 5,\n href: getDwContactUrl(),\n target: '_blank',\n aria: 'footer.contact',\n role: 'link',\n },\n];\n\nexport const StyledFooter = styled(Footer)`\n box-sizing: border-box;\n display: flex;\n flex-wrap: wrap;\n flex-direction: row;\n align-items: center;\n width: 100%;\n min-height: 90px;\n font-family: Helvetica, Arial, sans-serif;\n line-height: 45px;\n margin: 20px 0;\n background: ${colors.LG_BLUE_7};\n\n ul {\n display: flex;\n flex-flow: row wrap;\n flex-direction: row;\n max-width: 100%;\n list-style-type: none;\n padding: 10px 0;\n text-align: center;\n margin: 0;\n }\n\n li {\n margin-right: 12px;\n padding: 0 0 0 12px;\n\n &.rtl {\n direction: rtl;\n }\n }\n\n .footer-link {\n text-decoration: none;\n font-size: 15px;\n color: ${colors.LG_BLUE_4};\n background-color: transparent;\n :hover,\n :active,\n :focus {\n color: ${colors.LG_WHITE};\n }\n }\n\n @media (max-width: ${resolutions.max.tablet}px) {\n margin: 0;\n }\n\n @media (max-width: ${resolutions.max.mobile}px) {\n max-width: 100%;\n min-height: 65px;\n\n ul {\n justify-content: center;\n }\n }\n`;\n","import styled from 'styled-components';\n\nconst LoadingMessage = ({ className }) => (\n <div className={`${className} container loading`}>\n <p>Loading ...</p>\n </div>\n);\n\nexport const StyledLoadingMessage = styled(LoadingMessage)``;\n","import styled from 'styled-components';\n\nconst ErrorMessage = ({ className, error }) => (\n <div className={`${className}`}>\n <p>{error}</p>\n </div>\n);\nexport const StyledErrorMessage = styled(ErrorMessage)`\n color: red;\n`;\n","import { useQuery } from '@apollo/client';\nimport { StyledLoadingMessage as LoadingMessage } from '../commons/LoadingMessage';\nimport { StyledErrorMessage as ErrorMessage } from '../commons/ErrorMessage';\n\nconst hasData = data => data && Object.values(data).filter(item => item).length > 0;\n\nexport const WithGraphQLQueryHandling = ({ query, queryVariables, children }) => {\n const { loading, error, data = {}, refetch } = useQuery(query, {\n variables: queryVariables,\n });\n\n if (loading) {\n return <LoadingMessage />;\n }\n\n if (error) {\n const { message = 'error while fetching data' } = error;\n return <ErrorMessage error={message} />;\n }\n\n if (!hasData(data)) {\n return <ErrorMessage error=\"no data available\" />;\n }\n\n return children(data, refetch);\n};\n","import { createContext, useContext } from 'react';\n\n// eslint-disable-next-line fp/no-let\nlet metadata = null;\n\nexport function hasMetadata() {\n return !!metadata;\n}\n\nexport function setMetadata(inMetadata) {\n metadata = inMetadata; // eslint-disable-line fp/no-mutation\n}\n\nexport function getMetadata() {\n return metadata;\n}\n\nexport function clearMetadata() {\n metadata = null; // eslint-disable-line fp/no-mutation\n}\n\n// CONTEXT\nexport const FrontendMetadataContext = createContext({ getMetadata });\n\n// USAGE HOOK\nexport const useMetadata = () => useContext(FrontendMetadataContext).getMetadata();\n","import gql from 'graphql-tag';\nimport { useParams } from 'react-router';\nimport { setTranslations } from '../../utils/i18n';\nimport { setFrontendConfig } from '../../hooks/useFrontendConfig';\nimport { toLang } from '../../utils/mappers/langMapper';\nimport { WithGraphQLQueryHandling } from '../WithGraphQLQueryHandling/WithGraphQLQueryHandling';\nimport { footerFragment } from '../Footer/Footer';\nimport { setMetadata } from '../../hooks/useMetadata';\n\nexport const i18nConfigQuery = gql`\n query translationsAndConfig($lang: Language!) {\n i18n: i18nByLang(lang: $lang, appName: \"mdl\") {\n all\n }\n config {\n imageBasePath\n staticBaseHost\n gtmId(appName: \"mdl\")\n gtmLevel1Id(appName: \"mdl\")\n }\n iso639ByLang(lang: $lang)\n ...${footerFragment.name}\n }\n ${footerFragment.fragment()}\n`;\n\nexport const I18nConfigLoader = ({ children }) => {\n const { langCode } = useParams();\n\n const i18nQueryVariables = { lang: toLang(langCode || 'en') };\n\n return (\n <WithGraphQLQueryHandling query={i18nConfigQuery} queryVariables={i18nQueryVariables}>\n {data => {\n if (data.i18n) {\n setTranslations(JSON.parse(data.i18n.all));\n }\n if (data.config) {\n setFrontendConfig(data.config);\n }\n if (data.iso639ByLang) {\n setMetadata(data.iso639ByLang);\n }\n return children(data);\n }}\n </WithGraphQLQueryHandling>\n );\n};\n","import { isServer } from '../../utils/ssr';\n\nexport const BrowserOnly = ({ children, ...restProps }) => (\n <div {...restProps}>{!isServer() && children}</div>\n);\n","import { useSelector } from 'react-redux';\nimport config from '../../config';\nimport { userSelector } from '../../state/user/userSelectors';\nimport { useLocalStorage } from '../../hooks/useLocalStorage';\nimport { I18nText } from '../I18n/I18nText';\nimport { BrowserOnly } from './BrowserOnly';\n\nexport const GdprLayer = ({ footerData }) => {\n const { isLoggedIn } = useSelector(userSelector);\n const [hasAcceptedGdpr, setHasAcceptedGdpr] = useLocalStorage('hasAcceptedGdpr');\n const { namedUrl } = footerData.footer.policy || {};\n\n if (isLoggedIn || hasAcceptedGdpr) {\n return null;\n }\n\n return (\n <BrowserOnly>\n <div className=\"cookie\" style={{ left: 0 }}>\n <div className=\"cookie__wrap\">\n <div className=\"cookie__item\">\n <I18nText isA=\"p\" className=\"cookie__text\" translation=\"common.gdpr.overlay.text\" />\n </div>\n <div className=\"cookie__buttons\">\n <I18nText\n isA=\"a\"\n translation=\"common.gdpr.overlay.moreButton\"\n className=\"cookie__btn cookie__btn--more\"\n href={`${config.dw.baseUrl}${namedUrl}`}\n target=\"_blank\"\n />\n <I18nText\n isA=\"a\"\n translation=\"common.gdpr.overlay.okButton\"\n className=\"cookie__btn cookie__btn--ok\"\n href=\"#\"\n onClick={() => setHasAcceptedGdpr(true)}\n />\n </div>\n </div>\n </div>\n </BrowserOnly>\n );\n};\n","export const PAGE_TYPES = Object.freeze({\n HELP: 'HELP',\n VOCABULARY: 'VOCABULARY',\n ALPHABETICAL_ORDER: 'ALPHABETICAL_ORDER',\n LEGAL: 'LEGAL',\n OVERVIEW: 'OVERVIEW',\n COURSE: 'COURSE',\n LESSON: 'LESSON',\n EXERCISE: 'EXERCISE',\n LESSON_EXERCISE_RESULT: 'LESSON_EXERCISE_RESULT',\n LESSON_SUMMARY: 'LESSON_SUMMARY',\n GRAMMAR: 'GRAMMAR',\n GRAMMAR_DETAIL: 'GRAMMAR_DETAIL',\n GRAMMAR_OVERVIEW: 'GRAMMAR_OVERVIEW',\n VOCABULARY_OVERVIEW: 'VOCABULARY_OVERVIEW',\n REGIONAL_STUDIES: 'REGIONAL_STUDIES',\n PLACEMENT_TEST: 'PLACEMENT_TEST',\n FINAL_TEST: 'FINAL_TEST',\n MANUSCRIPT: 'MANUSCRIPT',\n USER_PROFILE: 'USER_PROFILE',\n PASSWORD_CHANGE: 'PASSWORD_CHANGE',\n PASSWORD_RESET: 'PASSWORD_RESET',\n PASSWORD_SET: 'PASSWORD_SET',\n REGISTER_USER: 'REGISTER_USER',\n FEEDBACK_STATUS: 'FEEDBACK_STATUS',\n EXTRAS: 'EXTRAS',\n PLACEMENT_DASHBOARD: 'PLACEMENT_DASHBOARD',\n VOCABULARY_TRAINER: 'VOCABULARY_TRAINER',\n NOT_FOUND_PAGE: 'NOT_FOUND',\n});\n\nexport const GTM_NO_CONTENT_PAGE_IDS = Object.freeze({\n [PAGE_TYPES.OVERVIEW]: 5001,\n [PAGE_TYPES.GRAMMAR_OVERVIEW]: 5002,\n [PAGE_TYPES.VOCABULARY_OVERVIEW]: 5003,\n [PAGE_TYPES.VOCABULARY_TRAINER]: 5004,\n [PAGE_TYPES.REGISTER_USER]: 5005,\n [PAGE_TYPES.USER_PROFILE]: 5006,\n [PAGE_TYPES.PASSWORD_CHANGE]: 5007,\n [PAGE_TYPES.PASSWORD_RESET]: 5008,\n [PAGE_TYPES.PASSWORD_SET]: 5009,\n [PAGE_TYPES.FEEDBACK_STATUS]: 5010,\n [PAGE_TYPES.NOT_FOUND_PAGE]: 5011,\n});\n","import { PAGE_TYPES } from '../constants/pageTypes';\n\nconst LESSON_MENU_VOCABULARY_KEY = 'lesson.menu.vocabulary';\nconst LESSON_EXERCISE_RESULT_TITLE_KEY = 'lesson.exercises.result.title';\nconst LESSON_MENU_GRAMMAR_KEY = 'lesson.menu.grammar';\nconst LESSON_MENU_REGIONAL_STUDIES_KEY = 'lesson.menu.regionalStudies';\nconst LESSON_MANUSCRIPT_KEY = 'lesson.menu.manuscript';\nconst LESSON_MENU_EXTRAS_KEY = 'lesson.menu.extras';\nconst LESSON_EXERCISES_RESULT_GENERAL_KEY = 'lesson.exercises.result.general';\n\nexport const PAGE_TYPE_TO_TITLE_TRANSLATION_KEYS = Object.freeze({\n [PAGE_TYPES.ALPHABETICAL_ORDER]: ['lesson.menu.alphabeticalOrder'],\n [PAGE_TYPES.OVERVIEW]: ['metadata.overview'],\n [PAGE_TYPES.GRAMMAR_DETAIL]: [LESSON_MENU_GRAMMAR_KEY],\n [PAGE_TYPES.HELP]: ['common.help'],\n [PAGE_TYPES.VOCABULARY_OVERVIEW]: [LESSON_MENU_VOCABULARY_KEY],\n [PAGE_TYPES.USER_PROFILE]: ['profile.edit.title'],\n [PAGE_TYPES.FEEDBACK_STATUS]: ['common.feedback'],\n [PAGE_TYPES.REGISTER_USER]: ['profile.register.title'],\n [PAGE_TYPES.VOCABULARY]: [LESSON_MENU_VOCABULARY_KEY],\n [PAGE_TYPES.LEGAL]: ['metadata.legal'],\n [PAGE_TYPES.LESSON_EXERCISE_RESULT]: [LESSON_EXERCISE_RESULT_TITLE_KEY],\n [PAGE_TYPES.LESSON_SUMMARY]: [LESSON_EXERCISE_RESULT_TITLE_KEY],\n [PAGE_TYPES.GRAMMAR]: [LESSON_MENU_GRAMMAR_KEY],\n [PAGE_TYPES.GRAMMAR_OVERVIEW]: [LESSON_MENU_GRAMMAR_KEY],\n [PAGE_TYPES.REGIONAL_STUDIES]: [LESSON_MENU_REGIONAL_STUDIES_KEY],\n [PAGE_TYPES.MANUSCRIPT]: [LESSON_MANUSCRIPT_KEY],\n [PAGE_TYPES.EXTRAS]: [LESSON_MENU_EXTRAS_KEY],\n [PAGE_TYPES.VOCABULARY_TRAINER]: ['header.menu.vocabularyTrainer'],\n [PAGE_TYPES.PLACEMENT_DASHBOARD]: ['header.menu.levelTest'],\n [PAGE_TYPES.PASSWORD_CHANGE]: ['profile.edit.password.change.title'],\n [PAGE_TYPES.PASSWORD_RESET]: ['profile.edit.password.reset.title'],\n [PAGE_TYPES.PASSWORD_SET]: ['profile.edit.password.set.title'],\n [PAGE_TYPES.FINAL_TEST]: [LESSON_EXERCISES_RESULT_GENERAL_KEY],\n [PAGE_TYPES.PLACEMENT_TEST]: [LESSON_EXERCISES_RESULT_GENERAL_KEY, 'header.menu.levelTest'],\n});\n\nexport const PAGE_TYPE_TO_DESCRIPTION_TRANSLATION_KEYS = Object.freeze({\n [PAGE_TYPES.HELP]: 'metadata.description.help',\n [PAGE_TYPES.VOCABULARY]: 'metadata.description.vocabulary',\n [PAGE_TYPES.LEGAL]: 'metadata.description.legal',\n [PAGE_TYPES.OVERVIEW]: 'metadata.description.overview',\n [PAGE_TYPES.GRAMMAR]: 'metadata.description.grammar',\n [PAGE_TYPES.REGIONAL_STUDIES]: 'metadata.description.regionalStudies',\n [PAGE_TYPES.MANUSCRIPT]: 'metadata.description.manuscript',\n [PAGE_TYPES.REGISTER_USER]: 'metadata.description.register',\n [PAGE_TYPES.EXTRAS]: 'metadata.description.extras',\n});\n\nexport const PAGE_TYPE_TO_KEYWORDS_TRANSLATION_KEYS = Object.freeze({\n [PAGE_TYPES.VOCABULARY]: LESSON_MENU_VOCABULARY_KEY,\n [PAGE_TYPES.LESSON_EXERCISE_RESULT]: LESSON_EXERCISE_RESULT_TITLE_KEY,\n [PAGE_TYPES.LESSON_SUMMARY]: LESSON_EXERCISE_RESULT_TITLE_KEY,\n [PAGE_TYPES.GRAMMAR]: LESSON_MENU_GRAMMAR_KEY,\n [PAGE_TYPES.GRAMMAR_OVERVIEW]: LESSON_MENU_GRAMMAR_KEY,\n [PAGE_TYPES.GRAMMAR_DETAIL]: LESSON_MENU_GRAMMAR_KEY,\n [PAGE_TYPES.VOCABULARY_OVERVIEW]: LESSON_MENU_VOCABULARY_KEY,\n [PAGE_TYPES.REGIONAL_STUDIES]: LESSON_MENU_REGIONAL_STUDIES_KEY,\n [PAGE_TYPES.MANUSCRIPT]: LESSON_MANUSCRIPT_KEY,\n [PAGE_TYPES.EXTRAS]: LESSON_MENU_EXTRAS_KEY,\n [PAGE_TYPES.FINAL_TEST]: LESSON_EXERCISES_RESULT_GENERAL_KEY,\n [PAGE_TYPES.PLACEMENT_TEST]: LESSON_EXERCISES_RESULT_GENERAL_KEY,\n});\n\nexport const createTitle = ({ titleParts }) => titleParts.filter(Boolean).join(' | ');\nexport const createKeywords = ({ keywords }) => keywords.filter(Boolean).join(',');\n\nexport const html2text = ({ html }) => (html ? html.replace(/<.*?>/g, ' ') : html);\n","import { Helmet } from 'react-helmet-async';\nimport gql from 'graphql-tag';\nimport { useMetadata } from '../../hooks/useMetadata';\nimport { useMetaTitle } from '../../hooks/useMetaTitle';\nimport { useMetaDescription } from '../../hooks/useMetaDescription';\nimport { useMetaKeywords } from '../../hooks/useMetaKeywords';\nimport { mainContentFullUrl } from '../../utils/url/url';\nimport { useTranslation } from '../../hooks/useTranslation';\n\nexport const pageHeaderMetadataFragment = {\n name: 'PageHeaderMetadata',\n fragment({ type }) {\n return gql`fragment ${this.name} on ${type} {\n iso639Lang\n }\n `;\n },\n};\n\nexport const metaDataFragment = {\n name: 'MetaData',\n fragment({ type }) {\n return gql`fragment ${this.name} on ${type} {\n name\n keywordStrings\n description\n teaser\n }\n `;\n },\n};\n\nexport const PageMetaData = ({\n pageType,\n content = {},\n parentContentName,\n translationFirst = false,\n useOnlyCmsKeywords = false,\n useTeaserAsDescription = false,\n useDescriptionTranslation = false,\n addKeywordsAndDescription = true,\n}) => {\n const { name: contentName, keywordStrings = [], description, teaser } = content;\n const siteName = useTranslation('metadata.siteName');\n const iso639Lang = useMetadata();\n const title = useMetaTitle({ pageType, translationFirst, contentName, parentContentName });\n const descriptionMeta = useMetaDescription({\n pageType,\n contentName,\n teaser,\n description,\n useTeaserAsDescription,\n useDescriptionTranslation,\n });\n const keywordsString = useMetaKeywords({ pageType, useOnlyCmsKeywords, keywordStrings });\n const contentFullUrl = mainContentFullUrl();\n const showDescription = addKeywordsAndDescription && descriptionMeta;\n\n return (\n <Helmet>\n <html lang={iso639Lang} />\n <title>{title}</title>\n <meta\n name=\"copyright\"\n content={`© ${new Date().getFullYear()} Deutsche Welle (www.dw.com)`}\n />\n {showDescription && <meta name=\"description\" content={descriptionMeta} />}\n {showDescription && <meta property=\"og:description\" content={descriptionMeta} />}\n {addKeywordsAndDescription && keywordsString && (\n <meta name=\"keywords\" content={keywordsString} />\n )}\n <meta property=\"og:title\" content={title} />\n <meta property=\"og:type\" content=\"website\" />\n <meta property=\"og:site_name\" content={siteName} />\n <meta property=\"og:url\" content={contentFullUrl} />\n </Helmet>\n );\n};\n","import { useI18nContext } from '../context/I18nContext';\nimport { createTitle, PAGE_TYPE_TO_TITLE_TRANSLATION_KEYS } from '../utils/pageMetadata';\n\nexport const useMetaTitle = ({\n pageType,\n translationFirst,\n contentName,\n parentContentName,\n} = {}) => {\n const { i18n } = useI18nContext();\n const pageTitleTranslationKeys = PAGE_TYPE_TO_TITLE_TRANSLATION_KEYS[pageType];\n const pageTitleTranslations = pageTitleTranslationKeys\n ? pageTitleTranslationKeys.map(key => i18n.t(key))\n : [];\n const siteName = i18n.t('metadata.siteName');\n\n const titleParts = translationFirst\n ? [...pageTitleTranslations, contentName, parentContentName, siteName]\n : [contentName, ...pageTitleTranslations, parentContentName, siteName];\n\n return createTitle({ titleParts });\n};\n","import { html2text, PAGE_TYPE_TO_DESCRIPTION_TRANSLATION_KEYS } from '../utils/pageMetadata';\nimport { useTranslation } from './useTranslation';\n\nexport const useMetaDescription = ({\n pageType,\n contentName,\n teaser,\n description,\n useTeaserAsDescription,\n useDescriptionTranslation,\n} = {}) => {\n const descriptionTranslation = useTranslation({\n key: PAGE_TYPE_TO_DESCRIPTION_TRANSLATION_KEYS[pageType],\n parameters: { first: contentName },\n });\n\n return (\n (useTeaserAsDescription && html2text({ html: teaser })) ||\n (useDescriptionTranslation && descriptionTranslation) ||\n html2text({ html: description })\n );\n};\n","import { createKeywords, PAGE_TYPE_TO_KEYWORDS_TRANSLATION_KEYS } from '../utils/pageMetadata';\nimport { useTranslation } from './useTranslation';\n\nexport const useMetaKeywords = ({ pageType, useOnlyCmsKeywords, keywordStrings } = {}) => {\n const defaultKeywords = useTranslation('metadata.keywords');\n const pageKeywords = useTranslation(PAGE_TYPE_TO_KEYWORDS_TRANSLATION_KEYS[pageType]);\n\n const additionalKeyword = pageKeywords || defaultKeywords;\n const keywords = useOnlyCmsKeywords ? keywordStrings : [...keywordStrings, additionalKeyword];\n\n return createKeywords({ keywords });\n};\n","import { getErrorCode, getFeedbackUrl } from './urlFactory';\nimport { FEEDBACK_TYPES } from '../../constants/feedback';\n\nexport const feedbackHelper = {\n getForErrorCode(errorResponse, langCode) {\n const errorCode = getErrorCode(errorResponse);\n return feedbackHelper.error(errorCode, langCode);\n },\n getForPasswordChangeErrorCode(errorResponse, langCode) {\n const errorCode = getErrorCode(errorResponse);\n return feedbackHelper.errorPasswordChange(errorCode, langCode);\n },\n forLogin(redirectUrl, langCode) {\n return getFeedbackUrl(FEEDBACK_TYPES.LOGIN, langCode);\n },\n forLogout(langCode) {\n return getFeedbackUrl(FEEDBACK_TYPES.LOGOUT, langCode);\n },\n forUserDelete(langCode) {\n return getFeedbackUrl(FEEDBACK_TYPES.DELETED, langCode);\n },\n forInvalidToken(langCode) {\n return getFeedbackUrl(FEEDBACK_TYPES.INVALID_TOKEN, langCode);\n },\n forProfileServiceUnavailable(langCode) {\n return getFeedbackUrl(FEEDBACK_TYPES.PROFILE_SERVICE_UNAVAILABLE, langCode);\n },\n forSessionTimeout(redirectUrl, langCode) {\n return getFeedbackUrl(FEEDBACK_TYPES.SESSION_TIMEOUT, langCode);\n },\n forMissingUserProfile(redirectUrl, langCode) {\n return getFeedbackUrl(FEEDBACK_TYPES.MISSING_USER_PROFILE, langCode);\n },\n forForcedLogout(langCode) {\n return getFeedbackUrl(FEEDBACK_TYPES.FORCED_LOGOUT, langCode);\n },\n forPasswordChanged(langCode) {\n return getFeedbackUrl(FEEDBACK_TYPES.PASSWORD_CHANGED, langCode);\n },\n forMailChanged(langCode) {\n return getFeedbackUrl(FEEDBACK_TYPES.MAIL_CHANGED, langCode);\n },\n forMailChangeRequest(langCode) {\n return getFeedbackUrl(FEEDBACK_TYPES.MAIL_CHANGE_REQUEST, langCode);\n },\n forRegistered(langCode) {\n return getFeedbackUrl(FEEDBACK_TYPES.REGISTERED, langCode);\n },\n forRegistrationConfirm(langCode) {\n return getFeedbackUrl(FEEDBACK_TYPES.REGISTRATION_CONFIRMED, langCode);\n },\n forPasswordResetRequest(langCode) {\n return getFeedbackUrl(FEEDBACK_TYPES.PASSWORD_RESET_REQUESTED, langCode);\n },\n forSetPassword(langCode) {\n return getFeedbackUrl(FEEDBACK_TYPES.PASSWORD_RESET_SET, langCode);\n },\n forProfileUpdated(langCode) {\n return getFeedbackUrl(FEEDBACK_TYPES.PROFILE_UPDATED, langCode);\n },\n forVocabularyTrainerUnavailable(langCode) {\n return getFeedbackUrl(FEEDBACK_TYPES.VOCABULARY_TRAINER_UNAVAILABLE, langCode);\n },\n forVocabularyTrainerNoVocabularies(langCode) {\n return getFeedbackUrl(FEEDBACK_TYPES.VOCABULARY_TRAINER_NO_VOCABULARIES, langCode);\n },\n forCertificateMissingTranscription(langCode) {\n return getFeedbackUrl(FEEDBACK_TYPES.CERTIFICATE_NO_TRANSCRIPTION, langCode);\n },\n forInvalidCertificate(langCode) {\n return getFeedbackUrl(FEEDBACK_TYPES.INVALID_CERTIFICATE, langCode);\n },\n forGeneralError(langCode) {\n return getFeedbackUrl(FEEDBACK_TYPES.OTHER, langCode);\n },\n error(errorCode, langCode) {\n return getFeedbackUrl(errorCode || FEEDBACK_TYPES.OTHER, langCode);\n },\n errorPasswordChange(errorCode, langCode) {\n return getFeedbackUrl(\n errorCode ? FEEDBACK_TYPES.PASSWORD_CHANGE + errorCode : FEEDBACK_TYPES.OTHER,\n langCode,\n );\n },\n\n getFeedbackContentKey(feedbackType) {\n const typeWithoutUnderline = feedbackType\n .toLowerCase()\n .replace(/_+./g, s => s.slice(-1).toUpperCase());\n return `client.status.${typeWithoutUnderline}`;\n },\n};\n","import { useDispatch } from 'react-redux';\nimport { useHistory } from 'react-router-dom';\nimport { useEffect } from 'react';\nimport { feedbackHelper } from '../utils/url/feedbackHelpers';\nimport { validateUserTicket } from '../services/userService';\nimport { logInUser } from '../state/user/userDuck';\nimport { removeSearchParam } from '../utils/url/urlUtils';\nimport { getTicketDomain, getTicketFromUrlParam } from '../utils/userUtils';\nimport { USER } from '../constants/userUrl';\nimport { useGlobalsContext } from '../context/GlobalsContext';\n\nexport const useValidateTicketAndLoginUser = (location, langCode) => {\n const dispatch = useDispatch();\n const { origin } = useGlobalsContext().window.location;\n const ticket = getTicketFromUrlParam(location);\n const history = useHistory();\n\n useEffect(() => {\n const ticketDomain = getTicketDomain(origin, location);\n if (ticket && ticketDomain) {\n validateUserTicket(ticket, ticketDomain)\n .then(response => {\n if (!response.ok) {\n // eslint-disable-next-line fp/no-throw\n throw new Error(response.status);\n } else {\n dispatch(logInUser());\n }\n })\n .then(() => {\n history.push({\n search: removeSearchParam(location, USER.TICKET_PARAM_NAME),\n });\n })\n .catch(() => {\n history.push(feedbackHelper.forGeneralError(langCode));\n });\n }\n }, [ticket, location.pathname]); // eslint-disable-line react-hooks/exhaustive-deps\n};\n","/* eslint-disable react-hooks/exhaustive-deps */\nimport { useHistory } from 'react-router-dom';\nimport { useDispatch, useSelector } from 'react-redux';\nimport { useEffect } from 'react';\nimport { feedbackHelper } from '../utils/url/feedbackHelpers';\nimport { setHasLogOutRequestBeenCalled } from '../state/user/userDuck';\nimport { userSelector } from '../state/user/userSelectors';\n\nexport const useRedirectAfterLogOut = langCode => {\n const history = useHistory();\n const dispatch = useDispatch();\n const userState = useSelector(userSelector);\n\n useEffect(() => {\n if (userState.hasLogOutRequestBeenCalled) {\n history.push(feedbackHelper.forLogout(langCode));\n dispatch(setHasLogOutRequestBeenCalled(false));\n }\n }, [userState.hasLogOutRequestBeenCalled]);\n};\n","import styled from 'styled-components';\nimport { colors, resolutions } from '../../utils/css';\n\nconst PageLayout = ({ className, children }) => (\n <div className={className} aria-label=\"Page Container\">\n <div className=\"content-container\">{children}</div>\n </div>\n);\n\nexport const StyledPageLayout = styled(PageLayout)`\n background: ${colors.LG_WHITE};\n display: grid;\n margin: 0 auto;\n overflow-x: hidden !important;\n padding: 0;\n width: 100%;\n\n @media (min-width: ${resolutions.min.desktop}px) {\n margin: 40px auto;\n min-height: 600px;\n padding: 0 20px;\n width: 1240px;\n\n .content-container {\n width: 1200px;\n }\n }\n`;\n","/* eslint-disable react-hooks/exhaustive-deps */\nimport { useDispatch, useSelector } from 'react-redux';\nimport { useEffect } from 'react';\nimport { useHistory } from 'react-router-dom';\nimport { checkUserProfile } from '../services/userService';\nimport { loginTimeout } from '../state/user/userDuck';\nimport { feedbackHelper } from '../utils/url/feedbackHelpers';\nimport { userSelector } from '../state/user/userSelectors';\n\nexport const useCheckSessionTimeout = langCode => {\n const dispatch = useDispatch();\n const { isLoggedIn } = useSelector(userSelector);\n const history = useHistory();\n\n useEffect(() => {\n if (isLoggedIn) {\n checkUserProfile()\n .then(response => {\n if (response.status === 401) {\n dispatch(loginTimeout());\n history.push(feedbackHelper.forSessionTimeout('', langCode));\n }\n })\n .catch(() => {\n history.push(feedbackHelper.forGeneralError(langCode));\n });\n }\n }, [isLoggedIn]);\n};\n","import { LANG_CODES } from './langMapper';\n\nconst rtlLanguages = [\n LANG_CODES.ARABIC,\n LANG_CODES.DARI,\n LANG_CODES.HAUSA,\n LANG_CODES.PASHTO,\n LANG_CODES.PERSIAN,\n LANG_CODES.URDU,\n];\nexport const isRtlByLangCode = langCode => rtlLanguages.includes(langCode);\n","import {\n findExistingCourseById,\n findExistingLessonById,\n findInquiryProgress,\n} from './learnProgress';\n\nexport const learnProgressSelector = state => state.learnProgress;\n\nexport const findLessonLearnProgressSelector = lessonId => state => {\n const { lessons } = state.learnProgress;\n return findExistingLessonById({ lessons, lessonId });\n};\n\nexport const findInquiryLearnProgressSelector = (lessonId, exerciseId) => state => {\n if (!lessonId || !exerciseId) {\n return [];\n }\n const { lessons } = state.learnProgress;\n return findInquiryProgress({ lessons, lessonId, exerciseId });\n};\n\nexport const findCourseLearnProgressSelector = courseId => state => {\n const { courses } = state.learnProgress;\n return { courseProgress: findExistingCourseById({ courses, courseId }) };\n};\n\nexport const isLessonProgressSyncRequiredSelector = state => state.learnProgress.isSyncRequired;\n","export default __webpack_public_path__ + \"static/media/bg-dw-desktop.4aec073f.jpg\";","export default __webpack_public_path__ + \"static/media/DWTheAntiquaB-W7Bold.73a35783.woff\";","export default __webpack_public_path__ + \"static/media/DWTheAntiquaB-W7Bold.c739cf0d.woff2\";","export default __webpack_public_path__ + \"static/media/dwtheantiquab-w5plain.94c5b804.woff\";","export default __webpack_public_path__ + \"static/media/dwtheantiquab-w5plain.524a5eac.woff2\";","export default __webpack_public_path__ + \"static/media/DWTheAntiquaB-W5PlainItalic.0c806fe1.woff\";","export default __webpack_public_path__ + \"static/media/DWTheAntiquaB-W5PlainItalic.390937af.woff2\";","import { createGlobalStyle, StyleSheetManager } from 'styled-components';\nimport stylisRTLPlugin from 'stylis-plugin-rtl';\nimport { useParams } from 'react-router';\nimport { colors } from '../utils/css';\nimport { useValidateTicketAndLoginUser } from '../hooks/useValidateTicketAndLoginUser';\nimport { useRedirectAfterLogOut } from '../hooks/useRedirectAfterLogOut';\nimport { StyledPageLayout as PageLayout } from '../components/Page/PageLayout';\nimport { useLocationGetter } from '../hooks/useLocationGetter';\nimport { useCheckSessionTimeout } from '../hooks/useCheckSessionTimeout';\nimport { isRtlByLangCode } from '../utils/mappers/rtlLanguages';\nimport { useSyncLearnProgress } from '../hooks/useSyncLessonProgress';\nimport bgDWDesktop from '../assets/images/bg-dw-desktop.jpg';\nimport DWTheAntiquaBBoldWoff from '../assets/fonts/dw-theAntiquaB-W7Bold-web/DWTheAntiquaB-W7Bold.woff';\nimport DWTheAntiquaBBoldWoff2 from '../assets/fonts/dw-theAntiquaB-W7Bold-web/DWTheAntiquaB-W7Bold.woff2';\nimport DWTheAntiquaBSPlainWoff from '../assets/fonts/dw-theAntiquaB-W5Plain-web/dwtheantiquab-w5plain.woff';\nimport DWTheAntiquaBSPlainWoff2 from '../assets/fonts/dw-theAntiquaB-W5Plain-web/dwtheantiquab-w5plain.woff2';\nimport DWTheAntiquaBSPlainItalicWoff from '../assets/fonts/dw-theAntiquaB-W5PlainItalic-web/DWTheAntiquaB-W5PlainItalic.woff';\nimport DWTheAntiquaBSPlainItalicWoff2 from '../assets/fonts/dw-theAntiquaB-W5PlainItalic-web/DWTheAntiquaB-W5PlainItalic.woff2';\n\nexport const GlobalStyles = createGlobalStyle`\n * {\n box-sizing: border-box;\n font-family: Helvetica, Arial, sans-serif;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n }\n &:after, &:before {\n box-sizing: border-box;\n }\n html {\n -webkit-tap-highlight-color: transparent;\n }\n body {\n direction: ltr;\n text-align: left;\n background: url(${bgDWDesktop}) center top no-repeat ${colors.LG_GRAY_3};\n @font-face {\n font-family: DWTheAntiquaBBold;\n src: url(${DWTheAntiquaBBoldWoff}) format(\"woff\"),\n url(${DWTheAntiquaBBoldWoff2}) format(\"woff2\");\n font-style: normal;\n font-weight: 400\n }\n @font-face {\n font-family: DWTheAntiquaB;\n src: url(${DWTheAntiquaBSPlainWoff}) format(\"woff\"),\n url(${DWTheAntiquaBSPlainWoff2}) format(\"woff2\");\n font-style: normal;\n font-weight: 400\n }\n @font-face {\n font-family: DWTheAntiquaBItalic;\n src: url(${DWTheAntiquaBSPlainItalicWoff}) format(\"woff\"),\n url(${DWTheAntiquaBSPlainItalicWoff2}) format(\"woff2\");\n font-style: normal;\n font-weight: 400\n }\n }\n svg:not(:root) {\n overflow: hidden;\n }\n`;\n\nexport const MainPage = ({ children }) => {\n const { langCode } = useParams();\n const { location } = useLocationGetter();\n useValidateTicketAndLoginUser(location, langCode);\n useRedirectAfterLogOut(langCode);\n useCheckSessionTimeout(langCode);\n useSyncLearnProgress();\n\n const isRtl = isRtlByLangCode(langCode);\n\n return (\n <StyleSheetManager stylisPlugins={isRtl ? [stylisRTLPlugin] : []}>\n <>\n <GlobalStyles />\n <PageLayout>{children}</PageLayout>\n </>\n </StyleSheetManager>\n );\n};\n","import { useEffect, useState } from 'react';\nimport globals from '../utils/globals';\n\nexport const useLocationGetter = () => {\n const [location, setLocation] = useState({});\n const [langCode, setLangCode] = useState('');\n useEffect(() => {\n const locationFromWindow = globals.window.location;\n const pathnameFragments = locationFromWindow.pathname\n ? locationFromWindow.pathname.split('/')\n : [];\n const langCodeFromLocation = pathnameFragments.length > 1 ? pathnameFragments[1] : '';\n setLocation(locationFromWindow);\n setLangCode(langCodeFromLocation);\n }, []);\n return { location, langCode };\n};\n","import { useDispatch, useSelector } from 'react-redux';\nimport { useEffect } from 'react';\nimport { userSelector } from '../state/user/userSelectors';\nimport { syncLessonProgress } from '../state/progress/learnProgressDuck';\nimport { isLessonProgressSyncRequiredSelector } from '../state/progress/learnProgressSelectors';\n\nexport const useSyncLearnProgress = () => {\n const { isLoggedIn } = useSelector(userSelector);\n const isLessonProgressSyncRequired = useSelector(isLessonProgressSyncRequiredSelector);\n const dispatch = useDispatch();\n\n useEffect(() => {\n if (isLoggedIn && isLessonProgressSyncRequired) {\n dispatch(syncLessonProgress());\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [isLoggedIn]);\n};\n","import { Helmet } from 'react-helmet-async';\nimport { useFrontendConfig } from '../../hooks/useFrontendConfig';\n\nexport const GtmLoadScript = () => (\n <Helmet>\n <script>\n {`(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],\nj=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=\n'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);\n})(window,document,'script','dataLayer','GTM-${useFrontendConfig().gtmId}');`}\n </script>\n </Helmet>\n);\n","import { objectToQueryParams } from '../../utils/url/url';\nimport { useFrontendConfig } from '../../hooks/useFrontendConfig';\n\nexport const GtmNoScriptFallback = ({ dataLayer }) => {\n const hideIframeStyles = {\n display: 'none',\n visibility: 'hidden',\n };\n const { gtmId } = useFrontendConfig();\n return (\n <noscript>\n <iframe\n title={`GTM-${gtmId}`}\n src={`https://www.googletagmanager.com/ns.html?id=GTM-${gtmId}&${objectToQueryParams(\n dataLayer,\n )}`}\n height=\"0\"\n width=\"0\"\n style={hideIframeStyles}\n />\n </noscript>\n );\n};\n","import { useLocation } from 'react-router-dom';\nimport { getQueryParamValueFrom } from '../utils/url/url';\n\nexport const useLocationQueryParam = paramName => {\n const { search } = useLocation();\n\n return getQueryParamValueFrom({ from: search, value: paramName });\n};\n","import { useGlobalsContext } from '../../../context/GlobalsContext';\nimport { useLocationQueryParam } from '../../../hooks/useLocationQueryParam';\nimport { useFrontendConfig } from '../../../hooks/useFrontendConfig';\n\nexport const useStaticInfoForGtm = () => {\n const pageUrl = useGlobalsContext().window.location.href.split('?')[0];\n const macaParam = useLocationQueryParam('maca');\n const { gtmLevel1Id } = useFrontendConfig();\n\n return { gtmLevel1Id, macaParam, pageUrl };\n};\n","import gql from 'graphql-tag';\nimport globals from '../../utils/globals';\n\nconst isValidList = list => list?.length > 0;\n\nconst addCurrentNavToRootList = ({ nav }) => [...nav.navsToRoot, nav];\n\n// eslint-disable-next-line no-underscore-dangle\nconst contentTitle = content => (content.__typename === 'Person' ? content.fullName : content.name);\n\nconst pickCategoryName = ({ navs, index }) => (navs[index] || {}).name;\n\nexport const gtmDataLayerPartial = {\n name: 'GtmDataLayer',\n partial() {\n return `\n ...on ModelAspect {\n id\n gtmLanguageCode\n gtmContentType\n }\n ...on DeliveryAspect {\n gtmContentDate\n }\n ...on NamedAspect {\n name\n }\n ...on AssociationsAspect {\n navigations {\n id\n name\n navsToRoot {\n name\n }\n }\n subjects {\n name\n }\n topics:categories {\n originId\n }\n departments {\n name\n }\n }\n `;\n },\n};\n\nexport const mediaInfoForTrackingFragment = {\n name: 'MediaInfoForTrackingFragment',\n fragment({ type }) {\n return gql`fragment ${this.name} on ${type} {\n videos {\n ${gtmDataLayerPartial.partial()}\n }\n audios {\n ${gtmDataLayerPartial.partial()}\n }\n }\n `;\n },\n};\n\nexport const generateContentGtmInfo = ({\n content,\n level1Id,\n macaParam,\n pageUrl,\n courseId,\n noContentPageId,\n}) => {\n const navs = isValidList(content.navigations) ? content.navigations : [{ navsToRoot: [] }];\n const alignedNavs = addCurrentNavToRootList({ nav: navs[0] });\n\n return {\n categoryLevel1: pickCategoryName({ navs: alignedNavs, index: 0 }),\n categoryLevel2: pickCategoryName({ navs: alignedNavs, index: 1 }),\n categoryLevel3: pickCategoryName({ navs: alignedNavs, index: 2 }),\n contentTitle: contentTitle(content),\n contentLanguage: content.gtmLanguageCode,\n pageOID: content.id,\n contentType: content.gtmContentType,\n date: content.gtmContentDate,\n subject: content.subjects ? content.subjects[0]?.name : {},\n topicIds: content.topics?.map(topic => topic.originId),\n pageSID: navs[0].id,\n departmentName: content.departments ? content.departments[0]?.name : {},\n categoryType: 1,\n displayForm: 5,\n level1ID: level1Id,\n macaParam,\n pageUrl,\n courseId,\n noContentPageId,\n };\n};\n\nexport const TrackingUtils = {\n initDataLayerScript: datalayer => {\n const initialDataLayer = {\n ...datalayer,\n event: 'onPageChange',\n };\n\n return `\n if(!window.dataLayer) {\n window.dataLayer = [${JSON.stringify(initialDataLayer)}]\n };`.trim();\n },\n generateDataLayer: ({ content, level1Id, macaParam, pageUrl, courseId, noContentPageId }) => ({\n pageData: {\n ...generateContentGtmInfo({\n content,\n level1Id,\n macaParam,\n pageUrl,\n courseId,\n noContentPageId,\n }),\n embeddings: {},\n },\n }),\n pushToGoogleTagManager: ({ datalayerObj, withReset = false }) => {\n setTimeout(() => {\n if (withReset) {\n TrackingUtils.resetDataLayer();\n }\n // eslint-disable-next-line fp/no-mutating-methods\n globals.window.dataLayer?.push(datalayerObj);\n }, 0);\n },\n resetDataLayer: () => {\n // eslint-disable-next-line fp/no-mutating-methods\n globals.window.dataLayer.push(function dontUseArrowFunction() {\n this.reset();\n });\n },\n};\n","import { createContext, useContext } from 'react';\n\n// CONTEXT\nexport const CourseDataContext = createContext({});\n\n// USAGE HOOK\nexport const useCourseData = () => useContext(CourseDataContext);\n","import { Helmet } from 'react-helmet-async';\nimport { GtmNoScriptFallback } from './GtmNoScriptFallback';\nimport { useStaticInfoForGtm } from './hooks/useStaticInfoForGtm';\nimport { gtmDataLayerPartial, TrackingUtils } from './TrackingUtils';\nimport { useCourseData } from '../../hooks/useCourseData';\n\nexport const gtmDataLayerFragment = gtmDataLayerPartial;\n\nexport const GtmDataLayer = ({ content, noContentPageId, push = false }) => {\n const { gtmLevel1Id: level1Id, macaParam, pageUrl } = useStaticInfoForGtm();\n const { courseId } = useCourseData();\n\n const dataLayer = TrackingUtils.generateDataLayer({\n content,\n macaParam,\n level1Id,\n pageUrl,\n courseId,\n noContentPageId,\n });\n\n if (push) {\n TrackingUtils.pushToGoogleTagManager({\n withReset: true,\n datalayerObj: {\n event: 'onPageChange',\n ...dataLayer,\n },\n });\n }\n\n return (\n <>\n <Helmet>\n <script>{TrackingUtils.initDataLayerScript(dataLayer)}</script>\n </Helmet>\n <GtmNoScriptFallback dataLayer={dataLayer} />\n </>\n );\n};\n","import { isServer } from '../../utils/ssr';\nimport globals from '../../utils/globals';\n\nimport { GtmLoadScript } from './GtmLoadScript';\nimport { GtmDataLayer } from './GtmDataLayer';\n\nexport { gtmDataLayerFragment } from './GtmDataLayer';\n\nexport const GtmScriptWithDataLayer = ({ content = {}, noContentPageId }) => {\n const isGtmAlreadyInitialized = !isServer() && !!globals.window.dataLayer;\n return (\n <>\n <GtmDataLayer\n content={content}\n noContentPageId={noContentPageId}\n push={isGtmAlreadyInitialized}\n />\n {!isGtmAlreadyInitialized && <GtmLoadScript />}\n </>\n );\n};\n","import { memo } from 'react';\nimport { GtmScriptWithDataLayer as NotMemoGtmScriptWithDataLayer } from './GtmScriptWithDataLayer';\n\nexport { gtmDataLayerFragment } from './GtmScriptWithDataLayer';\n\nexport const GtmScriptWithDataLayer = memo(NotMemoGtmScriptWithDataLayer);\n","import { StyledHeader as Header } from '../Header/Header';\nimport { StyledFooter as Footer } from '../Footer/Footer';\nimport { I18nConfigLoader } from '../I18n/I18nConfigLoader';\nimport { GdprLayer } from '../GdprLayer/GdprLayer';\nimport { PageMetaData } from './PageMetaData';\nimport { MainPage } from '../../pages/MainPage';\nimport { GtmScriptWithDataLayer } from '../GoogleTagManager';\nimport { GTM_NO_CONTENT_PAGE_IDS } from '../../constants/pageTypes';\n\nexport const PageContainer = ({ children }) => {\n return (\n <MainPage>\n <I18nConfigLoader>\n {data => (\n <>\n <Header />\n {children}\n <Footer data={data} />\n <GdprLayer footerData={data} />\n </>\n )}\n </I18nConfigLoader>\n </MainPage>\n );\n};\n\nexport const withPageContainerAndMetadata = ({\n component: TargetComponent,\n pageType,\n addDescriptionAndKeywordsMeta,\n useDescriptionTranslation,\n}) => (\n <PageContainer>\n <PageMetaData\n pageType={pageType}\n addKeywordsAndDescription={addDescriptionAndKeywordsMeta}\n useDescriptionTranslation={useDescriptionTranslation}\n />\n <GtmScriptWithDataLayer noContentPageId={GTM_NO_CONTENT_PAGE_IDS[pageType]} />\n <TargetComponent />\n </PageContainer>\n);\n","import { PageContainer } from '../components/Page/PageContainer';\nimport { GtmScriptWithDataLayer } from '../components/GoogleTagManager';\nimport { GTM_NO_CONTENT_PAGE_IDS } from '../constants/pageTypes';\n\nexport const Default404Page = () => (\n <PageContainer>\n <GtmScriptWithDataLayer noContentPageId={GTM_NO_CONTENT_PAGE_IDS.NOT_FOUND} />\n <div>Page not found (404).</div>\n </PageContainer>\n);\n","/**\n * Represents Courses that are delivered in one Content Language typically German.\n * @constructor\n * @param {array} 36519718 - B1 Nicos Weg\n * @param {array} 39902336 - B1 Deutsch im Job – Profis gesucht\n * @param {array} 53437698 - B1 Jojo sucht das Glück\n * @param {array} 53074503 - Das Deutschlandlabor\n * @param {array} 55320903 - Ticket nach Berlin\n * @param {array} 54554235 - Das Bandtagebuch mit Einshoch6\n */\nexport const MONOLINGUAL_COURSES_IDS = Object.freeze([\n '36519718',\n '39902336',\n '53437698',\n '53074503',\n '54554235',\n]);\n\nexport const isMonolingualCourse = courseId => MONOLINGUAL_COURSES_IDS.includes(courseId);\n","import styled from 'styled-components';\nimport { colors, resolutions } from '../../utils/css';\n\nconst HeroTemplate = ({ className, aria, children }) => (\n <aside aria-label={aria} className={className}>\n <div className=\"content\">{children}</div>\n </aside>\n);\nexport const StyledHeroTemplate = styled(HeroTemplate)`\n display: flex;\n align-items: center;\n color: ${colors.LG_WHITE};\n\n @media (max-width: ${resolutions.max.mobile}px) {\n max-height: 240px;\n background-size: 150%;\n font-size: 28px;\n line-height: 32px;\n }\n`;\n","import styled from 'styled-components';\nimport { StyledHeroTemplate as HeroTemplate } from '../../HeroTemplate/HeroTemplate';\nimport { resolutions } from '../../../utils/css';\n\nconst determineImage = ({ imageId, imageBasePath }) => {\n return `${imageBasePath}/${imageId}`;\n};\n\nexport const StyledCourseHeroImage = styled(HeroTemplate)`\n background: url(${determineImage}_509.jpg) center center / cover no-repeat;\n height: 320px;\n\n .content {\n width: 100%;\n padding: 0 20px;\n }\n\n .title {\n margin: 0;\n white-space: nowrap;\n overflow-x: hidden;\n text-overflow: ellipsis;\n }\n\n .identifier {\n text-transform: uppercase;\n font: 700 40px Helvetica, Arial, sans-serif;\n opacity: 0.5;\n }\n\n .description {\n /* @noflip */\n direction: ltr;\n font: 400 40px DWTheAntiquaB, Georgia, serif;\n opacity: 1;\n margin: 0 8px;\n }\n\n @media (max-width: ${resolutions.max.tablet}px) {\n .identifier,\n .description {\n font-size: 36px;\n }\n }\n\n @media (max-width: 992px) {\n background: url(${determineImage}_507.jpg) center center / cover no-repeat;\n\n .identifier,\n .description {\n font-size: 32px;\n }\n }\n\n @media (max-width: ${resolutions.max.mobile}px) {\n .identifier,\n .description {\n font-size: 28px;\n }\n }\n\n @media (max-width: 480px) {\n background: url(${determineImage}_503.jpg) center center / cover no-repeat;\n }\n\n @media (max-width: 360px) {\n background: url(${determineImage}_501.jpg) center center / cover no-repeat;\n }\n`;\n","function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport * as React from \"react\";\n\nvar _ref2 = /*#__PURE__*/React.createElement(\"g\", {\n className: \"arrowBox\",\n fillRule: \"evenodd\"\n}, /*#__PURE__*/React.createElement(\"g\", {\n className: \"arrowArrow\",\n transform: \"translate(12, 12), rotate(0 0 0) scale(1.0)\"\n}, /*#__PURE__*/React.createElement(\"polygon\", {\n points: \"12 -4.7125 0 4.9375 -12 -4.6875 -10.375 -5.5 0 0.125 10.375 -5.5\"\n})));\n\nfunction SvgToggleableArrow(_ref, svgRef) {\n var title = _ref.title,\n titleId = _ref.titleId,\n props = _objectWithoutProperties(_ref, [\"title\", \"titleId\"]);\n\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n viewBox: \"0 0 24 24\",\n xmlns: \"http://www.w3.org/2000/svg\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _ref2);\n}\n\nvar ForwardRef = /*#__PURE__*/React.forwardRef(SvgToggleableArrow);\nexport default __webpack_public_path__ + \"static/media/toggleableArrow.a17a06a6.svg\";\nexport { ForwardRef as ReactComponent };","import styled from 'styled-components';\nimport { ReactComponent as ToggleableArrowIcon } from '../svg/toggleableArrow.svg';\n\nexport const StyledToggleableArrowIcon = styled(props => <ToggleableArrowIcon {...props} />)``;\n","import styled from 'styled-components';\nimport classnames from 'classnames';\nimport { StyledToggleableArrowIcon as ToggleableArrowIcon } from '../../assets/icons/ToggleableArrowIcon';\n\nconst ToggleableArrow = ({ className, isUp, fill, ...restProps }) => {\n const classNames = classnames(className, {\n up: isUp,\n });\n return <ToggleableArrowIcon className={classNames} {...{ fill }} {...restProps} />;\n};\n\nexport const StyledToggleableArrow = styled(ToggleableArrow)`\n position: absolute;\n width: 28px;\n height: 24px;\n fill: ${({ fill }) => fill};\n &.up {\n transform: rotate(180deg);\n }\n`;\n","import styled from 'styled-components';\nimport classnames from 'classnames';\nimport { I18nText } from '../../../I18n/I18nText';\nimport { colors, resolutions } from '../../../../utils/css';\nimport { StyledToggleableArrow as ToggleableArrow } from '../../../ToggleableArrow/ToggleableArrow';\n\nconst CourseHeader = ({ className, groupNameTranslationKey, isOpen, onClick, onKeyPress }) => {\n return (\n <div\n className={classnames(className, 'header')}\n role=\"button\"\n tabIndex=\"0\"\n onClick={onClick}\n onKeyPress={onKeyPress}\n aria-label=\"course.header\"\n >\n <I18nText\n className={classnames('title')}\n {...{\n isA: 'h2',\n }}\n aria-label=\"course.groupName\"\n translation={groupNameTranslationKey || 'course.otherLessons'}\n />\n <ToggleableArrow\n className=\"toggleable-arrow\"\n fill={colors.LG_GRAY_13}\n {...{\n isUp: isOpen,\n }}\n />\n </div>\n );\n};\n\nexport const StyledCourseHeader = styled(CourseHeader)`\n display: flex;\n justify-content: space-between;\n align-items: center;\n width: 100%;\n border-top: 1px solid ${colors.LG_GRAY_TRANSPARENT_1};\n height: 163px;\n pointer-events: none;\n\n .title {\n height: 25px;\n background-color: ${colors.LG_WHITE};\n color: ${colors.LG_GRAY_13};\n white-space: nowrap;\n overflow-x: hidden;\n text-overflow: ellipsis;\n font-family: Helvetica, Arial, sans-serif;\n font-weight: 700;\n font-size: 22px;\n line-height: 23px;\n margin: 0;\n padding: 0 20px;\n }\n\n .toggleable-arrow {\n display: none;\n }\n\n @media (max-width: ${resolutions.max.tablet}px) {\n height: 94px;\n pointer-events: all;\n\n .title {\n padding: 0 45px 0 20px;\n border-top: 0;\n }\n\n .toggleable-arrow {\n display: inline-block;\n right: 40px;\n }\n }\n`;\n","import styled from 'styled-components';\nimport { colors } from '../../../../utils/css';\nimport { calculatePercentage } from '../../../../utils/commons';\n\nexport const LessonScore = ({ className, lessonProgress }) => {\n const { resultPoints, maxPointsForAllExercises } = lessonProgress;\n\n const resultPointsClassName = () => {\n const resultInPercentage = calculatePercentage(resultPoints, maxPointsForAllExercises);\n\n if (resultInPercentage >= 70) {\n return 'good';\n }\n if (resultInPercentage <= 40) {\n return 'low';\n }\n return 'mid';\n };\n\n return (\n <div className={className}>\n <span className={resultPointsClassName()}>{resultPoints}</span>\n <span>/</span>\n <span>{maxPointsForAllExercises}</span>\n </div>\n );\n};\n\nexport const StyledLessonScore = styled(LessonScore)`\n font-size: 14px;\n\n .low {\n color: ${colors.LG_RED_SCORE};\n }\n .mid {\n color: ${colors.LG_GRAY_11};\n }\n .good {\n color: ${colors.LG_GREEN_SCORE};\n }\n`;\n","import styled from 'styled-components';\nimport { I18nText } from '../../I18n/I18nText';\nimport { colors } from '../../../utils/css';\n\nexport const ProgressResetButton = ({ className, onClickReset }) => {\n return (\n <button onClick={e => onClickReset(e)} className={className}>\n <I18nText translation=\"course.reset\" />\n </button>\n );\n};\n\nexport const StyledProgressResetButton = styled(ProgressResetButton)`\n background-color: ${colors.LG_GRAY_2};\n border: 1px solid transparent;\n color: ${colors.LG_WHITE};\n font-size: 12px;\n min-height: 31px;\n padding: 3px 10px;\n`;\n\nexport const StyledSmallProgressResetButton = styled(StyledProgressResetButton)`\n min-height: 27px;\n padding: 1px 7px;\n`;\n","export const progressIconColors = {\n GRAY: 'gray',\n WHITE: 'white',\n};\n","import styled from 'styled-components';\nimport classnames from 'classnames';\nimport { colors } from '../../utils/css';\nimport { progressIconColors } from './progressIconColors';\nimport { useTranslation } from '../../hooks/useTranslation';\n\nexport const progressState = Object.freeze({\n EMPTY: 'empty',\n HALF: 'half',\n FULL: 'full',\n});\n\nconst translationKeyPrefix = 'common.progress';\n\nconst getTitleTranslationKey = progress => {\n switch (progress) {\n case progressState.EMPTY:\n return `${translationKeyPrefix}.none`;\n case progressState.HALF:\n return `${translationKeyPrefix}.half`;\n case progressState.FULL:\n return `${translationKeyPrefix}.full`;\n default:\n return `${translationKeyPrefix}.none`;\n }\n};\n\nconst ProgressIcon = ({ className, progress, color = progressIconColors.GRAY }) => {\n const title = useTranslation(getTitleTranslationKey(progress));\n\n return (\n <div className={className} title={title}>\n <div className={classnames('background', color)}>\n <div className={classnames('icon', progress, color)} />\n </div>\n </div>\n );\n};\n\nexport const StyledProgressIcon = styled(ProgressIcon)`\n width: 16px;\n height: 16px;\n margin: 0;\n text-align: right;\n\n div {\n margin: 0;\n }\n\n .background.white {\n border: 2px solid ${colors.LG_WHITE};\n }\n\n .background.gray {\n border: 2px solid ${colors.LG_GRAY_2};\n }\n\n .background {\n height: 100%;\n width: 100%;\n border-radius: 50%;\n box-sizing: border-box;\n\n .icon {\n height: 100%;\n }\n\n .icon.white {\n background: ${colors.LG_WHITE};\n }\n\n .icon.gray {\n background: ${colors.LG_GRAY_2};\n }\n\n .icon.full {\n width: 100%;\n }\n\n .icon.half {\n width: 50%;\n }\n\n .icon.empty {\n width: 0;\n }\n }\n`;\n","import { USER } from '../constants/userUrl';\n\nexport const PS_PREFIX = USER.PS_URL;\nexport const CERTIFICATE_URL = `${PS_PREFIX}protected/certificate/`;\n\nexport const getCertificate = id => {\n return fetch(`${CERTIFICATE_URL}${id}`, {\n headers: {\n 'Content-Type': 'application/pdf',\n },\n }).then(response => (response.ok ? response : response.json().then(err => Promise.reject(err))));\n};\n","import { getCertificate } from '../services/certificateService';\nimport { FEEDBACK_TYPES } from '../constants/feedback';\nimport { feedbackHelper } from './url/feedbackHelpers';\n\nexport const handleCertificateGeneration = async ({ id, langCode, history }) => {\n if (!id) {\n history.push(feedbackHelper.forInvalidCertificate(langCode));\n }\n\n try {\n const response = await getCertificate(id);\n response.blob().then(blob => {\n const headerFilename = response.headers.get('Content-Disposition').split('filename=')[1];\n const filename = headerFilename.replace('?', '–');\n const url = window.URL.createObjectURL(blob);\n const downloadLink = document.createElement('a');\n // eslint-disable-next-line fp/no-mutation\n downloadLink.href = url;\n // eslint-disable-next-line fp/no-mutation\n downloadLink.download = decodeURIComponent(filename);\n downloadLink.click();\n });\n } catch (error) {\n error.errorCode === FEEDBACK_TYPES.MISSING_TRANSCRIPTION\n ? history.push(feedbackHelper.forCertificateMissingTranscription(langCode))\n : history.push(feedbackHelper.forInvalidCertificate(langCode));\n }\n};\n","export default __webpack_public_path__ + \"static/media/icon-course-cert-gray.0fdcab0c.svg\";","import styled from 'styled-components';\nimport { useHistory } from 'react-router-dom';\nimport { useParams } from 'react-router';\nimport { useTranslation } from '../../hooks/useTranslation';\nimport { handleCertificateGeneration } from '../../utils/certificateUtils';\nimport CertificateGray from '../../assets/svg/icon-course-cert-gray.svg';\n\nexport const CertificateIcon = ({ className, id }) => {\n const history = useHistory();\n const { langCode } = useParams();\n const title = useTranslation('common.progress.cert');\n\n const handleOnCertificateClick = async () => {\n if (id) {\n await handleCertificateGeneration({ id, langCode, history });\n }\n };\n\n return (\n <div role=\"none\" onClick={handleOnCertificateClick}>\n <img alt=\"progress-icon cert\" className={className} src={CertificateGray} title={title} />\n </div>\n );\n};\n\nexport const StyledCertificateIcon = styled(CertificateIcon)`\n width: 16px;\n height: 24px;\n cursor: pointer;\n`;\n","export default __webpack_public_path__ + \"static/media/star-white.d32dc96a.svg\";","export default __webpack_public_path__ + \"static/media/star-gray.84ad33dd.svg\";","import styled from 'styled-components';\nimport StarWhite from '../../assets/svg/star-white.svg';\nimport StarGrey from '../../assets/svg/star-gray.svg';\nimport { progressIconColors } from './progressIconColors';\nimport { useTranslation } from '../../hooks/useTranslation';\n\nconst starsMapping = {\n [progressIconColors.GRAY]: StarGrey,\n [progressIconColors.WHITE]: StarWhite,\n};\n\nexport const ProgressIconStar = ({ className, color }) => {\n const title = useTranslation('common.progress.good');\n\n return (\n <img alt=\"Progress icon - star\" className={className} src={starsMapping[color]} title={title} />\n );\n};\n\nexport const StyledProgressIconStar = styled(ProgressIconStar)`\n width: 16px;\n height: 16px;\n`;\n","import { progressState, StyledProgressIcon as ProgressIcon } from '../ProgressIcon/ProgressIcon';\nimport { calculatePercentage } from '../../utils/commons';\nimport { StyledCertificateIcon } from '../ProgressIcon/CertificateIcon';\nimport { StyledProgressIconStar } from '../ProgressIcon/ProgressIconStar';\nimport { progressIconColors } from '../ProgressIcon/progressIconColors';\n\nexport const LearnProgressIcon = ({\n learnProgress,\n color = progressIconColors.GRAY,\n finalLessonId,\n}) => {\n const getProgressIcon = () => {\n if (!learnProgress) {\n return <ProgressIcon progress={progressState.EMPTY} color={color} />;\n }\n\n const {\n resultPoints,\n maxPointsForAllExercises,\n doneExerciseCount,\n allExerciseCount,\n finalTestPassed,\n } = learnProgress;\n\n if (doneExerciseCount === 0) {\n return <ProgressIcon progress={progressState.EMPTY} color={color} />;\n }\n if (finalTestPassed) {\n return <StyledCertificateIcon id={finalLessonId} />;\n }\n if (doneExerciseCount < allExerciseCount) {\n return <ProgressIcon progress={progressState.HALF} color={color} />;\n }\n if (doneExerciseCount === allExerciseCount) {\n const resultInPercentage = calculatePercentage(resultPoints, maxPointsForAllExercises);\n if (resultInPercentage >= 80) {\n return <StyledProgressIconStar color={color} />;\n }\n return <ProgressIcon progress={progressState.FULL} color={color} />;\n }\n\n return <ProgressIcon progress={progressState.EMPTY} color={color} />;\n };\n\n return getProgressIcon();\n};\n","import styled from 'styled-components';\nimport { Link } from 'react-router-dom';\nimport { useSelector } from 'react-redux';\nimport { StyledText as Text } from '../../../Text/Text';\nimport { colors } from '../../../../utils/css';\nimport { getContentUrl } from '../../../../utils/url/urlFactory';\nimport { StyledLessonScore as LessonScore } from './LessonScore';\nimport { StyledSmallProgressResetButton as ProgressResetButton } from '../../Progress/ProgressResetButton';\nimport { LearnProgressIcon } from '../../../LearnProgressIcon/LearnProgressIcon';\nimport { findLessonLearnProgressSelector } from '../../../../state/progress/learnProgressSelectors';\n\nexport const LessonItem = ({ lesson, className, onClickReset }) => {\n const lessonId = lesson.id;\n const lessonProgress = useSelector(findLessonLearnProgressSelector(lessonId));\n\n const onHandleResetClick = e => {\n onClickReset(e, lessonId);\n };\n\n return (\n <>\n <Link\n className={className}\n to={getContentUrl({\n id: lesson.id,\n name: lesson.shortTitle,\n language: lesson.language,\n __typename: 'Lesson',\n })}\n tabIndex={0}\n >\n <Text className=\"title\" isA=\"h3\" aria-label=\"lesson.title\">\n {lesson.shortTitle}\n </Text>\n <div className={`tile-progress`}>\n <LearnProgressIcon learnProgress={lessonProgress} />\n </div>\n <Text className=\"learningTarget\" aria-label=\"lesson.learningTarget\">\n {lesson.learningTargetHeadline}\n </Text>\n {lessonProgress && (\n <>\n <LessonScore\n className=\"lessonScore\"\n lessonProgress={lessonProgress}\n onClickReset={onClickReset}\n lessonId={lesson.id}\n />\n <ProgressResetButton className=\"resetButton\" onClickReset={onHandleResetClick} />\n </>\n )}\n <Text className=\"categories\" aria-label=\"lesson.categories\">\n {lesson.grammarDescription}\n </Text>\n </Link>\n </>\n );\n};\n\nconst alignProgressData = '5px';\n\nexport const StyledLessonItem = styled(LessonItem)`\n border-top: 1px solid ${colors.LG_GRAY_TRANSPARENT_1};\n color: ${colors.LG_GRAY_8};\n display: grid;\n font-size: 14px;\n grid-template-columns: 1fr auto;\n grid-template-rows: repeat(3, 1fr);\n height: 102px;\n padding: 10px 20px;\n overflow-y: hidden;\n text-decoration: none;\n\n &:hover {\n color: ${colors.LG_GRAY_8};\n text-decoration: none;\n }\n\n .title {\n color: ${colors.LG_GRAY_9};\n font-family: DWTheAntiquaBBold, Georgia-Bold, serif;\n font-size: 17px;\n line-height: 24px;\n margin: 0;\n overflow-x: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n .learningTarget,\n .categories {\n font-family: DWTheAntiquaB, Georgia, serif;\n overflow-x: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n .categories {\n grid-column: 1 / 2;\n }\n\n .tile-progress {\n display: flex;\n justify-content: flex-end;\n padding: 5px 0 0 0;\n padding-right: ${alignProgressData};\n }\n\n .lessonScore {\n grid-column-start: 2;\n justify-self: flex-end;\n padding-right: ${alignProgressData};\n }\n\n .resetButton {\n grid-column-start: 2;\n grid-row-start: 3;\n justify-self: center;\n }\n`;\n","import styled from 'styled-components';\nimport classnames from 'classnames';\nimport { colors, resolutions } from '../../../../utils/css';\nimport { StyledLessonItem as LessonItem } from '../LessionItem/LessonItem';\n\nexport const LessonList = ({ className, groupedLessons, onClickReset, isOpen = true }) => (\n // eslint-disable-next-line jsx-a11y/role-supports-aria-props\n <ul\n className={classnames(className, 'lesson-list', { collapsed: !isOpen })}\n aria-expanded={isOpen}\n aria-label=\"lesson.list\"\n >\n {groupedLessons.map(lesson => (\n <li key={lesson.id} className=\"lesson-item\">\n <LessonItem\n {...{\n lesson: lesson.target,\n onClickReset,\n }}\n />\n </li>\n ))}\n </ul>\n);\n\nexport const StyledLessonList = styled(LessonList)`\n transition: max-height 0.3s linear;\n overflow-y: hidden;\n visibility: visible;\n max-height: ${props => props.groupedLessons.length * 102}px;\n list-style-type: none;\n margin: 0;\n padding: 0;\n\n @media (max-width: ${resolutions.max.tablet}px) {\n background-color: ${colors.LG_GRAY_3};\n\n &:last-child {\n border-bottom: 0;\n }\n\n &.collapsed {\n visibility: hidden;\n max-height: 0;\n }\n }\n`;\n","import { resolutions } from '../../../../utils/css';\nimport { useToggle } from '../../../../hooks/useToggle';\nimport { StyledCourseHeader as CourseHeader } from '../CourseHeader/CourseHeader';\nimport { StyledLessonList as LessonList } from '../LessonList/LessonList';\nimport globals from '../../../../utils/globals';\n\nexport const CourseAccordion = ({ groupNameTranslationKey, groupedLessons, onClickReset }) => {\n const isOnDesktop = globals.window.innerWidth >= resolutions.min.desktop;\n const [isOpen, { toggleOnClick, toggleOnKeyPress }] = useToggle({ initialState: isOnDesktop });\n\n return (\n <div className=\"accordion\" aria-label=\"course.accordion\">\n <CourseHeader\n {...{\n isOpen,\n groupNameTranslationKey,\n onClick: toggleOnClick,\n onKeyPress: toggleOnKeyPress,\n }}\n />\n <LessonList\n {...{\n isOpen,\n groupedLessons,\n onClickReset,\n }}\n />\n </div>\n );\n};\n","import styled from 'styled-components';\nimport { colors, resolutions } from '../../../utils/css';\nimport { CourseAccordion } from './CourseAccordion/CourseAccordion';\n\nexport const CourseList = ({ className, groupedLessons, onClickResetLesson }) => (\n <ul className={className} aria-label=\"course.list\">\n {Object.keys(groupedLessons).map(key => (\n // group lessons by their group names\n <li key={groupedLessons[key][0].id} className=\"course\">\n <CourseAccordion\n {...{\n groupNameTranslationKey: groupedLessons[key][0].groupName,\n groupedLessons: groupedLessons[key],\n onClickReset: onClickResetLesson,\n }}\n />\n </li>\n ))}\n </ul>\n);\n\nexport const StyledCourseList = styled(CourseList)`\n * {\n box-sizing: border-box;\n }\n\n display: grid;\n grid-template-columns: repeat(4, 1fr);\n width: 100%;\n list-style-type: none;\n margin: 0;\n padding: 0;\n\n .course {\n display: inline-block;\n background: ${colors.LG_WHITE};\n\n &:nth-child(odd) {\n .accordion .lesson-list {\n background-color: ${colors.LG_GRAY_3};\n }\n }\n }\n\n @media (max-width: ${resolutions.max.tablet}px) {\n grid-template-columns: 100%;\n }\n`;\n","import { createGlobalStyle } from 'styled-components';\n\nexport const DisableScrollingStyles = createGlobalStyle`\n body {\n overflow: hidden;\n padding-right: 17px;\n }\n`;\n","import ReactDOM from 'react-dom';\nimport { DisableScrollingStyles } from './DisableScrollingStyles';\n\nexport const ModalIntegration = ({ isOpen, children }) => {\n if (!isOpen) return null;\n const componentToCreate = (\n <>\n <DisableScrollingStyles />\n {children}\n </>\n );\n return ReactDOM.createPortal(componentToCreate, document.body);\n};\n","import styled from 'styled-components';\nimport classnames from 'classnames';\nimport { colors } from '../../utils/css';\nimport { useTranslation } from '../../hooks/useTranslation';\nimport { useRtlContext } from '../../hooks/useRtl';\n\nconst StandardButton = ({ titleKey, className, handleClick }) => {\n const { isRtl } = useRtlContext();\n const label = useTranslation(titleKey);\n\n return (\n <button\n className={classnames(`${className} button`, { rtl: isRtl })}\n aria-label={label}\n onClick={handleClick}\n >\n {label}\n </button>\n );\n};\n\nexport const StyledStandardButton = styled(StandardButton)`\n display: inline-block;\n width: 100%;\n background: ${colors.LG_BLUE_1};\n box-sizing: border-box;\n border: none;\n height: 50px;\n text-decoration: none;\n justify-content: center;\n align-items: center;\n line-height: 33px;\n color: ${colors.LG_WHITE};\n font: 400 17px Helvetica, Arial, sans-serif;\n text-align: center;\n :active,\n :hover,\n :focus {\n transition: all 0.1s linear;\n background-color: ${colors.LG_GRAY_10};\n color: ${colors.LG_WHITE};\n }\n\n .rtl {\n direction: rtl;\n }\n`;\n","import styled from 'styled-components';\nimport { StyledStandardButton as StandardButton } from '../StandardButton/StandardButton';\nimport { colors, resolutions } from '../../utils/css';\nimport { I18nText } from '../I18n/I18nText';\nimport { useRtlContext } from '../../hooks/useRtl';\n\nexport const Modal = ({\n className,\n fadeIn,\n descriptionKey,\n leftButtonKey,\n rightButtonKey,\n onConfirmClicked,\n onCancelClicked,\n}) => {\n const { isRtl } = useRtlContext();\n\n const faded = fadeIn ? 'in' : '';\n const classNameString = `${className} fade ${faded}`;\n return (\n <div className={isRtl ? `${classNameString} rtl` : `${classNameString}`}>\n <div className=\"modal-background\" />\n <div className=\"modal-dialogue\">\n <div className=\"modal-content\">\n <div className=\"modal-body\">\n <I18nText isA=\"p\" translation={descriptionKey} />\n </div>\n <div className=\"modal-footer\">\n <LeftButton\n titleKey={leftButtonKey}\n handleClick={onConfirmClicked}\n {...{ className }}\n />\n <RightButton\n titleKey={rightButtonKey}\n handleClick={onCancelClicked}\n {...{ className }}\n />\n </div>\n </div>\n </div>\n </div>\n );\n};\n\nexport const StyledModal = styled(Modal)`\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: 10040;\n\n .modal-background {\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n background: ${colors.LG_BLACK};\n opacity: 0.5;\n font-family: Helvetica, Arial, sans-serif;\n font-weight: 400;\n font-size: 15px;\n }\n .modal-dialogue {\n position: relative;\n background-color: ${colors.LG_WHITE};\n width: 900px;\n margin: 30px auto;\n\n .modal-content {\n position: relative;\n background-color: ${colors.LG_WHITE};\n background-clip: padding-box;\n border-radius: 0;\n outline: 0;\n box-shadow: 0 3px 9px ${colors.LG_TRANSPARENT_BLACK_50};\n border: 1px solid ${colors.LG_TRANSPARENT_BLACK_20};\n\n .modal-body {\n position: relative;\n padding: 15px;\n font-size: 15px;\n\n p {\n margin: 0 0 10px;\n }\n }\n }\n\n .modal-footer {\n padding: 35px 10px;\n text-align: right;\n border-top: 1px solid ${colors.LG_GRAY_4};\n display: flex;\n flex-flow: row;\n justify-content: space-evenly;\n\n button {\n position: relative;\n margin: 0 7px;\n width: 100%;\n }\n }\n }\n\n &.fade {\n opacity: 0;\n -webkit-transition: opacity 0.15s linear;\n -o-transition: opacity 0.15s linear;\n transition: opacity 0.15s linear;\n }\n\n &.fade.in {\n opacity: 1;\n }\n\n &.rtl {\n direction: rtl;\n }\n\n @media (max-width: ${resolutions.max.tablet}px) {\n .modal-dialogue {\n width: 600px;\n .modal-footer {\n flex-flow: column;\n button {\n margin: 15px 0;\n }\n }\n }\n }\n\n @media (max-width: ${resolutions.max.mobile}px) {\n .modal-dialogue {\n width: auto;\n margin: 10px;\n .modal-footer {\n flex-flow: column;\n button {\n margin: 15px 0;\n }\n }\n }\n }\n`;\n\nexport const RightButton = styled(StandardButton)`\n background: ${colors.LG_WHITE};\n color: ${colors.LG_BLUE_1};\n border: 1px solid ${colors.LG_BLUE_1};\n box-sizing: border-box;\n\n :hover {\n border-color: ${colors.LG_BLACK};\n }\n`;\n\nexport const LeftButton = StandardButton;\n","import { StyledModal as Modal } from './Modal';\n\nexport const ResetModal = ({ fadeIn, onConfirmClicked, onCancelClicked }) => {\n const descriptionKey = 'lesson.modal.confirm';\n const leftButtonKey = 'lesson.modal.reset';\n const rightButtonKey = 'lesson.modal.cancel';\n return (\n <Modal\n {...{\n fadeIn,\n descriptionKey,\n leftButtonKey,\n rightButtonKey,\n onConfirmClicked,\n onCancelClicked,\n }}\n />\n );\n};\n","import styled from 'styled-components';\nimport { useSelector } from 'react-redux';\nimport { StyledProgressResetButton as ProgressResetButton } from './ProgressResetButton';\nimport { LearnProgressIcon } from '../../LearnProgressIcon/LearnProgressIcon';\nimport { findCourseLearnProgressSelector } from '../../../state/progress/learnProgressSelectors';\n\nexport const CourseProgress = ({ className, courseId, finalLessonId, onClickResetCourse }) => {\n const { courseProgress } = useSelector(findCourseLearnProgressSelector(courseId));\n\n return (\n <div className={className}>\n <ProgressResetButton onClickReset={onClickResetCourse} />\n <LearnProgressIcon learnProgress={courseProgress} finalLessonId={finalLessonId} />\n </div>\n );\n};\n\nexport const StyledCourseProgress = styled(CourseProgress)`\n display: flex;\n justify-content: flex-end;\n align-items: center;\n padding-right: 25px;\n\n > * {\n margin: 14px;\n }\n`;\n","// converts dkLearningLevel value to string learning levels\nexport const learningLevelMapper = {\n 0: '',\n 2: 'A1',\n 4: 'A2',\n 8: 'B1',\n 16: 'B2',\n};\n\nexport const sortByLearningLevel = coursesToSort =>\n // eslint-disable-next-line fp/no-mutating-methods\n [...coursesToSort].sort((a, b) => {\n if (a.dkLearningLevel === 0 && b.dkLearningLevel === 0) return 0;\n return a.dkLearningLevel - b.dkLearningLevel || a.id - b.id;\n });\n","import { useEffect, useState } from 'react';\nimport { useDispatch } from 'react-redux';\nimport { createGlobalStyle } from 'styled-components';\nimport {\n groupBy,\n isFinalTestPredicate,\n removeContentLinksWithEmptyTarget,\n} from '../../utils/commons';\nimport { useFrontendConfig } from '../../hooks/useFrontendConfig';\nimport {\n deleteCourseProgress,\n deleteLessonProgress,\n initCourse,\n readCourseProgress,\n readLessonProgresses,\n} from '../../state/progress/learnProgressDuck';\nimport { isMonolingualCourse } from '../../constants/isLtrContentOnly';\nimport { StyledCourseHeroImage as CoursePageHeroImage } from './CourseHeroImage/CourseHeroImage';\nimport { I18nText } from '../I18n/I18nText';\nimport { StyledCourseList as CourseList } from './CourseList/CourseList';\nimport { ModalIntegration } from '../Modal/ModalIntegration';\nimport { ResetModal } from '../Modal/ResetModal';\nimport { StyledCourseProgress as CourseProgress } from './Progress/CourseProgress';\nimport { learningLevelMapper } from '../../utils/learningLevelUtils';\n\nexport const LTRContentCourseOverviewStyle = createGlobalStyle`\n #courses {\n .title,\n span[aria-label*=\"lesson\"] {\n /* @noflip */\n direction: ltr;\n }\n .content .title {\n /* @noflip */\n text-align: left;\n }\n }\n`;\n\nexport const CourseOverview = ({ data, contentId }) => {\n const isMonoLingualCourse = isMonolingualCourse(contentId);\n\n const {\n name,\n dkLearningLevel,\n contentLinks: lessonContentLinks,\n mainContentImageLink,\n learningMetaInfo: { achievableScore, exerciseCount } = {},\n } = data.content;\n const filteredContentLinks = removeContentLinksWithEmptyTarget(lessonContentLinks);\n const finalLessonId = filteredContentLinks\n .filter(contentLink => isFinalTestPredicate(contentLink))\n .map(contentLink => contentLink.target.id);\n const allLessonIds = filteredContentLinks.map(contentLink => contentLink.target.id);\n const groupedLessons = groupBy('groupName', filteredContentLinks);\n const { imageBasePath } = useFrontendConfig();\n const [isResetModalOpen, setResetModalOpen] = useState(false);\n const [lessonIdToDelete, setLessonIdToDelete] = useState(null);\n\n const dispatch = useDispatch();\n\n useEffect(() => {\n dispatch(\n initCourse({\n allExerciseCount: exerciseCount,\n maxPointsForAllExercises: achievableScore,\n cosCourseId: contentId,\n }),\n );\n dispatch(readLessonProgresses(allLessonIds));\n dispatch(readCourseProgress(contentId));\n }, []); // eslint-disable-line react-hooks/exhaustive-deps\n\n const onClickResetCourse = () => {\n setResetModalOpen(true);\n };\n\n const onClickResetLesson = (e, lessonId) => {\n e.preventDefault();\n setLessonIdToDelete(lessonId);\n setResetModalOpen(true);\n };\n\n const onConfirmResetProgress = () => {\n if (lessonIdToDelete) {\n dispatch(deleteLessonProgress(lessonIdToDelete));\n setLessonIdToDelete(null);\n } else {\n dispatch(deleteCourseProgress(contentId));\n }\n setResetModalOpen(false);\n };\n\n const onCancelResetModal = () => {\n setLessonIdToDelete(null);\n setResetModalOpen(false);\n };\n\n return (\n <div className=\"section\" data-course-id={contentId} id=\"courses\">\n {isMonoLingualCourse && <LTRContentCourseOverviewStyle />}\n <div className=\"row\">\n <div className=\"col-xs-12\">\n <div className=\"respHeaderImgContainer course-headline\">\n <CoursePageHeroImage\n imageId={mainContentImageLink.targetId}\n imageBasePath={imageBasePath}\n >\n <h1 className=\"title\">\n <I18nText\n tabIndex={0}\n translation={learningLevelMapper[dkLearningLevel]}\n className=\"identifier\"\n />\n <I18nText tabIndex={0} translation={name} className=\"description\" />\n </h1>\n </CoursePageHeroImage>\n </div>\n </div>\n </div>\n <div className=\"row\">\n <CourseProgress\n courseId={+contentId}\n finalLessonId={finalLessonId}\n onClickResetCourse={onClickResetCourse}\n />\n </div>\n <div className=\"row course-list learn-status\">\n <CourseList {...{ groupedLessons, onClickResetLesson }} />\n </div>\n <ModalIntegration isOpen={isResetModalOpen}>\n <ResetModal\n fadeIn={true}\n onConfirmClicked={onConfirmResetProgress}\n onCancelClicked={onCancelResetModal}\n />\n </ModalIntegration>\n </div>\n );\n};\n","import gql from 'graphql-tag';\nimport { Helmet } from 'react-helmet-async';\nimport { useFrontendConfig } from '../../hooks/useFrontendConfig';\n\nexport const imageOGMetaDataFragment = {\n name: 'ImageOGMetaData',\n fragment({ type }) {\n return gql`fragment ${type}${this.name} on ${type} {\n mainContentImage {\n id\n imageFormats\n }\n }\n `;\n },\n};\n\nexport const hasCorrectImageFormat = imageFormats =>\n imageFormats.find(format => format.includes('MASTER_LANDSCAPE'));\n\nconst createImageSharingData = ({ id, imageFormats, imageBasePath }) => {\n if (hasCorrectImageFormat(imageFormats)) {\n return {\n url: `${imageBasePath}/${id}_401.jpg`,\n width: 700,\n height: 394,\n };\n }\n return undefined;\n};\n\nexport const ImageOGMetaData = ({ image }) => {\n const { imageBasePath } = useFrontendConfig();\n\n if (!image) {\n return null;\n }\n\n const { url, width, height } = createImageSharingData({ ...image, imageBasePath }) || {};\n\n if (!url) {\n return null;\n }\n\n return (\n <Helmet>\n <meta property=\"og:image:type\" content=\"image/jpeg\" />\n <meta property=\"og:image\" content={url} />\n <meta property=\"og:image:width\" content={width} />\n <meta property=\"og:image:height\" content={height} />\n </Helmet>\n );\n};\n","import gql from 'graphql-tag';\nimport { useSelector } from 'react-redux';\nimport { toLang } from '../utils/mappers/langMapper';\nimport { PageContainer } from '../components/Page/PageContainer';\nimport { WithGraphQLQueryHandling } from '../components/WithGraphQLQueryHandling/WithGraphQLQueryHandling';\nimport { CourseOverview } from '../components/Course/CourseOverview';\nimport { scoreFragment } from '../state/progress/learnProgress';\nimport { userDataSelector, userSelector } from '../state/user/userSelectors';\nimport { metaDataFragment, PageMetaData } from '../components/Page/PageMetaData';\nimport { PAGE_TYPES } from '../constants/pageTypes';\nimport {\n ImageOGMetaData,\n imageOGMetaDataFragment,\n} from '../components/ImageOGMetaData/ImageOGMetaData';\nimport {\n gtmDataLayerFragment,\n GtmScriptWithDataLayer,\n} from '../components/GoogleTagManager/GtmScriptWithDataLayer';\nimport { CourseDataContext } from '../hooks/useCourseData';\n\nexport const coursePageQuery = ({ addMetaInfo, handicap }) => gql`\n query CoursePage($id: Int!, $lang: Language!) {\n content(id: $id, lang: $lang) {\n ... on Course {\n name\n dkLearningLevel\n mainContentImageLink {\n description\n targetId\n }\n contentLinks(targetTypes: LESSON) {\n id\n additionalInformation\n groupName\n target {\n ... on Lesson {\n id\n language\n shortTitle\n learningTargetHeadline\n grammarDescription\n }\n }\n }\n ...CourseImageOGMetaData\n ...${`CourseScore${handicap || ''}`}\n ...${metaDataFragment.name}\n ${gtmDataLayerFragment.partial()}\n }\n }\n }\n ${scoreFragment.fragment({ type: 'Course', addLearningMetaInfo: addMetaInfo, handicap })}\n ${imageOGMetaDataFragment.fragment({ type: 'Course' })}\n ${metaDataFragment.fragment({ type: 'Course' })}\n`;\n\nexport const CoursePage = ({ contentId, langCode }) => {\n const { isLoggedIn } = useSelector(userSelector);\n const { handicap } = useSelector(userDataSelector) || {};\n\n const coursePageQueryVariables = {\n id: +contentId,\n lang: toLang(langCode),\n };\n\n return (\n <PageContainer>\n <WithGraphQLQueryHandling\n query={coursePageQuery({ addMetaInfo: isLoggedIn, handicap })}\n queryVariables={coursePageQueryVariables}\n >\n {data => (\n <CourseDataContext.Provider value={{ courseId: +contentId }}>\n <PageMetaData\n pageType={PAGE_TYPES.COURSE}\n content={data.content}\n useOnlyCmsKeywords={true}\n />\n <ImageOGMetaData image={data.content.mainContentImage} />\n <GtmScriptWithDataLayer content={data.content} />\n <CourseOverview {...{ data, contentId }} />\n </CourseDataContext.Provider>\n )}\n </WithGraphQLQueryHandling>\n </PageContainer>\n );\n};\n","const TABLE_WITH_ATTRIBUTES = '<table(.*?)>';\nconst OPEN_TABLE_TAG = '<table>';\nconst CLOSE_TABLE_TAG = '</table>';\nconst TABLE_WRAPPER_DIV = '<div class=\"tab-wrap\">';\nconst DIV_CLOSING = '</div>';\n\nexport const wrapTablesWithDiv = htmlString => {\n const text = removeAttributesFromTables(htmlString);\n const textReplacedOpenings = text.replace(\n new RegExp(TABLE_WITH_ATTRIBUTES, 'g'),\n `${TABLE_WRAPPER_DIV}${OPEN_TABLE_TAG}`,\n );\n const textReplacedClosings = textReplacedOpenings.replace(\n new RegExp(CLOSE_TABLE_TAG, 'g'),\n `${CLOSE_TABLE_TAG}${DIV_CLOSING}`,\n );\n return textReplacedClosings;\n};\n\nconst removeAttributesFromTables = htmlString =>\n htmlString.replace(new RegExp(TABLE_WITH_ATTRIBUTES, 'g'), OPEN_TABLE_TAG);\n","import { Component } from 'react';\n\nexport class WithRenderDelay extends Component {\n state = {};\n\n componentDidMount() {\n const delayTime = this.props.delayTime || 100;\n const timeoutHandle = setTimeout(() => this.props.actionToBeDelayed(), delayTime);\n this.setState((prevState, props) => ({ timeoutHandle }));\n }\n\n componentWillUnmount() {\n clearTimeout(this.state.timeoutHandle);\n }\n\n render() {\n // eslint-disable-next-line no-unused-vars\n const { render, actionToBeDelayed, delayTime, ...restProps } = this.props;\n return render(restProps);\n }\n}\n","import { useRef } from 'react';\nimport styled from 'styled-components';\nimport classnames from 'classnames';\nimport { DwPicture } from '../../DwPicture/DwPicture';\nimport { RichText } from '../../RichText/RichText';\n\nconst KnowledgeModalContainer = ({\n className,\n fadeIn,\n knowledgeType,\n imageId,\n imageName,\n audioFile,\n title,\n shortTitle,\n name,\n text,\n subTitle,\n onClose,\n isRtl,\n}) => {\n const audioRef = useRef();\n const closeModalRef = useRef();\n const closeBackdropRef = useRef();\n const faded = fadeIn ? 'in' : '';\n const initialSound = knowledgeType === 'INITIAL_SOUND';\n\n const playAudio = e => {\n e.preventDefault();\n audioRef.current.play();\n };\n\n const closeModal = () => {\n closeModalRef.current.classList.remove('in');\n closeBackdropRef.current.classList.remove('in');\n if (onClose) {\n onClose();\n }\n };\n\n const closeButton = (\n <button\n type=\"button\"\n className=\"close\"\n data-dismiss=\"modal\"\n aria-label=\"Close\"\n onClick={closeModal}\n >\n <span aria-hidden=\"true\">⨯</span>\n </button>\n );\n\n const audioLink = linkTitle => (\n <a\n className=\"audio-modal-link audio-example\"\n href=\"/#\"\n onClick={e => playAudio(e)}\n role=\"button\"\n tabIndex={0}\n >\n <h4 className=\"modal-title\" id=\"mySmallModalLabel\">\n {linkTitle}\n </h4>\n {/* eslint-disable-next-line jsx-a11y/media-has-caption */}\n <audio ref={audioRef} className=\"audio-modal-file initialized\" tabIndex=\"0\">\n <source src={audioFile} type=\"audio/MP3\" />\n </audio>\n </a>\n );\n\n return (\n <>\n <div\n className={classnames(className, 'modal fade', {\n in: faded,\n })}\n ref={closeModalRef}\n >\n <div className=\"modal-dialog-glossar modal-sm\" role=\"document\">\n <div className=\"modal-content m-bubble\">\n {initialSound && (\n <div className=\"modal-header no-line\">\n {closeButton}\n <h2 className=\"modal-title\" id=\"mySmallModalLabel\">\n {shortTitle}\n </h2>\n </div>\n )}\n\n {!initialSound && (\n <div className=\"modal-header\">\n {closeButton}\n {audioLink(title)}\n {subTitle && (\n <h5 className=\"modal-title\" id=\"mySmallModalLabelSubline\">\n {subTitle}\n </h5>\n )}\n </div>\n )}\n\n {initialSound && (\n <div className=\"modal-body\">\n <DwPicture imageId={imageId} alt={imageName} />\n {audioLink(name)}\n <RichText className=\"richText\" content={text} />\n </div>\n )}\n {!initialSound && (\n <div className=\"modal-body\">\n {imageId && <DwPicture imageId={imageId} alt={imageName} />}\n <RichText\n className={classnames('richText', {\n 'override-rtl': isRtl,\n })}\n content={text}\n />\n </div>\n )}\n </div>\n </div>\n </div>\n <div\n className={classnames(className, 'modal-backdrop fade', {\n rtl: isRtl,\n in: faded,\n })}\n role=\"button\"\n tabIndex=\"0\"\n aria-label=\"Close\"\n ref={closeBackdropRef}\n onClick={closeModal}\n onKeyPress={closeModal}\n />\n </>\n );\n};\n\nexport const KnowledgeModal = styled(KnowledgeModalContainer)`\n display: block;\n &.modal {\n pointer-events: none;\n }\n .modal-dialog-glossar {\n pointer-events: all;\n }\n &.modal-backdrop {\n cursor: default;\n }\n div.modal-body {\n div.richText {\n margin: 0;\n p {\n margin: 0 0 10px;\n }\n }\n }\n .audio-example {\n background-image: inherit;\n padding-left: 0px;\n padding-right: 0px;\n margin-right: 0px;\n }\n`;\n","import { useEffect, useRef } from 'react';\nimport ReactDOM from 'react-dom';\nimport { useToggle } from '../../../hooks/useToggle';\nimport { KnowledgeModal } from './KnowledgeModal';\n\nexport const Knowledge = ({ children, knowledge, isRtl }) => {\n const [isOpen, { toggleOnClick, toggleOnKeyPress }] = useToggle();\n const wrapper = useRef(null);\n const vocals = 'A, a;Ä, ä;E, e;I, i;O, o;Ö, ö;U, u;Ü, ü;Eu, eu;Au, au;ie;Ei, ei'.split(';');\n const classMap = {\n consonants: 'anlaut-modal consonants',\n vocals: 'anlaut-modal vocals',\n glossary: 'glossar-modal custom-modal',\n };\n const getClassName = () => {\n if (knowledge.knowledgeType === 'VOCABULARY') {\n return classMap.glossary;\n }\n if (vocals.includes(knowledge.shortTitle)) {\n return classMap.vocals;\n }\n return classMap.consonants;\n };\n\n const KnowledgeModalContainer = () => {\n return (\n <>\n {/* eslint-disable-next-line jsx-a11y/anchor-is-valid */}\n <a\n className={getClassName()}\n href=\"#\"\n onClick={e => handleClick(e)}\n onKeyPress={e => handleKeyPress(e)}\n >\n {children}\n </a>{' '}\n {isOpen && (\n <KnowledgeModal\n fadeIn={isOpen}\n knowledgeType={knowledge.knowledgeType}\n imageId={knowledge.mainContentImage ? knowledge.mainContentImage.id : null}\n imageName={knowledge.mainContentImage ? knowledge.mainContentImage.name : null}\n audioFile={knowledge.audios && knowledge.audios[0] ? knowledge.audios[0].mp3Src : null}\n title={knowledge.name}\n shortTitle={knowledge.shortTitle}\n name={knowledge.name}\n text={knowledge.text}\n subTitle={knowledge.subTitle}\n onClose={() => {\n toggleOnClick();\n }}\n isRtl={isRtl}\n />\n )}\n </>\n );\n };\n\n useEffect(() => {\n ReactDOM.render(<KnowledgeModalContainer />, wrapper.current);\n }, [isOpen]);\n\n const handleClick = e => {\n e.preventDefault();\n toggleOnClick();\n };\n\n const handleKeyPress = e => {\n e.preventDefault();\n toggleOnKeyPress(e);\n };\n\n return <span ref={wrapper}></span>;\n};\n","import { Knowledge } from '../../components/Modal/KnowledgeModal/Knowledge';\nimport { replaceWithComponent } from './replaceCommons';\n\nexport const placeholderToKnowledgeComponent = (matchedElement, { knowledges, isRtl }) => {\n return (\n <Knowledge\n knowledge={knowledges.find(element => element.id === parseInt(matchedElement.dataset.id, 10))}\n isRtl={isRtl}\n >\n {matchedElement.textContent}\n </Knowledge>\n );\n};\n\nexport const replacePlaceholderMarkupWithKnowledges = param => {\n replaceWithComponent({\n selector: '.placeholder.editable',\n node: document,\n componentFn: placeholderToKnowledgeComponent,\n param,\n });\n};\n","import gql from 'graphql-tag';\nimport { useParams } from 'react-router';\nimport { wrapTablesWithDiv } from '../../../utils/replacers/htmlReplacer';\nimport { replacePlaceholderImagesWithResponsivePictures } from '../../../utils/replacers/imageReplacer';\nimport { WithRenderDelay } from '../../WithRenderDelay/WithRenderDelay';\nimport { RichText } from '../../RichText/RichText';\nimport { toLang } from '../../../utils/mappers/langMapper';\nimport { WithGraphQLQueryHandling } from '../../WithGraphQLQueryHandling/WithGraphQLQueryHandling';\nimport { replacePlaceholderMarkupWithKnowledges } from '../../../utils/replacers/knowledgeReplacer';\nimport { ContentHeadline } from '../../ContentContainer/ContentHeadline/ContentHeadline';\nimport { useRtlContext } from '../../../hooks/useRtl';\nimport { PageMetaData } from '../../Page/PageMetaData';\nimport { gtmDataLayerFragment } from '../../GoogleTagManager';\nimport { GtmScriptWithDataLayer } from '../../GoogleTagManager/GtmScriptWithDataLayer';\n\nexport const knowledgesFragment = {\n name: 'Knowledges',\n fragment({ type }) {\n return gql`fragment ${type}${this.name} on ${type} {\n knowledges {\n id\n text\n knowledgeType\n shortTitle\n subTitle\n name\n mainContentImage {\n id\n name\n }\n audios {\n mp3Src\n }\n }\n }\n `;\n },\n};\nexport const lessonKnowledgeQuery = gql`\n query LessonKnowledge($knowledgeId: Int!, $lessonLang: Language!) {\n content(id: $knowledgeId, lang: $lessonLang) {\n ... on Knowledge {\n name\n text\n }\n ...KnowledgeKnowledges\n ${gtmDataLayerFragment.partial()}\n }\n }\n ${knowledgesFragment.fragment({ type: 'Knowledge' })}\n`;\n\nexport const LessonKnowledge = ({ pageType, lessonName, lessonKeywordStrings }) => {\n const { langCode, contentId } = useParams();\n const { isRtl } = useRtlContext();\n const lessonKnowledgeQueryVariables = {\n knowledgeId: +contentId,\n lessonLang: toLang(langCode),\n };\n\n return (\n <WithGraphQLQueryHandling\n query={lessonKnowledgeQuery}\n queryVariables={lessonKnowledgeQueryVariables}\n >\n {data => {\n const { content } = data;\n const { name, text, knowledges } = content;\n const knowledgeContent = wrapTablesWithDiv(text);\n\n return (\n <>\n <PageMetaData\n pageType={pageType}\n content={{ ...content, keywordStrings: lessonKeywordStrings }}\n parentContentName={lessonName}\n useDescriptionTranslation={true}\n />\n <GtmScriptWithDataLayer content={content} />\n <ContentHeadline>\n <h2 dir=\"auto\">{name}</h2>\n </ContentHeadline>\n <div className=\"row vocabulary\">\n <div className=\"col-sm-offset-1 col-sm-10 col-lg-offset-2 col-lg-8\">\n <WithRenderDelay\n actionToBeDelayed={() => {\n replacePlaceholderImagesWithResponsivePictures();\n replacePlaceholderMarkupWithKnowledges({ knowledges, isRtl });\n }}\n delayTime={10}\n render={() => <RichText content={knowledgeContent} />}\n />\n </div>\n </div>\n <div className=\"row vocabulary\">\n <div className=\"col-sm-offset-1 col-sm-10 col-lg-offset-2 col-lg-8\">\n <div className=\"richtext-content-container\"> </div>\n </div>\n </div>\n </>\n );\n }}\n </WithGraphQLQueryHandling>\n );\n};\n","import { useTimeout } from '../../../hooks/useTimeout';\nimport { replacePlaceholderMarkupWithKnowledges } from '../../../utils/replacers/knowledgeReplacer';\nimport { useRtlContext } from '../../../hooks/useRtl';\n\nexport const useKnowledgePlaceholderReplacementEffect = ({\n trigger,\n knowledges,\n ignore = false,\n}) => {\n const { isRtl } = useRtlContext();\n useTimeout(\n {\n callback: () => {\n if (!ignore) {\n replacePlaceholderMarkupWithKnowledges({ knowledges, isRtl });\n }\n },\n delay: 10,\n },\n [trigger],\n );\n};\n","import { wrapTablesWithDiv } from '../../utils/replacers/htmlReplacer';\nimport { useKnowledgePlaceholderReplacementEffect } from '../Modal/KnowledgeModal/useKnowledgePlaceholderReplacementEffect';\nimport { WithRenderDelay } from '../WithRenderDelay/WithRenderDelay';\nimport { replacePlaceholderImagesWithResponsivePictures } from '../../utils/replacers/imageReplacer';\nimport { RichText } from '../RichText/RichText';\nimport { ContentHeadline } from '../ContentContainer/ContentHeadline/ContentHeadline';\n\nexport const GrammarItem = ({ data }) => {\n const { name, text, knowledges } = data.content;\n const markup = wrapTablesWithDiv(text);\n\n useKnowledgePlaceholderReplacementEffect({ knowledges });\n\n return (\n <div className=\"section exercise-container vocabulary copy\">\n <ContentHeadline>\n <h2 dir=\"auto\">{name}</h2>\n </ContentHeadline>\n <div className=\"row vocabulary\">\n <div className=\"col-sm-offset-1 col-sm-10 col-lg-offset-2 col-lg-8\">\n <WithRenderDelay\n actionToBeDelayed={replacePlaceholderImagesWithResponsivePictures}\n delayTime={10}\n render={() => <RichText content={markup} />}\n />\n </div>\n </div>\n </div>\n );\n};\n","import gql from 'graphql-tag';\nimport { toLang } from '../utils/mappers/langMapper';\nimport { PageContainer } from '../components/Page/PageContainer';\nimport { WithGraphQLQueryHandling } from '../components/WithGraphQLQueryHandling/WithGraphQLQueryHandling';\nimport { knowledgesFragment } from '../components/Lesson/LessonKnowledge/LessonKnowledge';\nimport { GrammarItem } from '../components/GrammarItem/GrammarItem';\nimport { PageMetaData } from '../components/Page/PageMetaData';\nimport { PAGE_TYPES } from '../constants/pageTypes';\nimport {\n gtmDataLayerFragment,\n GtmScriptWithDataLayer,\n} from '../components/GoogleTagManager/GtmScriptWithDataLayer';\n\nexport const grammarPageQuery = gql`\n query GrammarPage($id: Int!, $lang: Language!) {\n content(id: $id, lang: $lang) {\n ... on Knowledge {\n name\n text\n }\n ...KnowledgeKnowledges\n ${gtmDataLayerFragment.partial()}\n }\n }\n ${knowledgesFragment.fragment({ type: 'Knowledge' })}\n`;\n\nexport const GrammarPage = ({ contentId, langCode }) => {\n const grammarPageQueryVariables = {\n id: +contentId,\n lang: toLang(langCode),\n };\n\n return (\n <PageContainer>\n <WithGraphQLQueryHandling query={grammarPageQuery} queryVariables={grammarPageQueryVariables}>\n {data => (\n <>\n <PageMetaData pageType={PAGE_TYPES.GRAMMAR_DETAIL} content={data.content} />\n <GtmScriptWithDataLayer content={data.content} />\n <GrammarItem data={data} />\n </>\n )}\n </WithGraphQLQueryHandling>\n </PageContainer>\n );\n};\n","export default __webpack_public_path__ + \"static/media/course_landing-1200x675.f68dc5b5.jpg\";","export default __webpack_public_path__ + \"static/media/course_landing-992x558.4309e861.jpg\";","export default __webpack_public_path__ + \"static/media/course_landing-768x432.d54bc099.jpg\";","export default __webpack_public_path__ + \"static/media/course_landing-480x270.5a82869e.jpg\";","import styled from 'styled-components';\nimport { colors, resolutions } from '../../utils/css';\nimport { StyledHeroTemplate } from '../HeroTemplate/HeroTemplate';\nimport landingImgFull from '../../assets/images/landing/course_landing-1200x675.jpg';\nimport landingImgTabletLandscape from '../../assets/images/landing/course_landing-992x558.jpg';\nimport landingImgTablet from '../../assets/images/landing/course_landing-768x432.jpg';\nimport landingImgMobile from '../../assets/images/landing/course_landing-480x270.jpg';\n\nexport const StyledMainHeroImage = styled(StyledHeroTemplate)`\n height: 400px;\n background-size: 100%;\n text-align: center;\n justify-content: center;\n background: url(${landingImgFull}) center/cover no-repeat;\n\n .content {\n position: static;\n display: flex;\n flex-flow: column;\n\n .title {\n color: ${colors.LG_ORANGE_DARK};\n font-family: DWTheAntiquaB, Georgia, serif;\n font-size: 54px;\n font-weight: 400;\n height: 60px;\n line-height: 50px;\n margin: 0 0 30px 0;\n opacity: 1;\n width: 100%;\n }\n\n .description {\n font: 400 23px/27.6px DWTheAntiquaB, Georgia, serif;\n margin: 0 0 10px;\n font-size: 23px;\n color: ${colors.LG_ORANGE_DARK};\n width: 100%;\n }\n }\n\n @media (max-width: ${resolutions.max.mobile}px) {\n .content {\n .title {\n font-size: 28px;\n margin-bottom: -20px;\n }\n\n .description {\n font-size: 16px;\n }\n }\n }\n\n @media (min-width: ${resolutions.min.mobile}px) {\n background: url(${landingImgMobile}) center/cover no-repeat;\n }\n\n @media (min-width: ${resolutions.min.tablet}px) {\n background: url(${landingImgTablet}) center/cover no-repeat;\n .title {\n margin-bottom: 0;\n }\n }\n\n @media (min-width: ${resolutions.min.tabletLandscape}px) {\n background: url(${landingImgTabletLandscape}) center/cover no-repeat;\n }\n\n @media (min-width: ${resolutions.min.full}px) {\n background: url(${landingImgFull}) center/cover no-repeat;\n }\n`;\n","import styled from 'styled-components';\nimport gql from 'graphql-tag';\nimport { Link } from 'react-router-dom';\nimport { useSelector } from 'react-redux';\nimport { colors, resolutions } from '../../../../utils/css';\nimport { I18nText } from '../../../I18n/I18nText';\nimport { learningLevelMapper } from '../../../../utils/learningLevelUtils';\nimport { getContentUrl } from '../../../../utils/url/urlFactory';\nimport { LearnProgressIcon } from '../../../LearnProgressIcon/LearnProgressIcon';\nimport { findCourseLearnProgressSelector } from '../../../../state/progress/learnProgressSelectors';\nimport { userSelector } from '../../../../state/user/userSelectors';\nimport { progressIconColors } from '../../../ProgressIcon/progressIconColors';\n\nexport const tileFragment = gql`\n fragment Tile on Course {\n id\n name\n language\n subTitle\n dkLearningLevel\n }\n`;\n\nexport const Tile = ({ className, data }) => {\n const { dkLearningLevel, name, subTitle, id } = data;\n const { courseProgress } = useSelector(findCourseLearnProgressSelector(id));\n const { isLoggedIn } = useSelector(userSelector);\n\n return (\n <LinkWrapper {...{ linkData: data, className }}>\n {isLoggedIn && (\n <div className=\"tile-progress\">\n <LearnProgressIcon learnProgress={courseProgress} color={progressIconColors.WHITE} />\n </div>\n )}\n <h2 className=\"tile-learningLevel\">{learningLevelMapper[dkLearningLevel]}</h2>\n <I18nText isA=\"p\" translation={name} className=\"tile-name\" aria-label=\"tile.placement.name\" />\n <I18nText\n isA=\"p\"\n translation={subTitle}\n className=\"tile-subTitle\"\n aria-label=\"tile.placement.subTitle\"\n />\n </LinkWrapper>\n );\n};\n\nconst LinkWrapper = ({ children, linkData, className }) => {\n return linkData.href ? (\n <a className={`${className} tile-container`} href={linkData.href}>\n {children}\n </a>\n ) : (\n <Link key={linkData.id} className={`${className} tile-container`} to={getContentUrl(linkData)}>\n {children}\n </Link>\n );\n};\n\nexport const StyledTile = styled(Tile)`\n --absElemOffset: 84px;\n padding: var(--absElemOffset) 20px 20px 20px;\n display: flex;\n flex-direction: column;\n width: 300px;\n height: 250px;\n box-sizing: border-box;\n position: relative;\n border-color: ${colors.LG_WHITE};\n border-style: solid;\n border-width: 1px 1px 0 0;\n background-color: ${({ backgroundColor }) => backgroundColor};\n color: ${colors.LG_WHITE};\n\n &:nth-child(4n) {\n border-right-width: 0;\n }\n\n &.tile-container {\n text-decoration: none;\n :hover,\n :active,\n :focus {\n color: ${colors.LG_TRANSPARENT_WHITE_50};\n }\n }\n\n .tile-learningLevel {\n font: 400 70px / var(--absElemOffset) Helvetica, Arial, sans-serif;\n height: var(--absElemOffset);\n text-align: start;\n margin: 0;\n padding: 0;\n position: absolute;\n top: 0;\n }\n\n .tile-name {\n font: 400 23px/25px DWTheAntiquaBBold, Georgia, serif;\n margin: 0 0 7px;\n width: 100%;\n }\n\n .tile-subTitle {\n font: 400 16px/25px DWTheAntiquaB, Georgia, serif;\n max-height: 60%;\n opacity: 0.9;\n max-width: 95%;\n }\n\n .tile-progress {\n position: absolute;\n top: 0;\n padding-top: 20px;\n width: calc(100% - 40px);\n height: var(--absElemOffset);\n display: flex;\n justify-content: flex-end;\n }\n\n @media (max-width: ${resolutions.max.tablet}px) {\n --absElemOffset: 64px;\n height: 180px;\n width: 100%;\n border-width: 1px 1px 0 0;\n\n &:nth-child(2n) {\n border-right-width: 0;\n }\n\n .tile-learningLevel {\n font: 400 54px/64px Helvetica, Arial, sans-serif;\n height: var(--absElemOffset);\n }\n\n .tile-name {\n font-size: 22px;\n }\n\n .tile-subTitle {\n font-size: 15px;\n }\n\n .tile-progress {\n height: var(--absElemOffset);\n padding-top: 15px;\n }\n }\n\n @media (max-width: ${resolutions.max.mobile}px) {\n height: 90px;\n padding: 10px;\n border-width: 1px 0 0 0;\n justify-content: center;\n\n .tile-learningLevel {\n line-height: 90px;\n font-size: 36px;\n width: 58px;\n height: 90px;\n margin: 0 0 0 6px;\n }\n\n .tile-name {\n position: relative;\n font-size: 17px;\n line-height: 19px;\n font-weight: 400;\n margin: 0 25px 3px 64px;\n width: calc(100% - 89px);\n }\n\n .tile-subTitle {\n font-size: 14px;\n font-weight: 400;\n line-height: 19px;\n flex-direction: row;\n margin: 0 25px 0 64px;\n width: calc(100% - 89px);\n }\n\n .tile-progress {\n width: calc(100% - 20px);\n }\n }\n`;\n","import styled from 'styled-components';\nimport { colors, resolutions } from '../../../../utils/css';\nimport { useRtlContext } from '../../../../hooks/useRtl';\n\nconst BlankTile = ({ className }) => {\n const { isRtl } = useRtlContext();\n return <div className={`${className} ${isRtl ? 'rtl' : ''}`} />;\n};\n\nexport const StyledBlankTile = styled(BlankTile)`\n border-top: 1px solid ${colors.LG_WHITE};\n border-right: 1px solid ${colors.LG_WHITE};\n background: ${colors.DW_LIGHT_BLUE};\n text-decoration: none;\n\n @media (max-width: ${resolutions.max.tablet}px) {\n height: 180px;\n width: 100%;\n\n &.rtl {\n border-right-width: 0;\n }\n }\n\n @media (max-width: ${resolutions.max.mobile}px) {\n display: none;\n }\n`;\n","import styled from 'styled-components';\nimport { StyledTile as Tile } from './Tile';\n\nexport const MoreCoursesTile = ({ className, backgroundColor }) => (\n <Tile\n {...{\n className,\n backgroundColor,\n }}\n data={{\n dkLearningLevel: 0,\n name: 'dashboard.dw.title',\n subTitle: 'dashboard.dw.text',\n href: 'https://www.dw.com/en/learn-german/s-2469', // TODO: to be added to config file\n }}\n />\n);\n\nexport const StyledMoreCoursesTile = styled(MoreCoursesTile)`\n .tile-progress {\n display: none;\n }\n`;\n","import { colors } from '../utils/css';\n\nexport const tileColors = [\n `${colors.LG_ORANGE}`,\n `${colors.LG_ORANGE_DARK}`,\n `${colors.LG_PINK}`,\n `${colors.LG_RED}`,\n `${colors.LG_GREEN_LIGHT}`,\n `${colors.LG_GREEN}`,\n `${colors.DW_LIGHT_BLUE}`,\n `${colors.LG_BLUE_5}`,\n];\n","export const scrollIntoViewCenter = htmlElement => {\n htmlElement.scrollIntoView({\n behavior: 'smooth',\n block: 'center',\n inline: 'nearest',\n });\n};\n\n// Creates a string that can be used for dynamic id and key attributes\nexport const uniqueId = () => `id-${Math.random().toString(36).substr(2, 16)}`;\n","import { Fragment } from 'react';\nimport styled from 'styled-components';\nimport { colors, resolutions } from '../../../utils/css';\nimport { StyledTile as Tile } from './Tile/Tile';\nimport { StyledBlankTile as BlankTile } from './Tile/BlankTile';\nimport { StyledMoreCoursesTile as MoreCoursesTile } from './Tile/MoreCoursesTile';\nimport { tileColors } from '../../../constants/tileColors';\nimport { uniqueId } from '../../../utils/htmlUtils';\n\nexport const Tiles = ({ className, data }) => {\n return (\n <nav className={className}>\n {data.map((tileData, index) => {\n const tileElement = (\n <Tile\n key={tileData.id}\n backgroundColor={tileColors[index % tileColors.length]}\n data={tileData}\n />\n );\n // check if the number of the fetched tiles is even and if it is,\n // then add a blank tile as penultimate\n return data.length % 2 === 0 && data.indexOf(tileData) === data.length - 1 ? (\n <Fragment key={uniqueId()}>\n {tileElement}\n <BlankTile />\n </Fragment>\n ) : (\n tileElement\n );\n })}\n <MoreCoursesTile backgroundColor={colors.LG_BLUE_5} />\n </nav>\n );\n};\n\nexport const StyledTiles = styled(Tiles)`\n display: grid;\n grid-template-columns: repeat(4, 1fr);\n width: 100%;\n min-height: 500px;\n border-bottom: 1px solid ${colors.LG_WHITE};\n\n @media (min-width: ${resolutions.min.desktop}px) {\n width: 1200px;\n }\n\n @media (max-width: ${resolutions.max.tablet}px) {\n grid-template-columns: repeat(2, 1fr);\n }\n\n @media (max-width: ${resolutions.max.mobile}px) {\n grid-template-columns: 1fr;\n width: 100%;\n }\n`;\n","import { useEffect } from 'react';\nimport { useDispatch } from 'react-redux';\nimport { StyledMainHeroImage } from '../MainHeroImage/MainHeroImage';\nimport { StyledTiles } from './Tiles/Tiles';\nimport { I18nText } from '../I18n/I18nText';\nimport { readCourseProgresses } from '../../state/progress/learnProgressDuck';\n\nexport const Dashboard = ({ data }) => {\n const dispatch = useDispatch();\n\n useEffect(() => {\n const courseIds = data.map(course => course.id);\n dispatch(readCourseProgresses(courseIds));\n }, [data, dispatch]);\n\n return (\n <main aria-label=\"dashboard\">\n <StyledMainHeroImage>\n <I18nText isA=\"h1\" tabIndex={0} translation=\"dashboard.title\" className=\"title\" />\n <I18nText isA=\"p\" tabIndex={0} translation=\"dashboard.subTitle\" className=\"description\" />\n </StyledMainHeroImage>\n <StyledTiles\n {...{\n data,\n }}\n />\n </main>\n );\n};\n","import gql from 'graphql-tag';\nimport { useParams } from 'react-router';\nimport { Dashboard } from '../components/Dashboard/Dashboard';\nimport { tileFragment } from '../components/Dashboard/Tiles/Tile/Tile';\nimport { sortByLearningLevel } from '../utils/learningLevelUtils';\nimport { toLang } from '../utils/mappers/langMapper';\nimport { PageContainer } from '../components/Page/PageContainer';\nimport { WithGraphQLQueryHandling } from '../components/WithGraphQLQueryHandling/WithGraphQLQueryHandling';\nimport { PageMetaData } from '../components/Page/PageMetaData';\nimport { GTM_NO_CONTENT_PAGE_IDS, PAGE_TYPES } from '../constants/pageTypes';\nimport {\n gtmDataLayerFragment,\n GtmScriptWithDataLayer,\n} from '../components/GoogleTagManager/GtmScriptWithDataLayer';\n\nexport const dashboardPageQuery = gql`\n query DashboardPage($type: ModelType!, $courseLang: Language!, $amount: Int!) {\n # Get courses in the selected language till A2 level\n contentsByLang: contentsByType(\n type: $type\n lang: $courseLang\n amount: $amount\n filters: { field: \"dkLearningLevel\", value: [\"0\", \"2\", \"4\"] }\n ) {\n ...Tile\n ... on Course {\n ${gtmDataLayerFragment.partial()}\n }\n }\n # Get B1 courses in German\n contentsInGerman: contentsByType(\n type: $type\n lang: GERMAN\n amount: $amount\n filters: { field: \"dkLearningLevel\", value: [\"8\", \"16\"] }\n ) {\n ...Tile\n }\n }\n ${tileFragment}\n`;\n\nexport const DashboardPage = () => {\n const { langCode } = useParams();\n\n const dashboardPageQueryVariables = {\n type: 'COURSE',\n courseLang: toLang(langCode),\n amount: 10,\n };\n\n return (\n <PageContainer>\n <WithGraphQLQueryHandling\n query={dashboardPageQuery}\n queryVariables={dashboardPageQueryVariables}\n >\n {data => (\n <>\n <PageMetaData pageType={PAGE_TYPES.OVERVIEW} useDescriptionTranslation={true} />\n <GtmScriptWithDataLayer noContentPageId={GTM_NO_CONTENT_PAGE_IDS.OVERVIEW} />\n <Dashboard\n data={[...sortByLearningLevel(data.contentsByLang), ...data.contentsInGerman]}\n />\n </>\n )}\n </WithGraphQLQueryHandling>\n </PageContainer>\n );\n};\n","import styled from 'styled-components';\nimport { I18nText } from '../I18n/I18nText';\nimport { colors, resolutions } from '../../utils/css';\n\nexport const GrammarOverviewHeader = ({ className }) => {\n return (\n <div className={className}>\n <div className=\"grammarOverviewHeader-wrapper\">\n <I18nText translation=\"header.menu.grammar\" isA=\"h1\" />\n <I18nText translation=\"grammar.overview.description\" isA=\"p\" />\n </div>\n </div>\n );\n};\n\nexport const StyledGrammarOverviewHeader = styled(GrammarOverviewHeader)`\n display: block;\n width: 100%;\n background-color: ${colors.LG_GRAY_3};\n color: ${colors.LG_GRAY_9};\n\n .grammarOverviewHeader-wrapper {\n height: 320px;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n\n h1 {\n padding: 125px 20px 0 20px;\n margin: 20px 0 10px;\n }\n\n p {\n padding: 0 20px 10px;\n margin: 0 0 10px;\n }\n }\n\n @media (min-width: ${resolutions.min.desktop}px) {\n margin-bottom: 20px;\n }\n\n @media (max-width: ${resolutions.max.mobile}px) {\n .grammarOverviewHeader-wrapper {\n height: 240px;\n\n h1 {\n padding: 78px 20px 0 20px;\n }\n }\n }\n`;\n","import { useRef } from 'react';\nimport styled from 'styled-components';\nimport { Link } from 'react-router-dom';\nimport { useToggle } from '../../../hooks/useToggle';\nimport { colors, resolutions } from '../../../utils/css';\nimport { StyledToggleableArrow as ToggleableArrow } from '../../ToggleableArrow/ToggleableArrow';\nimport { I18nText } from '../../I18n/I18nText';\nimport { getContentUrl } from '../../../utils/url/urlFactory';\n\nexport const AccordionItem = ({ title, contents, className }) => {\n const element = useRef(null);\n const [isOpen, { toggleOnClick }] = useToggle();\n const height = element.current ? element.current.scrollHeight : '0';\n return (\n <div className={className}>\n <button tabIndex={0} className=\"accordionItem-btn\" onClick={toggleOnClick}>\n <I18nText translation={title} isA=\"p\" className={className} />\n <ToggleableArrow\n className=\"toggleable-arrow\"\n fill={colors.LG_WHITE}\n {...{\n isUp: isOpen,\n }}\n />\n </button>\n <AccordionItemContent height={height} isOpen={isOpen} ref={element} aria-expanded={isOpen}>\n {contents.map(content => (\n <div key={content.id} className=\"accordionItem-text\">\n <Link\n tabIndex={isOpen ? 0 : -1}\n to={getContentUrl({\n id: content.id,\n name: content.shortTitle,\n language: content.language,\n __typename: content.knowledgeType,\n })}\n >\n {content.shortTitle}\n </Link>\n </div>\n ))}\n </AccordionItemContent>\n </div>\n );\n};\n\nexport const StyledAccordionItem = styled(AccordionItem)`\n font-family: DWTheAntiquaB, Georgia, serif;\n font-weight: 400;\n font-size: 18px;\n line-height: 25px;\n text-align: left;\n\n display: flex;\n flex-direction: column;\n margin: 0px;\n\n .accordionItem-btn {\n display: flex;\n position: relative;\n width: 100%;\n padding: 20px;\n background-color: ${({ backgroundColor }) => backgroundColor};\n color: ${colors.LG_WHITE};\n cursor: pointer;\n align-items: center;\n border: none;\n :hover {\n background-color: ${colors.LG_GRAY_9};\n }\n :focus {\n color: ${colors.LG_BAHAMA_BLUE};\n text-decoration: underline;\n }\n }\n\n .toggleable-arrow {\n right: 18px;\n }\n`;\n\nexport const AccordionItemContent = styled.div`\n max-height: ${({ isOpen, height }) => (isOpen ? height : '1')}px;\n overflow: hidden;\n background-color: ${colors.LG_WHITE};\n transition: max-height 0.7s;\n\n .accordionItem-text {\n font-size: 18px;\n line-height: 25px;\n border-bottom-width: 1px;\n border-bottom-style: solid;\n border-bottom-color: ${colors.LG_GRAY_12};\n\n a {\n color: ${colors.LG_GRAY_9};\n text-decoration: none;\n padding: 20px;\n display: block;\n &:hover {\n color: ${colors.LG_WHITE};\n background-color: ${colors.LG_GRAY_9};\n }\n }\n\n @media (max-width: ${resolutions.max.mobile}px) {\n font-size: 15px;\n line-height: 20px;\n }\n }\n`;\n","import { colors } from '../utils/css';\n\nexport const grammarOverviewColors = [\n `${colors.LG_GREEN_YELLOW}`,\n `${colors.DW_LIGHT_BLUE}`,\n `${colors.LG_ORANGE}`,\n `${colors.LG_RED}`,\n `${colors.LG_GREEN_YELLOW}`,\n `${colors.LG_PINK}`,\n `${colors.LG_ORANGE_DARK}`,\n `${colors.LG_ORANGE}`,\n `${colors.LG_RED_DARK}`,\n `${colors.DW_LIGHT_BLUE}`,\n `${colors.LG_GREEN}`,\n `${colors.LG_ORANGE}`,\n];\n","import styled from 'styled-components';\nimport { StyledAccordionItem as AccordionItem } from './AccordionItem/AccordionItem';\nimport { grammarOverviewColors } from '../../constants/grammarOverviewColors';\n\nexport const Accordion = ({ className, data }) => {\n return (\n <div className={className}>\n {data.map((accordionData, index) => (\n <AccordionItem\n key={accordionData.id}\n backgroundColor={grammarOverviewColors[index % grammarOverviewColors.length]}\n title={accordionData.headline}\n contents={accordionData.grammars}\n className={className}\n />\n ))}\n </div>\n );\n};\n\nexport const StyledAccordion = styled(Accordion)`\n display: block;\n`;\n","import { StyledGrammarOverviewHeader as GrammarOverviewHeader } from './GrammarOverviewHeader';\nimport { StyledAccordion as Accordion } from '../Accordion/Accordion';\n\nconst removeEmptyGrammars = data =>\n Object.values(data.grammarOverview).filter(\n item => Array.isArray(item.grammars) && item.grammars.length,\n );\n\nexport const GrammarOverview = data => (\n <>\n <GrammarOverviewHeader />\n <Accordion data={removeEmptyGrammars(data)} />\n </>\n);\n","import gql from 'graphql-tag';\nimport { useParams } from 'react-router';\nimport { toLang } from '../utils/mappers/langMapper';\nimport { WithGraphQLQueryHandling } from '../components/WithGraphQLQueryHandling/WithGraphQLQueryHandling';\nimport { PageContainer } from '../components/Page/PageContainer';\nimport { GrammarOverview } from '../components/GrammarOverview/GrammarOverview';\nimport { PageMetaData } from '../components/Page/PageMetaData';\nimport { GTM_NO_CONTENT_PAGE_IDS, PAGE_TYPES } from '../constants/pageTypes';\nimport { GtmScriptWithDataLayer } from '../components/GoogleTagManager/GtmScriptWithDataLayer';\n\nexport const grammarOverviewPageFragment = gql`\n fragment GrammarOverviewItems on GrammarOverviewCategory {\n id\n headline\n grammars {\n id\n shortTitle\n language\n knowledgeType\n }\n }\n`;\n\nexport const grammarOverviewPageQuery = gql`\n query GrammarOverviewPage($lang: Language!) {\n grammarOverview(lang: $lang) {\n verbs {\n ...GrammarOverviewItems\n }\n tenses {\n ...GrammarOverviewItems\n }\n nounsAndArticles {\n ...GrammarOverviewItems\n }\n declination {\n ...GrammarOverviewItems\n }\n negation {\n ...GrammarOverviewItems\n }\n pronoun {\n ...GrammarOverviewItems\n }\n prepositions {\n ...GrammarOverviewItems\n }\n adjectivesAndAdverbs {\n ...GrammarOverviewItems\n }\n sentenceStructure {\n ...GrammarOverviewItems\n }\n numbers {\n ...GrammarOverviewItems\n }\n spellingOrthography {\n ...GrammarOverviewItems\n }\n others {\n ...GrammarOverviewItems\n }\n }\n }\n ${grammarOverviewPageFragment}\n`;\n\nexport const GrammarOverviewPage = () => {\n const { langCode } = useParams();\n\n const grammarPageQueryVariables = { lang: toLang(langCode) };\n\n return (\n <PageContainer>\n <WithGraphQLQueryHandling\n query={grammarOverviewPageQuery}\n queryVariables={grammarPageQueryVariables}\n >\n {data => (\n <>\n <PageMetaData pageType={PAGE_TYPES.GRAMMAR_OVERVIEW} />\n <GtmScriptWithDataLayer noContentPageId={GTM_NO_CONTENT_PAGE_IDS.GRAMMAR_OVERVIEW} />\n <GrammarOverview {...data} />\n </>\n )}\n </WithGraphQLQueryHandling>\n </PageContainer>\n );\n};\n","import { toLangCode } from '../mappers/langMapper';\nimport { encodeUrlNamePart, normalizeUrlName } from './url';\nimport { FEEDBACK_TYPES } from '../../constants/feedback';\n\nexport const pathPartials = {\n // IMPORTANT: Avoid groups in regex, always check here: https://pshrmn.github.io/route-tester/\n langCodeRegex: '[a-z]{2}-?0?0?2?[briaf]{0,2}',\n titlePathRegex: '.*',\n contentIdRegex: '\\\\d+',\n contentTypeRegex: '[a-z_]{1,15}',\n knowledgeTypeRegex: 'lv|la',\n knowledgeWithContentIdTypeRegex: 'gr|rs',\n feedbackTypes: Object.values(FEEDBACK_TYPES).join('|'),\n};\n\nexport const alignTitleRedirect = ({ title, language }) => ({ params, url }) => {\n const { typeId, contentId, title: titleFromPath } = params;\n if (titleFromPath !== normalizeUrlName(title.replace(/\\//g, ''))) {\n return {\n redirect: true,\n path: `/${toLangCode(language)}/${encodeUrlNamePart(title)}/${typeId}-${contentId}`,\n };\n }\n\n return {\n redirect: false,\n path: url,\n };\n};\n\nexport const notFoundRedirect = statement => ({ params, url }) => {\n const { langCode } = params;\n if (statement) {\n const langFromUrl = langCode ? `/${langCode}` : '/en';\n return {\n redirect: true,\n path: `${langFromUrl}/404?from=${url}`,\n };\n }\n return {\n redirect: false,\n path: url,\n };\n};\n\nexport const checkRedirects = ({ fns = [], match }) =>\n fns.reduce(\n (initial, fn) => {\n if (!initial.redirect) {\n const result = fn()(match) || {};\n return result.redirect ? result : initial;\n }\n return initial;\n },\n {\n redirect: false,\n path: match.url,\n },\n );\n","import { Link } from 'react-router-dom';\nimport styled from 'styled-components';\nimport { colors, resolutions } from '../../../../utils/css';\nimport { useTranslation } from '../../../../hooks/useTranslation';\n\nexport const LessonMenuItem = ({\n to,\n translationKey,\n id,\n ariaLabel,\n target,\n rel,\n onClick,\n onKeyPress,\n}) => {\n const label = useTranslation(translationKey);\n return (\n <StyledLessonMenuItem>\n <Link\n {...{\n to,\n id,\n target,\n rel,\n onClick,\n onKeyPress,\n }}\n className=\"lesson-menu-link\"\n aria-label={ariaLabel}\n >\n {label}\n </Link>\n </StyledLessonMenuItem>\n );\n};\n\nexport const StyledLessonMenuItem = styled('li')`\n padding: 0;\n text-align: center;\n width: 100%;\n\n @media (min-width: ${resolutions.min.tablet}px) {\n border-bottom: 1px solid ${colors.LG_WHITE};\n }\n\n .lesson-menu-link {\n color: ${colors.LG_WHITE};\n font-family: Helvetica, Arial, sans-serif;\n font-size: 17px;\n font-weight: 700;\n display: inline-block;\n padding: 20px;\n text-decoration: none;\n width: 100%;\n\n // mouse, touch pad\n @media (hover: hover) and (pointer: fine) {\n &:hover {\n background-color: ${colors.LG_ORANGE1};\n }\n }\n // smartphones, touchscreens\n @media (hover: none) and (pointer: coarse) {\n &:hover {\n background-color: ${colors.LG_ORANGE1};\n }\n }\n &:active {\n background-color: ${colors.LG_ORANGE1};\n }\n &:focus {\n background-color: ${colors.LG_BLACK};\n }\n\n @media (min-width: ${resolutions.min.tablet}px) {\n font-size: 21px;\n }\n }\n`;\n","import styled from 'styled-components';\nimport { colors, resolutions } from '../../../../utils/css';\n\nexport const LessonTitle = ({ lessonName }) => (\n <StyledLessonTitle>\n <h1 className=\"title\">{lessonName}</h1>\n </StyledLessonTitle>\n);\n\nexport const StyledLessonTitle = styled('div')`\n align-items: center;\n display: flex;\n justify-content: center;\n min-height: 60px;\n\n .title {\n color: ${colors.LG_WHITE};\n font-size: 18px;\n line-height: 1.3;\n margin: 15px 0;\n padding: 0 50px;\n text-align: center;\n }\n\n @media (min-width: ${resolutions.min.tablet}px) {\n min-height: 85px;\n\n .title {\n font-size: 25px;\n padding: 0 65px;\n }\n }\n\n @media (min-width: ${resolutions.min.desktop}px) {\n .title {\n font-size: 34px;\n }\n }\n`;\n","import styled from 'styled-components';\nimport { colors, resolutions } from '../../../../utils/css';\nimport navCrossBlackLg from '../../../../assets/svg/nav-cross-black-lg.svg';\nimport navCrossLg from '../../../../assets/svg/nav-cross-lg.svg';\nimport { StyledIconBar as IconBar } from '../../../IconBar/IconBar';\nimport { I18nText } from '../../../I18n/I18nText';\n\nexport const LessonBurgerButton = ({ isMenuCollapsed, setIsMenuCollapsed }) => (\n <StyledLessonBurgerButton>\n <button\n onClick={() => setIsMenuCollapsed(!isMenuCollapsed)}\n type=\"button\"\n className={isMenuCollapsed ? 'icon-toggle collapsed' : 'icon-toggle collapse'}\n data-toggle={isMenuCollapsed ? 'collapsed' : 'collapse'}\n data-target=\"#lecture-nav-user-menu\"\n aria-expanded={isMenuCollapsed}\n aria-controls=\"navbar\"\n >\n <span className=\"title\">\n <I18nText translation=\"lesson.menu.inLesson\" />\n </span>\n <div className=\"burger-menu-toggle-container\">\n <span className=\"sr-only\">\n <I18nText translation=\"lesson.menu.toggleNavigation\" />\n </span>\n {!isMenuCollapsed && <span className=\"close-menu\" />}\n\n {isMenuCollapsed && (\n <>\n <IconBar />\n <IconBar />\n </>\n )}\n </div>\n </button>\n </StyledLessonBurgerButton>\n);\n\nconst buttonStyle = `\n background-color: transparent;\n background-image: none;\n border: 0;\n border-radius: 0;\n margin: 0;\n padding: 0;\n`;\n\nconst defaultHoverStyles = `\n &:hover ${IconBar} {\n background-color: ${colors.LG_BLACK};\n }\n &:hover .close-menu {\n background: url(${navCrossBlackLg});\n background-size: cover;\n } \n`;\n// mouse, touch pad, smartphones, touchscreens\nconst mediaHoverDeviceDetection = `\n @media (hover: hover) and (pointer: fine) {\n ${defaultHoverStyles}\n }\n @media (hover: none) and (pointer: coarse) {\n ${defaultHoverStyles}\n }\n`;\n\nexport const StyledLessonBurgerButton = styled('div')`\n position: absolute;\n /*! @noflip */\n right: 20px;\n top: calc(50% - 10px);\n\n @media (min-width: ${resolutions.min.desktop}px) {\n /*! @noflip */\n right: 30px;\n }\n\n .title {\n display: none;\n }\n\n ${IconBar} {\n background-color: ${colors.LG_WHITE};\n padding: 0;\n }\n\n .close-menu {\n background: url(${navCrossLg});\n background-size: cover;\n display: block;\n height: 15px;\n margin-top: 6px;\n /*! @noflip */\n right: 15px;\n width: 15px;\n\n @media (min-width: ${resolutions.min.tablet}px) {\n height: 21px;\n margin-top: 2px;\n width: 22px;\n }\n }\n\n .collapse {\n display: block;\n ${buttonStyle}\n }\n\n .collapsed {\n ${buttonStyle}\n }\n\n .burger-menu-toggle-container {\n margin: 0;\n position: relative;\n }\n\n .icon-toggle {\n ${mediaHoverDeviceDetection}\n\n &:active ${IconBar}, \n &:focus ${IconBar} {\n background-color: ${colors.LG_BLACK};\n }\n\n &:focus .close-menu,\n &:active .close-menu {\n background: url(${navCrossBlackLg});\n background-size: cover;\n }\n }\n`;\n","export const LESSON_PARTS = Object.freeze({\n EXERCISE: 'EXERCISE',\n GRAMMAR: 'GRAMMAR',\n VOCABULARY_GLOSSARY: 'VOCABULARY_GLOSSARY',\n REGIONAL_STUDIES: 'REGIONAL_STUDIES',\n PHONEMIC_CHART: 'PHONEMIC_CHART',\n MANUSCRIPT: 'MANUSCRIPT',\n DOWNLOAD: 'DOWNLOAD',\n});\n","import { LESSON_PARTS } from '../constants/lessonParts';\nimport { isFinalTestPredicate } from './commons';\nimport {\n getAlphabeticalOrderUrl,\n getFirstGrammarUrl,\n getFirstRegionalStudiesUrl,\n getVocabularyUrl,\n} from './url/urlFactory';\n\nexport const hasLessonPart = (lessonOverviewParts, lessonPart) => {\n return lessonOverviewParts.some(part => part.lessonPart === lessonPart);\n};\n\nexport const getFirstIdOfLessonPart = (lessonOverviewParts, lessonPart) => {\n const targetOverviewPart = lessonOverviewParts.find(part => part.lessonPart === lessonPart);\n return targetOverviewPart ? targetOverviewPart.targetId : null;\n};\n\nexport const filterLessonKnowledgeOverviewItems = lessonOverviewParts =>\n lessonOverviewParts.filter(part =>\n [\n LESSON_PARTS.GRAMMAR,\n LESSON_PARTS.VOCABULARY_GLOSSARY,\n LESSON_PARTS.REGIONAL_STUDIES,\n ].includes(part.lessonPart),\n );\n\nexport const filterLessonExerciseOverviewItems = lessonOverviewParts =>\n lessonOverviewParts.filter(part => part.lessonPart === LESSON_PARTS.EXERCISE);\n\nexport const isFinalTestLesson = ({ lessonContentLinksFromCourse, currentLessonId }) => {\n const finalTestLessonContentLink = lessonContentLinksFromCourse.find(\n contentLink => contentLink.targetId === +currentLessonId && isFinalTestPredicate(contentLink),\n );\n return Boolean(finalTestLessonContentLink);\n};\n\nexport const filteredAssembledInfos = ({ lessonOverviewParts, lessonPath }) => {\n return assembleOverviewInfos({ lessonOverviewParts, lessonPath }).filter(info => info.hasInfo);\n};\n\nexport const assembleOverviewInfos = ({ lessonOverviewParts, lessonPath }) => {\n const firstGrammarId = getFirstIdOfLessonPart(lessonOverviewParts, LESSON_PARTS.GRAMMAR);\n const firstRegionalStudiesId = getFirstIdOfLessonPart(\n lessonOverviewParts,\n LESSON_PARTS.REGIONAL_STUDIES,\n );\n\n return [\n {\n name: 'grammar',\n hasInfo: hasLessonPart(lessonOverviewParts, LESSON_PARTS.GRAMMAR),\n url: getFirstGrammarUrl(lessonPath, firstGrammarId),\n },\n {\n name: 'alphabeticalOrder',\n hasInfo: hasLessonPart(lessonOverviewParts, LESSON_PARTS.PHONEMIC_CHART),\n url: getAlphabeticalOrderUrl(lessonPath),\n },\n {\n name: 'vocabulary',\n hasInfo: hasLessonPart(lessonOverviewParts, LESSON_PARTS.VOCABULARY_GLOSSARY),\n url: getVocabularyUrl(lessonPath),\n },\n {\n name: 'regionalStudies',\n hasInfo: hasLessonPart(lessonOverviewParts, LESSON_PARTS.REGIONAL_STUDIES),\n url: getFirstRegionalStudiesUrl(lessonPath, firstRegionalStudiesId),\n },\n ];\n};\n","import styled from 'styled-components';\nimport { useState } from 'react';\nimport { useParams } from 'react-router';\nimport { useDispatch } from 'react-redux';\nimport { useHistory } from 'react-router-dom';\nimport { colors, resolutions, clearfix } from '../../../utils/css';\nimport { LessonMenuItem } from './LessonMenuItem/LessonMenuItem';\nimport { LessonTitle } from './LessonTitleAndBurgerButton/LessonTitle';\nimport { LessonBurgerButton } from './LessonTitleAndBurgerButton/LessonBurgerButton';\nimport { LESSON_PARTS } from '../../../constants/lessonParts';\nimport {\n getAlphabeticalOrderUrl,\n getCourseUrl,\n getExtrasUrl,\n getFirstGrammarUrl,\n getFirstRegionalStudiesUrl,\n getLessonUrl,\n getManuscriptUrl,\n getPlacementDashboardUrl,\n getVocabularyUrl,\n} from '../../../utils/url/urlFactory';\nimport { normalizeUrlName } from '../../../utils/url/url';\nimport { hasLessonPart } from '../../../utils/lessonUtils';\nimport { ModalIntegration } from '../../Modal/ModalIntegration';\nimport { ResetModal } from '../../Modal/ResetModal';\nimport { deleteLessonProgress } from '../../../state/progress/learnProgressDuck';\nimport { useTranslation } from '../../../hooks/useTranslation';\n\nexport const LessonMenu = ({\n lessonId,\n lessonName,\n lessonOverviewParts,\n courseId,\n courseName,\n isFromPlacementCourse,\n isFinalTest,\n firstExercisePath,\n}) => {\n const { langCode } = useParams();\n const [isMenuCollapsed, setIsMenuCollapsed] = useState(true);\n const [isResetModalOpen, setResetModalOpen] = useState(false);\n\n const dispatch = useDispatch();\n const history = useHistory();\n\n const grammarAria = useTranslation('lesson.menu.grammar_aria');\n const vocabularyAria = useTranslation('lesson.menu.vocabulary_aria');\n\n const onConfirmResetLessonProgress = () => {\n dispatch(deleteLessonProgress(+lessonId));\n setResetModalOpen(false);\n history.push(getLessonUrl(lessonId, langCode, normalizeUrlName(lessonName)));\n };\n\n const onCancelResetLessonProgress = () => {\n setResetModalOpen(false);\n };\n\n const getFirstOfTypeId = lessonPart =>\n hasLessonPart(lessonOverviewParts, lessonPart) &&\n lessonOverviewParts.find(part => part.lessonPart === lessonPart).targetId;\n\n const firstGrammarId = getFirstOfTypeId(LESSON_PARTS.GRAMMAR);\n const firstRegionalStudiesId = getFirstOfTypeId(LESSON_PARTS.REGIONAL_STUDIES);\n\n const lessonPath = getLessonUrl(lessonId, langCode, normalizeUrlName(lessonName));\n\n const hasExercisesReset =\n hasLessonPart(lessonOverviewParts, LESSON_PARTS.EXERCISE) &&\n !isFromPlacementCourse &&\n !isFinalTest;\n\n return (\n <StyledLessonMenu>\n <div className=\"lesson-nav-layout-wrapper\">\n <div className=\"lesson-title-button-container-wrapper\">\n <LessonTitle lessonName={lessonName} />\n <LessonBurgerButton {...{ isMenuCollapsed, setIsMenuCollapsed }} />\n </div>\n <div className=\"lesson-nav-menu-container-wrapper\">\n <div\n id=\"lecture-nav-user-menu\"\n className=\"collapse in lesson-nav-menu-wrapper\"\n aria-expanded={!isMenuCollapsed}\n style={{\n transition: 'all 0.3s linear',\n maxHeight: isMenuCollapsed ? 0 : 800,\n visibility: isMenuCollapsed ? 'hidden' : 'visible',\n boxShadow: isMenuCollapsed && 'none',\n }}\n >\n <ul className=\"lesson-nav-menu\">\n <LessonMenuItem\n onClick={() => setIsMenuCollapsed(!isMenuCollapsed)}\n to={lessonPath}\n translationKey=\"lesson.menu.description\"\n progressIconClass=\"half\"\n />\n {hasLessonPart(lessonOverviewParts, LESSON_PARTS.EXERCISE) && (\n <LessonMenuItem\n onClick={() => {\n if (isFinalTest) {\n dispatch(deleteLessonProgress(+lessonId));\n }\n setIsMenuCollapsed(!isMenuCollapsed);\n }}\n to={firstExercisePath}\n id=\"exercise-list\"\n translationKey=\"lesson.menu.exercises\"\n progressIconClass=\"full\"\n />\n )}\n {hasLessonPart(lessonOverviewParts, LESSON_PARTS.GRAMMAR) && (\n <LessonMenuItem\n onClick={() => setIsMenuCollapsed(!isMenuCollapsed)}\n to={getFirstGrammarUrl(lessonPath, firstGrammarId)}\n id=\"grammar\"\n translationKey=\"lesson.menu.grammar\"\n progressIconClass=\"none\"\n ariaLabel={grammarAria}\n rel=\"noopener noreferrer\"\n target=\"_blank\"\n />\n )}\n {hasLessonPart(lessonOverviewParts, LESSON_PARTS.PHONEMIC_CHART) && (\n <LessonMenuItem\n onClick={() => setIsMenuCollapsed(!isMenuCollapsed)}\n to={getAlphabeticalOrderUrl(lessonPath)}\n id=\"alphabetical-order\"\n translationKey=\"lesson.menu.alphabeticalOrder\"\n progressIconClass=\"full\"\n rel=\"noopener noreferrer\"\n target=\"_blank\"\n />\n )}\n {hasLessonPart(lessonOverviewParts, LESSON_PARTS.VOCABULARY_GLOSSARY) && (\n <LessonMenuItem\n onClick={() => setIsMenuCollapsed(!isMenuCollapsed)}\n to={getVocabularyUrl(lessonPath)}\n id=\"vocabulary\"\n translationKey=\"lesson.menu.vocabulary\"\n progressIconClass=\"full\"\n ariaLabel={vocabularyAria}\n rel=\"noopener noreferrer\"\n target=\"_blank\"\n />\n )}\n {hasLessonPart(lessonOverviewParts, LESSON_PARTS.REGIONAL_STUDIES) && (\n <LessonMenuItem\n onClick={() => setIsMenuCollapsed(!isMenuCollapsed)}\n to={getFirstRegionalStudiesUrl(lessonPath, firstRegionalStudiesId)}\n id=\"regional-studies\"\n translationKey=\"lesson.menu.regionalStudies\"\n progressIconClass=\"none\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n />\n )}\n {hasLessonPart(lessonOverviewParts, LESSON_PARTS.MANUSCRIPT) && (\n <LessonMenuItem\n onClick={() => setIsMenuCollapsed(!isMenuCollapsed)}\n to={getManuscriptUrl(lessonPath)}\n id=\"manuscript\"\n translationKey=\"lesson.menu.manuscript\"\n progressIconClass=\"none\"\n />\n )}\n {hasLessonPart(lessonOverviewParts, LESSON_PARTS.DOWNLOAD) && (\n <LessonMenuItem\n onClick={() => setIsMenuCollapsed(!isMenuCollapsed)}\n to={getExtrasUrl(lessonPath)}\n id=\"extras\"\n translationKey=\"lesson.menu.extras\"\n progressIconClass=\"none\"\n />\n )}\n {hasExercisesReset && (\n <>\n <LessonMenuItem\n onClick={() => {\n setIsMenuCollapsed(!isMenuCollapsed);\n setResetModalOpen(true);\n }}\n to=\"#\"\n id=\"reset\"\n translationKey=\"lesson.menu.reset\"\n />\n <ModalIntegration isOpen={isResetModalOpen}>\n <ResetModal\n fadeIn={isResetModalOpen}\n onConfirmClicked={onConfirmResetLessonProgress}\n onCancelClicked={onCancelResetLessonProgress}\n />\n </ModalIntegration>\n </>\n )}\n {courseId && !isFromPlacementCourse && (\n <LessonMenuItem\n onClick={() => setIsMenuCollapsed(!isMenuCollapsed)}\n to={getCourseUrl(courseId, langCode, normalizeUrlName(courseName))}\n id=\"course-overview\"\n translationKey=\"lesson.menu.courseOverview\"\n />\n )}\n {isFromPlacementCourse && (\n <LessonMenuItem\n onClick={() => setIsMenuCollapsed(!isMenuCollapsed)}\n to={getPlacementDashboardUrl(langCode)}\n id=\"placement-dashboard\"\n translationKey=\"lesson.menu.placementDashboard\"\n />\n )}\n </ul>\n </div>\n </div>\n </div>\n </StyledLessonMenu>\n );\n};\n\nexport const StyledLessonMenu = styled('nav')`\n display: grid;\n\n @media (min-width: ${resolutions.min.desktop}px) {\n margin-bottom: 20px;\n }\n\n .lesson-nav-layout-wrapper {\n background-color: ${colors.LG_ORANGE};\n position: relative;\n top: 0;\n width: 100%;\n z-index: 3;\n }\n\n .lesson-title-button-container-wrapper {\n display: grid;\n }\n\n .lesson-nav-menu-container-wrapper {\n position: absolute;\n width: 100%;\n }\n\n .lesson-nav-menu-wrapper {\n border-top: 1px solid ${colors.LG_WHITE};\n box-shadow: 1px 10px 20px 0 ${colors.LG_TRANSPARENT_BLACK_25};\n margin: 0;\n padding: 0;\n width: 100%;\n\n @media (min-width: ${resolutions.min.desktop}px) {\n box-shadow: none;\n }\n }\n\n .lesson-nav-menu {\n background-color: ${colors.LG_ORANGE};\n list-style-type: none;\n margin: 0;\n padding: 0;\n width: 100%;\n\n ${clearfix}\n\n @media (min-width: ${resolutions.min.desktop}px) {\n /* @noflip */\n float: right;\n width: 400px;\n }\n }\n`;\n","function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport * as React from \"react\";\n\nfunction SvgIconHintCircleOrange(_ref, svgRef) {\n var title = _ref.title,\n titleId = _ref.titleId,\n props = _objectWithoutProperties(_ref, [\"title\", \"titleId\"]);\n\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n width: \"18px\",\n height: \"18px\",\n viewBox: \"0 0 18 18\",\n xmlns: \"http://www.w3.org/2000/svg\",\n xmlnsXlink: \"http://www.w3.org/1999/xlink\",\n xmlSpace: \"preserve\",\n style: {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n strokeLinejoin: \"round\",\n strokeMiterlimit: 1.41421\n },\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M9,0C13.967,0 18,4.033 18,9C18,13.967 13.967,18 9,18C4.033,18 0,13.967 0,9C0,4.033 4.033,0 9,0ZM12.189,14.994L12.189,14.343L10.027,13.623L10.027,6.966C8.269,6.966 7.525,7.069 6.206,7.289L6.206,7.903C7.113,8.041 7.538,8.144 7.977,8.337L7.977,13.657C7.181,13.849 6.502,14.013 5.87,14.343L5.87,14.994L12.189,14.994ZM8.984,5.417C8.544,5.417 8.31,5.322 8.007,5.02C7.705,4.718 7.61,4.484 7.61,4.044C7.61,3.605 7.705,3.37 8.007,3.068C8.31,2.765 8.544,2.67 8.984,2.67C9.424,2.67 9.657,2.765 9.96,3.068C10.262,3.37 10.357,3.605 10.357,4.044C10.357,4.484 10.262,4.718 9.96,5.02C9.657,5.322 9.424,5.417 8.984,5.417Z\",\n style: {\n fill: \"#f08c00\"\n }\n }));\n}\n\nvar ForwardRef = /*#__PURE__*/React.forwardRef(SvgIconHintCircleOrange);\nexport default __webpack_public_path__ + \"static/media/icon-hint-circle-orange.764164ab.svg\";\nexport { ForwardRef as ReactComponent };","import { Link } from 'react-router-dom';\nimport gql from 'graphql-tag';\nimport { useDispatch } from 'react-redux';\nimport { I18nText } from '../../I18n/I18nText';\nimport { ReactComponent as IconHintCircleOrange } from '../../../assets/svg/icon-hint-circle-orange.svg';\nimport { Text } from '../../Text/Text';\nimport { useKnowledgePlaceholderReplacementEffect } from '../../Modal/KnowledgeModal/useKnowledgePlaceholderReplacementEffect';\nimport { deleteLessonProgress } from '../../../state/progress/learnProgressDuck';\n\nexport const lessonContentDescriptionFragment = gql`\n fragment LessonContentDescription on Lesson {\n id\n description\n learningTargetHeadline\n learningTargetDescription\n }\n`;\n\nexport const LessonContentDescription = ({\n content,\n firstExercisePath,\n isFinalTest,\n isHintHidden,\n}) => {\n const {\n id: lessonid,\n description,\n learningTargetHeadline,\n learningTargetDescription,\n knowledges,\n } = content;\n\n useKnowledgePlaceholderReplacementEffect({ knowledges });\n const dispatch = useDispatch();\n\n const deleteProgressIfFinalTest = () => {\n if (isFinalTest) {\n dispatch(deleteLessonProgress(lessonid));\n }\n };\n\n return (\n <div className=\"row\">\n <div className=\"col-xs-12\">\n <div className=\"main-info-content \">\n <div className=\"richtext-content-container override-strong\">\n <span className=\"description\">\n <Text\n dangerouslySetInnerHTML={{\n __html: description,\n }}\n />\n </span>\n </div>\n <div className=\"richtext-content-container override-strong\">\n <h2 className=\"learningTargetHeadline\">{learningTargetHeadline}</h2>\n <p />\n <Text\n dangerouslySetInnerHTML={{\n __html: learningTargetDescription,\n }}\n />\n <p />\n </div>\n </div>\n <div className=\"col-sm-offset-1 col-sm-10 col-lg-offset-2 col-lg-8\">\n <div className={`exercise-hint ${isHintHidden && 'hidden'}`}>\n <span className=\"hint \">\n <IconHintCircleOrange />\n </span>\n <I18nText translation=\"lesson.noexercise\" />\n </div>\n </div>\n <div className=\"start-lecture\">\n <div className=\"col-xs-12 col-md-4 col-md-offset-4\">\n <Link\n to={firstExercisePath}\n id=\"start-lesson\"\n className=\"btn main\"\n onClick={deleteProgressIfFinalTest}\n >\n <I18nText translation=\"lesson.start\" />\n </Link>\n </div>\n </div>\n </div>\n </div>\n );\n};\n","export const subtitlesLabels = Object.freeze({\n GERMAN: 'Deutsch/Deutsch',\n ENGLISH: 'English',\n RUSSIAN: 'Русский',\n CHINESE: '中文',\n PORTUGUESE_BRAZIL: 'Português',\n ALBANIAN: 'Shqip',\n AMHARIC: 'አማርኛ',\n ARABIC: 'عربي',\n BENGALI: 'বাংলা',\n BOSNIAN: 'Bosanski',\n BULGARIAN: 'Български',\n DARI: 'دری',\n FRENCH: 'Français',\n GREEK: 'Ελληνικά',\n HAUSA: 'Hausa',\n HINDI: 'हिन्दी',\n INDONESIAN: 'Bahasa Indonesia',\n KISWAHILI: 'Kiswahili',\n CROATIAN: 'Hrvatski',\n MACEDONIAN: 'Македонски',\n PASHTO: 'پښتو',\n PERSIAN: 'فارسی',\n POLISH: 'Polski',\n ROMANIAN: 'Română',\n SERBIAN: 'Srpski',\n SPANISH: 'Español',\n TURKISH: 'Türkçe',\n UKRANIAN: 'Українська мова',\n URDU: 'اردو',\n});\n","const hasVideoPlaceholdersInRichText = ({ text = '' }) =>\n /<video[^>]*video-js vjs-fluid[^>]*>/g.test(text);\nconst hasAudioPlaceholdersInRichText = ({ text = '' }) =>\n /<audio[^>]*video-js vjs-fluid[^>]*>/g.test(text);\n\nconst hasVideoPlayer = ({ __typename, text = '' }) =>\n __typename === 'Video' || hasVideoPlaceholdersInRichText({ text });\nconst hasAudioPlayer = ({ __typename, text = '' }) =>\n __typename === 'Audio' || hasAudioPlaceholdersInRichText({ text });\n\nexport const hasVideosOnly = content => hasVideoPlayer(content) && !hasAudioPlayer(content);\nexport const hasAudiosOnly = content => hasAudioPlayer(content) && !hasVideoPlayer(content);\n\nexport const hasPlayer = content => hasVideoPlayer(content) || hasAudioPlayer(content);\n","export const importVideoPlugins = async () =>\n Promise.all([\n import(/* webpackChunkName: 'playerPlugins-video' */ 'videojs-contrib-quality-levels'),\n import(/* webpackChunkName: 'playerPlugins-video' */ 'videojs-hls-quality-selector'),\n import(\n /* webpackChunkName: 'playerPlugins-video' */ 'videojs-hls-quality-selector/dist/videojs-hls-quality-selector.css'\n ),\n ]);\n","export const importAudioPlugins = async () =>\n Promise.all([\n import(/* webpackChunkName: 'playerPlugins-audio' */ 'videojs-seek-buttons'),\n import(\n /* webpackChunkName: 'playerPlugins-audio' */ 'videojs-seek-buttons/dist/videojs-seek-buttons.css'\n ),\n ]);\n","export const importVideoJs = async () => {\n const [videojsModule] = await Promise.all([\n import('video.js'),\n import('video.js/dist/video-js.min.css'),\n ]);\n return { videojs: videojsModule.default };\n};\n","import globals from '../utils/globals';\nimport { hasVideosOnly, hasAudiosOnly } from './videoTypeMatcher';\nimport { importVideoPlugins } from './videoPlugins';\nimport { importAudioPlugins } from './audioPlugins';\nimport { importVideoJs } from './videojs';\n\nconst commonOptions = {\n bigPlayButton: false,\n};\n\nconst videoOptions = {\n ...commonOptions,\n};\n\nconst audioOptions = {\n ...commonOptions,\n controlBar: {\n pictureInPictureToggle: false,\n fullscreenToggle: false,\n },\n playbackRates: [1, 1.3, 1.5],\n};\n\nexport const getOptions = videoNode => {\n if (videoNode.tagName === 'AUDIO') {\n return audioOptions;\n }\n if (videoNode.tagName === 'VIDEO') {\n return videoOptions;\n }\n return undefined;\n};\n\nconst importAllPlugins = async () => Promise.all([importVideoPlugins(), importAudioPlugins()]);\n\nconst importPlayerPlugins = async content => {\n if (hasVideosOnly(content)) {\n return importVideoPlugins();\n }\n if (hasAudiosOnly(content)) {\n return importAudioPlugins();\n }\n\n return importAllPlugins();\n};\n\nconst getPlayerWithPlugins = async content => {\n const { videojs } = await importVideoJs();\n await importPlayerPlugins(content);\n return videojs;\n};\n\nconst initAudio = player => {\n player.seekButtons({\n forward: 30,\n back: 10,\n });\n};\n\n// eslint-disable-next-line no-unused-vars\nconst initVideo = player => {\n player.hlsQualitySelector();\n};\n\nconst initPluginsForPlayer = player => {\n if (player.isAudio()) {\n initAudio(player);\n } else {\n initVideo(player);\n }\n};\n\nexport const loadVideoJsApi = async content => {\n const playerLib = await getPlayerWithPlugins(content);\n return {\n playerLib,\n document: globals.window.document,\n init: initPluginsForPlayer,\n };\n};\n","/* eslint-disable max-len */\nimport { useEffect } from 'react';\n\nimport { loadVideoJsApi, getOptions } from './api';\nimport { isServer } from '../utils/ssr';\n\nconst renderVideoJsPlayers = async ({ playerLib, document, init }) => {\n const { durationBarComponentName } = await import(\n /* webpackChunkName: 'player-custom' */ '../components/MediaInput/MediaInputVideo/CustomPlayerComponents/InfoBar/VjsDurationInfoBar'\n );\n // const { videoMediaTagComponentName } = await import(/* webpackChunkName: 'player-custom' */'./components/VjsMediaTag');\n const { videoPlayButtonComponentName } = await import(\n /* webpackChunkName: 'player-custom' */ '../components/MediaInput/MediaInputVideo/CustomPlayerComponents/PlayButton/VjsPlayButton'\n );\n\n const videoPlaceholderNodes = [...document.querySelectorAll('.video-js:not(.rendered)')];\n videoPlaceholderNodes.forEach(playerNode => {\n playerNode.classList.add('rendered');\n const player = playerLib(playerNode, getOptions(playerNode));\n\n player.addChild(durationBarComponentName);\n // player.addChild(videoMediaTagComponentName);\n player.addChild(videoPlayButtonComponentName);\n init(player);\n });\n};\n\nexport const useVideoPlayerEffect = content => {\n useEffect(() => {\n let didCancel = false; // eslint-disable-line fp/no-let\n\n async function convertVideoJsNodes() {\n const loadedApi = await loadVideoJsApi(content);\n if (!didCancel) {\n await renderVideoJsPlayers(loadedApi);\n }\n }\n\n if (!isServer()) {\n convertVideoJsNodes();\n }\n return () => {\n didCancel = true; // eslint-disable-line fp/no-mutation\n };\n }, [content]);\n};\n","import { useStaticInfoForGtm } from './useStaticInfoForGtm';\nimport { generateContentGtmInfo } from '../TrackingUtils';\nimport { useAddEmbeddingsToGtm } from './useAddEmbeddingsToGtm';\n\nexport const useMediaTracking = content => {\n const { level1Id, macaParam, pageUrl } = useStaticInfoForGtm();\n const contentDictionary = {\n [content.id]: generateContentGtmInfo({\n content,\n level1Id,\n macaParam,\n pageUrl,\n }),\n };\n\n useAddEmbeddingsToGtm({ dictionary: contentDictionary });\n};\n","import { useEffect } from 'react';\nimport { TrackingUtils } from '../TrackingUtils';\n\nconst eventName = 'addEmbeddings';\n\nexport const useAddEmbeddingsToGtm = ({ dictionary }) => {\n useEffect(() => {\n TrackingUtils.pushToGoogleTagManager({\n datalayerObj: {\n event: eventName,\n pageData: {\n embeddings: dictionary,\n },\n },\n });\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n};\n","import gql from 'graphql-tag';\nimport { subtitlesLabels } from '../../../utils/mappers/subtitlesLabel';\nimport { useVideoPlayerEffect } from '../../../video/useVideoPlayerEffect';\nimport { useMediaTracking } from '../../GoogleTagManager/hooks/useMediaTracking';\nimport { gtmDataLayerFragment } from '../../GoogleTagManager';\n\nexport const mediaInputVideoFragment = {\n name: 'MediaInputVideo',\n fragment({ type }) {\n return gql`fragment ${type}${this.name} on ${type} {\n videos {\n name\n contentDate\n language \n posterImageUrl\n hlsVideoSrc\n formattedDuration\n subtitles {\n trackId: targetId\n srcLanguage\n language\n subtitleUrl\n }\n ${gtmDataLayerFragment.partial()}\n }\n }\n `;\n },\n};\n\nexport const MediaInputVideo = ({ data }) => {\n useVideoPlayerEffect(data.content);\n useMediaTracking(data.content.videos[0]);\n const {\n type = 'application/x-mpegURL',\n subtitles,\n posterImageUrl,\n hlsVideoSrc,\n formattedDuration,\n } = data.content.videos[0];\n\n return (\n // eslint-disable-next-line jsx-a11y/media-has-caption\n <video\n className=\"video-js vjs-fluid\"\n preload=\"none\"\n controls\n poster={posterImageUrl}\n data-duration={formattedDuration}\n >\n <source src={hlsVideoSrc} {...{ type }} />\n {subtitles.map(subtitle => (\n <track\n default\n key={subtitle.trackId}\n src={subtitle.subtitleUrl}\n srcLang={subtitle.srcLanguage}\n label={subtitlesLabels[subtitle.language]}\n />\n ))}\n <p className=\"vjs-no-js\">\n To view this video please enable JavaScript, and consider upgrading to a web browser that{' '}\n <a\n href=\"https://videojs.com/html5-video-support/\"\n rel=\"noopener noreferrer\"\n target=\"_blank\"\n >\n supports HTML5 video\n </a>\n </p>\n </video>\n );\n};\n","import gql from 'graphql-tag';\nimport { DwPicture } from '../../DwPicture/DwPicture';\n\nexport const mediaInputImageFragment = {\n name: 'MediaInputImage',\n fragment({ type }) {\n return gql`fragment ${type}${this.name} on ${type} {\n mainContentImage {\n imageId: id\n imageName: name\n }\n }\n `;\n },\n};\n\nexport const MediaInputImage = ({ data }) => {\n const { imageId, imageName } = data.content.mainContentImage || {};\n\n return imageId ? <DwPicture imageId={imageId} alt={imageName} /> : null;\n};\n","/* eslint-disable jsx-a11y/media-has-caption */\nimport { useRef } from 'react';\nimport gql from 'graphql-tag';\nimport { DwPicture } from '../../DwPicture/DwPicture';\nimport { I18nText } from '../../I18n/I18nText';\nimport { useMediaTracking } from '../../GoogleTagManager/hooks/useMediaTracking';\nimport { gtmDataLayerFragment } from '../../GoogleTagManager';\n\nexport const mediaInputAudioFragment = {\n name: 'MediaInputAudio',\n fragment({ type }) {\n return gql`fragment ${type}${this.name} on ${type} {\n audios {\n id\n name\n contentDate\n mainContentImage {\n imageId: id\n imageName: name\n }\n mp3Src\n audioResourceLinks {\n url\n duration\n size\n }\n ${gtmDataLayerFragment.partial()}\n }\n }\n `;\n },\n};\n\nexport const MediaInputAudio = ({ data }) => {\n const audioRef = useRef();\n useMediaTracking(data.content.audios[0]);\n\n if (!data.content.audios[0]) return null;\n const { id, name, contentDate, mainContentImage, mp3Src } = data.content.audios[0];\n const { imageId, imageName } = mainContentImage || data.content.mainContentImage || {};\n const { duration, size } = data.content.audios[0].audioResourceLinks[0];\n\n const playAudio = e => {\n e.preventDefault();\n audioRef.current.play();\n };\n\n return (\n <div className=\"input-header-audio\">\n {/* eslint-disable-next-line jsx-a11y/click-events-have-key-events */}\n {imageId && (\n <a\n className=\"audio-trigger\"\n href=\"/#\"\n onClick={e => playAudio(e)}\n style={{ cursor: 'pointer' }}\n role=\"button\"\n tabIndex={0}\n >\n <DwPicture imageId={imageId} alt={imageName} />\n </a>\n )}\n <audio\n ref={audioRef}\n controls\n id={id}\n className=\"initialized\"\n xttype=\"audio\"\n xtrefresh=\"5\"\n xtstream=\"1\"\n xtlocation=\"ext\"\n xtmode=\"clip\"\n xtextension=\"17\"\n xtplayer={id}\n content-date={contentDate}\n xtrichname={name}\n xtduration={duration}\n xtsize={size}\n >\n <source src={mp3Src} />\n <I18nText translation=\"common.avplayer.playerNotSupported\" />\n </audio>\n </div>\n );\n};\n","/* eslint-disable no-nested-ternary */\nimport gql from 'graphql-tag';\nimport {\n MediaInputVideo,\n mediaInputVideoFragment,\n} from '../../MediaInput/MediaInputVideo/MediaInputVideo';\nimport {\n MediaInputImage,\n mediaInputImageFragment,\n} from '../../MediaInput/MediaInputImage/MediaInputImage';\nimport {\n MediaInputAudio,\n mediaInputAudioFragment,\n} from '../../MediaInput/MediaInputAudio/MediaInputAudio';\n\nexport const mediaInputChooserFragment = {\n name: 'MediaInputChooser',\n fragment({ type }) {\n return gql`fragment ${type}${this.name} on ${type} {\n ...${type}MediaInputImage\n ...${type}MediaInputAudio\n ...${type}MediaInputVideo\n }\n ${mediaInputImageFragment.fragment({ type })}\n ${mediaInputAudioFragment.fragment({ type })}\n ${mediaInputVideoFragment.fragment({ type })}\n `;\n },\n};\n\nexport const MediaInputChooser = ({ data }) => {\n const { videos, audios } = data.content;\n\n const lessonInput =\n videos.length > 0 ? (\n <MediaInputVideo data={data} />\n ) : audios.length > 0 ? (\n <MediaInputAudio data={data} />\n ) : data.content.mainContentImage ? (\n <div className=\"respHeaderImgContainer course-headline\">\n <MediaInputImage data={data} />\n </div>\n ) : null;\n\n return (\n <div className=\"row\">\n <div className=\"col-xs-12\">\n <div className=\"input-header-container\">{lessonInput}</div>\n </div>\n </div>\n );\n};\n","import { useParams } from 'react-router';\nimport gql from 'graphql-tag';\nimport {\n LessonContentDescription,\n lessonContentDescriptionFragment,\n} from '../LessonContentDescription/LessonContentDescription';\nimport {\n MediaInputChooser,\n mediaInputChooserFragment,\n} from '../MediaInputChooser/MediaInputChooser';\nimport { ImageOGMetaData } from '../../ImageOGMetaData/ImageOGMetaData';\nimport { knowledgesFragment } from '../LessonKnowledge/LessonKnowledge';\nimport { WithGraphQLQueryHandling } from '../../WithGraphQLQueryHandling/WithGraphQLQueryHandling';\nimport { metaDataFragment, PageMetaData } from '../../Page/PageMetaData';\nimport { PAGE_TYPES } from '../../../constants/pageTypes';\nimport {\n gtmDataLayerFragment,\n GtmScriptWithDataLayer,\n} from '../../GoogleTagManager/GtmScriptWithDataLayer';\n\nexport const lessonInformationQuery = gql`\n query LessonInformation($lessonId: Int!, $lang: Language!) {\n content(id: $lessonId, lang: $lang) {\n ... on Lesson {\n ...LessonMediaInputChooser\n ...LessonContentDescription\n ...LessonKnowledges\n ...${metaDataFragment.name}\n ${gtmDataLayerFragment.partial()}\n }\n }\n }\n ${mediaInputChooserFragment.fragment({ type: 'Lesson' })}\n ${lessonContentDescriptionFragment}\n ${knowledgesFragment.fragment({ type: 'Lesson' })}\n ${metaDataFragment.fragment({ type: 'Lesson' })}\n`;\n\nexport const LessonInformation = ({\n lessonLang,\n firstExercisePath,\n isFinalTest,\n courseName,\n isContentDescriptionHintVisible = false,\n ogImage,\n}) => {\n const { lessonId } = useParams();\n\n const lessonInformationQueryVariables = {\n lessonId: +lessonId,\n lang: lessonLang,\n };\n\n return (\n <WithGraphQLQueryHandling\n query={lessonInformationQuery}\n queryVariables={lessonInformationQueryVariables}\n >\n {data => (\n <>\n <PageMetaData\n pageType={PAGE_TYPES.LESSON}\n content={data.content}\n parentContentName={courseName}\n useOnlyCmsKeywords={true}\n useTeaserAsDescription={true}\n />\n <ImageOGMetaData image={ogImage} />\n <GtmScriptWithDataLayer content={data.content} />\n <MediaInputChooser data={data} />\n <LessonContentDescription\n content={data.content}\n firstExercisePath={firstExercisePath}\n isFinalTest={isFinalTest}\n isHintHidden={!isContentDescriptionHintVisible}\n />\n </>\n )}\n </WithGraphQLQueryHandling>\n );\n};\n","import { createContext, useContext, useReducer } from 'react';\nimport { createInquiryProgressMetaData } from '../../../../state/progress/learnProgress';\n\n// Actions\nexport const EXERCISE_PROGRESS_ACTION_TYPES = Object.freeze({\n ADD_DONE_INQUIRY: 'ADD_DONE_INQUIRY',\n RESET: 'RESET',\n});\n\n// Reducer\nconst exerciseProgressReducer = (state, action) => {\n switch (action.type) {\n case EXERCISE_PROGRESS_ACTION_TYPES.ADD_DONE_INQUIRY:\n return {\n ...state,\n inquiryProgresses: [\n ...state.inquiryProgresses,\n createInquiryProgressMetaData({\n inquiryId: action.inquiryId,\n score: action.score,\n achievableScore: action.achievableScore,\n }),\n ],\n numberOfDoneInquiries: state.numberOfDoneInquiries + 1,\n currentExerciseScore: state.currentExerciseScore + action.score,\n };\n case EXERCISE_PROGRESS_ACTION_TYPES.RESET:\n return initialState;\n default:\n // eslint-disable-next-line fp/no-throw\n throw new Error('unexpected action type');\n }\n};\n\nconst initialState = {\n inquiryProgresses: [],\n numberOfDoneInquiries: 0,\n currentExerciseScore: 0,\n};\n\nexport const ExerciseProgressContext = createContext(null);\n\nexport const ExerciseProgressProvider = ({ isFromPlacementCourse, children }) => {\n const [exerciseStats, dispatch] = useReducer(exerciseProgressReducer, initialState);\n\n return (\n <ExerciseProgressContext.Provider\n value={[\n {\n ...exerciseStats,\n isFromPlacementCourse,\n },\n dispatch,\n ]}\n >\n {children}\n </ExerciseProgressContext.Provider>\n );\n};\n\n// usage hook with \"action creators\"\nexport const useExerciseProgress = () => {\n const [exerciseProgress, dispatch] = useContext(ExerciseProgressContext);\n\n const addDoneInquiry = ({ inquiryId, score, achievableScore }) => {\n dispatch({\n type: EXERCISE_PROGRESS_ACTION_TYPES.ADD_DONE_INQUIRY,\n inquiryId,\n score,\n achievableScore,\n });\n };\n\n const resetProgress = () => {\n dispatch({ type: EXERCISE_PROGRESS_ACTION_TYPES.RESET });\n };\n\n return { exerciseProgress, addDoneInquiry, resetProgress };\n};\n","import { useParams } from 'react-router';\nimport { I18nText } from '../../../I18n/I18nText';\nimport { useExerciseProgress } from '../workflow/ExerciseProgress';\nimport { isRtlByLangCode } from '../../../../utils/mappers/rtlLanguages';\n\nconst outOfText = <I18nText id=\"outOf\" className=\"darkgray\" translation=\"exercise.outOf\" />;\nconst numberOfPointsEarnedText = (\n <I18nText\n id=\"number-of-points-earned-text\"\n className=\"darkgray\"\n translation=\"exercise.pointsEarned\"\n />\n);\nconst numberOfExercisesSolvedText = (\n <I18nText\n id=\"number-of-exercises-solved-text\"\n className=\"darkgray\"\n translation=\"exercise.exercisesResolved\"\n />\n);\n\nexport const LessonExerciseStats = ({ amountOfInquiries }) => {\n const { exerciseProgress } = useExerciseProgress();\n const { langCode } = useParams();\n const isRtlLang = isRtlByLangCode(langCode);\n\n const numberOfDoneInquiriesSpan = (\n <span id=\"number-of-solved\">{exerciseProgress.numberOfDoneInquiries}</span>\n );\n const amountOfInquiriesSpan = <span id=\"number-of-all-inquiries\">{amountOfInquiries}</span>;\n const scoreSpan = (\n <span id=\"number-of-points-earned\">{exerciseProgress.currentExerciseScore}</span>\n );\n\n const ltrStats = (\n <>\n {numberOfDoneInquiriesSpan}\n \n {outOfText}\n \n {amountOfInquiriesSpan}\n \n {numberOfExercisesSolvedText}. \n {scoreSpan}\n \n {numberOfPointsEarnedText}.\n </>\n );\n\n const rtlStats = (\n <>\n {numberOfDoneInquiriesSpan}\n \n {outOfText}\n \n {numberOfExercisesSolvedText}\n \n {amountOfInquiriesSpan}\n \n {numberOfPointsEarnedText}\n \n {scoreSpan}\n </>\n );\n\n return (\n <div className=\"col-sm-offset-1 col-sm-10 col-lg-offset-2 col-lg-8\">\n <p className=\"exerciseStats\">{isRtlLang ? rtlStats : ltrStats}</p>\n </div>\n );\n};\n","import classnames from 'classnames';\nimport { I18nText } from '../../I18n/I18nText';\n\nexport const ContentNavTitle = ({ title, top, bottom }) => (\n <div className=\"row noVMargins\">\n <div className=\"col-sm-offset-1 col-sm-10 col-lg-offset-2 col-lg-8\">\n <div\n className={classnames('exercise-nav', {\n top,\n bottom,\n })}\n >\n <I18nText\n isA=\"div\"\n className=\"exercise-nav-title\"\n style={{ direction: 'ltr' }}\n translation={title}\n />\n </div>\n </div>\n </div>\n);\n","import gql from 'graphql-tag';\nimport { ContentHeadline } from '../../../ContentContainer/ContentHeadline/ContentHeadline';\n\nexport const lessonExerciseHeadlineFragment = {\n name: 'LessonExerciseHeadline',\n fragment() {\n return gql`fragment ${this.name} on Exercise {\n name\n description\n }\n `;\n },\n};\n\nexport const LessonExerciseHeadline = ({ data }) => {\n const { name, description } = data.content;\n return (\n <ContentHeadline>\n <h2 dir=\"auto\">{name}</h2>\n <div\n dir=\"auto\"\n dangerouslySetInnerHTML={{\n __html: description,\n }}\n />\n </ContentHeadline>\n );\n};\n","/* eslint-disable jsx-a11y/media-has-caption */\nimport { forwardRef } from 'react';\n\nexport const LessonExerciseHiddenAudio = forwardRef(({ src }, ref) => (\n <div className=\"exercise-audio-feedback\">\n <audio\n className=\"exercise-audio-file feedback-audio initialized\"\n tabIndex=\"-1\"\n width=\"100%\"\n preload=\"none\"\n ref={ref}\n >\n <source src={src} type=\"audio/MP3\" />\n </audio>\n </div>\n));\n","import { forwardRef } from 'react';\nimport { LessonExerciseHiddenAudio } from './LessonExerciseHiddenAudio';\n\nexport const LessonExerciseSoundFailureHiddenAudio = forwardRef((_, ref) => (\n <LessonExerciseHiddenAudio ref={ref} src=\"/assets/audio/signal_sound_failure.mp3\" />\n));\n","import { forwardRef } from 'react';\nimport { LessonExerciseHiddenAudio } from './LessonExerciseHiddenAudio';\n\nexport const LessonExerciseSoundSuccessHiddenAudio = forwardRef((_, ref) => (\n <LessonExerciseHiddenAudio ref={ref} src=\"/assets/audio/signal_sound_success.mp3\" />\n));\n","import { createContext, useRef, useState } from 'react';\nimport { LessonExerciseSoundFailureHiddenAudio } from '../components/Lesson/LessonExercise/LessonExerciseHiddenAudio/LessonExerciseSoundFailureHiddenAudio';\nimport { LessonExerciseSoundSuccessHiddenAudio } from '../components/Lesson/LessonExercise/LessonExerciseHiddenAudio/LessonExerciseSoundSuccessHiddenAudio';\n\nexport const AudioContext = createContext([{}, () => {}, {}, {}]);\n\nexport const AudioProvider = props => {\n const [questionAudiosRefArray, setQuestionAudiosRefArray] = useState([]);\n const wrongAnswerAudioRef = useRef();\n const correctAnswerAudioRef = useRef();\n\n return (\n <AudioContext.Provider\n value={[\n questionAudiosRefArray,\n setQuestionAudiosRefArray,\n wrongAnswerAudioRef,\n correctAnswerAudioRef,\n ]}\n >\n <LessonExerciseSoundFailureHiddenAudio ref={wrongAnswerAudioRef} />\n <LessonExerciseSoundSuccessHiddenAudio ref={correctAnswerAudioRef} />\n {props.children}\n </AudioContext.Provider>\n );\n};\n","import { RichText } from '../../../RichText/RichText';\n\nexport const LessonExerciseTextInput = ({ inputText }) =>\n inputText && (\n <div className=\"headline-container row\">\n <div className=\"col-sm-offset-1 col-sm-10 col-lg-offset-2 col-lg-8\">\n <div className=\"exercise-headline\">\n <RichText content={inputText} />\n </div>\n </div>\n </div>\n );\n","import { useContext } from 'react';\nimport { AudioContext } from '../context/AudioContext';\n\nexport const useAudio = () => {\n const [\n audiosRefArray,\n setAudiosRefArray,\n wrongAnswerAudioRef,\n correctAnswerAudioRef,\n ] = useContext(AudioContext);\n\n const stopOtherAudios = index => {\n const currentAudio = audiosRefArray[index];\n audiosRefArray.forEach(audio => {\n if (audio !== currentAudio) {\n audio.current.pause();\n // eslint-disable-next-line fp/no-mutation,no-param-reassign\n audio.current.currentTime = 0;\n }\n });\n };\n const playAudio = (e, ref) => {\n e.preventDefault();\n const index = audiosRefArray.indexOf(ref);\n stopOtherAudios(index);\n audiosRefArray[index].current.play();\n };\n\n const addRef = ref => {\n // eslint-disable-next-line fp/no-mutating-methods\n audiosRefArray.push(ref);\n setAudiosRefArray(audiosRefArray);\n };\n\n const playWrongDefaultAudioFeedBack = () => {\n wrongAnswerAudioRef.current.play();\n };\n\n const playCorrectDefaultAudioFeedBack = () => {\n correctAnswerAudioRef.current.play();\n };\n\n return {\n playAudio,\n addRef,\n playWrongDefaultAudioFeedBack,\n playCorrectDefaultAudioFeedBack,\n };\n};\n","/* eslint-disable jsx-a11y/role-supports-aria-props */\nimport { useEffect, useRef, useState } from 'react';\nimport { createGlobalStyle } from 'styled-components';\nimport { useAudio } from '../../../../../hooks/useAudio';\nimport { useTranslation } from '../../../../../hooks/useTranslation';\nimport { useFrontendConfig } from '../../../../../hooks/useFrontendConfig';\n\nconst LessonExerciseQuestionAudioGlobalStyles = createGlobalStyle` \n /* @noflip */\n .alwaysLtr {\n text-align: left;\n direction: ltr;\n }\n`;\n\nexport const LessonExerciseQuestionAudio = ({ audio, inquiryText }) => {\n const [isPlaying, setIsPlaying] = useState(false);\n const [hasEnded, setHasEnded] = useState(false);\n\n const playAudioLabel = useTranslation('exercise.playAudio');\n const { target: answerAudio } = audio || {};\n const { mp3Src: audioUrl, mainContentImage } = answerAudio || {};\n\n const audioRef = useRef();\n const { addRef, playAudio } = useAudio();\n\n const { imageBasePath } = useFrontendConfig();\n\n useEffect(() => {\n addRef(audioRef);\n }, [addRef]);\n\n const handleOnPlaying = () => {\n setIsPlaying(true);\n };\n\n const handleOnEnded = () => {\n setIsPlaying(false);\n setHasEnded(true);\n };\n\n const handleOnPaused = () => {\n setIsPlaying(false);\n };\n\n const getBubbleAudioLabel = () => {\n if (isPlaying) return 'playing';\n\n if (hasEnded) return 'ending';\n\n return '';\n };\n\n const audioLabel = inquiryText || playAudioLabel;\n return (\n <>\n <a\n href=\"#!\"\n className={`bubble audio ${getBubbleAudioLabel()} alwaysLtr`}\n aria-label={`Audio - ${audioLabel}`}\n onClick={e => playAudio(e, audioRef)}\n >\n <LessonExerciseQuestionAudioGlobalStyles />\n {/* eslint-disable-next-line jsx-a11y/media-has-caption */}\n <audio\n className={`exercise-audio-file initialized${isPlaying ? ' playing-now' : ''}`}\n tabIndex=\"0\"\n width=\"100%\"\n preload=\"none\"\n onPlaying={handleOnPlaying}\n onEnded={handleOnEnded}\n onPause={handleOnPaused}\n ref={audioRef}\n >\n <source src={audioUrl} type=\"audio/MP3\" />\n </audio>\n <div className=\"bubble-text-audio\">{audioLabel}</div>\n <div className=\"exercise-play-audio\" />\n </a>\n {mainContentImage && (\n <div className=\"bubble-image-container\">\n <img\n className=\"img-responsive\"\n src={`${imageBasePath}/${mainContentImage.imageId}_501.jpg`}\n alt={mainContentImage.imageName}\n />\n </div>\n )}\n </>\n );\n};\n","import { createGlobalStyle } from 'styled-components';\n\nexport const LessonExerciseQuestionTextGlobalStyles = createGlobalStyle` \n /* @noflip */\n .alwaysLtr {\n text-align: left;\n direction: ltr;\n }\n`;\n\nexport const LessonExerciseQuestionText = ({ inquiryText }) => (\n <>\n <LessonExerciseQuestionTextGlobalStyles />\n <div className=\"bubble text alwaysLtr\">{inquiryText}</div>\n </>\n);\n","import { LessonExerciseQuestionText } from './LessonExerciseQuestionText';\nimport { useFrontendConfig } from '../../../../../hooks/useFrontendConfig';\n\nexport const LessonExerciseQuestionImage = ({ inquiryText, mainContentImage }) => {\n const { id, name } = mainContentImage;\n const { imageBasePath } = useFrontendConfig();\n return (\n <>\n <LessonExerciseQuestionText inquiryText={inquiryText} />\n <div className=\"bubble-image-container\">\n <img className=\"img-responsive\" src={`${imageBasePath}/${id}_501.jpg`} alt={name} />\n </div>\n </>\n );\n};\n","import { LessonExerciseQuestionText } from './LessonExerciseQuestionText';\nimport { MediaInputVideo } from '../../../../MediaInput/MediaInputVideo/MediaInputVideo';\n\nexport const LessonExerciseQuestionVideo = ({ inquiryText, videos }) => (\n <>\n <LessonExerciseQuestionText inquiryText={inquiryText} />\n <div className=\"bubble-image-container\">\n <MediaInputVideo data={{ content: { videos } }} />\n </div>\n </>\n);\n","export const findQuestionAudio = audios => audios.find(audio => audio.mainContent);\n\nexport const findFeedbackAudio = (isSolutionAudioFallbackMode, audios) => {\n const feedbackAudio = audios.find(audio => !audio.mainContent);\n return feedbackAudio || (isSolutionAudioFallbackMode ? findQuestionAudio(audios) : undefined);\n};\n","export const QUESTION_TYPES = Object.freeze({\n TEXT: 'TEXT',\n IMAGE: 'IMAGE',\n AUDIO: 'AUDIO',\n VIDEO: 'VIDEO',\n});\n","import gql from 'graphql-tag';\nimport { LessonExerciseQuestionAudio } from './QuestionTypes/LessonExerciseQuestionAudio';\nimport { LessonExerciseQuestionImage } from './QuestionTypes/LessonExerciseQuestionImage';\nimport { LessonExerciseQuestionText } from './QuestionTypes/LessonExerciseQuestionText';\nimport { LessonExerciseQuestionVideo } from './QuestionTypes/LessonExerciseQuestionVideo';\nimport { findQuestionAudio } from '../../../../utils/audioUtils';\nimport { QUESTION_TYPES } from './QuestionTypes/questionTypes';\nimport { mediaInputVideoFragment } from '../../../MediaInput/MediaInputVideo/MediaInputVideo';\n\nexport const lessonExerciseQuestionFragment = {\n name: 'LessonExerciseQuestion',\n fragment() {\n return gql`fragment ${this.name} on Inquiry {\n inquiryText\n mainContentImage {\n id\n name\n }\n audios: contentLinks(targetTypes: [AUDIO]) {\n id\n mainContent\n target {\n ...on Audio {\n mp3Src\n mainContentImage {\n imageId: id\n imageName: name\n }\n }\n }\n }\n ...Inquiry${mediaInputVideoFragment.name}\n } \n ${mediaInputVideoFragment.fragment({ type: 'Inquiry' })}\n `;\n },\n};\n\nexport const exerciseQuestionTypeSelector = ({ inquiry }) => {\n const { videos, audios, mainContentImage } = inquiry;\n if (mainContentImage) {\n return QUESTION_TYPES.IMAGE;\n }\n if (videos.length > 0) {\n return QUESTION_TYPES.VIDEO;\n }\n if (findQuestionAudio(audios)) {\n return QUESTION_TYPES.AUDIO;\n }\n return QUESTION_TYPES.TEXT;\n};\n\nexport const LessonExerciseQuestion = ({ inquiry, useSubInquiryTextAsLabel = false }) => {\n const { inquiryText, videos, audios, mainContentImage, subInquiries } = inquiry;\n const questionType = exerciseQuestionTypeSelector({ inquiry });\n\n const getLabelText = () => {\n if (inquiryText) return inquiryText;\n if (subInquiries && useSubInquiryTextAsLabel) return subInquiries[0].subInquiryText;\n return '';\n };\n\n const labelText = getLabelText(inquiryText, subInquiries);\n const questionAudio = findQuestionAudio(audios);\n\n switch (questionType) {\n case QUESTION_TYPES.IMAGE:\n return <LessonExerciseQuestionImage {...{ inquiryText, mainContentImage }} />;\n case QUESTION_TYPES.VIDEO:\n return <LessonExerciseQuestionVideo {...{ inquiryText, videos }} />;\n case QUESTION_TYPES.AUDIO:\n return <LessonExerciseQuestionAudio audio={questionAudio} inquiryText={labelText} />;\n case QUESTION_TYPES.TEXT:\n return <LessonExerciseQuestionText inquiryText={labelText} />;\n default:\n return null;\n }\n};\n","import styled from 'styled-components';\nimport { colors } from '../../utils/css';\nimport { Text } from '../Text/Text';\n\n// eslint-disable-next-line no-unused-vars\nconst ButtonTemplate = ({ className, btnClass, children, disabled, fullWidth, ...restProps }) => (\n <div className={className}>\n <button className={btnClass} disabled={disabled} aria-disabled={disabled} {...restProps}>\n <Text>{children}</Text>\n </button>\n </div>\n);\nexport const StyledButtonTemplate = styled(ButtonTemplate)`\n width: ${props => (props.fullWidth ? '100%' : '40%')};\n\n button {\n border-radius: 25px;\n width: 100%;\n height: 38px;\n background: ${colors.LG_WHITE};\n color: ${colors.LG_BLUE_1};\n border: 1px solid ${colors.LG_BLUE_1};\n transition: 0.2s;\n outline: none;\n }\n`;\n","import styled from 'styled-components';\nimport { StyledButtonTemplate } from './ButtonTemplate';\nimport { colors } from '../../utils/css';\n\nexport const SolveButton = ({ className, isDisabled, handleClick, fullWidth, children }) => (\n <StyledButtonTemplate\n className={className}\n btnClass={`solve-button-${isDisabled ? 'gray' : 'blue'}`}\n disabled={isDisabled}\n onClick={handleClick}\n fullWidth={fullWidth}\n >\n {children}\n </StyledButtonTemplate>\n);\n\nconst grayActiveFocus = `\n background: ${colors.LG_WHITE};\n color: ${colors.LG_GRAY_1};\n border: 1px solid ${colors.LG_GRAY_1};\n opacity: 0.65;\n`;\n\nexport const StyledSolveButton = styled(SolveButton)`\n .solve-button-gray {\n ${grayActiveFocus}\n }\n\n button.solve-button-blue {\n &:hover {\n background: ${props => (props.fullWidth ? colors.DW_LIGHT_BLUE : colors.LG_GRAY_10)};\n color: ${colors.LG_WHITE};\n border: 1px solid ${props => (props.fullWidth ? colors.DW_LIGHT_BLUE : colors.LG_GRAY_1)};\n }\n\n &:active,\n &:focus {\n ${grayActiveFocus}\n }\n }\n`;\n","import styled from 'styled-components';\nimport { StyledButtonTemplate } from './ButtonTemplate';\nimport { colors } from '../../utils/css';\n\nexport const CheckButton = ({ className, handleClick, isDisabled, children }) => (\n <StyledButtonTemplate\n className={className}\n btnClass={`check-button-${isDisabled ? 'gray' : 'blue'}`}\n disabled={isDisabled}\n onClick={handleClick}\n >\n {children}\n </StyledButtonTemplate>\n);\n\nexport const StyledCheckButton = styled(CheckButton)`\n .check-button-blue {\n &:hover {\n color: ${colors.LG_WHITE};\n background: ${colors.LG_BLUE_1};\n }\n }\n\n .check-button-gray {\n background: ${colors.LG_WHITE};\n color: ${colors.LG_GRAY_1};\n border-color: ${colors.LG_GRAY_1};\n opacity: 0.65;\n }\n`;\n","import styled from 'styled-components';\nimport { StyledSolveButton } from './SolveButton';\nimport { StyledCheckButton } from './CheckButton';\nimport { I18nText } from '../I18n/I18nText';\nimport { resolutions } from '../../utils/css';\n\nexport const SolveCheckButton = ({\n className,\n isSolveButtonDisabled,\n isCheckButtonDisabled,\n handleSolveClicked,\n handleCheckClicked,\n}) => (\n <div className={className}>\n <StyledSolveButton handleClick={handleSolveClicked} isDisabled={isSolveButtonDisabled}>\n <I18nText translation=\"exercise.resolve\" />\n </StyledSolveButton>\n <StyledCheckButton handleClick={handleCheckClicked} isDisabled={isCheckButtonDisabled}>\n <I18nText translation=\"exercise.check\" />\n </StyledCheckButton>\n </div>\n);\n\nexport const StyledSolveCheckButton = styled(SolveCheckButton)`\n /* @noflip */\n direction: ltr;\n display: flex;\n margin: auto;\n justify-content: space-between;\n padding: 20px 0;\n margin-bottom: 50px;\n width: 770px;\n > * {\n width: 376px;\n }\n\n @media (max-width: ${resolutions.max.tablet}px) {\n width: 79.825%;\n padding: 20px 20px;\n > * {\n width: 48%;\n }\n }\n\n @media (max-width: ${resolutions.max.mobile}px) {\n width: 97%;\n }\n`;\n","export const placeholderConfig = [\n { placeholder: '#p#', size: 'medium', maxLength: 15 },\n { placeholder: '#ps#', size: 'small', maxLength: 7 },\n { placeholder: '#pm#', size: 'medium', maxLength: 15 },\n { placeholder: '#pl#', size: 'full', maxLength: null },\n];\n\nexport const createSingleSentenceAnswerContent = (subInquiries, arrayJoinString) => {\n const sentences = subInquiries.map(subInquiry => subInquiry.subInquiryText);\n return sentences.join(arrayJoinString);\n};\n\nexport const cleanupAndAddPlaceholderComponents = answertext => {\n // eslint-disable-next-line fp/no-let\n let answerWithReplacePlaceholders = answertext;\n\n const replaceInString = config => {\n // eslint-disable-next-line fp/no-mutation\n answerWithReplacePlaceholders = answerWithReplacePlaceholders.replace(\n new RegExp(config.placeholder, 'g'),\n `<span class=\"placeholder-cloze\">${config.size}</span>`,\n );\n };\n\n placeholderConfig.forEach(replaceInString);\n return answerWithReplacePlaceholders;\n};\n","export const INQUIRY_STATE = Object.freeze({\n INITIAL: 'INITIAL',\n WRONG: 'WRONG',\n CORRECT: 'CORRECT',\n SOLVED: 'SOLVED',\n});\n","/* eslint-disable jsx-a11y/anchor-is-valid,jsx-a11y/aria-role,comma-dangle */\nimport { useState } from 'react';\nimport classnames from 'classnames';\nimport { INQUIRY_STATE } from '../workflow/inquiryState';\n\nexport const ClozePulldown = ({\n index,\n pulldownData,\n inquiryState,\n checkEntry,\n onHandleItemSelected,\n isDisabled,\n}) => {\n const [isToggled, setIsToggled] = useState(false);\n const getInputClassName = () => {\n switch (inquiryState) {\n case INQUIRY_STATE.CORRECT:\n case INQUIRY_STATE.WRONG:\n return checkEntry(pulldownData) ? 'correct-input' : 'wrong-input';\n case INQUIRY_STATE.SOLVED:\n return 'solved-input';\n default:\n return '';\n }\n };\n\n const onPulldownClicked = () => {\n if (!isDisabled) {\n setIsToggled(!isToggled);\n }\n };\n\n return (\n <div\n key={pulldownData.id}\n className={classnames(\n `btn-group answer-select-dropdown-container placeholder-cloze cloze-${pulldownData.id}`,\n isToggled ? 'open' : '',\n inquiryState !== INQUIRY_STATE.INITIAL ? 'solved-input' : '',\n )}\n >\n <button\n type=\"button\"\n className={classnames(\n 'btn btn-default dropdown-toggle',\n getInputClassName(),\n isDisabled ? 'disabled' : '',\n )}\n data-toggle=\"dropdown\"\n aria-haspopup=\"true\"\n aria-expanded={isToggled}\n onClick={onPulldownClicked}\n >\n {pulldownData.selectedValue}{' '}\n {pulldownData.selectedValue === '...' ? <span className=\"caret\" /> : null}\n </button>\n <ul className=\"dropdown-menu\">\n {pulldownData.alternatives.map((alternative, altIndex) => (\n <li key={alternative.id}>\n <a\n className=\"answer-select-dropdown\"\n href=\"#\"\n data-answer-select={alternative.id}\n data-exercise-answer-id={alternative.id}\n data-index={altIndex}\n onClick={e => {\n onHandleItemSelected(e, index, alternative.alternativeText);\n setIsToggled(false);\n }}\n >\n {alternative.alternativeText}\n </a>\n </li>\n ))}\n </ul>\n </div>\n );\n};\n","import globals from '../../../../utils/globals';\nimport { replacePlaceholderWithAnswerComponent } from '../../../../utils/replacers/exerciseReplacer';\nimport { useTimeout } from '../../../../hooks/useTimeout';\n\nexport const usePlaceholderReplacementEffect = ({\n selector,\n createComponent,\n trigger = 'staticTrigger',\n scopeClassName,\n node,\n}) => {\n useTimeout(\n {\n callback: () => {\n replacePlaceholderWithAnswerComponent({\n selector,\n createComponent,\n scopeClassName,\n node: node ? node.current : globals.window.document,\n });\n },\n delay: 10,\n },\n [trigger],\n );\n};\n","import { replaceWithComponent } from './replaceCommons';\n\nexport const replacePlaceholderWithAnswerComponent = ({\n selector,\n createComponent,\n scopeClassName,\n node,\n}) => {\n replaceWithComponent({\n selector: scopeClassName\n ? `.${scopeClassName} ${selector || '.placeholder-cloze'}`\n : selector || '.placeholder-cloze',\n node,\n componentFn: (matchedElem, index) => createComponent(index, matchedElem),\n });\n};\n","import { usePlaceholderReplacementEffect } from './usePlaceholderReplacementEffect';\nimport { Text } from '../../../Text/Text';\n\nexport const ExerciseRichText = ({\n content,\n createComponent,\n trigger,\n scopeClassName,\n className,\n isA = 'div',\n update = false,\n node,\n}) => {\n usePlaceholderReplacementEffect({ createComponent, trigger, scopeClassName, node });\n return (\n <Text\n {...{ isA, className }}\n key={update ? trigger : null}\n dangerouslySetInnerHTML={{\n __html: content,\n }}\n />\n );\n};\n","import { useState, useEffect, useRef } from 'react';\nimport classnames from 'classnames';\nimport styled from 'styled-components';\nimport {\n cleanupAndAddPlaceholderComponents,\n createSingleSentenceAnswerContent,\n} from '../clozeExerciseUtils';\nimport { INQUIRY_STATE } from '../../workflow/inquiryState';\nimport { ClozePulldown } from '../ClozePulldown';\nimport { ExerciseRichText } from '../ExerciseRichText';\n\nexport const PulldownAnswer = ({ className, inquiry, onChange, inquiryState, isDisabled }) => {\n const { subInquiries, clozeLayoutType } = inquiry;\n const initialClozePulldownData = subInquiries.map(subInquiry => {\n return {\n ...subInquiry,\n selectedValue: '...',\n };\n });\n\n const checkEntry = entry =>\n entry.alternatives.some(\n alternative => entry.selectedValue === alternative.alternativeText && alternative.isCorrect,\n );\n const checkAnswer = () => clozePulldownData.filter(data => checkEntry(data)).length;\n\n const [clozePulldownData, setClozePulldownData] = useState(initialClozePulldownData);\n const node = useRef(null);\n\n const onHandleItemSelected = (e, index, answer) => {\n e.preventDefault();\n const newClozeData = [...clozePulldownData];\n // eslint-disable-next-line fp/no-mutation\n newClozeData[index].selectedValue = answer;\n setClozePulldownData(newClozeData);\n onChange(checkAnswer());\n };\n\n useEffect(() => {\n if (inquiryState === INQUIRY_STATE.SOLVED) {\n setClozePulldownData(pulldownData => {\n const newClozeData = [...pulldownData];\n pulldownData.forEach((value, index) => {\n // eslint-disable-next-line fp/no-mutation\n newClozeData[index].selectedValue = value.alternatives.find(\n alternative => alternative.isCorrect,\n ).alternativeText;\n });\n return newClozeData;\n });\n }\n }, [inquiryState]);\n\n const createPulldown = index => (\n <ClozePulldown\n {...{\n index,\n pulldownData: clozePulldownData[index],\n inquiryState,\n isDisabled,\n checkEntry,\n onHandleItemSelected,\n }}\n />\n );\n\n const partialComponent = (inline = false) => answerContent => (\n <div\n ref={node}\n className={classnames(\n className,\n 'exercise-cloze-text-big',\n inline ? 'dropwdowns-inline' : '',\n )}\n >\n <ExerciseRichText\n content={answerContent}\n createComponent={createPulldown}\n className=\"form-group\"\n trigger={inquiryState}\n isA=\"div\"\n update={true}\n node={node}\n />\n </div>\n );\n\n const clozeLayoutTypeConfig = {\n CONTINUOUS_TEXT: {\n cmp: partialComponent(true),\n answerContent: () => cleanupAndAddPlaceholderComponents(inquiry.text),\n },\n SINGLE_SENTENCE: {\n cmp: partialComponent(false),\n answerContent: () =>\n cleanupAndAddPlaceholderComponents(\n createSingleSentenceAnswerContent(subInquiries, '<p></p>'),\n ),\n },\n };\n\n const selectedClozeLayoutConfig = clozeLayoutTypeConfig[clozeLayoutType];\n\n if (selectedClozeLayoutConfig == null) {\n return null;\n }\n\n return selectedClozeLayoutConfig.cmp(selectedClozeLayoutConfig.answerContent());\n};\n\nexport const StyledPulldownAnswer = styled(PulldownAnswer)`\n &.exercise-cloze-text-big div.form-group p {\n display: block;\n }\n\n /* @noflip */\n text-align: left;\n /* @noflip */\n direction: ltr;\n`;\n","function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport * as React from \"react\";\n\nfunction SvgIconHint(_ref, svgRef) {\n var title = _ref.title,\n titleId = _ref.titleId,\n props = _objectWithoutProperties(_ref, [\"title\", \"titleId\"]);\n\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n width: \"10px\",\n height: \"18px\",\n viewBox: \"0 0 10 18\",\n xmlns: \"http://www.w3.org/2000/svg\",\n xmlnsXlink: \"http://www.w3.org/1999/xlink\",\n style: {\n fillRule: \"evenodd\"\n },\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M369.101562,1457.80899 L369.101562,1456.85041 C369.918135,1456.42437 370.841202,1456.08709 371.870793,1455.83857 L371.870793,1448.22319 C371.302743,1447.97467 370.432929,1447.76165 369.261326,1447.58413 L369.261326,1446.67881 C370.965476,1446.39478 372.953622,1446.25277 375.225823,1446.25277 L375.225823,1455.83857 L378.101562,1456.85041 L378.101562,1457.80899 L369.101562,1457.80899 Z M373.308663,1444.17585 C372.740613,1444.17585 372.261328,1443.98059 371.870793,1443.59005 C371.480259,1443.19952 371.284994,1442.72023 371.284994,1442.15218 C371.284994,1441.58413 371.480259,1441.10485 371.870793,1440.71431 C372.261328,1440.32378 372.740613,1440.12851 373.308663,1440.12851 C373.876713,1440.12851 374.355998,1440.32378 374.746533,1440.71431 C375.137067,1441.10485 375.332332,1441.58413 375.332332,1442.15218 C375.332332,1442.72023 375.137067,1443.19952 374.746533,1443.59005 C374.355998,1443.98059 373.876713,1444.17585 373.308663,1444.17585 L373.308663,1444.17585 Z\",\n style: {\n fill: \"#f08c00\"\n },\n transform: \"translate(-369.000000, -1440.000000)\"\n }));\n}\n\nvar ForwardRef = /*#__PURE__*/React.forwardRef(SvgIconHint);\nexport default __webpack_public_path__ + \"static/media/icon-hint.484f8f25.svg\";\nexport { ForwardRef as ReactComponent };","import { createGlobalStyle } from 'styled-components';\nimport { ReactComponent as IconHintSimple } from '../../../../assets/svg/icon-hint.svg';\nimport { ReactComponent as IconHintCircleOrange } from '../../../../assets/svg/icon-hint-circle-orange.svg';\n\nexport const LessonExerciseHintGlobalStyles = createGlobalStyle`\n /* @noflip */\n .exercise-container .exercise-hint span.hint {\n right: 0\n }\n \n @media (min-width: 768px) {\n .exercise-container .exercise-hint p {\n text-align: left;\n }\n }\n`;\n\nexport const LessonExerciseHint = ({ description, isSimpleIconHint = false, isA = 'div' }) => {\n const hintSVG = isSimpleIconHint ? <IconHintSimple /> : <IconHintCircleOrange />;\n const Tag = isA;\n\n return (\n description && (\n <div className=\"exercise-hint\">\n <LessonExerciseHintGlobalStyles />\n <span className=\"hint\">{hintSVG}</span>\n <Tag\n dir=\"auto\"\n dangerouslySetInnerHTML={{\n __html: description,\n }}\n />\n </div>\n )\n );\n};\n","import styled from 'styled-components';\n\nexport const StyledContainerTextContent = styled('div')`\n display: grid;\n\n br {\n content: '';\n display: block;\n height: 10px;\n }\n`;\n","const MULTIPLE_WHITESPACES_REGEX = /\\s\\s+/g;\nconst MINUS_CHARACTERS_REGEX = /[\\u002D\\u2010\\u2027\\u2011\\u2013\\u2014\\u2212]/g;\nconst SPECIAL_CHARACTERS = ',\\\\.!\\\\?:;\\\\-';\nconst WHITESPACE_BEFORE_SPECIAL_REGEX = new RegExp(` ([${SPECIAL_CHARACTERS}])`, 'g');\nconst WHITESPACE_AFTER_SPECIAL_REGEX = new RegExp(`([${SPECIAL_CHARACTERS}]) `, 'g');\n\nexport const normalizeText = str => {\n if (!str) {\n return str;\n }\n return str\n .trim()\n .replace(MULTIPLE_WHITESPACES_REGEX, ' ')\n .replace(MINUS_CHARACTERS_REGEX, '-')\n .replace(WHITESPACE_BEFORE_SPECIAL_REGEX, '$1')\n .replace(WHITESPACE_AFTER_SPECIAL_REGEX, '$1');\n};\n\nexport const isNormalizedTextEqual = (str1, str2) => {\n return normalizeText(str1) === normalizeText(str2);\n};\n","/* eslint-disable jsx-a11y/anchor-is-valid,jsx-a11y/aria-role */\nimport { useState, useEffect } from 'react';\nimport classnames from 'classnames';\nimport { createGlobalStyle } from 'styled-components';\nimport {\n cleanupAndAddPlaceholderComponents,\n createSingleSentenceAnswerContent,\n} from '../clozeExerciseUtils';\nimport { ExerciseRichText } from '../ExerciseRichText';\nimport { StyledContainerTextContent } from './ContainerTextContent';\nimport { INQUIRY_STATE } from '../../workflow/inquiryState';\nimport { shuffle } from '../../../../../utils/commons';\nimport { isNormalizedTextEqual } from '../../utils/exerciseUtils';\n\nconst ChooseAnswerGlobalStyles = createGlobalStyle` \n /* @noflip */\n .alwaysLtr {\n text-align: left;\n direction: ltr;\n }\n`;\n\nexport const ChooseAnswer = ({ inquiry, onChange, inquiryState, isDisabled }) => {\n const { subInquiries, clozeLayoutType, id } = inquiry;\n\n const scopeClassName = `inquiry_${id}`;\n\n const initialClozeChooseData = subInquiries.map(subInquiry => {\n return {\n ...subInquiry,\n selectedAnswer: undefined,\n };\n });\n const initialSelectableAnswers = subInquiries.map(subInquiry => ({\n text: subInquiry.alternatives[0].alternativeText,\n id: subInquiry.alternatives[0].id,\n }));\n\n const [clozeChooseData, setClozeChooseData] = useState(initialClozeChooseData);\n const [selectableAnswers, setSelectableAnswers] = useState(initialSelectableAnswers);\n\n const setSelectedAnswer = answer => {\n // eslint-disable-next-line fp/no-let\n let updated = false;\n const newClozeData = clozeChooseData.map(clozeData => {\n if (!clozeData.selectedAnswer && !updated) {\n // eslint-disable-next-line fp/no-mutation\n updated = true;\n return { ...clozeData, selectedAnswer: answer };\n }\n return { ...clozeData };\n });\n setClozeChooseData(newClozeData);\n };\n\n const removeSelectedAnswer = answer => {\n const newClozeData = clozeChooseData.map(clozeData => {\n if (clozeData.selectedAnswer && clozeData.selectedAnswer.id === answer.id) {\n return { ...clozeData, selectedAnswer: undefined };\n }\n return { ...clozeData };\n });\n setClozeChooseData(newClozeData);\n };\n\n const removeSelectableAnswer = answer => {\n const newSelectableAnswers = selectableAnswers.filter(\n selectableAnswer => selectableAnswer.id !== answer.id,\n );\n setSelectableAnswers(newSelectableAnswers);\n };\n\n const addSelectableAnswer = answer => {\n const newSelectableAnswers = [answer, ...selectableAnswers];\n setSelectableAnswers(newSelectableAnswers);\n };\n\n const handleAnswerClicked = (e, answerText, answerId, isSelectedAnswer) => {\n const answer = { text: answerText, id: +answerId };\n e.preventDefault();\n if (!isDisabled) {\n if (isSelectedAnswer) {\n removeSelectedAnswer(answer);\n addSelectableAnswer(answer);\n } else {\n setSelectedAnswer(answer);\n removeSelectableAnswer(answer);\n }\n }\n };\n\n const checkEntry = (answerText, index) => {\n return clozeChooseData[index].alternatives.some(\n alternative =>\n isNormalizedTextEqual(answerText, alternative.alternativeText) && alternative.isCorrect,\n );\n };\n useEffect(() => {\n if (inquiryState === INQUIRY_STATE.SOLVED) {\n setClozeChooseData(\n subInquiries.map(subInquiry => ({\n ...subInquiry,\n selectedAnswer: {\n text: subInquiry.alternatives[0].alternativeText,\n id: subInquiry.alternatives[0].id,\n },\n })),\n );\n setSelectableAnswers([]);\n }\n }, [inquiryState, subInquiries]);\n useEffect(() => {\n if (inquiryState !== INQUIRY_STATE.SOLVED) {\n onChange(\n clozeChooseData.filter((data, index) =>\n clozeChooseData[index].alternatives.some(\n alternative =>\n data.selectedAnswer &&\n isNormalizedTextEqual(data.selectedAnswer.text, alternative.alternativeText) &&\n alternative.isCorrect,\n ),\n ).length,\n );\n }\n }, [inquiryState, onChange, clozeChooseData]);\n useEffect(() => {\n setSelectableAnswers(answers =>\n shuffle(answers.slice(0)).map(answer => {\n return {\n ...answer,\n };\n }),\n );\n }, []);\n\n const EmptyPlaceholder = () => <div className=\"cloze-sorting-target\" />;\n const FilledPlaceholder = ({ selectedAnswer, index }) => (\n <div className=\"cloze-sorting-target filled\">{answerLink(selectedAnswer, index, true)}</div>\n );\n\n const PlaceHolder = ({ clozeData, index }) => {\n const { selectedAnswer } = clozeData;\n return (\n <>\n {selectedAnswer ? (\n <FilledPlaceholder selectedAnswer={selectedAnswer} index={index} />\n ) : (\n <EmptyPlaceholder />\n )}\n </>\n );\n };\n\n const createPlaceholder = index => {\n const clozeData = clozeChooseData[index];\n return <PlaceHolder clozeData={clozeData} index={index} />;\n };\n\n const continuousTextPartialComponent = answerContent => (\n <div className=\"answer cloze-text answer-sorting-target dropwdowns-inline alwaysLtr\">\n <StyledContainerTextContent>\n <p />\n <ExerciseRichText\n content={answerContent}\n createComponent={createPlaceholder}\n trigger={[clozeChooseData, inquiryState]}\n scopeClassName={scopeClassName}\n />\n </StyledContainerTextContent>\n </div>\n );\n\n const singleLinePartialComponent = answerContent => (\n <div className=\"answer cloze-text answer-sorting-target alwaysLtr\">\n <StyledContainerTextContent>\n <ExerciseRichText\n content={answerContent}\n createComponent={createPlaceholder}\n trigger={[clozeChooseData, inquiryState]}\n scopeClassName={scopeClassName}\n />\n </StyledContainerTextContent>\n </div>\n );\n const getAnswerClasses = (answerText, index, isSelectedAnswer) => {\n const defaultClasses = 'btn answer-sorting-btn alwaysLtr';\n if (!isSelectedAnswer) {\n return defaultClasses;\n }\n return classnames(\n defaultClasses,\n (inquiryState === INQUIRY_STATE.CORRECT || inquiryState === INQUIRY_STATE.WRONG) &&\n checkEntry(answerText, index)\n ? 'correct-input'\n : '',\n inquiryState === INQUIRY_STATE.WRONG && !checkEntry(answerText, index) ? 'wrong-input' : '',\n inquiryState === INQUIRY_STATE.SOLVED ? 'solved-input' : '',\n );\n };\n const answerLink = (selectableAnswer, index, isSelectedAnswer) => (\n <a\n role=\"\"\n href=\"#!\"\n className={getAnswerClasses(selectableAnswer.text, index, isSelectedAnswer)}\n aria-selected={isSelectedAnswer}\n key={selectableAnswer.id}\n id={selectableAnswer.id}\n onClick={e =>\n handleAnswerClicked(e, selectableAnswer.text, selectableAnswer.id, isSelectedAnswer)\n }\n >\n {selectableAnswer.text}\n </a>\n );\n\n const clozeLayoutTypeConfig = {\n CONTINUOUS_TEXT: {\n cmp: continuousTextPartialComponent,\n answerContent: () => cleanupAndAddPlaceholderComponents(inquiry.text),\n },\n SINGLE_SENTENCE: {\n cmp: singleLinePartialComponent,\n answerContent: () =>\n cleanupAndAddPlaceholderComponents(createSingleSentenceAnswerContent(subInquiries, '<br>')),\n },\n };\n\n const selectedClozeLayoutConfig = clozeLayoutTypeConfig[clozeLayoutType];\n\n if (selectedClozeLayoutConfig == null) {\n return null;\n }\n\n return (\n <>\n <ChooseAnswerGlobalStyles />\n <div className={scopeClassName}>\n {selectedClozeLayoutConfig.cmp(selectedClozeLayoutConfig.answerContent())}\n </div>\n <div className={`${scopeClassName} answer-sorting-collection`} aria-multiselectable=\"true\">\n {selectableAnswers.map((selectableAnswer, index) =>\n answerLink(selectableAnswer, index, false, false),\n )}\n </div>\n </>\n );\n};\n","function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport * as React from \"react\";\n\nvar _ref2 = /*#__PURE__*/React.createElement(\"rect\", {\n width: 2,\n height: 2,\n x: 2,\n y: 6\n});\n\nvar _ref3 = /*#__PURE__*/React.createElement(\"rect\", {\n width: 2,\n height: 2,\n x: 5,\n y: 6\n});\n\nvar _ref4 = /*#__PURE__*/React.createElement(\"rect\", {\n width: 2,\n height: 2,\n x: 8,\n y: 6\n});\n\nvar _ref5 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"m 11,6 3,0 0,5 -2,0 0,-3 -1,0 z\"\n});\n\nvar _ref6 = /*#__PURE__*/React.createElement(\"rect\", {\n width: 2,\n height: 2,\n x: 12,\n y: 12\n});\n\nvar _ref7 = /*#__PURE__*/React.createElement(\"rect\", {\n width: 6,\n height: 2,\n x: 5,\n y: 12\n});\n\nvar _ref8 = /*#__PURE__*/React.createElement(\"rect\", {\n width: 2,\n height: 2,\n x: 9,\n y: 9\n});\n\nvar _ref9 = /*#__PURE__*/React.createElement(\"rect\", {\n width: 2,\n height: 2,\n x: 6,\n y: 9\n});\n\nvar _ref10 = /*#__PURE__*/React.createElement(\"rect\", {\n width: 2,\n height: 2,\n x: 2,\n y: 12\n});\n\nvar _ref11 = /*#__PURE__*/React.createElement(\"rect\", {\n width: 3,\n height: 2,\n x: 2,\n y: 9\n});\n\nfunction SvgKeyboard(_ref, svgRef) {\n var title = _ref.title,\n titleId = _ref.titleId,\n props = _objectWithoutProperties(_ref, [\"title\", \"titleId\"]);\n\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n width: 16,\n height: 16,\n style: {\n fill: \"#888\"\n },\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, /*#__PURE__*/React.createElement(\"g\", null, /*#__PURE__*/React.createElement(\"path\", {\n style: {\n fill: \"none\",\n stroke: \"#888\"\n },\n d: \"M 0.5,4.5 15.5,4.5 15.5,15.5 0.5,15.5 Z\"\n }), _ref2, _ref3, _ref4, _ref5, _ref6, _ref7, _ref8, _ref9, _ref10, _ref11));\n}\n\nvar ForwardRef = /*#__PURE__*/React.forwardRef(SvgKeyboard);\nexport default __webpack_public_path__ + \"static/media/keyboard.3a060932.svg\";\nexport { ForwardRef as ReactComponent };","import styled from 'styled-components';\nimport { ReactComponent as KeyboardIcon } from '../../../../assets/svg/keyboard.svg';\nimport { resolutions } from '../../../../utils/css';\n\nexport const StyledKeyboardIcon = styled(KeyboardIcon)`\n display: none;\n\n @media (min-width: ${resolutions.max.tabletLandscape}px) {\n display: block;\n .placeholder-cloze > & {\n display: inline-block;\n }\n }\n`;\n","import styled, { css } from 'styled-components';\nimport { forwardRef } from 'react';\nimport { INQUIRY_STATE } from '../../Lesson/LessonExercise/workflow/inquiryState';\nimport { useTranslation } from '../../../hooks/useTranslation';\n\nexport const TextAreaInput = forwardRef(\n (\n { inquiryState, input, isDisabled, onChange, onKeyPress, isPlaceholderDisabled = false },\n ref,\n ) => {\n const translatedPlaceholder = useTranslation('exercise.typeHere');\n\n const getBorderColor = () => {\n switch (inquiryState) {\n case INQUIRY_STATE.WRONG:\n return '#be232d';\n case INQUIRY_STATE.CORRECT:\n return '#82b905';\n case INQUIRY_STATE.SOLVED:\n case INQUIRY_STATE.INITIAL:\n default:\n return '#d1c9c2';\n }\n };\n\n const onTextAreaKeyPress = e => {\n if (onKeyPress) {\n onKeyPress(e);\n }\n };\n\n return (\n <StyledVerticalTextArea\n aria-autocomplete=\"none\"\n rows={8}\n placeholder={isPlaceholderDisabled ? '' : translatedPlaceholder}\n value={input}\n aria-haspopup=\"true\"\n role=\"textbox\"\n borderColor={getBorderColor()}\n isDisabled={isDisabled()}\n onChange={onChange}\n onKeyPress={onTextAreaKeyPress}\n ref={ref}\n />\n );\n },\n);\n\nconst StyledVerticalTextArea = styled.textarea`\n padding: 5px 10px;\n border: 2px solid ${({ borderColor }) => borderColor};\n resize: vertical;\n height: 8em;\n overflow: auto;\n /* @noflip */\n text-align: left;\n width: 95%;\n\n ${({ isDisabled }) =>\n isDisabled &&\n css`\n cursor: not-allowed;\n opacity: 1;\n background-color: #eee;\n `}\n\n &:empty:not(:focus):before {\n content: attr(placeholder);\n color: grey;\n }\n\n &:focus {\n border-color: #66afe9;\n outline: 0;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(102, 175, 233, 0.6);\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(102, 175, 233, 0.6);\n }\n`;\n","/* eslint-disable fp/no-mutation,no-param-reassign,no-return-assign,react-hooks/exhaustive-deps */\nimport styled from 'styled-components';\nimport classnames from 'classnames';\nimport { useEffect, useRef, useState } from 'react';\nimport './index.css'; // copied file from module path react-simple-keyboard/build/css/index.css due to SSR issues\nimport Keyboard from 'react-simple-keyboard';\nimport { StyledKeyboardIcon as KeyboardIcon } from './KeyboardIcon';\nimport { TextAreaInput } from '../../../Input/TextAreaInput/TextAreaInput';\n\n// copy&pasted from simple-keyboard-layouts module because it was not usable in unit tests\n// import layout from 'simple-keyboard-layouts/build/layouts/german';\nconst layout = {\n layout: {\n default: [\n '^ 1 2 3 4 5 6 7 8 9 0 \\u00DF \\u00B4 {bksp}',\n '{tab} q w e r t z u i o p \\u00FC +',\n '{lock} a s d f g h j k l \\u00F6 \\u00E4 # {enter}',\n '{shift} < y x c v b n m , . - {shift}',\n '.com @ {space}',\n ],\n shift: [\n '\\u00B0 ! \" \\u00A7 $ % & / ( ) = ? ` {bksp}',\n '{tab} Q W E R T Z U I O P \\u00DC *',\n \"{lock} A S D F G H J K L \\u00D6 \\u00C4 ' {enter}\",\n '{shift} > Y X C V B N M ; : _ {shift}',\n '.com @ {space}',\n ],\n },\n};\n\nexport const KeyboardWrapper = ({\n inputMaxLength,\n onChange,\n inputValue,\n inputClassName = '',\n isTextArea = false,\n}) => {\n const [isKeyboardVisible, setKeyboardVisible] = useState(false);\n const [layoutName, setLayoutName] = useState('default');\n const keyboardRef = useRef();\n const inputRef = useRef();\n const textAreaRef = useRef();\n\n useEffect(() => {\n if (isKeyboardVisible) {\n keyboardRef.current.setInput(inputValue);\n }\n if (inputRef.current) {\n inputRef.current.focus();\n }\n if (textAreaRef.current) {\n textAreaRef.current.focus();\n }\n }, [isKeyboardVisible]);\n\n const toggleKeyboard = () => {\n setKeyboardVisible(!isKeyboardVisible);\n };\n\n const handleKeyPress = pressedKey => {\n if (pressedKey === '{enter}') toggleKeyboard();\n if (pressedKey === '{shift}' || pressedKey === '{lock}') handleShift();\n };\n\n const onInputKeyPress = e => {\n if (e.charCode === 13) {\n toggleKeyboard();\n }\n };\n\n const handleShift = () => {\n const newLayoutName = layoutName === 'default' ? 'shift' : 'default';\n setLayoutName(newLayoutName);\n };\n\n const onChangeInput = input => {\n keyboardRef.current.setInput(input);\n onChange(input);\n };\n\n const onChangeLocalInput = e => {\n onChangeInput(e.target.value);\n };\n\n return (\n <>\n <KeyboardIcon onClick={toggleKeyboard} />\n {isKeyboardVisible && (\n <>\n <div\n className=\"ui-keyboard center-block dropdown-menu ui-keyboard-has-focus\"\n style={{ width: '540px', direction: 'ltr' }}\n >\n <div className=\"ui-keyboard-preview-wrapper\">\n <button onClick={toggleKeyboard} className=\"close\" aria-label=\"Close\">\n <span aria-hidden=\"true\">×</span>\n </button>\n {!isTextArea && (\n <input\n className={classnames(inputClassName, 'ui-keyboard-preview')}\n value={inputValue}\n onChange={onChangeLocalInput}\n onKeyPress={onInputKeyPress}\n maxLength={inputMaxLength}\n ref={inputRef}\n />\n )}\n {isTextArea && (\n <TextAreaInput\n {...{\n input: inputValue,\n onChange: onChangeLocalInput,\n isDisabled: () => false,\n onKeyPress: onInputKeyPress,\n isPlaceholderDisabled: true,\n ref: textAreaRef,\n }}\n />\n )}\n </div>\n <Keyboard\n keyboardRef={r => (keyboardRef.current = r)}\n className=\"keyboard\"\n {...{\n onChange: onChangeInput,\n onKeyPress: handleKeyPress,\n layoutName,\n ...layout,\n }}\n />\n </div>\n <StyledKeyboardBackdrop onClick={toggleKeyboard} />\n </>\n )}\n </>\n );\n};\n\nexport const StyledKeyboardBackdrop = styled.div`\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: 990;\n`;\n","import { useState } from 'react';\nimport classnames from 'classnames';\nimport { INQUIRY_STATE } from '../workflow/inquiryState';\nimport { isNormalizedTextEqual } from '../utils/exerciseUtils';\nimport { KeyboardWrapper } from '../Keyboard/KeyboardWrapper';\n\nexport const ClozeInput = ({\n inquiryState,\n index,\n clozeData,\n config,\n handleOnInputChange,\n isDisabled,\n}) => {\n const fieldNameId = clozeData.id;\n const [value, setValue] = useState(\n inquiryState === INQUIRY_STATE.SOLVED\n ? clozeData.alternatives[0].alternativeText\n : clozeData.userAnswer,\n );\n\n const [isCorrect, setIsCorrect] = useState(\n isNormalizedTextEqual(clozeData.alternatives[0].alternativeText, clozeData.userAnswer),\n );\n\n const handleOnChange = e => {\n handleChange(e.target.value);\n };\n\n const handleKeyboardChange = input => {\n handleChange(input);\n };\n\n const handleChange = input => {\n if (!isDisabled) {\n setValue(input);\n setIsCorrect(handleOnInputChange(index, input));\n }\n };\n\n const getInputClassName = () => {\n switch (inquiryState) {\n case INQUIRY_STATE.CORRECT:\n case INQUIRY_STATE.WRONG:\n return isCorrect ? 'correct-input' : 'wrong-input';\n case INQUIRY_STATE.SOLVED:\n return 'solved-input';\n default:\n return '';\n }\n };\n\n const baseInputClassName = `answer-input-cloze-${config.size} cloze-${clozeData.id} answer-input-cloze-element form-control onscreen-kb input-sm`;\n\n return (\n <>\n <input\n type=\"text\"\n aria-required=\"true\"\n id={fieldNameId}\n disabled={isDisabled}\n maxLength={config.maxLength}\n className={classnames(baseInputClassName, 'ui-keyboard-input', getInputClassName())}\n aria-label=\"exercise-input\"\n data-exercise-answer-id={clozeData.alternatives[0].id}\n aria-haspopup=\"true\"\n onChange={handleOnChange}\n value={value}\n autoComplete=\"off\"\n />\n {!isDisabled && (\n <KeyboardWrapper\n onChange={handleKeyboardChange}\n inputValue={value}\n inputClassName={baseInputClassName}\n />\n )}\n </>\n );\n};\n","import { useEffect, useState } from 'react';\nimport { createGlobalStyle } from 'styled-components';\nimport {\n cleanupAndAddPlaceholderComponents,\n createSingleSentenceAnswerContent,\n placeholderConfig,\n} from '../clozeExerciseUtils';\nimport { ExerciseRichText } from '../ExerciseRichText';\nimport { INQUIRY_STATE } from '../../workflow/inquiryState';\nimport { isNormalizedTextEqual } from '../../utils/exerciseUtils';\nimport { ClozeInput } from '../ClozeInput';\n\nconst WritingAnswerGlobalStyles = createGlobalStyle` \n /* @noflip */\n .alwaysLtr {\n text-align: left;\n direction: ltr;\n }\n`;\n\nexport const WritingAnswer = ({ inquiry, onChange, inquiryState, isDisabled }) => {\n const { subInquiries, clozeLayoutType, id } = inquiry;\n const scopeClassName = `inquiry_${id}`;\n\n const initialClozeWritingData = subInquiries.map(subInquiry => {\n return {\n ...subInquiry,\n userAnswer: '',\n };\n });\n\n const [clozeWritingData, setClozeWritingData] = useState(initialClozeWritingData);\n\n useEffect(() => {\n if (inquiryState === INQUIRY_STATE.SOLVED) {\n setClozeWritingData(\n subInquiries.map(subInquiry => ({\n ...subInquiry,\n userAnswer: subInquiry.alternatives[0].alternativeText,\n })),\n );\n }\n }, [inquiryState, subInquiries]);\n\n const handleOnInputChange = (index, value) => {\n const newData = [...clozeWritingData];\n // eslint-disable-next-line fp/no-mutation\n newData[index].userAnswer = value;\n setClozeWritingData(newData);\n onChange(\n newData.filter(answer =>\n isNormalizedTextEqual(answer.userAnswer, answer.alternatives[0].alternativeText),\n ).length,\n );\n\n return checkAnswer(index, value);\n };\n\n const checkAnswer = (index, value) =>\n isNormalizedTextEqual(value, clozeWritingData[index].alternatives[0].alternativeText);\n\n const createPlaceholder = (index, matchedElement) => {\n const clozeData = clozeWritingData[index];\n const config = placeholderConfig.find(entry => entry.size === matchedElement.innerText);\n return (\n <ClozeInput\n {...{\n inquiryState,\n index,\n clozeData,\n config,\n handleOnInputChange,\n isDisabled,\n }}\n />\n );\n };\n\n const clozeLayoutTypeConfig = {\n CONTINUOUS_TEXT: {\n answerContent: () => cleanupAndAddPlaceholderComponents(inquiry.text),\n },\n SINGLE_SENTENCE: {\n answerContent: () =>\n cleanupAndAddPlaceholderComponents(\n createSingleSentenceAnswerContent(subInquiries, '<p></p>'),\n ),\n },\n };\n\n const selectedClozeLayoutConfig = clozeLayoutTypeConfig[clozeLayoutType];\n\n if (selectedClozeLayoutConfig == null) {\n return null;\n }\n\n const answerContent = selectedClozeLayoutConfig.answerContent();\n\n return (\n <div className={scopeClassName}>\n <WritingAnswerGlobalStyles />\n <div className=\"exercise-cloze-text-big alwaysLtr\">\n <div className=\"form-group\">\n <ExerciseRichText\n content={answerContent}\n createComponent={createPlaceholder}\n trigger={inquiryState}\n update={true}\n scopeClassName={scopeClassName}\n isA=\"div\"\n />\n </div>\n </div>\n </div>\n );\n};\n","import { useState } from 'react';\nimport { INQUIRY_STATE } from './inquiryState';\nimport { useExerciseProgress } from './ExerciseProgress';\n\nexport const useInquiryHandling = ({ inquiryId, achievableScore, subInquiries = 1 }) => {\n const [isSolveButtonDisabled, setSolveButtonDisabled] = useState(true);\n const [isCheckButtonDisabled, setCheckButtonDisabled] = useState(false);\n const [isMarkedAsDone, setMarkedAsDone] = useState(false);\n const [wrongAnswerCount, setWrongAnswerCount] = useState(0);\n const [inquiryState, setInquiryState] = useState(INQUIRY_STATE.INITIAL);\n\n const { addDoneInquiry, exerciseProgress } = useExerciseProgress();\n const { isFromPlacementCourse } = exerciseProgress;\n\n const isDisabled = () => {\n return (\n inquiryState === INQUIRY_STATE.CORRECT ||\n inquiryState === INQUIRY_STATE.SOLVED ||\n (inquiryState === INQUIRY_STATE.WRONG && isFromPlacementCourse)\n );\n };\n\n const disableAllButtons = () => {\n setCheckButtonDisabled(true);\n setSolveButtonDisabled(true);\n };\n\n const checkAndMarkAsDone = ({ score = 0 }) => {\n if (!isMarkedAsDone) {\n addDoneInquiry({ inquiryId, achievableScore, score });\n setMarkedAsDone(true);\n }\n };\n\n const handleCorrectAnswer = () => {\n setInquiryState(INQUIRY_STATE.CORRECT);\n checkAndMarkAsDone({ score: achievableScore });\n disableAllButtons();\n };\n\n const handleWrongAnswer = (correctSubInquiries = 0) => {\n setInquiryState(INQUIRY_STATE.WRONG);\n checkAndMarkAsDone({ score: (achievableScore * correctSubInquiries) / subInquiries });\n setWrongAnswerCount(wrongAnswerCount + 1);\n if (isFromPlacementCourse) setCheckButtonDisabled(true);\n setSolveButtonDisabled(false);\n };\n\n const handleSolved = () => {\n setInquiryState(INQUIRY_STATE.SOLVED);\n checkAndMarkAsDone({});\n disableAllButtons();\n };\n\n return {\n isSolveButtonDisabled,\n isCheckButtonDisabled,\n inquiryState,\n isDisabled,\n isFromPlacementCourse,\n handleCorrectAnswer,\n handleWrongAnswer,\n handleSolved,\n };\n};\n","import { useRef, useState } from 'react';\nimport { useParams } from 'react-router';\nimport {\n exerciseQuestionTypeSelector,\n LessonExerciseQuestion,\n} from '../LessonExerciseQuestion/LessonExerciseQuestion';\nimport { StyledSolveCheckButton } from '../../../SolveCheckButton/SolveCheckButton';\nimport { StyledPulldownAnswer } from './AnswerTypes/PulldownAnswer';\nimport { QUESTION_TYPES } from '../LessonExerciseQuestion/QuestionTypes/questionTypes';\nimport { LessonExerciseHint } from '../LessonExerciseHint/LessonExerciseHint';\nimport { ChooseAnswer } from './AnswerTypes/ChooseAnswer';\nimport { WritingAnswer } from './AnswerTypes/WritingAnswer';\nimport { useAudio } from '../../../../hooks/useAudio';\nimport { useInquiryHandling } from '../workflow/useInquiryHandling';\nimport { findFeedbackAudio } from '../../../../utils/audioUtils';\nimport { LessonExerciseHiddenAudio } from '../LessonExerciseHiddenAudio/LessonExerciseHiddenAudio';\n\nexport const ClozeExerciseRow = ({ inquiry, initiallyCorrectInquiries = 0 }) => {\n const { exerciseId } = useParams();\n const {\n audios,\n inquiryDescription,\n id: inquiryId,\n learningMetaInfo: { achievableScore },\n mainContentImage,\n } = inquiry;\n const { clozeType } = inquiry.subInquiries[0];\n\n const [correctSubInquiries, setCorrectSubInquiries] = useState(initiallyCorrectInquiries);\n const { playWrongDefaultAudioFeedBack, playCorrectDefaultAudioFeedBack } = useAudio();\n const isSolutionAudioFallbackMode = Boolean(mainContentImage);\n const feedbackAudio = findFeedbackAudio(isSolutionAudioFallbackMode, audios);\n const { target: answerAudio } = feedbackAudio || {};\n const { mp3Src: feedbackAudioUrl } = answerAudio || {};\n const feedbackAudioRef = useRef();\n\n const {\n isSolveButtonDisabled,\n isCheckButtonDisabled,\n handleCorrectAnswer,\n handleWrongAnswer,\n handleSolved,\n inquiryState,\n isDisabled,\n } = useInquiryHandling({ inquiryId, achievableScore, subInquiries: inquiry.subInquiries.length });\n\n const onChange = changeResult => {\n setCorrectSubInquiries(changeResult);\n };\n\n const onHandleSolveButtonClicked = () => {\n handleSolved();\n playCorrectAudioFeedBack();\n };\n\n const onHandleCheckButtonClicked = () => {\n if (correctSubInquiries === inquiry.subInquiries.length) {\n handleCorrectAnswer();\n playCorrectAudioFeedBack();\n } else {\n handleWrongAnswer(correctSubInquiries);\n playWrongDefaultAudioFeedBack();\n }\n };\n const playCorrectAudioFeedBack = () => {\n if (feedbackAudioUrl) {\n feedbackAudioRef.current.play();\n } else {\n playCorrectDefaultAudioFeedBack();\n }\n };\n const getAnswerComponent = () => {\n switch (clozeType) {\n case 'PULLDOWN':\n return (\n <StyledPulldownAnswer\n {...{\n inquiry,\n onChange,\n inquiryState,\n isDisabled: isDisabled(),\n }}\n />\n );\n case 'CHOOSE':\n return <ChooseAnswer {...{ inquiry, onChange, inquiryState, isDisabled: isDisabled() }} />;\n case 'WRITING':\n return <WritingAnswer {...{ inquiry, onChange, inquiryState, isDisabled: isDisabled() }} />;\n default:\n return null;\n }\n };\n\n const questionType = exerciseQuestionTypeSelector({ inquiry });\n const answerComponent = getAnswerComponent();\n\n const lessonExerciseHintPartial = (\n <div className=\"row\">\n <div className=\"col-sm-offset-1 col-sm-10 col-lg-offset-2 col-lg-8\">\n <LessonExerciseHint description={inquiryDescription} />\n </div>\n </div>\n );\n\n return (\n <div className=\"exercise-questions\" data-type=\"cloze\" data-exercise-id={exerciseId}>\n <div className=\"question-row row\">\n {questionType === QUESTION_TYPES.TEXT && clozeType !== 'CHOOSE' ? (\n <>\n <div className=\"col-sm-offset-1 col-sm-10 col-lg-offset-2 col-lg-8\">\n <LessonExerciseHiddenAudio ref={feedbackAudioRef} src={feedbackAudioUrl} />\n <LessonExerciseQuestion {...{ inquiry }} />\n {answerComponent}\n </div>\n {lessonExerciseHintPartial}\n </>\n ) : (\n <>\n <div className=\"col-sm-offset-1 col-sm-5 col-lg-offset-2 col-lg-4\">\n <LessonExerciseHiddenAudio ref={feedbackAudioRef} src={feedbackAudioUrl} />\n <LessonExerciseQuestion {...{ inquiry }} />\n </div>\n <div className=\"col-sm-5 col-lg-4 answer-dictation-target\">{answerComponent}</div>\n {lessonExerciseHintPartial}\n </>\n )}\n </div>\n <div className=\"row form-group inline-check\">\n <StyledSolveCheckButton\n {...{\n handleCheckClicked: onHandleCheckButtonClicked,\n handleSolveClicked: onHandleSolveButtonClicked,\n isCheckButtonDisabled,\n isSolveButtonDisabled,\n }}\n />\n </div>\n </div>\n );\n};\n","import gql from 'graphql-tag';\nimport { AudioProvider } from '../../../../context/AudioContext';\nimport { LessonExerciseTextInput } from '../LessonExerciseTextInput/LessonExerciseTextInput';\nimport { ClozeExerciseRow } from './ClozeExerciseRow';\n\nexport const clozeExerciseFragment = {\n name: 'clozeExercise',\n fragment() {\n return gql`fragment ${this.name} on Inquiry {\n text\n clozeLayoutType\n subInquiries {\n clozeType\n }\n } \n `;\n },\n};\n\nexport const ClozeExercise = ({ data }) => {\n const { inputText, inquiries } = data.content;\n\n return (\n <AudioProvider>\n <LessonExerciseTextInput inputText={inputText} />\n {inquiries.map(inquiry => (\n <ClozeExerciseRow key={inquiry.id} inquiry={inquiry} />\n ))}\n </AudioProvider>\n );\n};\n","import { useState } from 'react';\nimport { useInquiryHandling } from '../workflow/useInquiryHandling';\nimport { KeyboardWrapper } from '../Keyboard/KeyboardWrapper';\nimport { TextAreaInput } from '../../../Input/TextAreaInput/TextAreaInput';\nimport { LessonExerciseQuestionAudio } from '../LessonExerciseQuestion/QuestionTypes/LessonExerciseQuestionAudio';\nimport { LessonExerciseHint } from '../LessonExerciseHint/LessonExerciseHint';\nimport { StyledSolveCheckButton } from '../../../SolveCheckButton/SolveCheckButton';\nimport { findQuestionAudio } from '../../../../utils/audioUtils';\nimport { useAudio } from '../../../../hooks/useAudio';\nimport { isNormalizedTextEqual } from '../utils/exerciseUtils';\n\nexport const DictationExerciseRow = ({ inquiry }) => {\n const [input, setInput] = useState('');\n\n const {\n inquiryDescription,\n audios,\n text: solutionText,\n learningMetaInfo: { achievableScore },\n id: inquiryId,\n } = inquiry;\n const questionAudio = findQuestionAudio(audios);\n\n const {\n isSolveButtonDisabled,\n isCheckButtonDisabled,\n inquiryState,\n handleCorrectAnswer,\n handleWrongAnswer,\n handleSolved,\n isDisabled,\n } = useInquiryHandling({ inquiryId, achievableScore });\n const { playWrongDefaultAudioFeedBack, playCorrectDefaultAudioFeedBack } = useAudio();\n\n const onSolveClicked = () => {\n setInput(solutionText);\n handleSolved();\n };\n const onCheckClicked = () => {\n if (isNormalizedTextEqual(solutionText, input)) {\n handleCorrectAnswer();\n playCorrectDefaultAudioFeedBack();\n } else {\n handleWrongAnswer();\n playWrongDefaultAudioFeedBack();\n }\n };\n\n const onChange = event => {\n const newInput = event.target.value;\n setInput(newInput);\n };\n\n return (\n <div className=\"exercise-questions\" aria-atomic=\"true\">\n <div className=\"question-row row\">\n <div className=\"col-sm-offset-1 col-sm-5 col-lg-offset-2 col-lg-4\">\n <LessonExerciseQuestionAudio audio={questionAudio} />\n </div>\n <div className=\"col-sm-5 col-lg-4 answer-dictation-target\">\n <TextAreaInput {...{ isDisabled, inquiryState, input, onChange }} />\n {!isDisabled() && (\n <KeyboardWrapper onChange={setInput} inputValue={input} isTextArea={true} />\n )}\n </div>\n <div className=\"col-sm-offset-1 col-sm-10 col-lg-offset-2 col-lg-8\">\n <LessonExerciseHint description={inquiryDescription} />\n </div>\n </div>\n <StyledSolveCheckButton\n handleCheckClicked={() => onCheckClicked()}\n handleSolveClicked={() => onSolveClicked()}\n isSolveButtonDisabled={isSolveButtonDisabled}\n isCheckButtonDisabled={isCheckButtonDisabled}\n />\n </div>\n );\n};\n","import { DictationExerciseRow } from './DictationExerciseRow';\nimport { AudioProvider } from '../../../../context/AudioContext';\n\nexport const DictationExercise = ({ data }) => {\n const { inquiries } = data.content;\n\n return (\n <AudioProvider>\n {inquiries.map(inquiry => (\n <DictationExerciseRow key={inquiry.id} {...{ inquiry }} />\n ))}\n </AudioProvider>\n );\n};\n","export const INQUIRY_MEDIA_TYPE = Object.freeze({\n TEXT: 'TEXT',\n IMAGE: 'IMAGE',\n AUDIO: 'AUDIO',\n VIDEO: 'VIDEO',\n});\n","import { createGlobalStyle } from 'styled-components';\nimport classnames from 'classnames';\nimport { INQUIRY_MEDIA_TYPE } from '../../../../../constants/inquiryMediaTypes';\nimport { useFrontendConfig } from '../../../../../hooks/useFrontendConfig';\n\nconst ManyToManyAnswerGlobalStyles = createGlobalStyle` \n /* @noflip */\n .alwaysLtr {\n text-align: left;\n direction: ltr;\n }\n \n .pair-select-container .pairsToUse .left .btn {\n /* @noflip */\n float: left;\n /* @noflip */\n clear: left;\n }\n`;\n\nexport const ManyToManyAnswer = ({\n answer,\n answersBlocked,\n mediaType,\n isLeftAnswer = false,\n isMatched = false,\n onAnswerClicked,\n}) => {\n const answerText = isLeftAnswer ? answer.subInquiryText : answer.alternatives[0].alternativeText;\n const isImage = mediaType === INQUIRY_MEDIA_TYPE.IMAGE;\n const imagePairClass = isLeftAnswer ? 'image-pair-left ' : 'image-pair-right ';\n const basicClass = `btn ${isImage ? imagePairClass : ''}removeHover`;\n\n const { imageBasePath } = useFrontendConfig();\n const assignAnswerClass = (isSelected, currentSideAnswersBlocked) => {\n const isBlocked = currentSideAnswersBlocked ? 'waiting inactive' : '';\n const status = isSelected ? 'tapped' : isBlocked;\n return `${basicClass} ${status}`;\n };\n\n const assignMatchedAnswerClass = (isCorrectlyMatched, isSolved) => {\n if (isSolved) {\n return `${basicClass} solved`;\n }\n if (isCorrectlyMatched === null) {\n return basicClass;\n }\n const checkedStatus = isCorrectlyMatched ? 'correct solved' : 'wrong';\n return `${basicClass} ${checkedStatus}`;\n };\n\n return (\n <a\n href=\"/#\"\n className={classnames(\n isMatched\n ? assignMatchedAnswerClass(answer.isCorrectlyMatched, answer.isSolved)\n : assignAnswerClass(answer.isSelected, answersBlocked),\n 'alwaysLtr',\n )}\n data-exercise-answer-id={isLeftAnswer ? answer.id : answer.alternatives[0].id}\n onClick={onAnswerClicked}\n >\n <ManyToManyAnswerGlobalStyles />\n {!isLeftAnswer && isImage ? (\n <img\n className=\"img-responsive\"\n src={`${imageBasePath}/${answer.alternatives[0].images[0].id}_501.jpg`}\n alt={answerText}\n />\n ) : (\n answerText\n )}\n </a>\n );\n};\n","export const SHUFFLE_RIGHT_ANSWERS = 'SHUFFLE_RIGHT_ANSWERS';\nexport const MATCH_ANSWERS_PAIR = 'MATCH_ANSWERS_PAIR';\nexport const BLOCK_ANSWERS = 'BLOCK_ANSWERS';\nexport const RESET_MATCHED_ANSWERS_PAIR = 'RESET_MATCHED_ANSWERS_PAIR';\nexport const CHECK_ANSWERS = 'CHECK_ANSWERS';\nexport const SOLVE_ANSWERS = 'SOLVE_ANSWERS';\n\nexport const reducer = (state, action) => {\n const { selectedId, isLeft, selectedIndex, subInquiries, initialLeftAnswers } =\n action.payload || {};\n\n switch (action.type) {\n case SHUFFLE_RIGHT_ANSWERS: {\n // eslint-disable-next-line fp/no-mutating-methods\n const shuffledRightAnswers = [...state.rightAnswers].sort(() => 0.25 - Math.random());\n return {\n ...state,\n rightAnswers: shuffledRightAnswers,\n };\n }\n case MATCH_ANSWERS_PAIR: {\n const leftMatchedAnswer = state.leftAnswers.find(answer =>\n isLeft ? answer.id === selectedId : answer.isSelected,\n );\n const rightMatchedAnswer = state.rightAnswers.find(answer =>\n isLeft ? answer.isSelected : answer.alternatives[0].id === selectedId,\n );\n\n return {\n ...state,\n leftMatchedAnswers: [\n ...state.leftMatchedAnswers,\n {\n ...leftMatchedAnswer,\n isSelected: false,\n },\n ],\n rightMatchedAnswers: [\n ...state.rightMatchedAnswers,\n {\n ...rightMatchedAnswer,\n isSelected: false,\n },\n ],\n leftAnswers: state.leftAnswers.filter(answer => answer !== leftMatchedAnswer),\n rightAnswers: state.rightAnswers.filter(answer => answer !== rightMatchedAnswer),\n isLeftAnswerBlocked: false,\n isRightAnswerBlocked: false,\n };\n }\n case BLOCK_ANSWERS: {\n const answers = isLeft ? state.leftAnswers : state.rightAnswers;\n const updatedAnswers = answers.map(answer => {\n const isIdEqual = isLeft\n ? answer.id === selectedId\n : answer.alternatives[0].id === selectedId;\n return {\n ...answer,\n isSelected: isIdEqual && !answer.isSelected,\n };\n });\n\n return {\n ...state,\n leftAnswers: isLeft ? updatedAnswers : state.leftAnswers,\n rightAnswers: isLeft ? state.rightAnswers : updatedAnswers,\n isLeftAnswerBlocked: isLeft\n ? updatedAnswers.some(answer => answer.isSelected)\n : state.isLeftAnswerBlocked,\n isRightAnswerBlocked: isLeft\n ? state.isRightAnswerBlocked\n : updatedAnswers.some(answer => answer.isSelected),\n };\n }\n case RESET_MATCHED_ANSWERS_PAIR: {\n const leftMatchedAnswer = state.leftMatchedAnswers[selectedIndex];\n const rightMatchedAnswer = state.rightMatchedAnswers[selectedIndex];\n\n return {\n ...state,\n leftMatchedAnswers: state.leftMatchedAnswers.filter(\n matchedAnswer => matchedAnswer !== leftMatchedAnswer,\n ),\n rightMatchedAnswers: state.rightMatchedAnswers.filter(\n matchedAnswer => matchedAnswer !== rightMatchedAnswer,\n ),\n leftAnswers: [\n ...state.leftAnswers,\n {\n ...leftMatchedAnswer,\n isCorrectlyMatched: null,\n },\n ],\n rightAnswers: [\n ...state.rightAnswers,\n {\n ...rightMatchedAnswer,\n isCorrectlyMatched: null,\n },\n ],\n };\n }\n case CHECK_ANSWERS: {\n const updatedLeftMatchedAnswers = state.leftMatchedAnswers.map((matchedAnswer, index) => {\n return {\n ...matchedAnswer,\n isCorrectlyMatched: matchedAnswer.id === state.rightMatchedAnswers[index].id,\n };\n });\n\n const updatedRightMatchedAnswers = state.rightMatchedAnswers.map((matchedAnswer, index) => {\n return {\n ...matchedAnswer,\n isCorrectlyMatched: matchedAnswer.id === state.leftMatchedAnswers[index].id,\n };\n });\n\n const isAllMatchedCorrectly =\n updatedLeftMatchedAnswers.length === subInquiries.length &&\n updatedLeftMatchedAnswers.every(matchedAnswer => matchedAnswer.isCorrectlyMatched);\n\n return {\n ...state,\n leftMatchedAnswers: updatedLeftMatchedAnswers,\n rightMatchedAnswers: updatedRightMatchedAnswers,\n solvedWrongCounter: isAllMatchedCorrectly ? 0 : state.solvedWrongCounter + 1,\n isAllMatchedCorrectly,\n };\n }\n case SOLVE_ANSWERS: {\n const solvedMatchedAnswers = initialLeftAnswers.map(answer => {\n return {\n ...answer,\n isSolved: true,\n };\n });\n\n return {\n ...state,\n leftAnswers: [],\n rightAnswers: [],\n leftMatchedAnswers: solvedMatchedAnswers,\n rightMatchedAnswers: solvedMatchedAnswers,\n isSolvedCorrect: true,\n };\n }\n default:\n return state;\n }\n};\n","import { useEffect, useReducer } from 'react';\nimport { createGlobalStyle } from 'styled-components';\nimport { ManyToManyAnswer } from '../ManyToManyAnswer/ManyToManyAnswer';\nimport { I18nText } from '../../../../I18n/I18nText';\nimport {\n BLOCK_ANSWERS,\n CHECK_ANSWERS,\n SHUFFLE_RIGHT_ANSWERS,\n MATCH_ANSWERS_PAIR,\n reducer,\n RESET_MATCHED_ANSWERS_PAIR,\n SOLVE_ANSWERS,\n} from './manyToManyQuestionRowReducer';\nimport { LessonExerciseHint } from '../../LessonExerciseHint/LessonExerciseHint';\nimport { StyledSolveCheckButton } from '../../../../SolveCheckButton/SolveCheckButton';\nimport { useInquiryHandling } from '../../workflow/useInquiryHandling';\nimport { useAudio } from '../../../../../hooks/useAudio';\n\nconst ManyToManyQuetsionRowGlobalStyles = createGlobalStyle` \n /* @noflip */\n .alwaysLtr {\n text-align: left;\n direction: ltr;\n }\n \n /* @noflip */\n .pair-select-container .pairsToUse.used .right .btn {\n float: left;\n clear: left;\n }\n`;\n\nexport const ManyToManyQuestionRow = ({ inquiry }) => {\n const {\n id: inquiryId,\n inquiryText,\n inquiryDescription,\n subInquiries,\n mediaType,\n learningMetaInfo: { achievableScore },\n } = inquiry;\n const initialLeftAnswers = subInquiries.map(subInquiry => {\n return {\n ...subInquiry,\n isSelected: false,\n isCorrectlyMatched: null,\n isSolved: false,\n };\n });\n\n const [state, dispatch] = useReducer(reducer, {\n isLeftAnswerBlocked: false,\n isRightAnswerBlocked: false,\n leftAnswers: initialLeftAnswers,\n rightAnswers: initialLeftAnswers,\n leftMatchedAnswers: [],\n rightMatchedAnswers: [],\n isAllMatchedCorrectly: false,\n solvedWrongCounter: 0,\n isSolvedCorrect: false,\n });\n\n const {\n isSolveButtonDisabled,\n isCheckButtonDisabled,\n handleCorrectAnswer,\n handleWrongAnswer,\n handleSolved,\n isFromPlacementCourse,\n } = useInquiryHandling({\n inquiryId,\n achievableScore,\n });\n const { playWrongDefaultAudioFeedBack, playCorrectDefaultAudioFeedBack } = useAudio();\n\n useEffect(() => {\n if (state.isAllMatchedCorrectly) {\n handleCorrectAnswer();\n playCorrectDefaultAudioFeedBack();\n }\n if (state.isSolvedCorrect) {\n handleSolved();\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [state.isAllMatchedCorrectly, state.isSolvedCorrect]);\n\n useEffect(() => {\n if (state.solvedWrongCounter > 0) {\n handleWrongAnswer();\n playWrongDefaultAudioFeedBack();\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [state.solvedWrongCounter]);\n\n useEffect(() => {\n dispatch({\n type: SHUFFLE_RIGHT_ANSWERS,\n });\n }, []);\n\n const onAnswerClicked = (e, selectedId, isLeft) => {\n e.preventDefault();\n const isAnswerBlocked = isLeft ? state.isRightAnswerBlocked : state.isLeftAnswerBlocked;\n if (isAnswerBlocked || (state.solvedWrongCounter > 0 && isFromPlacementCourse)) {\n dispatch({\n type: MATCH_ANSWERS_PAIR,\n payload: {\n selectedId,\n isLeft,\n },\n });\n } else {\n dispatch({\n type: BLOCK_ANSWERS,\n payload: {\n selectedId,\n isLeft,\n },\n });\n }\n };\n\n const onMatchedAnswerClicked = (e, selectedIndex) => {\n e.preventDefault();\n if (\n state.leftMatchedAnswers[selectedIndex].isCorrectlyMatched ||\n state.leftMatchedAnswers[selectedIndex].isSolved ||\n (state.solvedWrongCounter > 0 && isFromPlacementCourse)\n ) {\n return;\n }\n\n dispatch({\n type: RESET_MATCHED_ANSWERS_PAIR,\n payload: {\n selectedIndex,\n },\n });\n };\n\n const onCheckClicked = e => {\n e.preventDefault();\n dispatch({\n type: CHECK_ANSWERS,\n payload: {\n subInquiries,\n },\n });\n };\n\n const onSolveClicked = e => {\n e.preventDefault();\n dispatch({\n type: SOLVE_ANSWERS,\n payload: {\n initialLeftAnswers,\n },\n });\n };\n\n return (\n <div className=\"question-row row\">\n <div className=\"col-sm-offset-1 col-sm-10 col-lg-offset-2 col-lg-8\">\n <ManyToManyQuetsionRowGlobalStyles />\n <div className=\"bubble text alwaysLtr\">{inquiryText}</div>\n <div className=\"pair-select-container \">\n <div className=\"row pairsToUse answer-pairs-container\">\n <div className=\"col-xs-6 left\">\n {state.leftAnswers.map(answer => (\n <ManyToManyAnswer\n key={answer.id}\n answer={answer}\n mediaType={mediaType}\n isLeftAnswer={true}\n answersBlocked={state.isLeftAnswerBlocked}\n onAnswerClicked={e => onAnswerClicked(e, answer.id, true)}\n />\n ))}\n </div>\n <div className=\"col-xs-6 right\">\n {state.rightAnswers.map(answer => (\n <ManyToManyAnswer\n key={answer.alternatives[0].id}\n answer={answer}\n mediaType={mediaType}\n answersBlocked={state.isRightAnswerBlocked}\n onAnswerClicked={e => onAnswerClicked(e, answer.alternatives[0].id, false)}\n />\n ))}\n </div>\n </div>\n <I18nText isA=\"p\" translation=\"exercise.matchedPairs\" />\n <div className=\"row pairsToUse used answer-pairs-target\">\n <div className=\"col-xs-6 left\">\n {state.leftMatchedAnswers.map((matchedAnswer, index) => (\n <ManyToManyAnswer\n key={matchedAnswer.id}\n answer={matchedAnswer}\n mediaType={mediaType}\n isLeftAnswer={true}\n isMatched={true}\n onAnswerClicked={e => onMatchedAnswerClicked(e, index)}\n />\n ))}\n </div>\n <div className=\"col-xs-6 right\">\n {state.rightMatchedAnswers.map((matchedAnswer, index) => (\n <ManyToManyAnswer\n key={matchedAnswer.alternatives[0].id}\n answer={matchedAnswer}\n mediaType={mediaType}\n isMatched={true}\n onAnswerClicked={e => onMatchedAnswerClicked(e, index)}\n />\n ))}\n </div>\n </div>\n </div>\n </div>\n {inquiryDescription && (\n <div className=\"col-sm-offset-1 col-sm-10 col-lg-offset-2 col-lg-8\">\n <LessonExerciseHint description={inquiryDescription} />\n </div>\n )}\n <StyledSolveCheckButton\n isSolveButtonDisabled={isSolveButtonDisabled}\n isCheckButtonDisabled={isCheckButtonDisabled}\n handleSolveClicked={e => onSolveClicked(e)}\n handleCheckClicked={e => onCheckClicked(e)}\n />\n </div>\n );\n};\n","/* eslint-disable jsx-a11y/media-has-caption */\nimport { useParams } from 'react-router';\nimport { ManyToManyQuestionRow } from './ManyToManyQuestionRow/ManyToManyQuestionRow';\nimport { LessonExerciseTextInput } from '../LessonExerciseTextInput/LessonExerciseTextInput';\nimport { AudioProvider } from '../../../../context/AudioContext';\n\nexport const ManyToManyExercise = ({ data }) => {\n const { exerciseId } = useParams();\n const { inputText, inquiries } = data.content;\n\n return (\n <AudioProvider>\n <LessonExerciseTextInput inputText={inputText} />\n <div className=\"exercise-questions\" data-type=\"allocationpairs\" data-exercise-id={exerciseId}>\n {inquiries.map(inquiry => (\n <ManyToManyQuestionRow key={inquiry.id} {...{ inquiry }} />\n ))}\n </div>\n </AudioProvider>\n );\n};\n","export const ANSWER_STATE = Object.freeze({\n INITIAL: 'initial',\n SELECTED: 'selected',\n WRONG: 'wrong',\n CORRECT: 'correct',\n SOLVED: 'solved',\n});\n","/* eslint-disable jsx-a11y/role-supports-aria-props */\nimport { forwardRef } from 'react';\nimport { createGlobalStyle } from 'styled-components';\nimport { ANSWER_STATE } from '../answerState';\n\nconst LessonExerciseTextAnswerGlobalStyles = createGlobalStyle` \n /* @noflip */\n .alwaysLtr {\n text-align: left;\n direction: ltr;\n }\n`;\n\nexport const LessonExerciseTextAnswer = forwardRef(({ answer, handleAnswerClicked }, ref) => {\n const assignAnswerAriaLabel = ({ answerState }) => {\n switch (answerState) {\n case ANSWER_STATE.INITIAL:\n return 'Not selected';\n case ANSWER_STATE.SOLVED:\n case ANSWER_STATE.SELECTED:\n return 'Selected';\n case ANSWER_STATE.CORRECT:\n return 'Correct';\n case ANSWER_STATE.WRONG:\n return 'Wrong';\n default:\n // eslint-disable-next-line fp/no-throw\n throw new Error('invalid answerState');\n }\n };\n\n const getAnswerClass = ({ answerState }) => {\n switch (answerState) {\n case ANSWER_STATE.INITIAL:\n return '';\n case ANSWER_STATE.SELECTED:\n return 'selected';\n case ANSWER_STATE.CORRECT:\n return 'correct';\n case ANSWER_STATE.WRONG:\n return 'wrong';\n case ANSWER_STATE.SOLVED:\n return 'solved';\n default:\n // eslint-disable-next-line fp/no-throw\n throw new Error('invalid answerState');\n }\n };\n\n return (\n <a\n className=\"answer-link-container\"\n role=\"button\"\n href=\"/#\"\n aria-label={`${answer.alternativeText} - ${assignAnswerAriaLabel(answer)}`}\n aria-selected={answer.answerState !== ANSWER_STATE.INITIAL}\n data-exercise-answer-id={answer.id}\n onClick={handleAnswerClicked}\n ref={ref}\n >\n <LessonExerciseTextAnswerGlobalStyles />\n <div className={`answer text-choice removeHover ${getAnswerClass(answer)} alwaysLtr`}>\n {answer.alternativeText}\n </div>\n </a>\n );\n});\n","/* eslint-disable jsx-a11y/role-supports-aria-props */\nimport { forwardRef } from 'react';\nimport { ANSWER_STATE } from '../answerState';\nimport { useFrontendConfig } from '../../../../../hooks/useFrontendConfig';\n\nexport const LessonExerciseImageAnswer = forwardRef(({ answer, handleAnswerClicked }, ref) => {\n const { imageBasePath } = useFrontendConfig();\n\n const assignAnswerClass = ({ answerState }) => {\n switch (answerState) {\n case ANSWER_STATE.INITIAL:\n return '';\n case ANSWER_STATE.SELECTED:\n return 'selected-image';\n case ANSWER_STATE.CORRECT:\n return 'correct-image';\n case ANSWER_STATE.WRONG:\n return 'wrong-image';\n case ANSWER_STATE.SOLVED:\n return 'solved-image';\n default:\n // eslint-disable-next-line fp/no-throw\n throw new Error('invalid answerState');\n }\n };\n\n return (\n <a\n className={`image-choice removeHover ${assignAnswerClass(answer)}`}\n role=\"button\"\n href=\"/#\"\n aria-selected={answer.answerState === ANSWER_STATE.SELECTED}\n data-exercise-answer-id={answer.id}\n onClick={handleAnswerClicked}\n ref={ref}\n >\n <img\n className=\"img-responsive\"\n src={`${imageBasePath}/${answer.images[0].id}_501.jpg`}\n alt={answer.alternativeText}\n />\n </a>\n );\n});\n","import gql from 'graphql-tag';\nimport { INQUIRY_MEDIA_TYPE } from '../../../../constants/inquiryMediaTypes';\nimport { LessonExerciseTextAnswer } from './LessonExerciseTextAnswer/LessonExerciseTextAnswer';\nimport { LessonExerciseImageAnswer } from './LessonExerciseImageAnswer/LessonExerciseImageAnswer';\n\nexport const lessonExerciseAnswerFragment = {\n name: 'LessonExerciseAnswer',\n fragment() {\n return gql`fragment ${this.name} on Inquiry {\n subInquiries {\n id\n subInquiryText: inquiryText\n subInquiryDescription: inquiryDescription\n images {\n id\n }\n alternatives {\n id\n alternativeText\n isCorrect\n images {\n id\n }\n }\n }\n } \n `;\n },\n};\n\nexport const ExerciseAnswer = ({ answerMediaType, answer, index, onAnswerClicked, addRef }) => {\n const Component =\n answerMediaType === INQUIRY_MEDIA_TYPE.TEXT.toLowerCase()\n ? LessonExerciseTextAnswer\n : LessonExerciseImageAnswer;\n return (\n <Component\n key={answer.id}\n answer={answer}\n handleAnswerClicked={e => onAnswerClicked(e, index)}\n ref={ref => {\n addRef(index, ref);\n }}\n />\n );\n};\n","import { useEffect, useRef } from 'react';\n\nexport const useIsMountedRef = () => {\n const isMountedRef = useRef(false);\n\n const setMounted = isMounted => {\n // eslint-disable-next-line fp/no-mutation\n isMountedRef.current = isMounted;\n };\n\n useEffect(() => {\n setMounted(true);\n return () => setMounted(false);\n });\n\n return isMountedRef;\n};\n","import { useEffect, useRef, useState } from 'react';\nimport { LessonExerciseHint } from '../LessonExerciseHint/LessonExerciseHint';\nimport { LessonExerciseQuestion } from '../LessonExerciseQuestion/LessonExerciseQuestion';\nimport { StyledSolveCheckButton } from '../../../SolveCheckButton/SolveCheckButton';\nimport { useInquiryHandling } from '../workflow/useInquiryHandling';\nimport { ANSWER_STATE } from '../LessonExerciseAnswer/answerState';\nimport { useAudio } from '../../../../hooks/useAudio';\nimport { findFeedbackAudio } from '../../../../utils/audioUtils';\nimport { LessonExerciseHiddenAudio } from '../LessonExerciseHiddenAudio/LessonExerciseHiddenAudio';\nimport { ExerciseAnswer } from '../LessonExerciseAnswer/ExerciseAnswer';\nimport { useIsMountedRef } from '../../../../hooks/useIsMountedRef';\n\nexport const MultiSelectionQuestionRow = ({ inquiry, exerciseId }) => {\n const {\n id: inquiryId,\n inquiryDescription,\n audios,\n subInquiries,\n mediaType,\n mainContentImage,\n learningMetaInfo: { achievableScore },\n } = inquiry;\n const isSolutionAudioFallbackMode = Boolean(mainContentImage);\n const correctAnswerAudio = findFeedbackAudio(isSolutionAudioFallbackMode, audios);\n const { target: answerAudio } = correctAnswerAudio || {};\n const { mp3Src: correctAnswerAudioUrl } = answerAudio || {};\n const { alternatives } = subInquiries[0];\n const answersRefArray = [];\n const answerMediaType = mediaType.toLowerCase();\n\n const [answersFrozen, setAnswersFrozen] = useState(false);\n const [answers, setAnswers] = useState(\n alternatives.map(alternative => {\n return {\n ...alternative,\n answerState: ANSWER_STATE.INITIAL,\n };\n }),\n );\n const {\n isSolveButtonDisabled,\n isCheckButtonDisabled,\n handleCorrectAnswer,\n handleWrongAnswer,\n handleSolved,\n isFromPlacementCourse,\n } = useInquiryHandling({\n inquiryId,\n achievableScore,\n });\n\n const { playWrongDefaultAudioFeedBack, playCorrectDefaultAudioFeedBack } = useAudio();\n const correctAnswerAudioRef = useRef();\n const answersRef = useRef(answers);\n const isMountedRef = useIsMountedRef();\n\n useEffect(() => {\n // eslint-disable-next-line fp/no-mutation\n answersRef.current = answers;\n });\n\n const selectOrUnselectAnswer = chosenAnswerIndex => {\n const updatedAnswers = answers.map((answer, index) => {\n if (index !== chosenAnswerIndex) {\n return answer;\n }\n const newAnswerState =\n answer.answerState === ANSWER_STATE.SELECTED ? ANSWER_STATE.INITIAL : ANSWER_STATE.SELECTED;\n return {\n ...answer,\n answerState: newAnswerState,\n };\n });\n setAnswers(updatedAnswers);\n };\n\n const isSolvedCorrectly = checkedAnswers => {\n const unsolvedOrWrongAnswers = checkedAnswers.filter(answer => {\n const { answerState, isCorrect } = answer;\n return (\n answerState === ANSWER_STATE.WRONG || (answerState === ANSWER_STATE.INITIAL && isCorrect)\n );\n });\n return unsolvedOrWrongAnswers.length === 0;\n };\n\n const updateAnswers = (answersToUpdate, answerStateEvalFn, skipAnswerConditionalFn) => {\n const updatedAnswers = answersToUpdate.map(answer => {\n if (skipAnswerConditionalFn && skipAnswerConditionalFn(answer) === true) {\n return answer;\n }\n return {\n ...answer,\n answerState: answerStateEvalFn(answer),\n };\n });\n setAnswers(updatedAnswers);\n return updatedAnswers;\n };\n\n const playSuccessAudio = () => {\n if (correctAnswerAudioUrl) {\n correctAnswerAudioRef.current.play();\n } else {\n playCorrectDefaultAudioFeedBack();\n }\n };\n\n const addRef = (index, ref) => {\n // eslint-disable-next-line fp/no-mutation\n answersRefArray[index] = ref;\n };\n\n const onAnswerClicked = (e, chosenAnswerIndex) => {\n e.preventDefault();\n if (answersFrozen) {\n return;\n }\n answersRefArray[chosenAnswerIndex].blur();\n selectOrUnselectAnswer(chosenAnswerIndex);\n };\n\n const onHandleSolveButtonClicked = () => {\n handleSolved();\n playSuccessAudio();\n updateAnswers(answers, answer =>\n answer.isCorrect ? ANSWER_STATE.SOLVED : ANSWER_STATE.INITIAL,\n );\n setAnswersFrozen(true);\n };\n\n const onHandleCheckButtonClicked = () => {\n const checkedAnswers = updateAnswers(\n answers,\n answer => (answer.isCorrect ? ANSWER_STATE.CORRECT : ANSWER_STATE.WRONG),\n answer => answer.answerState !== ANSWER_STATE.SELECTED,\n );\n\n if (isSolvedCorrectly(checkedAnswers)) {\n handleCorrectAnswer();\n playSuccessAudio();\n setAnswersFrozen(true);\n } else {\n handleWrongAnswer();\n if (isFromPlacementCourse) setAnswersFrozen(true);\n playWrongDefaultAudioFeedBack();\n setTimeout(() => {\n if (isMountedRef.current) {\n updateAnswers(answersRef.current, answer =>\n answer.answerState === ANSWER_STATE.WRONG && !isFromPlacementCourse\n ? ANSWER_STATE.INITIAL\n : answer.answerState,\n );\n }\n }, 3000);\n }\n };\n\n return (\n <div\n className={`exercise-questions ${answersFrozen ? 'finished' : ''}`}\n data-type={`allocation${answerMediaType}`}\n data-exercise-id={exerciseId}\n aria-atomic=\"true\"\n >\n <div className=\"question-row row\">\n <div className=\"col-sm-offset-1 col-sm-5 col-lg-offset-2 col-lg-4\">\n <LessonExerciseQuestion {...{ inquiry }} />\n </div>\n <div className=\"col-sm-5 col-lg-4\">\n <div className={`answer-multiple-${answerMediaType}`} aria-multiselectable=\"true\">\n {answers.map((answer, index) => (\n <ExerciseAnswer\n key={answer.id}\n {...{ answerMediaType, answer, index, onAnswerClicked, addRef }}\n />\n ))}\n </div>\n </div>\n </div>\n <div className=\"col-sm-offset-1 col-sm-10 col-lg-offset-2 col-lg-8\">\n <LessonExerciseHint description={inquiryDescription} />\n </div>\n <StyledSolveCheckButton\n {...{\n isSolveButtonDisabled,\n isCheckButtonDisabled,\n handleCheckClicked: onHandleCheckButtonClicked,\n handleSolveClicked: onHandleSolveButtonClicked,\n }}\n />\n {correctAnswerAudioUrl && (\n <LessonExerciseHiddenAudio ref={correctAnswerAudioRef} src={correctAnswerAudioUrl} />\n )}\n </div>\n );\n};\n","import { LessonExerciseTextInput } from '../LessonExerciseTextInput/LessonExerciseTextInput';\nimport { MultiSelectionQuestionRow } from './MultiSelectionQuestionRow';\nimport { AudioProvider } from '../../../../context/AudioContext';\n\nexport const MultiSelectionExercise = ({ data }) => {\n const { id, inputText, inquiries } = data.content;\n\n return (\n <AudioProvider>\n <LessonExerciseTextInput inputText={inputText} />\n {inquiries.map(inquiry => (\n <MultiSelectionQuestionRow key={inquiry.id} exerciseId={id} inquiry={inquiry} />\n ))}\n </AudioProvider>\n );\n};\n","/* eslint-disable jsx-a11y/aria-role */\nimport { useTranslation } from '../../../../../hooks/useTranslation';\n\nexport const SelfAssessmentAnswer = ({ answer, handleAnswerClicked }) => {\n const { index, isSelected, label } = answer;\n const answerLabel = useTranslation(label);\n\n return (\n <>\n <a\n role=\"\"\n aria-selected={isSelected}\n aria-label={`${answerLabel}${isSelected ? ' - Correct' : ''}`}\n href=\"/#\"\n className=\"answer-link-container\"\n data-exercise-answer-id={index}\n onClick={handleAnswerClicked}\n >\n <div className={`answer text-choice ${isSelected ? 'correct' : ''}`}>{answerLabel}</div>\n </a>\n </>\n );\n};\n","import { I18nText } from '../../../../I18n/I18nText';\nimport { LessonExerciseQuestionAudio } from '../../LessonExerciseQuestion/QuestionTypes/LessonExerciseQuestionAudio';\nimport { findFeedbackAudio } from '../../../../../utils/audioUtils';\nimport { useTranslation } from '../../../../../hooks/useTranslation';\nimport { useRtlContext } from '../../../../../hooks/useRtl';\n\nexport const SelfAssessmentQuestion = ({ audios, mainContentImage }) => {\n const { isRtl } = useRtlContext();\n\n const howWasItWithOnlyFeedbackAudio = useTranslation('exercise.howWasItWithOnlyFeedbackAudio');\n const howWasItLabel = useTranslation('exercise.howWasIt');\n\n const isSolutionAudioFallbackMode = Boolean(mainContentImage);\n const feedbackAudio = findFeedbackAudio(isSolutionAudioFallbackMode, audios);\n\n const feedbackAudioUrl = feedbackAudio ? feedbackAudio.target.mp3Src : null;\n\n const lessonExerciseQuestionAudio = () => {\n const hasOnlyFeedbackAudio =\n feedbackAudioUrl.includes('Loesungsaudio.mp3') && audios.length === 1;\n const audioLabel = hasOnlyFeedbackAudio ? howWasItWithOnlyFeedbackAudio : howWasItLabel;\n return <LessonExerciseQuestionAudio audio={feedbackAudio} inquiryText={audioLabel} />;\n };\n\n return (\n <div className=\"col-sm-offset-1 col-sm-5 col-lg-offset-2 col-lg-4\">\n {feedbackAudioUrl ? (\n lessonExerciseQuestionAudio()\n ) : (\n <div className={`bubble text${isRtl ? ' override-rtl' : ''}`}>\n <I18nText translation=\"exercise.howWasIt\" />\n </div>\n )}\n </div>\n );\n};\n","import { useState } from 'react';\nimport { SelfAssessmentAnswer } from './SelfAssessmentAnswer';\nimport { SelfAssessmentQuestion } from './SelfAssessmentQuestion';\nimport { useInquiryHandling } from '../../workflow/useInquiryHandling';\n\nexport const SelfAssessment = ({ inquiry }) => {\n const {\n audios,\n mainContentImage,\n learningMetaInfo: { achievableScore },\n id: inquiryId,\n } = inquiry;\n const fixedAnswers = [\n { label: 'exercise.02', index: 1, isSelected: false },\n { label: 'exercise.01', index: 0, isSelected: false },\n ];\n\n const { handleCorrectAnswer, handleWrongAnswer } = useInquiryHandling({\n inquiryId,\n achievableScore,\n });\n\n const [answersFrozen, setAnswersFrozen] = useState(false);\n const [answers, setSelected] = useState(fixedAnswers);\n\n const updateSelected = selectedIndex => {\n const updatedAnswers = answers.map((answer, index) => {\n return {\n ...answer,\n isSelected: index === selectedIndex ? true : answer.isSelected,\n };\n });\n\n setSelected(updatedAnswers);\n };\n\n const evaluateAnswer = selectedIndex => {\n if (selectedIndex === 0) {\n handleCorrectAnswer();\n } else {\n handleWrongAnswer();\n }\n };\n\n const onAnswerClicked = (e, index) => {\n e.preventDefault();\n\n if (answersFrozen) {\n return;\n }\n\n evaluateAnswer(index);\n updateSelected(index);\n setAnswersFrozen(true);\n };\n\n return (\n <div\n className={`exercise-questions ${answersFrozen ? 'finished' : ''}`}\n data-type=\"allocationaudiopronunce\"\n data-exercise-id={inquiry.id}\n >\n <div className=\"question-row row\">\n <SelfAssessmentQuestion {...{ audios, mainContentImage }} />\n <div className=\"col-sm-5 col-lg-4\">\n <div className=\"answer-multiple-text\" aria-multiselectable=\"false\">\n {answers.map((answer, index) => (\n <SelfAssessmentAnswer\n key={`${inquiryId}-${index}`}\n answer={answer}\n handleAnswerClicked={e => onAnswerClicked(e, index)}\n />\n ))}\n </div>\n </div>\n </div>\n </div>\n );\n};\n","import { createGlobalStyle } from 'styled-components';\nimport { LessonExerciseHint } from '../LessonExerciseHint/LessonExerciseHint';\nimport { LessonExerciseQuestion } from '../LessonExerciseQuestion/LessonExerciseQuestion';\nimport { SelfAssessment } from './SelfAssessment/SelfAssessment';\n\nexport const RepeatExerciseRowGlobalStyles = createGlobalStyle`\n /* @noflip */\n .answer {\n direction: ltr;\n text-align: left;\n }\n`;\n\nexport const RepeatExerciseRow = ({ inquiry }) => {\n const { inquiryDescription, subInquiries } = inquiry;\n const { subInquiryDescription } = subInquiries[0];\n\n return (\n <>\n <div className=\"exercise-questions\">\n <div className=\"question-row row\">\n <div className=\"col-sm-offset-1 col-sm-5 col-lg-offset-2 col-lg-4\">\n <LessonExerciseQuestion {...{ inquiry, useSubInquiryTextAsLabel: true }} />\n </div>\n <div className=\"col-sm-5 col-lg-4\">\n <RepeatExerciseRowGlobalStyles />\n {subInquiryDescription && <div className=\"answer\">{subInquiryDescription}</div>}\n </div>\n </div>\n </div>\n <div className=\"row\">\n <div className=\"col-sm-offset-1 col-sm-10 col-lg-offset-2 col-lg-8\">\n <LessonExerciseHint description={inquiryDescription} />\n </div>\n </div>\n <SelfAssessment {...{ inquiry }} />\n </>\n );\n};\n","import { AudioProvider } from '../../../../context/AudioContext';\nimport { LessonExerciseTextInput } from '../LessonExerciseTextInput/LessonExerciseTextInput';\nimport { RepeatExerciseRow } from './RepeatExerciseRow';\n\nexport const RepeatExercise = ({ data }) => {\n const { inputText, inquiries } = data.content;\n return (\n <AudioProvider>\n <LessonExerciseTextInput inputText={inputText} />\n {inquiries.map(inquiry => (\n <RepeatExerciseRow key={inquiry.id} inquiry={inquiry} />\n ))}\n </AudioProvider>\n );\n};\n","import { useEffect, useRef, useState } from 'react';\nimport { LessonExerciseHiddenAudio } from '../../LessonExerciseHiddenAudio/LessonExerciseHiddenAudio';\nimport { LessonExerciseHint } from '../../LessonExerciseHint/LessonExerciseHint';\nimport { LessonExerciseQuestion } from '../../LessonExerciseQuestion/LessonExerciseQuestion';\nimport { findFeedbackAudio } from '../../../../../utils/audioUtils';\nimport { useAudio } from '../../../../../hooks/useAudio';\nimport { useInquiryHandling } from '../../workflow/useInquiryHandling';\nimport { ANSWER_STATE } from '../../LessonExerciseAnswer/answerState';\nimport { ExerciseAnswer } from '../../LessonExerciseAnswer/ExerciseAnswer';\nimport { useIsMountedRef } from '../../../../../hooks/useIsMountedRef';\n\nexport const SingleSelectionQuestionRow = ({ exerciseId, inquiry }) => {\n const {\n id: inquiryId,\n inquiryDescription,\n audios,\n subInquiries,\n mainContentImage,\n learningMetaInfo: { achievableScore },\n } = inquiry;\n const isSolutionAudioFallbackMode = Boolean(mainContentImage);\n const correctAnswerAudio = findFeedbackAudio(isSolutionAudioFallbackMode, audios);\n const { target: answerAudio } = correctAnswerAudio || {};\n const { mp3Src: correctAnswerAudioUrl } = answerAudio || {};\n const { alternatives } = subInquiries[0];\n const answerMediaType = inquiry.mediaType.toLowerCase();\n const answersRefArray = [];\n\n const [answersFrozen, setAnswersFrozen] = useState(false);\n const [answers, setAnswers] = useState(\n alternatives.map(alternative => {\n return {\n ...alternative,\n answerState: ANSWER_STATE.INITIAL,\n };\n }),\n );\n const { playWrongDefaultAudioFeedBack, playCorrectDefaultAudioFeedBack } = useAudio();\n const correctAnswerAudioRef = useRef();\n const answersRef = useRef(answers);\n const { handleCorrectAnswer, handleWrongAnswer, isFromPlacementCourse } = useInquiryHandling({\n inquiryId,\n achievableScore,\n });\n const isMountedRef = useIsMountedRef();\n\n useEffect(() => {\n // eslint-disable-next-line fp/no-mutation\n answersRef.current = answers;\n });\n\n const getAnswerState = ({ index, chosenAnswerIndex, selectCurrentAnswer, answer }) => {\n const { answerState, isCorrect } = answer;\n if (index === chosenAnswerIndex) {\n if (selectCurrentAnswer) {\n return isCorrect ? ANSWER_STATE.CORRECT : ANSWER_STATE.WRONG;\n }\n return ANSWER_STATE.INITIAL;\n }\n return answerState;\n };\n\n const updateAnswers = (chosenAnswerIndex, selectCurrentAnswer) => {\n const answersCopy = selectCurrentAnswer ? [...answers] : [...answersRef.current];\n const updatedAnswers = answersCopy.map((answer, index) => {\n return {\n ...answer,\n answerState: getAnswerState({ index, chosenAnswerIndex, selectCurrentAnswer, answer }),\n };\n });\n setAnswers(updatedAnswers);\n };\n\n const addRef = (index, ref) => {\n // eslint-disable-next-line fp/no-mutation\n answersRefArray[index] = ref;\n };\n\n const onAnswerClicked = (e, chosenAnswerIndex) => {\n e.preventDefault();\n answersRefArray[chosenAnswerIndex].blur();\n if (answersFrozen) {\n return;\n }\n updateAnswers(chosenAnswerIndex, true);\n\n if (answers[chosenAnswerIndex].isCorrect) {\n handleCorrectAnswer();\n setAnswersFrozen(true);\n if (correctAnswerAudioUrl) {\n correctAnswerAudioRef.current.play();\n } else {\n playCorrectDefaultAudioFeedBack();\n }\n } else {\n handleWrongAnswer();\n if (isFromPlacementCourse) setAnswersFrozen(true);\n playWrongDefaultAudioFeedBack();\n setTimeout(() => {\n if (isMountedRef.current) {\n updateAnswers(chosenAnswerIndex, isFromPlacementCourse);\n }\n }, 3000);\n }\n };\n\n return (\n <div\n className=\"exercise-questions\"\n data-type={`allocation${answerMediaType}`}\n data-exercise-id={exerciseId}\n aria-atomic=\"true\"\n >\n <div className=\"question-row row\">\n <div className=\"col-sm-offset-1 col-sm-5 col-lg-offset-2 col-lg-4\">\n <LessonExerciseQuestion {...{ inquiry }} />\n </div>\n <div className=\"col-sm-5 col-lg-4\">\n <div className={`answer-multiple-${answerMediaType}`} aria-multiselectable=\"false\">\n {answers.map((answer, index) => (\n <ExerciseAnswer\n key={answer.id}\n {...{ answerMediaType, answer, index, onAnswerClicked, addRef }}\n />\n ))}\n </div>\n </div>\n </div>\n <div className=\"row\">\n <div className=\"col-sm-offset-1 col-sm-10 col-lg-offset-2 col-lg-8\">\n <LessonExerciseHint description={inquiryDescription} />\n </div>\n </div>\n {correctAnswerAudioUrl && (\n <LessonExerciseHiddenAudio ref={correctAnswerAudioRef} src={correctAnswerAudioUrl} />\n )}\n </div>\n );\n};\n","import { SingleSelectionQuestionRow } from './SingleSelectionQuestionRow/SingleSelectionQuestionRow';\nimport { LessonExerciseTextInput } from '../LessonExerciseTextInput/LessonExerciseTextInput';\nimport { AudioProvider } from '../../../../context/AudioContext';\n\nexport const SingleSelectionExercise = ({ data }) => {\n const { id, inputText, inquiries } = data.content;\n\n return (\n <AudioProvider>\n <LessonExerciseTextInput inputText={inputText} />\n {inquiries.map(inquiry => (\n <SingleSelectionQuestionRow key={inquiry.id} exerciseId={id} inquiry={inquiry} />\n ))}\n </AudioProvider>\n );\n};\n","/* eslint-disable jsx-a11y/anchor-is-valid,jsx-a11y/aria-role */\nimport gql from 'graphql-tag';\nimport { useRef, useState, useEffect } from 'react';\nimport { createGlobalStyle } from 'styled-components';\nimport { useFrontendConfig } from '../../../../hooks/useFrontendConfig';\nimport { LessonExerciseQuestion } from '../LessonExerciseQuestion/LessonExerciseQuestion';\nimport { LessonExerciseHint } from '../LessonExerciseHint/LessonExerciseHint';\nimport { LessonExerciseHiddenAudio } from '../LessonExerciseHiddenAudio/LessonExerciseHiddenAudio';\nimport { StyledSolveCheckButton } from '../../../SolveCheckButton/SolveCheckButton';\nimport { INQUIRY_MEDIA_TYPE } from '../../../../constants/inquiryMediaTypes';\nimport { findFeedbackAudio } from '../../../../utils/audioUtils';\nimport { shuffle, sortObjectsByProp } from '../../../../utils/commons';\nimport { useInquiryHandling } from '../workflow/useInquiryHandling';\nimport { useAudio } from '../../../../hooks/useAudio';\nimport { INQUIRY_STATE } from '../workflow/inquiryState';\n\nexport const sortingExerciseFragment = {\n name: 'SortingExercise',\n fragment() {\n return gql`fragment ${this.name} on Inquiry {\n alternatives {\n id \n order\n alternativeText\n contentLinks {\n targetId\n }\n }\n } \n `;\n },\n};\n\nconst SortingExerciseRowAnswerGlobalStyles = createGlobalStyle` \n /* @noflip */\n .dotted-outline {\n text-align: left;\n direction: ltr;\n }\n`;\n\nexport const SortingExerciseRow = ({ inquiry }) => {\n const {\n alternatives,\n audios,\n id: inquiryId,\n inquiryDescription,\n mainContentImage,\n learningMetaInfo: { achievableScore },\n } = inquiry;\n const answerType = inquiry.mediaType.toLowerCase();\n\n const isSolutionAudioFallbackMode = Boolean(mainContentImage);\n const feedbackAudio = findFeedbackAudio(isSolutionAudioFallbackMode, audios);\n const { target: answerAudio } = feedbackAudio || {};\n const { mp3Src: feedbackAudioUrl } = answerAudio || {};\n const { imageBasePath } = useFrontendConfig();\n\n const feedbackAudioRef = useRef();\n const { playWrongDefaultAudioFeedBack, playCorrectDefaultAudioFeedBack } = useAudio();\n\n const {\n isSolveButtonDisabled,\n isCheckButtonDisabled,\n handleCorrectAnswer,\n handleWrongAnswer,\n handleSolved,\n inquiryState,\n isDisabled,\n } = useInquiryHandling({ inquiryId, achievableScore });\n\n const [choosenAnswers, setChoosenAnswers] = useState([]);\n const [selectableAnswers, setSelectableAnswers] = useState(alternatives);\n\n useEffect(() => {\n setSelectableAnswers(answers =>\n shuffle(answers.slice(0)).map(alternative => {\n return {\n ...alternative,\n isSelected: false,\n };\n }),\n );\n }, []);\n\n const isCorrectOrder = (value, index) => value.order === index + 1;\n\n const isDuplicatedValue = (value, index) =>\n value.alternativeText === alternatives[index].alternativeText;\n\n const isCorrect =\n choosenAnswers.length &&\n choosenAnswers.every(\n (value, index) => isCorrectOrder(value, index) || isDuplicatedValue(value, index),\n );\n\n const playCorrectAudio = () =>\n feedbackAudioUrl ? feedbackAudioRef.current.play() : playCorrectDefaultAudioFeedBack();\n\n const onHandleSolveButtonClicked = () => {\n setChoosenAnswers(sortObjectsByProp(alternatives, 'order'));\n setSelectableAnswers([]);\n playCorrectAudio();\n handleSolved();\n };\n\n const onHandleCheckButtonClicked = () => {\n if (isCorrect) {\n handleCorrectAnswer();\n playCorrectAudio();\n } else {\n handleWrongAnswer();\n playWrongDefaultAudioFeedBack();\n }\n };\n\n const onAnswerClicked = (e, selectedAnswer) => {\n e.preventDefault();\n if (isDisabled()) {\n return;\n }\n\n const updateSelection = {\n ...selectedAnswer,\n isSelected: !selectedAnswer.isSelected,\n };\n\n if (selectedAnswer.isSelected) {\n setSelectableAnswers(currentSelectableAnswers => [\n updateSelection,\n ...currentSelectableAnswers,\n ]);\n setChoosenAnswers(choosenAnswers.filter(answer => answer.id !== updateSelection.id));\n } else {\n setChoosenAnswers(currentChoosenAnswers => [...currentChoosenAnswers, updateSelection]);\n setSelectableAnswers(selectableAnswers.filter(answer => answer.id !== updateSelection.id));\n }\n };\n\n const getAnswerLink = (type, answer) => {\n const { alternativeText, contentLinks } = answer;\n const answerID = answer.id;\n const isInquiryMediaTypeText = type === INQUIRY_MEDIA_TYPE.TEXT.toLowerCase();\n const classType = isInquiryMediaTypeText ? 'btn' : 'image';\n const answerContent = isInquiryMediaTypeText ? (\n alternativeText\n ) : (\n <img\n className=\"img-responsive\"\n src={`${imageBasePath}/${contentLinks[0].targetId}_501.jpg`}\n alt={alternativeText}\n />\n );\n\n return (\n <a\n role=\"\"\n key={answerID}\n onClick={e => onAnswerClicked(e, answer)}\n href=\"#\"\n className={`btn answer-sorting-${classType} alwaysLtr`}\n aria-selected={answer.isSelected}\n data-exercise-answer-id={answerID}\n >\n <SortingExerciseRowAnswerGlobalStyles />\n {answerContent}\n </a>\n );\n };\n\n function getFeedbackClass() {\n switch (inquiryState) {\n case INQUIRY_STATE.WRONG:\n return 'wrong-outline';\n case INQUIRY_STATE.CORRECT:\n return 'correct-outline';\n case INQUIRY_STATE.SOLVED:\n case INQUIRY_STATE.INITIAL:\n default:\n return '';\n }\n }\n return (\n <>\n <div className=\"exercise-questions\" data-exercise-id={inquiryId}>\n <div className=\"question-row row\">\n <div className=\"col-sm-offset-1 col-sm-5 col-lg-offset-2 col-lg-4\">\n <LessonExerciseHiddenAudio ref={feedbackAudioRef} src={feedbackAudioUrl} />\n <LessonExerciseQuestion {...{ inquiry }} />\n </div>\n <div className=\"col-sm-5 col-lg-4\">\n <div className={`dotted-outline ${getFeedbackClass()}`}>\n <div className=\"col-xs-12 answer-sorting-target\">\n {choosenAnswers.map(answer => getAnswerLink(answerType, answer))}\n </div>\n </div>\n <div className=\"answer-sorting-collection\" aria-multiselectable=\"false\">\n {selectableAnswers.map(answer => getAnswerLink(answerType, answer))}\n </div>\n </div>\n </div>\n </div>\n <div className=\"row\">\n <div className=\"col-sm-offset-1 col-sm-10 col-lg-offset-2 col-lg-8\">\n <LessonExerciseHint description={inquiryDescription} />\n </div>\n </div>\n <div className=\"row form-group inline-check\">\n <StyledSolveCheckButton\n {...{\n handleCheckClicked: onHandleCheckButtonClicked,\n handleSolveClicked: onHandleSolveButtonClicked,\n isCheckButtonDisabled,\n isSolveButtonDisabled,\n }}\n />\n </div>\n </>\n );\n};\n","import { AudioProvider } from '../../../../context/AudioContext';\nimport { LessonExerciseTextInput } from '../LessonExerciseTextInput/LessonExerciseTextInput';\nimport { SortingExerciseRow } from './SortingExerciseRow';\n\nexport const SortingExercise = ({ data }) => {\n const { inputText, inquiries } = data.content;\n return (\n <AudioProvider>\n <LessonExerciseTextInput inputText={inputText} />\n {inquiries.map(inquiry => (\n <SortingExerciseRow key={inquiry.id} inquiry={inquiry} />\n ))}\n </AudioProvider>\n );\n};\n","import { Prompt } from 'react-router-dom';\nimport { useBeforeunload } from 'react-beforeunload';\nimport { useTranslation } from '../../../../hooks/useTranslation';\nimport { isPathInExerciseNavigationWhiteList } from '../../../../utils/url/urlUtils';\n\nexport const ExerciseLeavingPrompt = () => {\n useBeforeunload(event => {\n event.preventDefault();\n });\n\n const leaveMessage = useTranslation('client.exercise.interrupt');\n return (\n <Prompt\n message={(location, action) => {\n if (action === 'POP') {\n return leaveMessage;\n }\n return isPathInExerciseNavigationWhiteList(location.pathname) ? true : leaveMessage;\n }}\n />\n );\n};\n","import { ContentNavTitle } from './ContentNavTitle/ContentNavTitle';\n\nexport const ContentContainer = ({ title, children }) => (\n <div className=\"section exercise-container vocabulary copy\">\n <ContentNavTitle {...{ title, top: true }} />\n {children}\n <ContentNavTitle {...{ title, bottom: true }} />\n </div>\n);\n","export const ContentBottomLine = () => (\n <div className=\"row vocabulary list-end\">\n <div className=\"col-sm-offset-1 col-sm-10 col-lg-offset-2 col-lg-8 vocabulary-entry\" />\n </div>\n);\n","import styled from 'styled-components';\nimport { useRef } from 'react';\nimport { useToggle } from '../../hooks/useToggle';\nimport { StyledToggleableArrow as ToggleableArrow } from '../ToggleableArrow/ToggleableArrow';\nimport { colors } from '../../utils/css';\nimport { useTranslation } from '../../hooks/useTranslation';\n\nexport const AccordionContainer = ({ title, children, className }) => {\n const element = useRef(null);\n const [isOpen, { toggleOnClick }] = useToggle();\n const height = element.current ? element.current.scrollHeight : '0';\n const titleTranslation = useTranslation(title);\n\n return (\n <div className={className}>\n <div className=\"row noVMargins\">\n <div className=\"col-sm-offset-1 col-sm-10 col-lg-offset-2 col-lg-8\">\n <button tabIndex={0} onClick={toggleOnClick}>\n <h4>\n {titleTranslation}\n <ToggleableArrow\n className=\"toggleable-arrow\"\n fill={colors.LG_BLACK}\n {...{\n isUp: isOpen,\n }}\n />\n </h4>\n </button>\n </div>\n </div>\n <AccordionContainerContent\n height={height}\n isOpen={isOpen}\n ref={element}\n aria-expanded={isOpen}\n >\n {children}\n </AccordionContainerContent>\n </div>\n );\n};\n\nexport const AccordionContainerContent = styled.div`\n max-height: ${({ isOpen, height }) => (isOpen ? height : '1')}px;\n overflow: hidden;\n background-color: ${colors.LG_WHITE};\n transition: max-height 0.7s;\n margin-bottom: 20px;\n`;\n\nexport const StyledAccordionContainer = styled(AccordionContainer)`\n button {\n outline: none;\n padding: 0;\n display: flex;\n position: relative;\n cursor: pointer;\n border: none;\n background-color: ${colors.LG_WHITE};\n width: 10em;\n }\n .toggleable-arrow {\n position: relative;\n top: 0.1em;\n margin-left: 0.2em;\n width: 20px;\n height: 17px;\n }\n`;\n","import gql from 'graphql-tag';\nimport { createGlobalStyle } from 'styled-components';\nimport { RichText } from '../RichText/RichText';\nimport { useKnowledgePlaceholderReplacementEffect } from '../Modal/KnowledgeModal/useKnowledgePlaceholderReplacementEffect';\nimport { ContentContainer } from '../ContentContainer/ContentContainer';\nimport { ContentBottomLine } from '../ContentContainer/ContentBottomLine/ContentBottomLine';\nimport { StyledAccordionContainer as AccordionContainer } from '../ContentContainer/AccordionContainer';\n\nexport const manuscriptFragment = gql`\n fragment LessonManuscript on Lesson {\n id\n manuscript\n }\n`;\n\nconst ManuscriptGlobalStyles = createGlobalStyle`\n /* @noflip */\n .alwaysLtr {\n text-align: left;\n }\n`;\n\nexport const Manuscript = ({ content, isStandalone = true }) => {\n const { knowledges, manuscript } = content;\n const ContainerComponent = isStandalone ? ContentContainer : AccordionContainer;\n\n useKnowledgePlaceholderReplacementEffect({ knowledges, ignore: !isStandalone });\n\n return (\n <ContainerComponent title=\"lesson.menu.manuscript\">\n <ManuscriptGlobalStyles />\n <div className=\"row vocabulary\">\n <div className=\"col-sm-offset-1 col-sm-10 col-lg-offset-2 col-lg-8\">\n <RichText content={manuscript} className=\"override-ltr alwaysLtr\" />\n </div>\n </div>\n <ContentBottomLine />\n </ContainerComponent>\n );\n};\n","import gql from 'graphql-tag';\nimport { ContentNavTitle } from '../../../ContentContainer/ContentNavTitle/ContentNavTitle';\nimport { LessonExerciseHeadline } from '../LessonExerciseHeadline/LessonExerciseHeadline';\nimport { ClozeExercise, clozeExerciseFragment } from '../ClozeExercise/ClozeExercise';\nimport { DictationExercise } from '../DictationExercise/DictationExercise';\nimport { ManyToManyExercise } from '../ManyToManyExercise/ManyToManyExercise';\nimport { MediaInputVideo } from '../../../MediaInput/MediaInputVideo/MediaInputVideo';\nimport { MediaInputImage } from '../../../MediaInput/MediaInputImage/MediaInputImage';\nimport { MediaInputAudio } from '../../../MediaInput/MediaInputAudio/MediaInputAudio';\nimport { MultiSelectionExercise } from '../MultiSelectionExercise/MultiSelectionExercise';\nimport { RepeatExercise } from '../RepeatExercise/RepeatExercise';\nimport { SingleSelectionExercise } from '../SingleSelectionExercise/SingleSelectionExercise';\nimport { SortingExercise } from '../SortingExercise/SortingExercise';\nimport { useKnowledgePlaceholderReplacementEffect } from '../../../Modal/KnowledgeModal/useKnowledgePlaceholderReplacementEffect';\nimport { lessonExerciseAnswerFragment } from '../LessonExerciseAnswer/ExerciseAnswer';\nimport { lessonExerciseQuestionFragment } from '../LessonExerciseQuestion/LessonExerciseQuestion';\nimport { sortingExerciseFragment } from '../SortingExercise/SortingExerciseRow';\nimport { ExerciseLeavingPrompt } from './ExerciseLeavingPrompt';\nimport { Manuscript } from '../../../Manuscript/Manuscript';\n\nexport const lessonExerciseItemFragment = {\n name: 'LessonExerciseItem',\n fragment() {\n return gql`fragment ${this.name} on Inquiry {\n id\n inquiryDescription\n inquiryType\n selectionType\n sortingType\n mediaType\n learningMetaInfo {\n achievableScore\n }\n ...${lessonExerciseAnswerFragment.name}\n ...${lessonExerciseQuestionFragment.name}\n ...${sortingExerciseFragment.name}\n ...${clozeExerciseFragment.name}\n }\n \n ${lessonExerciseQuestionFragment.fragment()}\n ${lessonExerciseAnswerFragment.fragment()}\n ${sortingExerciseFragment.fragment()}\n ${clozeExerciseFragment.fragment()} \n `;\n },\n};\n\nexport const getExerciseComponentBySelectionType = (selectionType, data) => {\n switch (selectionType) {\n case 'SINGLE':\n return <SingleSelectionExercise data={data} />;\n case 'DIRECT':\n return <ManyToManyExercise data={data} />;\n case 'MULTIPLE':\n return <MultiSelectionExercise data={data} />;\n default:\n return null;\n }\n};\n\nexport const getExerciseComponentByType = data => {\n const { inquiryType, selectionType } = data.content.inquiries[0];\n switch (inquiryType) {\n case 'ASSOCIATION':\n return getExerciseComponentBySelectionType(selectionType, data);\n case 'DICTATION':\n return <DictationExercise data={data} />;\n case 'REPEAT':\n return <RepeatExercise data={data} />;\n case 'CLOZE':\n return <ClozeExercise data={data} />;\n case 'SORTING':\n return <SortingExercise data={data} />;\n default:\n return 'OTHER EXERCISE TYPE PLACEHOLDER';\n }\n};\n\nexport const getExerciseMediaInputComponentByType = data => {\n const { inputType } = data.content;\n switch (inputType) {\n case 'NONE':\n return null;\n case 'TEXT':\n return null;\n case 'IMAGE':\n return <MediaInputImage data={data} />;\n case 'AUDIO':\n return (\n <div className=\"input-header-video\">\n <MediaInputAudio data={data} />\n </div>\n );\n case 'VIDEO':\n return (\n <div className=\"input-header-video\">\n <MediaInputVideo data={data} />\n </div>\n );\n default:\n return null;\n }\n};\n\nexport const LessonExerciseItem = ({ data, exerciseCounter, manuscriptContent }) => {\n const contentComponent = getExerciseComponentByType(data);\n const mediaInputComponent = getExerciseMediaInputComponentByType(data);\n\n useKnowledgePlaceholderReplacementEffect({\n knowledges: [...data.content.knowledges, ...manuscriptContent.knowledges],\n });\n\n return (\n <>\n <ExerciseLeavingPrompt />\n {mediaInputComponent && (\n <div className=\"row\">\n <div className=\"col-xs-12 lecture-exercise-nav\">{mediaInputComponent}</div>\n </div>\n )}\n <ContentNavTitle title={exerciseCounter} top={true} />\n <LessonExerciseHeadline data={data} />\n {manuscriptContent.manuscript && (\n <Manuscript content={manuscriptContent} isStandalone={false} />\n )}\n {contentComponent}\n </>\n );\n};\n","export const SET_IMPROVE_MODE_FOR_LESSON = 'SET_IMPROVE_MODE_FOR_LESSON';\nexport const REMOVE_IMPROVE_MODE_FOR_LESSON = 'REMOVE_IMPROVE_MODE_FOR_LESSON';\n\nexport const LESSON_EXERCISE_MODE = Object.freeze({\n IMPROVE: 'IMPROVE',\n});\n\n// actions\nexport const setImproveMode = cosLessonId => ({\n type: SET_IMPROVE_MODE_FOR_LESSON,\n payload: cosLessonId,\n});\n\nexport const removeImproveMode = cosLessonId => ({\n type: REMOVE_IMPROVE_MODE_FOR_LESSON,\n payload: cosLessonId,\n});\n\n// helpers\nconst findExistingLesson = ({ cosLessonId, lessons }) => {\n return lessons.find(lesson => lesson.cosLessonId === cosLessonId);\n};\n\nconst addLessonMode = ({ cosLessonId, lessons }) => {\n const existingLesson = findExistingLesson({ cosLessonId, lessons });\n if (existingLesson) {\n const otherLessons = lessons.filter(lesson => lesson.cosLessonId !== cosLessonId);\n return [...otherLessons, { cosLessonId, mode: LESSON_EXERCISE_MODE.IMPROVE }];\n }\n return [...lessons, { cosLessonId, mode: LESSON_EXERCISE_MODE.IMPROVE }];\n};\n\nconst removeLessonMode = ({ cosLessonId, lessons }) => {\n const existingLesson = findExistingLesson({ cosLessonId, lessons });\n if (existingLesson) {\n const otherLessons = lessons.filter(lesson => lesson.cosLessonId !== cosLessonId);\n return [...otherLessons];\n }\n return [...lessons];\n};\n\n// state\nconst initialState = [];\n\n// reducer\nexport const lessonExerciseModeReducer = (state = initialState, action) => {\n switch (action.type) {\n case SET_IMPROVE_MODE_FOR_LESSON:\n return addLessonMode({ cosLessonId: action.payload, lessons: state });\n case REMOVE_IMPROVE_MODE_FOR_LESSON:\n return removeLessonMode({ cosLessonId: action.payload, lessons: state });\n default:\n return state;\n }\n};\n","import { LESSON_EXERCISE_MODE } from './lessonExerciseModeDuck';\n\nexport const isLessonInImproveModeSelector = lessonId => state => {\n return state.lessonExerciseMode.some(\n item => item.cosLessonId === lessonId && item.mode === LESSON_EXERCISE_MODE.IMPROVE,\n );\n};\n","import { useSelector } from 'react-redux';\nimport { useParams } from 'react-router';\nimport {\n findInquiryLearnProgressSelector,\n findLessonLearnProgressSelector,\n} from '../state/progress/learnProgressSelectors';\nimport {\n createLinkToResultPage,\n getLessonExerciseUrl,\n getLessonUrl,\n} from '../utils/url/urlFactory';\nimport { normalizeUrlName } from '../utils/url/url';\nimport { isLessonInImproveModeSelector } from '../state/mode/lessonExerciseModeSelectors';\n\nexport const useExerciseManager = ({\n lessonName,\n lessonExerciseOverviewItems,\n courseId,\n isFinalTest,\n}) => {\n const { langCode, lessonId, exerciseId } = useParams();\n const lessonProgress = useSelector(findLessonLearnProgressSelector(+lessonId));\n const isLessonInImproveMode = useSelector(isLessonInImproveModeSelector(+lessonId));\n const inquiryProgresses = useSelector(findInquiryLearnProgressSelector(+lessonId, +exerciseId));\n\n const generateNextExercisePath = nextItem => {\n if (!nextItem) {\n return undefined;\n }\n\n return getLessonExerciseUrl(\n langCode,\n lessonId,\n normalizeUrlName(nextItem.exerciseName),\n nextItem.exerciseId,\n );\n };\n\n const mapToFlatLessonExercises = lessonExerciseItems => {\n return lessonExerciseItems.map(item => ({\n exerciseId: item.targetId,\n exerciseName: item.target.name,\n }));\n };\n\n const filterExercisesWithNoFullScore = lessonExercises => {\n return lessonExercises.filter(lessonExercise => {\n const existingProgress = lessonProgress.exerciseProgresses.find(\n exerciseProgress => exerciseProgress.cosExerciseId === lessonExercise.exerciseId,\n );\n if (!existingProgress) {\n return true;\n }\n return existingProgress.maxPoints !== existingProgress.resultPoints;\n });\n };\n\n const getFirstExercisePath = isImproveMode => {\n const lessonExercises = mapToFlatLessonExercises(lessonExerciseOverviewItems);\n\n if (!lessonProgress || isFinalTest) {\n return getLessonExerciseUrl(\n langCode,\n lessonId,\n normalizeUrlName(lessonExercises[0].exerciseName),\n lessonExercises[0].exerciseId,\n );\n }\n\n // eslint-disable-next-line fp/no-let\n let firstExerciseItem;\n if (isLessonInImproveMode || isImproveMode) {\n const exercisesWithNoFullScore = filterExercisesWithNoFullScore(lessonExercises);\n // eslint-disable-next-line fp/no-mutation,prefer-destructuring\n firstExerciseItem = exercisesWithNoFullScore[0];\n } else {\n const exerciseIdsWithProgress = lessonProgress.exerciseProgresses.map(\n exerciseProgress => exerciseProgress.cosExerciseId,\n );\n // eslint-disable-next-line fp/no-mutation\n firstExerciseItem = lessonExercises.find(\n exercise => !exerciseIdsWithProgress.includes(exercise.exerciseId),\n );\n }\n\n if (firstExerciseItem) {\n return getLessonExerciseUrl(\n langCode,\n lessonId,\n normalizeUrlName(firstExerciseItem.exerciseName),\n firstExerciseItem.exerciseId,\n );\n }\n\n const lessonPath = getLessonUrl(lessonId, langCode, normalizeUrlName(lessonName));\n return createLinkToResultPage({ courseId, isFinalTest, lessonPath });\n };\n\n const getCurrentIndex = () => {\n const currentExerciseItem = lessonExerciseOverviewItems.find(\n item => item.targetId === +exerciseId,\n );\n return lessonExerciseOverviewItems.indexOf(currentExerciseItem);\n };\n\n const getNextExercisePath = () => {\n const lessonExercises = mapToFlatLessonExercises(lessonExerciseOverviewItems);\n\n if (isLessonInImproveMode) {\n // eslint-disable-next-line fp/no-mutating-methods\n const remainingLessonExercises = [...lessonExercises].splice(getCurrentIndex() + 1);\n const remainingExercisesWithNoFullScore = filterExercisesWithNoFullScore(\n remainingLessonExercises,\n );\n const [nextItem] = remainingExercisesWithNoFullScore;\n return generateNextExercisePath(nextItem);\n }\n const nextItem = lessonExercises[getCurrentIndex() + 1];\n return generateNextExercisePath(nextItem);\n };\n\n const getFullScoreAchieved = () => {\n if (!lessonProgress) {\n return false;\n }\n return lessonProgress.maxPointsForAllExercises === lessonProgress.resultPoints;\n };\n\n const filterExercises = data => {\n if (!isLessonInImproveMode) {\n return data;\n }\n\n const {\n content,\n content: { inquiries = [] },\n } = data;\n\n const remainingInquiries = inquiries.filter(inquiry => {\n const existingProgress = inquiryProgresses.find(\n inquiryProgress => inquiryProgress.inquiryId === inquiry.id,\n );\n return !existingProgress || existingProgress.score !== existingProgress.maxScore;\n });\n\n return { content: { ...content, inquiries: remainingInquiries } };\n };\n\n return {\n firstExerciseLink: isImproveMode => getFirstExercisePath(isImproveMode),\n nextExerciseLink: () => getNextExercisePath(),\n isFullScoreAchieved: () => getFullScoreAchieved(),\n currentExerciseCount: getCurrentIndex() + 1,\n allExerciseCount: lessonExerciseOverviewItems.length,\n filterExerciseDataIfInImproveMode: data => filterExercises(data),\n };\n};\n","/* eslint-disable react-hooks/exhaustive-deps */\nimport { useEffect } from 'react';\nimport gql from 'graphql-tag';\nimport { useHistory, useParams } from 'react-router-dom';\nimport { useDispatch, useSelector } from 'react-redux';\nimport { LessonExerciseStats } from '../LessonExerciseStats/LessonExerciseStats';\nimport { useScrollToTop } from '../../../../hooks/useScrollToTop';\nimport { ContentNavTitle } from '../../../ContentContainer/ContentNavTitle/ContentNavTitle';\nimport { StyledStandardButton } from '../../../StandardButton/StandardButton';\nimport { knowledgesFragment } from '../../LessonKnowledge/LessonKnowledge';\nimport {\n LessonExerciseItem,\n lessonExerciseItemFragment,\n} from '../LessonExerciseItem/LessonExerciseItem';\nimport { normalizeUrlName } from '../../../../utils/url/url';\nimport { createLinkToResultPage, getLessonUrl } from '../../../../utils/url/urlFactory';\nimport { WithGraphQLQueryHandling } from '../../../WithGraphQLQueryHandling/WithGraphQLQueryHandling';\nimport { lessonExerciseHeadlineFragment } from '../LessonExerciseHeadline/LessonExerciseHeadline';\nimport { useExerciseProgress } from '../workflow/ExerciseProgress';\nimport {\n addLessonProgress,\n readLessonProgress,\n} from '../../../../state/progress/learnProgressDuck';\nimport { createLearnProgressData, scoreFragment } from '../../../../state/progress/learnProgress';\nimport { mediaInputChooserFragment } from '../../MediaInputChooser/MediaInputChooser';\nimport { useExerciseManager } from '../../../../hooks/useExerciseManager';\nimport { isLessonInImproveModeSelector } from '../../../../state/mode/lessonExerciseModeSelectors';\nimport { userDataSelector } from '../../../../state/user/userSelectors';\nimport { metaDataFragment, PageMetaData } from '../../../Page/PageMetaData';\nimport { PAGE_TYPES } from '../../../../constants/pageTypes';\nimport {\n gtmDataLayerFragment,\n GtmScriptWithDataLayer,\n} from '../../../GoogleTagManager/GtmScriptWithDataLayer';\n\nexport const lessonExerciseQuery = ({ handicap }) => gql`\n query LessonExercise($exerciseId: Int!, $lessonLang: Language!) {\n content(id: $exerciseId, lang: $lessonLang) {\n ... on Exercise {\n id\n name\n inputType\n inputText\n images {\n id\n }\n inquiries {\n ...${lessonExerciseItemFragment.name}\n }\n ...${lessonExerciseHeadlineFragment.name}\n ...ExerciseMediaInputChooser\n ...${`ExerciseScore${handicap || ''}`}\n ...ExerciseKnowledges\n ...${metaDataFragment.name}\n ${gtmDataLayerFragment.partial()}\n }\n }\n }\n ${lessonExerciseHeadlineFragment.fragment()}\n ${lessonExerciseItemFragment.fragment()}\n ${mediaInputChooserFragment.fragment({ type: 'Exercise' })}\n ${scoreFragment.fragment({ type: 'Exercise', handicap })}\n ${knowledgesFragment.fragment({ type: 'Exercise' })}\n ${metaDataFragment.fragment({ type: 'Exercise' })}\n`;\n\nexport const LessonExerciseNavigation = ({\n lessonExerciseOverviewItems,\n lessonLang,\n lessonName,\n lessonAchievableScore,\n courseId,\n manuscriptContent,\n isFinalTest,\n}) => {\n useScrollToTop();\n const history = useHistory();\n const { langCode, lessonId, exerciseId } = useParams();\n const { exerciseProgress, resetProgress } = useExerciseProgress();\n const { handicap } = useSelector(userDataSelector) || {};\n const dispatch = useDispatch();\n const lessonIdNumber = +lessonId;\n const exerciseIdNumber = +exerciseId;\n\n const isLessonInImproveMode = useSelector(isLessonInImproveModeSelector(lessonIdNumber));\n\n const {\n nextExerciseLink,\n currentExerciseCount,\n allExerciseCount,\n filterExerciseDataIfInImproveMode,\n } = useExerciseManager({\n lessonName,\n lessonExerciseOverviewItems,\n courseId,\n isFinalTest,\n });\n\n useEffect(() => {\n // reset local progress state in case of browser back and forward buttons have been used\n const unlisten = history.listen((location, action) => {\n if (action === 'POP') {\n resetProgress();\n if (isLessonInImproveMode) {\n history.push(createLinkToResultPage({ courseId, lessonName, lessonPath }));\n }\n }\n });\n return () => unlisten();\n }, [history]);\n\n useEffect(() => {\n dispatch(readLessonProgress(lessonIdNumber));\n }, [lessonIdNumber]);\n\n const lessonPath = getLessonUrl(lessonId, langCode, normalizeUrlName(lessonName));\n const lessonExerciseNavQueryVariables = {\n exerciseId: exerciseIdNumber,\n lessonLang,\n };\n\n const exerciseCounter = `${currentExerciseCount} / ${allExerciseCount}`;\n\n const handleNextButtonClick = ({ exerciseAchievableScore }) => {\n const progressMetaData = createLearnProgressData({\n langCode,\n lessonId: lessonIdNumber,\n courseId,\n lessonAchievableScore,\n exerciseId: exerciseIdNumber,\n allExerciseCount,\n exerciseProgress,\n exerciseAchievableScore,\n });\n dispatch(addLessonProgress(progressMetaData));\n resetProgress();\n const nextPath =\n nextExerciseLink() || createLinkToResultPage({ courseId, isFinalTest, lessonPath });\n history.push(nextPath);\n };\n\n return (\n <WithGraphQLQueryHandling\n query={lessonExerciseQuery({ handicap })}\n queryVariables={lessonExerciseNavQueryVariables}\n >\n {data => {\n const { content } = data;\n const {\n learningMetaInfo: { achievableScore: exerciseAchievableScore },\n } = content;\n\n const filteredData = filterExerciseDataIfInImproveMode(data);\n const amountOfInquiries = filteredData.content.inquiries.length;\n\n return (\n <>\n <PageMetaData\n pageType={PAGE_TYPES.EXERCISE}\n content={content}\n parentContentName={lessonName}\n useOnlyCmsKeywords={true}\n />\n <GtmScriptWithDataLayer content={data.content} />\n <div className=\"section exercise-container ltr-container\">\n <LessonExerciseItem {...{ data: filteredData, exerciseCounter, manuscriptContent }} />\n <div className=\"row\">\n <LessonExerciseStats amountOfInquiries={amountOfInquiries} />\n <div className=\"col-xs-offset-2 col-xs-8 col-sm-offset-4 col-sm-4\">\n <div className=\"exercise-check\">\n <StyledStandardButton\n id=\"nextButton\"\n className=\"btn main\"\n titleKey=\"common.next\"\n handleClick={() =>\n handleNextButtonClick({\n exerciseAchievableScore,\n })\n }\n />\n </div>\n </div>\n </div>\n <ContentNavTitle title={exerciseCounter} bottom={true} style={{ direction: 'ltr' }} />\n </div>\n </>\n );\n }}\n </WithGraphQLQueryHandling>\n );\n};\n","import { useEffect } from 'react';\nimport { useLocation } from 'react-router-dom';\nimport { isServer } from '../utils/ssr';\nimport globals from '../utils/globals';\n\nexport const useScrollToTop = () => {\n const { pathname } = useLocation();\n\n useEffect(() => {\n !isServer() && globals.window.scrollTo(0, 0);\n }, [pathname]);\n};\n","import { useRef } from 'react';\nimport { DwPicture } from '../../../DwPicture/DwPicture';\n\nexport const VocabularyRow = ({ data }) => {\n const { name, subTitle, audios, text } = data;\n const audio = audios[0];\n const audioSource = audio ? audio.mp3Src : '';\n const isValidImage = audio && audio.mainContentImageLink;\n\n const audioRef = useRef();\n\n const playAudio = e => {\n e.preventDefault();\n audioRef.current.play();\n };\n\n return (\n <div className=\"row vocabulary\">\n <div className=\"col-sm-offset-1 col-sm-3 col-lg-offset-2 col-lg-3 vocabulary-entry\">\n <div className=\"richtext-content-container override-ltr\">\n <p>\n <a\n className=\"audio-wortschatz-link audio-link\"\n href=\"/#\"\n onClick={e => playAudio(e)}\n role=\"button\"\n >\n <span id=\"vocab-title\">\n <strong dir=\"auto\">{name}</strong>\n </span>\n {/* eslint-disable-next-line jsx-a11y/media-has-caption */}\n <audio\n className=\"audio-modal-file initialized\"\n tabIndex=\"0\"\n width=\"100%\"\n ref={audioRef}\n >\n <source src={audioSource} type=\"audio/MP3\" />\n </audio>\n </a>\n <br />\n {subTitle && <span id=\"vocab-subtitle\">{subTitle}</span>}\n </p>\n </div>\n </div>\n <div className=\"col-sm-3 col-lg-2 vocabulary-entry\">\n {isValidImage && (\n <div className=\"richtext-content-container\">\n <DwPicture imageId={audio.mainContentImageLink.targetId} alt={name} />\n </div>\n )}\n </div>\n <div className=\"col-sm-4 col-lg-3 vocabulary-entry\">\n <div className=\"richtext-content-container\" dangerouslySetInnerHTML={{ __html: text }} />\n </div>\n </div>\n );\n};\n","import { gql } from '@apollo/client';\nimport { useParams } from 'react-router';\nimport { createGlobalStyle } from 'styled-components';\nimport { VocabularyRow } from './VocabularyRow/VocabularyRow';\nimport { toLang } from '../../../utils/mappers/langMapper';\nimport { WithGraphQLQueryHandling } from '../../WithGraphQLQueryHandling/WithGraphQLQueryHandling';\nimport { isRtlByLangCode } from '../../../utils/mappers/rtlLanguages';\nimport { metaDataFragment, PageMetaData } from '../../Page/PageMetaData';\nimport { PAGE_TYPES } from '../../../constants/pageTypes';\nimport {\n gtmDataLayerFragment,\n GtmScriptWithDataLayer,\n} from '../../GoogleTagManager/GtmScriptWithDataLayer';\n\nexport const lessonVocabularyQuery = gql`\n query LessonVocabulary($lessonId: Int!, $lessonLang: Language!) {\n content(id: $lessonId, lang: $lessonLang) {\n ... on Lesson {\n vocabularies {\n id\n name\n subTitle\n text\n audios {\n mp3Src\n mainContentImageLink {\n targetId\n }\n }\n }\n ...${metaDataFragment.name}\n ${gtmDataLayerFragment.partial()}\n }\n }\n }\n ${metaDataFragment.fragment({ type: 'Lesson' })}\n`;\n\nconst LessonVocabularyGlobalStyles = createGlobalStyle`\n /* @noflip */\n .override-ltr {\n text-align: left;\n }\n \n @media (min-width: 768px) { \n /* @noflip */\n .col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9 {\n float:right\n } \n \n /* @noflip */\n div.row.vocabulary div.col-sm-4 p {\n margin-right: auto;\n margin-left: 20px\n }\n \n /* @noflip */\n .col-sm-offset-1 {\n margin-right: 8.33333333%;\n margin-left: 0;\n }\n }\n\n @media (min-width: 1200px) {\n /* @noflip */\n .col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9 {\n float:right\n } \n \n /* @noflip */\n .col-lg-offset-2 {\n margin-right: 16.66666667%;\n margin-left: 0\n }\n }\n`;\n\nexport const LessonVocabulary = () => {\n const { langCode, lessonId } = useParams();\n\n const lessonVocabularyQueryVariables = {\n lessonId: +lessonId,\n lessonLang: toLang(langCode),\n };\n\n // TODO: this is only temporary here because the old styles need this distinction\n const isRtl = isRtlByLangCode(langCode);\n\n return (\n <WithGraphQLQueryHandling\n query={lessonVocabularyQuery}\n queryVariables={lessonVocabularyQueryVariables}\n >\n {data => {\n const { content } = data;\n const { vocabularies } = content;\n\n return (\n <>\n {isRtl && <LessonVocabularyGlobalStyles />}\n <PageMetaData\n pageType={PAGE_TYPES.VOCABULARY}\n content={content}\n translationFirst={true}\n useDescriptionTranslation={true}\n />\n <GtmScriptWithDataLayer content={content} />\n {vocabularies.map(vocabularyItem => (\n <VocabularyRow key={vocabularyItem.name} data={vocabularyItem} />\n ))}\n </>\n );\n }}\n </WithGraphQLQueryHandling>\n );\n};\n","import { LESSON_PARTS } from '../../constants/lessonParts';\n\nconst LESSON_PART_TRANSLATION_CODES = Object.freeze({\n [LESSON_PARTS.PHONEMIC_CHART]: '',\n [LESSON_PARTS.EXERCISE]: '',\n [LESSON_PARTS.GRAMMAR]: 'lesson.menu.grammar',\n [LESSON_PARTS.VOCABULARY_GLOSSARY]: 'lesson.menu.vocabulary',\n [LESSON_PARTS.REGIONAL_STUDIES]: 'lesson.menu.regionalStudies',\n [LESSON_PARTS.MANUSCRIPT]: '',\n [LESSON_PARTS.DOWNLOAD]: '',\n});\n\nexport const getTranslationCodeForLessonPart = lessonPart =>\n LESSON_PART_TRANSLATION_CODES[lessonPart];\n","import { Link } from 'react-router-dom';\nimport { getTranslationCodeForLessonPart } from '../../../../utils/mappers/lessonPartToTranslationCode';\nimport { LESSON_PARTS } from '../../../../constants/lessonParts';\nimport { useI18nContext } from '../../../../context/I18nContext';\n\nconst getArrowAriaLabel = (item, t) => {\n if (item && item.lessonPart === LESSON_PARTS.GRAMMAR) {\n return item.target.name;\n }\n if (item && item.lessonPart === LESSON_PARTS.VOCABULARY_GLOSSARY) {\n return t('lesson.aria.vocabulary');\n }\n return '';\n};\n\nexport const NavigationRow = ({ position, currentItem, previousItem, nextItem, moveTo }) => {\n const { i18n } = useI18nContext();\n\n return (\n <div className=\"row noVMargins\">\n <div className=\"col-sm-offset-1 col-sm-10 col-lg-offset-2 col-lg-8\">\n <div className={`exercise-nav ${position}`}>\n <div className=\"exercise-nav-title\">\n {currentItem && i18n.t(getTranslationCodeForLessonPart(currentItem.lessonPart))}\n </div>\n {previousItem && (\n <Link\n className=\"prev-exercise\"\n to={moveTo(previousItem)}\n aria-label={getArrowAriaLabel(previousItem, i18n.t)}\n />\n )}\n {nextItem && (\n <Link\n className=\"next-exercise\"\n to={moveTo(nextItem)}\n aria-label={getArrowAriaLabel(nextItem, i18n.t)}\n />\n )}\n </div>\n </div>\n </div>\n );\n};\n","import { useHistory, useParams } from 'react-router';\nimport { LessonVocabulary } from '../LessonVocabulary/LessonVocabulary';\nimport { StyledStandardButton as StandardButton } from '../../StandardButton/StandardButton';\nimport { NavigationRow } from './NavigationRow/NavigationRow';\nimport { normalizeUrlName } from '../../../utils/url/url';\nimport {\n ALPHABETICAL_ORDER_URL_SUFFIX,\n LESSON_VOCABULARY_URL_SUFFIX,\n getLessonGrammarUrl,\n getLessonPhonemicChartUrl,\n getLessonRegionalStudiesUrl,\n getLessonVocabularyUrl,\n getSummaryUrl,\n getLessonUrl,\n} from '../../../utils/url/urlFactory';\nimport { LessonKnowledge } from '../LessonKnowledge/LessonKnowledge';\nimport { LESSON_PARTS } from '../../../constants/lessonParts';\nimport { ContentBottomLine } from '../../ContentContainer/ContentBottomLine/ContentBottomLine';\nimport { PAGE_TYPES } from '../../../constants/pageTypes';\nimport { PageMetaData } from '../../Page/PageMetaData';\n\nconst LESSON_PARTS_SUFFIX = {\n [LESSON_VOCABULARY_URL_SUFFIX]: LESSON_PARTS.VOCABULARY_GLOSSARY,\n [ALPHABETICAL_ORDER_URL_SUFFIX]: LESSON_PARTS.PHONEMIC_CHART,\n};\n\nexport const LessonKnowledgeNavigation = ({\n lessonName,\n lessonKeywordStrings,\n lessonKnowledgeOverviewItems,\n}) => {\n const history = useHistory();\n const { langCode, lessonId, knowledgeType, contentId } = useParams();\n const lessonPath = getLessonUrl(lessonId, langCode, normalizeUrlName(lessonName));\n\n const getCurrentItem = () => {\n if (contentId) {\n return lessonKnowledgeOverviewItems.find(item => item.targetId.toString() === contentId);\n }\n return lessonKnowledgeOverviewItems.find(\n item => item.lessonPart === LESSON_PARTS_SUFFIX[knowledgeType],\n );\n };\n\n const currentItem = getCurrentItem();\n const currentItemIndex = lessonKnowledgeOverviewItems.indexOf(currentItem);\n const previousItem = lessonKnowledgeOverviewItems[currentItemIndex - 1];\n const nextItem = lessonKnowledgeOverviewItems[currentItemIndex + 1];\n\n const moveTo = item => {\n const normalizedName = normalizeUrlName(item.target.name);\n if (item.lessonPart === LESSON_PARTS.GRAMMAR) {\n return getLessonGrammarUrl(langCode, lessonId, normalizedName, item.targetId);\n }\n if (item.lessonPart === LESSON_PARTS.REGIONAL_STUDIES) {\n return getLessonRegionalStudiesUrl(langCode, lessonId, normalizedName, item.targetId);\n }\n if (item.lessonPart === LESSON_PARTS.PHONEMIC_CHART) {\n return getLessonPhonemicChartUrl(langCode, lessonId, normalizedName);\n }\n return getLessonVocabularyUrl(langCode, lessonId, normalizedName);\n };\n\n const getCurrentComponent = () => {\n if ([LESSON_PARTS.GRAMMAR, LESSON_PARTS.REGIONAL_STUDIES].includes(currentItem.lessonPart)) {\n const pageType =\n currentItem.lessonPart === LESSON_PARTS.GRAMMAR\n ? PAGE_TYPES.GRAMMAR\n : PAGE_TYPES.REGIONAL_STUDIES;\n return (\n <LessonKnowledge\n pageType={pageType}\n lessonName={lessonName}\n lessonKeywordStrings={lessonKeywordStrings}\n />\n );\n }\n\n if (currentItem.lessonPart === LESSON_PARTS.PHONEMIC_CHART) {\n // TODO - create Phonemic Chart component and keep PageMetaData (but extend with content)\n return (\n <>\n <PageMetaData pageType={PAGE_TYPES.ALPHABETICAL_ORDER} />\n <h1>Phonemic Chart component</h1>\n </>\n );\n }\n return <LessonVocabulary />;\n };\n\n const goNextWithButton = () => {\n const nextPath = nextItem ? moveTo(nextItem) : getSummaryUrl(lessonPath);\n history.push(nextPath);\n };\n\n return (\n <div className=\"section exercise-container vocabulary copy\">\n <NavigationRow position=\"top\" {...{ currentItem, previousItem, nextItem, moveTo }} />\n {currentItem && getCurrentComponent()}\n <ContentBottomLine />\n <div className=\"row\">\n <div className=\"col-xs-offset-2 col-xs-8 col-sm-offset-4 col-sm-4\">\n <div className=\"exercise-check\">\n <StandardButton\n titleKey={nextItem ? 'common.next' : 'exercise.toSummary'}\n handleClick={goNextWithButton}\n />\n </div>\n </div>\n </div>\n <NavigationRow position=\"bottom\" {...{ currentItem, previousItem, nextItem, moveTo }} />\n </div>\n );\n};\n","import gql from 'graphql-tag';\nimport { WithGraphQLQueryHandling } from '../components/WithGraphQLQueryHandling/WithGraphQLQueryHandling';\nimport { manuscriptFragment, Manuscript } from '../components/Manuscript/Manuscript';\nimport { knowledgesFragment } from '../components/Lesson/LessonKnowledge/LessonKnowledge';\nimport {\n MediaInputChooser,\n mediaInputChooserFragment,\n} from '../components/Lesson/MediaInputChooser/MediaInputChooser';\nimport { metaDataFragment, PageMetaData } from '../components/Page/PageMetaData';\nimport { PAGE_TYPES } from '../constants/pageTypes';\nimport {\n gtmDataLayerFragment,\n GtmScriptWithDataLayer,\n} from '../components/GoogleTagManager/GtmScriptWithDataLayer';\n\nexport const ManuscriptQuery = gql`\n query ManuscriptPage($id: Int!, $lang: Language!) {\n content(id: $id, lang: $lang) {\n ...LessonMediaInputChooser\n ...LessonManuscript\n ...LessonKnowledges\n ...${metaDataFragment.name}\n ${gtmDataLayerFragment.partial()}\n }\n }\n ${mediaInputChooserFragment.fragment({ type: 'Lesson' })}\n ${manuscriptFragment}\n ${knowledgesFragment.fragment({ type: 'Lesson' })}\n ${metaDataFragment.fragment({ type: 'Lesson' })}\n`;\n\nexport const ManuscriptPage = ({ contentId, language }) => {\n const ManuscriptPageQueryVariables = {\n id: +contentId,\n lang: language,\n };\n\n return (\n <WithGraphQLQueryHandling query={ManuscriptQuery} queryVariables={ManuscriptPageQueryVariables}>\n {data => (\n <>\n <PageMetaData\n pageType={PAGE_TYPES.MANUSCRIPT}\n content={data.content}\n translationFirst={true}\n useDescriptionTranslation={true}\n />\n <GtmScriptWithDataLayer content={data.content} />\n <MediaInputChooser data={data} />\n <Manuscript {...data} />\n </>\n )}\n </WithGraphQLQueryHandling>\n );\n};\n","import { I18nText } from '../../I18n/I18nText';\n\nexport const ContentSection = ({ title, children }) => (\n <>\n <div className=\"row vocabulary\">\n <div className=\"col-sm-offset-1 col-sm-10 col-lg-offset-2 col-lg-8\">\n <I18nText isA=\"h3\" translation={title} />\n </div>\n </div>\n <div className=\"row vocabulary\">\n <div className=\"col-sm-offset-1 col-sm-10 col-lg-offset-2 col-lg-8\">\n <div className=\"richtext-content-container\">{children}</div>\n </div>\n </div>\n </>\n);\n","import { getArticleUrl } from '../../../../utils/url/url';\n\nexport const ArticleLinks = ({ data }) => {\n return data.map(({ targetId, target: { name: targetName }, name }) => (\n <div key={targetId}>\n <p className=\"grammarLink\">\n <a href={getArticleUrl({ articleId: targetId, name: targetName })}>{name}</a>\n </p>\n </div>\n ));\n};\n","import { capitalize, getMediaFileSizeInKBorMB } from '../../../../utils/commons';\nimport { getAudioDownloadUrl } from '../../../../utils/url/url';\n\nexport const AudioLinks = ({ data }) => {\n const getAudioLinkTitle = (name, format, size, variant) =>\n `${name} | ${format} | ${getMediaFileSizeInKBorMB(size)} (${capitalize(variant)})`;\n\n return data.map(audioLink =>\n audioLink.target.audioResourceLinks.map(({ id, url, format, size, variant }) => (\n <div key={id}>\n <p className=\"grammarLink\">\n <a href={getAudioDownloadUrl({ audioUrl: url })}>\n {getAudioLinkTitle(audioLink.name, format, size, variant)}\n </a>\n </p>\n </div>\n )),\n );\n};\n","import { getDownloadUrl } from '../../../../utils/url/url';\nimport { useFrontendConfig } from '../../../../hooks/useFrontendConfig';\n\nexport const DownloadLinks = ({ data }) => {\n const { staticBaseHost } = useFrontendConfig();\n\n return data.map(({ targetId, target: { filename }, name }) => (\n <div key={targetId}>\n <p className=\"grammarLink\">\n <a href={getDownloadUrl({ staticBaseHost, downloadId: targetId, filename })}>{name}</a>\n </p>\n </div>\n ));\n};\n","import gql from 'graphql-tag';\nimport { getMediaFileSizeInKBorMB } from '../../../../utils/commons';\nimport { getVideoDownloadUrl } from '../../../../utils/url/url';\n\nexport const videoResourceLinksFragment = {\n name: 'VideoResourceLinks',\n fragment() {\n return gql`fragment ${this.name} on Video {\n id\n name\n videoResourceLinks {\n id\n url\n techFormat\n size\n format\n }\n } \n `;\n },\n};\n\nexport const VideoLinks = ({ data }) => {\n const getVideoLinksByFormat = video =>\n video.videoResourceLinks.filter(videoLink => videoLink.techFormat.includes('PODCAST'));\n\n const videos = [].concat(\n ...data.map(video =>\n getVideoLinksByFormat(video.target).map(link => ({ ...link, name: video.name })),\n ),\n );\n\n const getVideoLinkTitle = (name, format, size, techFormat) =>\n `${name} | ${format} | ${getMediaFileSizeInKBorMB(size)} (${techFormat.slice(-2)})`;\n\n return videos.map(({ id, url, name, format, size, techFormat }) => (\n <p className=\"grammarLink\" key={id}>\n <a href={getVideoDownloadUrl({ videoUrl: url })}>\n {getVideoLinkTitle(name, format, size, techFormat)}\n </a>\n </p>\n ));\n};\n","import gql from 'graphql-tag';\nimport { ContentContainer } from '../../ContentContainer/ContentContainer';\nimport { ContentHeadline } from '../../ContentContainer/ContentHeadline/ContentHeadline';\nimport { ContentBottomLine } from '../../ContentContainer/ContentBottomLine/ContentBottomLine';\nimport { ContentSection } from '../../ContentContainer/ContentSection/ContentSection';\nimport { ArticleLinks } from './Links/ArticleLinks';\nimport { AudioLinks } from './Links/AudioLinks';\nimport { DownloadLinks } from './Links/DownloadLinks';\nimport { VideoLinks, videoResourceLinksFragment } from './Links/VideoLinks';\nimport { I18nText } from '../../I18n/I18nText';\n\nexport const lessonExtrasFragment = gql`\n fragment LessonExtras on Lesson {\n id\n contentLinks(targetTypes: [ARTICLE, DOWNLOAD, AUDIO, VIDEO]) {\n id\n name\n targetId\n targetType\n target {\n ... on Download {\n filename\n }\n ... on Article {\n name\n }\n ... on Audio {\n id\n name\n audioResourceLinks {\n id\n url\n size\n format\n variant\n }\n }\n ...${videoResourceLinksFragment.name}\n }\n }\n }\n ${videoResourceLinksFragment.fragment()}\n`;\n\nconst filterContentByType = type => contentLink => contentLink.targetType === type;\n\nexport const LessonExtras = ({ content = {} }) => {\n const { contentLinks = [] } = content;\n const downloads = contentLinks.filter(filterContentByType('DOWNLOAD'));\n const articles = contentLinks.filter(filterContentByType('ARTICLE'));\n const audios = contentLinks.filter(filterContentByType('AUDIO'));\n const videos = contentLinks.filter(filterContentByType('VIDEO'));\n const [hasDownloads, hasVideos, hasAudios, hasArticles] = [\n !!downloads.length,\n !!videos.length,\n !!audios.length,\n !!articles.length,\n ];\n\n return (\n <ContentContainer title=\"lesson.menu.extras\">\n <ContentHeadline>\n <I18nText isA=\"h2\" translation=\"lesson.menu.extras\" />\n </ContentHeadline>\n {hasDownloads && (\n <ContentSection title=\"lesson.downloads\">\n <DownloadLinks data={downloads} />\n </ContentSection>\n )}\n {(hasVideos || hasAudios) && (\n <ContentSection title=\"lesson.audioVideos\">\n {hasVideos && <VideoLinks data={videos} />}\n {hasAudios && <AudioLinks data={audios} />}\n </ContentSection>\n )}\n {hasArticles && (\n <ContentSection title=\"lesson.links.internal\">\n <ArticleLinks data={articles} />\n </ContentSection>\n )}\n <ContentBottomLine />\n </ContentContainer>\n );\n};\n","import gql from 'graphql-tag';\nimport { WithGraphQLQueryHandling } from '../components/WithGraphQLQueryHandling/WithGraphQLQueryHandling';\nimport { lessonExtrasFragment, LessonExtras } from '../components/Lesson/LessonExtras/LessonExtras';\nimport { metaDataFragment, PageMetaData } from '../components/Page/PageMetaData';\nimport { PAGE_TYPES } from '../constants/pageTypes';\nimport {\n gtmDataLayerFragment,\n GtmScriptWithDataLayer,\n} from '../components/GoogleTagManager/GtmScriptWithDataLayer';\n\nexport const LessonExtrasQuery = gql`\n query LessonExtrasPage($id: Int!, $lang: Language!) {\n content(id: $id, lang: $lang) {\n ...LessonExtras\n ...${metaDataFragment.name}\n ${gtmDataLayerFragment.partial()}\n }\n }\n ${lessonExtrasFragment}\n ${metaDataFragment.fragment({ type: 'Lesson' })}\n`;\n\nexport const LessonExtrasPage = ({ contentId, language }) => {\n const LessonExtraPageQueryVariables = {\n id: +contentId,\n lang: language,\n };\n\n return (\n <WithGraphQLQueryHandling\n query={LessonExtrasQuery}\n queryVariables={LessonExtraPageQueryVariables}\n >\n {({ content }) => (\n <>\n <PageMetaData\n pageType={PAGE_TYPES.EXTRAS}\n content={content}\n translationFirst={true}\n useDescriptionTranslation={true}\n />\n <GtmScriptWithDataLayer content={content} />\n <LessonExtras content={content} />\n </>\n )}\n </WithGraphQLQueryHandling>\n );\n};\n","import { useSelector } from 'react-redux';\nimport { I18nText } from '../../../I18n/I18nText';\nimport { userSelector } from '../../../../state/user/userSelectors';\n\nexport const EXERCISE_ACTION_TYPES = Object.freeze({\n CONTINUE: 'CONTINUE',\n IMPROVE: 'IMPROVE',\n SAVE: 'SAVE',\n});\n\nconst generateActionKey = (actionType, isLoggedIn) => {\n const translationPrefix = 'lesson.exercises.result';\n\n switch (actionType) {\n case EXERCISE_ACTION_TYPES.CONTINUE:\n return `${translationPrefix}.notSave`;\n case EXERCISE_ACTION_TYPES.IMPROVE:\n return isLoggedIn ? `${translationPrefix}.correct` : `${translationPrefix}.loginFixErrors`;\n case EXERCISE_ACTION_TYPES.SAVE:\n return isLoggedIn ? `${translationPrefix}.save` : `${translationPrefix}.loginSave`;\n default:\n // eslint-disable-next-line fp/no-throw\n throw new Error('invalid action');\n }\n};\n\nexport const ExerciseAction = ({ name, actionType, onClickAction, href }) => {\n const { isLoggedIn } = useSelector(userSelector);\n const actionKey = generateActionKey(actionType, isLoggedIn);\n\n return (\n <I18nText\n isA=\"a\"\n translation={actionKey}\n onClick={onClickAction}\n className={name}\n href={href}\n />\n );\n};\n","export const MARKS = Object.freeze({\n GOOD: 80,\n MEDIUM: 60,\n BAD: 40,\n});\n","import { useSelector } from 'react-redux';\nimport { MARKS } from '../../../../constants/marks';\nimport { I18nText } from '../../../I18n/I18nText';\nimport { calculatePercentage, generateRandomNumber } from '../../../../utils/commons';\nimport { findLessonLearnProgressSelector } from '../../../../state/progress/learnProgressSelectors';\n\nexport const Summary = ({ lessonId, showFeedback = false, showTitle = true }) => {\n const lesson = useSelector(findLessonLearnProgressSelector(lessonId));\n\n const {\n allExerciseCount = 0,\n doneExerciseCount = 0,\n maxPointsForAllExercises = 0,\n resultPoints = 0,\n } = lesson || {};\n\n const percentile = calculatePercentage(resultPoints, maxPointsForAllExercises);\n\n const getFeedBackText = () => {\n const randomNumber = generateRandomNumber(1, 3);\n\n if (percentile >= MARKS.GOOD) return `good${randomNumber}`;\n if (percentile >= MARKS.MEDIUM) return `mid${randomNumber}`;\n\n return `bad${randomNumber}`;\n };\n\n return (\n <>\n {showTitle && (\n <div className=\"exercise-nav top\">\n <div className=\"exercise-nav-title\">\n <I18nText\n translation=\"lesson.exercises.result.title\"\n isA=\"div\"\n className=\"exercise-nav-title\"\n />\n </div>\n </div>\n )}\n {showFeedback && (\n <div className=\"row\">\n <div className=\"col-xs-12\">\n <I18nText\n translation={`course.result.${getFeedBackText()}`}\n isA=\"div\"\n className=\"exercise-results-header\"\n />\n </div>\n </div>\n )}\n <div className=\"exercise-results\">\n <div className=\"exercise-results-list\">\n <div className=\"result-headline score\">\n <h1>\n <div className=\"result-points\" dir=\"ltr\">\n {percentile}%\n </div>\n </h1>\n <p>\n <I18nText\n translation=\"lesson.exercises.result.title\"\n className=\"exercise-results-header\"\n />\n : {`${doneExerciseCount}/${allExerciseCount}`}\n </p>\n </div>\n </div>\n </div>\n </>\n );\n};\n","/* eslint-disable react-hooks/exhaustive-deps */\nimport { useDispatch, useSelector } from 'react-redux';\nimport { useEffect } from 'react';\nimport { useHistory, useParams } from 'react-router-dom';\nimport { createGlobalStyle } from 'styled-components';\nimport { EXERCISE_ACTION_TYPES, ExerciseAction } from './ExerciseAction';\nimport { LessonExerciseHint } from '../LessonExerciseHint/LessonExerciseHint';\nimport { Summary } from './Summary';\nimport {\n filteredAssembledInfos,\n filterLessonExerciseOverviewItems,\n} from '../../../../utils/lessonUtils';\nimport { userSelector } from '../../../../state/user/userSelectors';\nimport { useI18nContext } from '../../../../context/I18nContext';\nimport { removeImproveMode, setImproveMode } from '../../../../state/mode/lessonExerciseModeDuck';\nimport { useExerciseManager } from '../../../../hooks/useExerciseManager';\nimport { getLessonUrl, getLoginPage, getSummaryUrl } from '../../../../utils/url/urlFactory';\nimport { useGlobalsContext } from '../../../../context/GlobalsContext';\nimport { normalizeUrlName } from '../../../../utils/url/url';\nimport { setLessonProgressSyncNeeded } from '../../../../state/progress/learnProgressDuck';\nimport { PageMetaData } from '../../../Page/PageMetaData';\nimport { PAGE_TYPES } from '../../../../constants/pageTypes';\nimport { GtmScriptWithDataLayer } from '../../../GoogleTagManager/GtmScriptWithDataLayer';\n\nexport const LessonResultAndSummaryGlobalStyles = createGlobalStyle`\n @media (min-width: 1200px) {\n /* @noflip */\n .col-lg-push-1 {\n right: 8.33333333%;\n left: 0;\n }\n }\n @media (min-width: 1200px) {\n /* @noflip */\n .col-lg-pull-1 {\n left: 8.33333333%;\n right: auto;\n }\n }\n /* @noflip */\n .col-lg-1, .col-lg-10, .col-lg-11, .col-lg-12, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-md-1, .col-md-10, .col-md-11, .col-md-12, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-sm-1, .col-sm-10, .col-sm-11, .col-sm-12, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-xs-1, .col-xs-10, .col-xs-11, .col-xs-12, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6, .col-xs-7, .col-xs-8, .col-xs-9 {\n position: relative;\n min-height: 1px;\n padding-left: 20px;\n padding-right: 20px;\n }\n`;\n\nexport const LessonExerciseResult = ({\n lessonOverviewParts,\n lessonId,\n lessonName,\n courseId,\n isFinalTest,\n lessonKeywordStrings,\n data,\n}) => {\n const { isLoggedIn } = useSelector(userSelector);\n const { i18n } = useI18nContext();\n const { langCode } = useParams();\n const { location } = useGlobalsContext().window;\n const dispatch = useDispatch();\n const history = useHistory();\n\n const lessonExerciseOverviewItems = filterLessonExerciseOverviewItems(lessonOverviewParts);\n const { firstExerciseLink, isFullScoreAchieved } = useExerciseManager({\n lessonName,\n lessonExerciseOverviewItems,\n courseId,\n isFinalTest,\n });\n\n useEffect(() => {\n dispatch(removeImproveMode(lessonId));\n }, []);\n\n const lessonPath = getLessonUrl(lessonId, langCode, normalizeUrlName(lessonName));\n const assembledInfos = filteredAssembledInfos({ lessonOverviewParts, lessonPath });\n const showImproveButton = !isLoggedIn || (isLoggedIn && !isFullScoreAchieved());\n const resultPrefix = 'lesson.exercises.result';\n\n const generateNextUrl = () => {\n return assembledInfos[0] ? assembledInfos[0].url : getSummaryUrl(lessonPath);\n };\n\n const generateExerciseInfos = t => {\n const exerciseInfos = assembledInfos.map(info => t(`${resultPrefix}.${info.name}`)).join(', ');\n\n return (\n exerciseInfos && (\n <p>\n {t(`${resultPrefix}.whatsNext`)} {exerciseInfos}.\n </p>\n )\n );\n };\n\n const infos = generateExerciseInfos(i18n.t);\n const nextUrl = generateNextUrl();\n const hintKey = i18n.t(`${resultPrefix}.hint`);\n\n const handleImproveClicked = () => {\n if (isLoggedIn) {\n dispatch(setImproveMode(lessonId));\n const firstExerciseLinkInImproveMode = firstExerciseLink(true);\n history.push(firstExerciseLinkInImproveMode);\n } else {\n dispatch(setLessonProgressSyncNeeded(true));\n }\n };\n\n const handleSaveClicked = () => {\n if (isLoggedIn) {\n history.push(nextUrl);\n } else {\n dispatch(setLessonProgressSyncNeeded(true));\n }\n };\n\n const handleContinueClicked = () => {\n history.push(nextUrl);\n };\n\n const loginLink = isLoggedIn\n ? undefined\n : getLoginPage(location.origin, langCode, location.pathname);\n\n return (\n <>\n <PageMetaData\n pageType={PAGE_TYPES.LESSON_EXERCISE_RESULT}\n content={{ name: lessonName, keywordStrings: lessonKeywordStrings }}\n translationFirst={true}\n />\n <GtmScriptWithDataLayer content={data} />\n <LessonResultAndSummaryGlobalStyles />\n <div className=\"col-lg-pull-1 col-lg-10 col-lg-push-1 col-xs-12\">\n <div className=\"exercise-container\">\n <Summary\n {...{\n lessonId,\n showFeedback: true,\n }}\n />\n <div className=\"row\">\n <div className=\"col-xs-12\">\n <div className=\"exercise-infos\">{infos}</div>\n {!isLoggedIn && (\n <LessonExerciseHint description={hintKey} isSimpleIconHint=\"true\" isA=\"p\" />\n )}\n </div>\n </div>\n <div className=\"exercise-actions\">\n <div className=\"row\">\n <div className=\"col-xs-12\">\n <div className=\"row\">\n {showImproveButton && (\n <div className=\"col-xs-12 col-lg-4\">\n <ExerciseAction\n name=\"btn secondary\"\n actionType={EXERCISE_ACTION_TYPES.IMPROVE}\n onClickAction={handleImproveClicked}\n href={loginLink}\n />\n </div>\n )}\n <div className=\"col-xs-12 col-lg-4\">\n {!isLoggedIn && (\n <ExerciseAction\n name=\"btn secondary\"\n actionType={EXERCISE_ACTION_TYPES.CONTINUE}\n onClickAction={handleContinueClicked}\n />\n )}\n </div>\n <div className=\"col-xs-12 col-lg-4\">\n <ExerciseAction\n name=\"btn main\"\n actionType={EXERCISE_ACTION_TYPES.SAVE}\n onClickAction={handleSaveClicked}\n href={loginLink}\n />\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </>\n );\n};\n","import { Link } from 'react-router-dom';\nimport { Summary } from '../LessonExercise/LessonExerciseResult/Summary';\nimport { getContentUrl, getDashboardUrl } from '../../../utils/url/urlFactory';\nimport { I18nText } from '../../I18n/I18nText';\nimport { toLangCode } from '../../../utils/mappers/langMapper';\nimport { isFinalTestPredicate } from '../../../utils/commons';\nimport { LessonResultAndSummaryGlobalStyles } from '../LessonExercise/LessonExerciseResult/LessonExerciseResult';\n\nexport const LessonSummary = ({ data, lessonId, language }) => {\n const { content } = data;\n const { contentLinks } = content;\n const currentLessonLink = contentLinks.find(link => link.targetId === lessonId);\n const currentLessonIndex = contentLinks.indexOf(currentLessonLink);\n\n const generateRedirectInfos = () => {\n const nextLessonContentLink = contentLinks[currentLessonIndex + 1] || {};\n const { lesson } = nextLessonContentLink;\n\n if (!lesson) {\n return {\n url: getDashboardUrl(toLangCode(language)),\n redirectMessage: 'lesson.exercises.result.toDashboard',\n };\n }\n\n const { shortTitle, id } = lesson;\n\n const url = getContentUrl({\n id,\n name: shortTitle,\n language,\n __typename: 'Lesson',\n });\n\n const isFinalTest = isFinalTestPredicate(nextLessonContentLink);\n\n const redirectMessage = isFinalTest\n ? 'lesson.exercises.result.toFinalTest'\n : 'lesson.exercises.result.nextLesson';\n\n return { url, redirectMessage };\n };\n\n const { url, redirectMessage } = generateRedirectInfos();\n\n return (\n <>\n <LessonResultAndSummaryGlobalStyles />\n <div className=\"col-lg-pull-1 col-lg-10 col-lg-push-1 col-xs-12\">\n <div className=\"exercise-container\">\n <Summary lessonId={currentLessonLink.targetId} />\n <div className=\"row\">\n <div className=\"col-xs-12\">\n <div className=\"exercise-infos\">\n <I18nText translation={redirectMessage} isA=\"p\" />\n </div>\n </div>\n </div>\n <div className=\"exercise-actions\">\n <div className=\"row\">\n <div className=\"col-xs-12\">\n <div className=\"row\">\n <div className=\"col-xs-12 col-md-4 col-md-offset-4\">\n <Link className=\"btn main\" to={url}>\n <I18nText translation=\"common.next\" />\n </Link>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </>\n );\n};\n","import gql from 'graphql-tag';\nimport { LessonSummary } from '../components/Lesson/LessonSummary/LessonSummary';\nimport { WithGraphQLQueryHandling } from '../components/WithGraphQLQueryHandling/WithGraphQLQueryHandling';\nimport { PageMetaData } from '../components/Page/PageMetaData';\nimport { PAGE_TYPES } from '../constants/pageTypes';\nimport { gtmDataLayerFragment } from '../components/GoogleTagManager';\nimport { GtmScriptWithDataLayer } from '../components/GoogleTagManager/GtmScriptWithDataLayer';\n\nexport const lessonSummaryPageQuery = gql`\n query LessonSummaryPage($id: Int!, $lang: Language!) {\n content(id: $id, lang: $lang) {\n ... on Course {\n id\n contentLinks(targetTypes: LESSON) {\n additionalInformation\n targetId\n lesson: target {\n ... on Lesson {\n id\n shortTitle\n }\n }\n }\n ${gtmDataLayerFragment.partial()}\n }\n }\n }\n`;\n\nexport const LessonSummaryPage = ({\n courseId,\n lessonId,\n language,\n lessonName,\n lessonKeywordStrings,\n}) => {\n const LessonSummaryQueryVariables = {\n id: +courseId,\n lang: language,\n };\n\n return (\n <WithGraphQLQueryHandling\n query={lessonSummaryPageQuery}\n queryVariables={LessonSummaryQueryVariables}\n >\n {data => (\n <>\n <PageMetaData\n pageType={PAGE_TYPES.LESSON_SUMMARY}\n content={{ name: lessonName, keywordStrings: lessonKeywordStrings }}\n translationFirst={true}\n />\n <GtmScriptWithDataLayer content={data.content} />\n <LessonSummary {...{ data, lessonId, language, lessonName }} />\n </>\n )}\n </WithGraphQLQueryHandling>\n );\n};\n","import { Route, useParams, useRouteMatch } from 'react-router';\nimport gql from 'graphql-tag';\nimport { createGlobalStyle } from 'styled-components';\nimport { isMonolingualCourse } from '../../constants/isLtrContentOnly';\nimport { LessonMenu } from './LessonMenu/LessonMenu';\nimport { LessonInformation } from './LessonInformation/LessonInformation';\nimport { pathPartials } from '../../utils/url/pathAnalyser';\nimport { ExerciseProgressProvider } from './LessonExercise/workflow/ExerciseProgress';\nimport { LessonExerciseNavigation } from './LessonExercise/LessonExerciseNavigation/LessonExerciseNavigation';\nimport { LessonKnowledgeNavigation } from './LessonKnowledgeNavigation/LessonKnowledgeNavigation';\nimport {\n LESSON_EXERCISE_RESULT_SUFFIX,\n LESSON_EXTRAS_SUFFIX,\n LESSON_MANUSCRIPT_SUFFIX,\n LESSON_SUMMARY_SUFFIX,\n} from '../../utils/url/urlFactory';\nimport { ManuscriptPage } from '../../pages/ManuscriptPage';\nimport { LessonExtrasPage } from '../../pages/LessonExtrasPage';\nimport { LessonExerciseResult } from './LessonExercise/LessonExerciseResult/LessonExerciseResult';\nimport { LessonSummaryPage } from '../../pages/LessonSummaryPage';\nimport { useExerciseManager } from '../../hooks/useExerciseManager';\nimport {\n filterLessonExerciseOverviewItems,\n filterLessonKnowledgeOverviewItems,\n isFinalTestLesson,\n} from '../../utils/lessonUtils';\nimport { isPlacementTestCourse } from '../../utils/mappers/placementTestCourseIds';\nimport { hasCorrectImageFormat } from '../ImageOGMetaData/ImageOGMetaData';\nimport { gtmDataLayerFragment } from '../GoogleTagManager';\nimport { CourseDataContext } from '../../hooks/useCourseData';\n\nexport const lessonOverviewPartsFragment = {\n fragment({ scope, handicap }) {\n const handicapArg = handicap ? `(handicap: ${handicap})` : '';\n return gql`\n fragment ${scope}OverviewParts${handicap || ''} on Lesson {\n overviewParts${handicapArg} {\n targetId\n lessonPart\n target {\n ... on Exercise {\n name\n ${gtmDataLayerFragment.partial()}\n }\n ... on Knowledge {\n name\n }\n }\n }\n }\n `;\n },\n};\n\nexport const LtrContentLessonStyle = createGlobalStyle`\n #lesson {\n .title,\n .main-info-content,\n .exercise-container,\n .input-header-container {\n /* @noflip */\n direction: ltr;\n /* @noflip */\n text-align: left;\n }\n }\n`;\n\nexport const Lesson = ({ data }) => {\n const { content } = data;\n const {\n name: lessonName,\n language,\n overviewParts: lessonOverviewParts,\n learningMetaInfo: { achievableScore },\n manuscript,\n knowledges,\n mainContentImage: lessonMainImage,\n keywordStrings: lessonKeywordStrings,\n } = content;\n const lessonKnowledgeOverviewItems = filterLessonKnowledgeOverviewItems(lessonOverviewParts);\n const lessonExerciseOverviewItems = filterLessonExerciseOverviewItems(lessonOverviewParts);\n\n const manuscriptContent = { manuscript, knowledges };\n const { path } = useRouteMatch();\n const { lessonId: lessonIdString } = useParams();\n const lessonId = +lessonIdString;\n\n const {\n id: courseId,\n name: courseName,\n contentLinks: lessonContentLinksFromCourse,\n mainContentImage: courseMainImage,\n } = data.contentsByType[0];\n\n const isFromPlacementCourse = isPlacementTestCourse(courseId);\n const isFinalTest = isFinalTestLesson({\n lessonContentLinksFromCourse,\n currentLessonId: lessonId,\n });\n\n const ogImage =\n lessonMainImage && hasCorrectImageFormat(lessonMainImage.imageFormats)\n ? lessonMainImage\n : courseMainImage;\n\n const { firstExerciseLink } = useExerciseManager({\n lessonName,\n lessonExerciseOverviewItems,\n courseId,\n isFinalTest,\n });\n\n const firstExercisePath = firstExerciseLink();\n\n return (\n <CourseDataContext.Provider value={{ courseId }}>\n <div id=\"lesson\">\n {isMonolingualCourse(courseId.toString()) && <LtrContentLessonStyle />}\n <LessonMenu\n {...{\n lessonId: lessonIdString,\n lessonName,\n lessonOverviewParts,\n courseId,\n courseName,\n isFromPlacementCourse,\n isFinalTest,\n firstExercisePath,\n }}\n />\n <Route\n exact\n path={path}\n render={() => (\n <LessonInformation\n lessonLang={language}\n firstExercisePath={firstExercisePath}\n courseName={courseName}\n isFinalTest={isFinalTest}\n ogImage={ogImage}\n />\n )}\n />\n <Route\n exact\n path={`${path}/e-:exerciseId(${pathPartials.contentIdRegex})`}\n render={() => (\n <ExerciseProgressProvider {...{ isFromPlacementCourse }}>\n <LessonExerciseNavigation\n lessonExerciseOverviewItems={lessonExerciseOverviewItems}\n lessonLang={language}\n lessonName={lessonName}\n lessonAchievableScore={achievableScore}\n courseId={courseId}\n manuscriptContent={manuscriptContent}\n isFinalTest={isFinalTest}\n />\n </ExerciseProgressProvider>\n )}\n />\n <Route\n exact\n path={[\n `${path}/:knowledgeType(${pathPartials.knowledgeTypeRegex})`,\n `${path}/:knowledgeType(${pathPartials.knowledgeWithContentIdTypeRegex})-:contentId(${pathPartials.contentIdRegex})`,\n ]}\n render={() => (\n <LessonKnowledgeNavigation\n {...{ lessonName, lessonKeywordStrings, lessonKnowledgeOverviewItems }}\n />\n )}\n />\n <Route\n exact\n path={`${path}/${LESSON_MANUSCRIPT_SUFFIX}`}\n render={() => <ManuscriptPage language={language} contentId={lessonId} />}\n />\n <Route\n exact\n path={`${path}/${LESSON_EXTRAS_SUFFIX}`}\n render={() => <LessonExtrasPage language={language} contentId={lessonId} />}\n />\n <Route\n exact\n path={`${path}/${LESSON_EXERCISE_RESULT_SUFFIX}`}\n render={() => (\n <LessonExerciseResult\n {...{\n lessonOverviewParts,\n lessonId,\n lessonName,\n courseId,\n isFinalTest,\n lessonKeywordStrings,\n data,\n }}\n />\n )}\n />\n <Route\n exact\n path={`${path}/${LESSON_SUMMARY_SUFFIX}`}\n render={() => (\n <LessonSummaryPage\n {...{ courseId, lessonId, language, lessonName, lessonKeywordStrings }}\n />\n )}\n />\n </div>\n </CourseDataContext.Provider>\n );\n};\n","import gql from 'graphql-tag';\nimport { useParams } from 'react-router';\nimport { useSelector } from 'react-redux';\nimport { PageContainer } from '../components/Page/PageContainer';\nimport { LANG_CODES, toLang } from '../utils/mappers/langMapper';\nimport { WithGraphQLQueryHandling } from '../components/WithGraphQLQueryHandling/WithGraphQLQueryHandling';\nimport { scoreFragment } from '../state/progress/learnProgress';\nimport { Lesson, lessonOverviewPartsFragment } from '../components/Lesson/Lesson';\nimport { userDataSelector } from '../state/user/userSelectors';\nimport { manuscriptFragment } from '../components/Manuscript/Manuscript';\nimport { knowledgesFragment } from '../components/Lesson/LessonKnowledge/LessonKnowledge';\nimport { metaDataFragment } from '../components/Page/PageMetaData';\nimport { imageOGMetaDataFragment } from '../components/ImageOGMetaData/ImageOGMetaData';\nimport { gtmDataLayerFragment } from '../components/GoogleTagManager';\n\nexport const lessonPageQuery = ({ handicap }) => gql`\n query LessonPage($lessonId: Int!, $lessonIdString: String!, $lang: Language!) {\n content(id: $lessonId, lang: $lang) {\n ... on Lesson {\n id\n name\n language\n ...${`LessonOverviewParts${handicap || ''}`}\n ...${`LessonScore${handicap || ''}`}\n ...${metaDataFragment.name}\n }\n ...LessonManuscript\n ...LessonKnowledges\n ...LessonImageOGMetaData\n ${gtmDataLayerFragment.partial()}\n }\n contentsByType(\n lang: $lang\n type: COURSE\n amount: 1\n filters: { field: \"contentLinks.targetId\", value: [$lessonIdString] }\n ) {\n ... on Course {\n id\n name\n contentLinks(targetTypes: LESSON) {\n targetId\n additionalInformation\n }\n }\n ...CourseImageOGMetaData\n }\n }\n ${lessonOverviewPartsFragment.fragment({ scope: 'Lesson', handicap })}\n ${scoreFragment.fragment({ type: 'Lesson', handicap })}\n ${manuscriptFragment}\n ${knowledgesFragment.fragment({ type: 'Lesson' })}\n ${imageOGMetaDataFragment.fragment({ type: 'Lesson' })}\n ${imageOGMetaDataFragment.fragment({ type: 'Course' })}\n ${metaDataFragment.fragment({ type: 'Lesson' })}\n`;\n\nexport const LessonPage = () => {\n const { langCode, lessonId } = useParams();\n const { handicap } = useSelector(userDataSelector) || {};\n\n const queryVariables = {\n lessonId: +lessonId,\n lessonIdString: lessonId,\n lang: toLang(langCode),\n };\n\n return (\n <PageContainer>\n <WithGraphQLQueryHandling\n query={lessonPageQuery({ handicap })}\n queryVariables={queryVariables}\n >\n {(data, refetch) => {\n if (!data.content) {\n refetch({\n ...queryVariables,\n lang: toLang(LANG_CODES.GERMAN),\n });\n return null;\n }\n return <Lesson {...{ data, queryVariables }} />;\n }}\n </WithGraphQLQueryHandling>\n </PageContainer>\n );\n};\n","import { useSelector } from 'react-redux';\nimport { Redirect, Route } from 'react-router-dom';\nimport { getFeedbackUrl } from '../../utils/url/urlFactory';\nimport { userSelector } from '../../state/user/userSelectors';\n\nexport const RestrictedRoute = ({ path, component, render, feedbackType }) => {\n const { isLoggedIn } = useSelector(userSelector);\n const TargetComponent = component;\n\n return (\n <Route\n exact\n path={path}\n render={({ match }) => {\n // eslint-disable-next-line no-nested-ternary\n return isLoggedIn ? (\n TargetComponent ? (\n <TargetComponent />\n ) : (\n render()\n )\n ) : (\n <Redirect to={getFeedbackUrl(feedbackType, match.params.langCode)} />\n );\n }}\n />\n );\n};\n","import { useEffect } from 'react';\nimport { useHistory, useParams } from 'react-router';\nimport { confirmUserRegistration } from '../../services/userService';\nimport { feedbackHelper } from '../../utils/url/feedbackHelpers';\nimport { StyledLoadingMessage as LoadingMessage } from '../commons/LoadingMessage';\n\nexport const ConfirmUserRegistrationContainer = ({ confirmationId }) => {\n const { langCode } = useParams();\n const history = useHistory();\n\n useEffect(() => {\n confirmUserRegistration(confirmationId)\n .then(async response => {\n if (response.ok) {\n history.push(feedbackHelper.forRegistrationConfirm(langCode));\n } else {\n const errorResponse = await response.json();\n history.push(feedbackHelper.getForErrorCode(errorResponse, langCode));\n }\n })\n .catch(e => {\n history.push(feedbackHelper.getForErrorCode(e, langCode));\n });\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n return <LoadingMessage />;\n};\n","export const hasErrorClassAssigner = (className, error) =>\n error ? `${className} has-error` : className;\n\nexport const hasNestedErrorsClassAssigner = (className, error) =>\n error ? `${className} has-nested-errors` : className;\n","export const CUSTOM_ERROR_TRANSLATION_KEYS = {\n SAFE_MONGO_CHARACTERS_ONLY: 'safeMongoCharactersOnly',\n TRANSCRIPTION: 'transcription',\n};\n\nconst buildKey = suffix => `client.validator.${suffix}`;\n\nexport const getTranslatedValidationMessage = ({\n name,\n validationErrorTranslationKey,\n validationType,\n customErrorTranslationKey,\n t,\n}) => {\n const title = t(validationErrorTranslationKey);\n switch (validationType) {\n case 'required':\n return t(buildKey('required'), { first: title });\n case 'pattern':\n return t(customErrorTranslationKey ? buildKey(customErrorTranslationKey) : buildKey(name), {\n first: title,\n });\n case 'differsFromEmail':\n return t(buildKey('differFromEmail'));\n case 'passwordRetype':\n return t(buildKey('equalTo'));\n default:\n return '';\n }\n};\n","import { hasErrorClassAssigner } from '../../utils/errorClassAssigner';\nimport { getTranslatedValidationMessage } from '../../utils/validation/validationMessages';\nimport { I18nText } from '../I18n/I18nText';\nimport { useI18nContext } from '../../context/I18nContext';\n\nexport const Input = ({\n titleTranslationKey,\n placeholderTranslationKey = titleTranslationKey,\n name,\n type,\n register,\n validationError,\n isLabelVisible = false,\n customErrorTranslationKey,\n ...restProps\n}) => {\n const { i18n } = useI18nContext();\n return (\n <div className={hasErrorClassAssigner('form-group', validationError)} aria-live=\"assertive\">\n <I18nText\n isA=\"label\"\n className={`control-label ${!isLabelVisible && 'hidden'}`}\n translation={titleTranslationKey}\n />\n <input\n className=\"form-control\"\n {...{ name, type }}\n placeholder={i18n.t(placeholderTranslationKey)}\n {...register}\n {...restProps}\n />\n {validationError && (\n <small className=\"help-block\">\n {getTranslatedValidationMessage({\n name,\n validationErrorTranslationKey: titleTranslationKey,\n validationType: validationError.type,\n customErrorTranslationKey,\n t: i18n.t,\n })}\n </small>\n )}\n </div>\n );\n};\n","import { hasErrorClassAssigner } from '../../utils/errorClassAssigner';\nimport { getTranslatedValidationMessage } from '../../utils/validation/validationMessages';\nimport { useI18nContext } from '../../context/I18nContext';\n\nexport const Select = ({\n name,\n defaultOptionKey,\n options,\n validationError,\n register,\n ...restProps\n}) => {\n const { i18n } = useI18nContext();\n\n return (\n <div className={hasErrorClassAssigner('form-group', validationError)} aria-live=\"assertive\">\n <select className=\"form-control\" name={name} {...register} {...restProps}>\n <option value=\"\">{i18n.t(defaultOptionKey)}</option>\n {options &&\n options.map(option => {\n const { key, name: optionName, value, ariaKey } = option;\n return (\n <option\n dir=\"auto\"\n key={value}\n value={value}\n aria-label={ariaKey ? i18n.t(ariaKey) : null}\n >\n {key ? i18n.t(key) : optionName}\n </option>\n );\n })}\n </select>\n {validationError && (\n <small className=\"help-block\">\n {getTranslatedValidationMessage({\n name,\n validationErrorTranslationKey: defaultOptionKey,\n validationType: validationError.type,\n t: i18n.t,\n })}\n </small>\n )}\n </div>\n );\n};\n","import { hasErrorClassAssigner } from '../../utils/errorClassAssigner';\nimport { getTranslatedValidationMessage } from '../../utils/validation/validationMessages';\nimport { useI18nContext } from '../../context/I18nContext';\n\nexport const Checkbox = ({\n name,\n labelText,\n validationErrorTranslationKey,\n register,\n validationError,\n ...restProps\n}) => {\n const { i18n } = useI18nContext();\n\n return (\n <div className=\"custom-checkbox\">\n <div className={hasErrorClassAssigner('form-group', validationError)}>\n <div className=\"input-group\">\n <span className=\"input-group-addon\">\n <input\n className=\"form-control\"\n name={name}\n type=\"checkbox\"\n aria-label={name}\n {...register}\n {...restProps}\n />\n </span>\n <label className=\"checkbox-label\">{labelText}</label>\n </div>\n {validationError && (\n <small className=\"help-block\">\n {getTranslatedValidationMessage({\n name,\n validationErrorTranslationKey,\n validationType: validationError.type,\n t: i18n.t,\n })}\n </small>\n )}\n </div>\n </div>\n );\n};\n","import {\n hasErrorClassAssigner,\n hasNestedErrorsClassAssigner,\n} from '../../../utils/errorClassAssigner';\nimport { I18nText } from '../../I18n/I18nText';\nimport { deconstructDateOfBirth } from '../../../utils/userUtils';\nimport { useTranslation } from '../../../hooks/useTranslation';\n\nexport const BirthDateInput = ({\n register,\n errors,\n initialDateOfBirth,\n translationPrefix = 'profile.register',\n}) => {\n const { year: initYear } = deconstructDateOfBirth(initialDateOfBirth);\n const hasErrors = errors.year;\n const placeholderLabel = useTranslation(`${translationPrefix}.placeholder.yearOfBirth`);\n\n return (\n <div className={hasNestedErrorsClassAssigner('form-group', hasErrors)} aria-live=\"assertive\">\n <div className={hasErrorClassAssigner('input-group', hasErrors)}>\n <I18nText className=\"input-group-addon\" translation={`${translationPrefix}.dateOfBirth`} />\n <div className=\"padding-none\">\n <input\n className=\"form-control\"\n type=\"number\"\n aria-labelledby=\"dateOfBirth\"\n aria-label=\"Year\"\n placeholder={placeholderLabel}\n name=\"year\"\n defaultValue={initYear}\n {...register('year', {\n min: 1900,\n max: 9999,\n maxLength: 4,\n })}\n />\n </div>\n </div>\n {hasErrors && (\n <small className=\"help-block\">\n <I18nText translation=\"client.validator.date\" />\n </small>\n )}\n </div>\n );\n};\n","export const emailPattern = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;\nexport const transcriptionPattern = /^[\\sa-zA-ZäöüÄÖÜß-]*$/;\nexport const namePattern = /^[^\\u0027\\u0022;{}<>&:\\\\]+$/;\n\nexport const passwordValid = password => {\n if (!password) {\n return false;\n }\n\n const minLength = 8;\n // eslint-disable-next-line\n let numberOfFulfilledConditions = 0;\n const minNumberOfFulfilledConditions = 3;\n const regexPatterns = [/[0-9]/, /[^A-Za-z_0-9]/, /[A-Z]/, /[a-z]/];\n\n regexPatterns.forEach(pattern => {\n if (password.match(pattern) !== null) {\n // eslint-disable-next-line\n numberOfFulfilledConditions += 1;\n }\n });\n\n return !!(\n password.length >= minLength && numberOfFulfilledConditions >= minNumberOfFulfilledConditions\n );\n};\n\nexport const passwordRetypeValid = (passwordRetype, password) =>\n !!(password && password === passwordRetype);\n\nexport const passwordDiffersFromEmail = (password, email) => {\n const repeatedCharsLimit = 4;\n const template = email;\n const { length } = template;\n // eslint-disable-next-line\n let subString;\n\n // eslint-disable-next-line\n for (let i = 0; i < length - repeatedCharsLimit; i++) {\n // eslint-disable-next-line\n subString = template.substring(i, i + repeatedCharsLimit);\n if (password.indexOf(subString) !== -1) {\n return false;\n }\n }\n return true;\n};\n\nconst validateCaptcha = (state, setState) => {\n setState({ ...state, captchaError: !state.isCaptchaPassed });\n return state.isCaptchaPassed;\n};\n\nexport const captcha = {\n validateCaptcha,\n};\n","import ReCAPTCHA from 'react-google-recaptcha';\nimport config from '../../config';\n\nexport const ReCaptcha = ({ languageCode, onSuccess, onExpired }) => {\n const checkForReCaptchaToken = token => {\n if (token) {\n onSuccess(token);\n }\n };\n\n return (\n <ReCAPTCHA\n hl={languageCode}\n sitekey={config.reCaptcha.siteKey}\n onChange={checkForReCaptchaToken}\n {...{ onExpired }}\n />\n );\n};\n","export const countries = [\n { value: 'AF', name: 'Afghanistan' },\n { value: 'AL', name: 'Albania' },\n { value: 'DZ', name: 'Algeria' },\n { value: 'AS', name: 'American Samoa' },\n { value: 'AD', name: 'Andorra' },\n { value: 'AO', name: 'Angola' },\n { value: 'AI', name: 'Anguilla' },\n { value: 'AQ', name: 'Antarctica' },\n { value: 'AG', name: 'Antigua and Barbuda' },\n { value: 'AR', name: 'Argentina' },\n { value: 'AM', name: 'Armenia' },\n { value: 'AW', name: 'Aruba' },\n { value: 'AU', name: 'Australia' },\n { value: 'AT', name: 'Austria' },\n { value: 'AZ', name: 'Azerbaijan' },\n { value: 'BS', name: 'Bahamas' },\n { value: 'BH', name: 'Bahrain' },\n { value: 'BD', name: 'Bangladesh' },\n { value: 'BB', name: 'Barbados' },\n { value: 'BY', name: 'Belarus' },\n { value: 'BE', name: 'Belgium' },\n { value: 'BZ', name: 'Belize' },\n { value: 'BJ', name: 'Benin' },\n { value: 'BM', name: 'Bermuda' },\n { value: 'BT', name: 'Bhutan' },\n { value: 'BO', name: 'Bolivia' },\n { value: 'BA', name: 'Bosnia and Herzegovina' },\n { value: 'BW', name: 'Botswana' },\n { value: 'BV', name: 'Bouvet Island' },\n { value: 'BR', name: 'Brazil' },\n { value: 'IO', name: 'British Indian Ocean Territory' },\n { value: 'BN', name: 'Brunei Darussalam' },\n { value: 'BG', name: 'Bulgaria' },\n { value: 'BF', name: 'Burkina Faso' },\n { value: 'BI', name: 'Burundi' },\n { value: 'CI', name: \"Côte d'Ivoire\" },\n { value: 'CV', name: 'Cabo Verde' },\n { value: 'KH', name: 'Cambodia' },\n { value: 'CM', name: 'Cameroon' },\n { value: 'CA', name: 'Canada' },\n { value: 'KY', name: 'Cayman Islands' },\n { value: 'CF', name: 'Central African Republic' },\n { value: 'TD', name: 'Chad' },\n { value: 'CL', name: 'Chile' },\n { value: 'CN', name: 'China' },\n { value: 'CX', name: 'Christmas Island' },\n { value: 'CC', name: 'Cocos Islands' },\n { value: 'CO', name: 'Colombia' },\n { value: 'KM', name: 'Comoros' },\n { value: 'CG', name: 'Congo' },\n { value: 'CK', name: 'Cook Islands' },\n { value: 'CR', name: 'Costa Rica' },\n { value: 'HR', name: 'Croatia' },\n { value: 'CU', name: 'Cuba' },\n { value: 'CY', name: 'Cyprus' },\n { value: 'CZ', name: 'Czech Republic' },\n { value: 'CD', name: 'Dem. Rep. of Congo' },\n { value: 'DK', name: 'Denmark' },\n { value: 'DJ', name: 'Djibouti' },\n { value: 'DM', name: 'Dominica' },\n { value: 'DO', name: 'Dominican Republic' },\n { value: 'EC', name: 'Ecuador' },\n { value: 'EG', name: 'Egypt' },\n { value: 'SV', name: 'El Salvador' },\n { value: 'GQ', name: 'Equatorial Guinea' },\n { value: 'ER', name: 'Eritrea' },\n { value: 'EE', name: 'Estonia' },\n { value: 'ET', name: 'Ethiopia' },\n { value: 'FK', name: 'Falkland Islands' },\n { value: 'FO', name: 'Faroe Islands' },\n { value: 'FJ', name: 'Fiji' },\n { value: 'FI', name: 'Finland' },\n { value: 'FR', name: 'France' },\n { value: 'GF', name: 'French Guyana' },\n { value: 'PF', name: 'French Polynesia' },\n { value: 'TF', name: 'French Southern and Antarctic Territories' },\n { value: 'GA', name: 'Gabon' },\n { value: 'GM', name: 'Gambia' },\n { value: 'GE', name: 'Georgia' },\n { value: 'DE', name: 'Germany' },\n { value: 'GH', name: 'Ghana' },\n { value: 'GI', name: 'Gibraltar' },\n { value: 'GB', name: 'Great Britain' },\n { value: 'GR', name: 'Greece' },\n { value: 'GL', name: 'Greenland' },\n { value: 'GD', name: 'Grenada' },\n { value: 'GP', name: 'Guadeloupe' },\n { value: 'GU', name: 'Guam' },\n { value: 'GT', name: 'Guatemala' },\n { value: 'GN', name: 'Guinea' },\n { value: 'GW', name: 'Guinea-Bissau' },\n { value: 'GY', name: 'Guyana' },\n { value: 'HT', name: 'Haiti' },\n { value: 'HM', name: 'Heard and the McDonald Islands' },\n { value: 'HN', name: 'Honduras' },\n { value: 'HK', name: 'Hong Kong' },\n { value: 'HU', name: 'Hungary' },\n { value: 'IS', name: 'Iceland' },\n { value: 'IN', name: 'India' },\n { value: 'ID', name: 'Indonesia' },\n { value: 'IR', name: 'Iran' },\n { value: 'IQ', name: 'Iraq' },\n { value: 'IE', name: 'Ireland' },\n { value: 'IL', name: 'Israel' },\n { value: 'IT', name: 'Italy' },\n { value: 'JM', name: 'Jamaica' },\n { value: 'JP', name: 'Japan' },\n { value: 'JO', name: 'Jordan' },\n { value: 'KZ', name: 'Kazakhstan' },\n { value: 'KE', name: 'Kenya' },\n { value: 'KI', name: 'Kiribati' },\n { value: 'KP', name: \"Korea (Democratic People's Republic of)\" },\n { value: 'KR', name: 'Korea (Republic)' },\n { value: 'KO', name: 'Kosovo' },\n { value: 'KW', name: 'Kuwait' },\n { value: 'KG', name: 'Kyrgyzstan' },\n { value: 'LA', name: 'Lao' },\n { value: 'LV', name: 'Latvia' },\n { value: 'LB', name: 'Lebanon' },\n { value: 'LS', name: 'Lesotho' },\n { value: 'LR', name: 'Liberia' },\n { value: 'LY', name: 'Libya' },\n { value: 'LI', name: 'Liechtenstein' },\n { value: 'LT', name: 'Lithuania' },\n { value: 'LU', name: 'Luxembourg' },\n { value: 'MO', name: 'Macau' },\n { value: 'MK', name: 'Macedonia' },\n { value: 'MG', name: 'Madagascar' },\n { value: 'MW', name: 'Malawi' },\n { value: 'MY', name: 'Malaysia' },\n { value: 'MV', name: 'Maldivian' },\n { value: 'ML', name: 'Mali' },\n { value: 'MT', name: 'Malta' },\n { value: 'MH', name: 'Marshall Islands' },\n { value: 'MQ', name: 'Martinique' },\n { value: 'MR', name: 'Mauritania' },\n { value: 'MU', name: 'Mauritius' },\n { value: 'YT', name: 'Mayotte' },\n { value: 'MX', name: 'Mexico' },\n { value: 'FM', name: 'Micronesia' },\n { value: 'MD', name: 'Moldova' },\n { value: 'MC', name: 'Monaco' },\n { value: 'MN', name: 'Mongolia' },\n { value: 'ME', name: 'Montenegro' },\n { value: 'MS', name: 'Montserrat' },\n { value: 'MA', name: 'Morocco' },\n { value: 'MZ', name: 'Mozambique' },\n { value: 'MM', name: 'Myanmar' },\n { value: 'NA', name: 'Namibia' },\n { value: 'NR', name: 'Nauru' },\n { value: 'NP', name: 'Nepal' },\n { value: 'NL', name: 'Netherlands' },\n { value: 'AN', name: 'Netherlands Antilles' },\n { value: 'NC', name: 'New Caledonia' },\n { value: 'NZ', name: 'New Zealand' },\n { value: 'NI', name: 'Nicaragua' },\n { value: 'NE', name: 'Niger' },\n { value: 'NG', name: 'Nigeria' },\n { value: 'NU', name: 'Niue' },\n { value: 'NF', name: 'Norfolk Island' },\n { value: 'MP', name: 'Northern Mariana Islands' },\n { value: 'NO', name: 'Norway' },\n { value: 'OM', name: 'Oman' },\n { value: 'PK', name: 'Pakistan' },\n { value: 'PW', name: 'Palau' },\n { value: 'PS', name: 'Palestine' },\n { value: 'PA', name: 'Panama' },\n { value: 'PG', name: 'Papua New Guinea' },\n { value: 'PY', name: 'Paraguay' },\n { value: 'PE', name: 'Peru' },\n { value: 'PH', name: 'Philippines' },\n { value: 'PN', name: 'Pitcairn' },\n { value: 'PL', name: 'Poland' },\n { value: 'PT', name: 'Portugal' },\n { value: 'PR', name: 'Puerto Rico' },\n { value: 'QA', name: 'Qatar' },\n { value: 'RE', name: 'Réunion' },\n { value: 'SS', name: 'Republic of South Sudan' },\n { value: 'RO', name: 'Romania' },\n { value: 'RU', name: 'Russia' },\n { value: 'RW', name: 'Rwanda' },\n { value: 'SH', name: 'Saint Helena' },\n { value: 'KN', name: 'Saint Kitts and Nevis' },\n { value: 'LC', name: 'Saint Lucia' },\n { value: 'VC', name: 'Saint Vincent & the Grenadines' },\n { value: 'WS', name: 'Samoa' },\n { value: 'SM', name: 'San Marino' },\n { value: 'ST', name: 'Sao Tomé and Principe' },\n { value: 'SA', name: 'Saudi Arabia' },\n { value: 'SN', name: 'Senegal' },\n { value: 'RS', name: 'Serbia' },\n { value: 'SC', name: 'Seychelles' },\n { value: 'SL', name: 'Sierra Leone' },\n { value: 'SG', name: 'Singapore' },\n { value: 'SK', name: 'Slovakia' },\n { value: 'SI', name: 'Slovenia' },\n { value: 'SB', name: 'Solomon Islands' },\n { value: 'SO', name: 'Somalia' },\n { value: 'ZA', name: 'South Africa' },\n { value: 'GS', name: 'South Georgia and the South Sandwich Islands' },\n { value: 'ES', name: 'Spain' },\n { value: 'LK', name: 'Sri Lanka' },\n { value: 'PM', name: 'St. Pierre and Miquelon' },\n { value: 'SD', name: 'Sudan' },\n { value: 'SR', name: 'Suriname' },\n { value: 'SJ', name: 'Svalbard and Jan Mayen' },\n { value: 'SZ', name: 'Swaziland' },\n { value: 'SE', name: 'Sweden' },\n { value: 'CH', name: 'Switzerland' },\n { value: 'SY', name: 'Syrian Arab Republic' },\n { value: 'TW', name: 'Taiwan, R.O.C.' },\n { value: 'TJ', name: 'Tajikistan' },\n { value: 'TZ', name: 'Tanzania' },\n { value: 'TH', name: 'Thailand' },\n { value: 'TL', name: 'Timor-Leste' },\n { value: 'TG', name: 'Togo' },\n { value: 'TK', name: 'Tokelau' },\n { value: 'TO', name: 'Tonga' },\n { value: 'TT', name: 'Trinidad & Tobago' },\n { value: 'TN', name: 'Tunisia' },\n { value: 'TR', name: 'Turkey' },\n { value: 'TM', name: 'Turkmenistan' },\n { value: 'TC', name: 'Turks and Caicos Islands' },\n { value: 'TV', name: 'Tuvalu' },\n { value: 'UG', name: 'Uganda' },\n { value: 'UA', name: 'Ukraine' },\n { value: 'AE', name: 'United Arab Emirates' },\n { value: 'UM', name: 'United States Minor Outlying Islands' },\n { value: 'US', name: 'United States of America' },\n { value: 'UY', name: 'Uruguay' },\n { value: 'UZ', name: 'Uzbekistan' },\n { value: 'VU', name: 'Vanuatu' },\n { value: 'VA', name: 'Vatican City' },\n { value: 'VE', name: 'Venezuela' },\n { value: 'VN', name: 'Viet Nam' },\n { value: 'VI', name: 'Virgin Islands' },\n { value: 'VG', name: 'Virgin Islands (brit.)' },\n { value: 'WF', name: 'Wallis and Futuna' },\n { value: 'EH', name: 'Western Sahara' },\n { value: 'YE', name: 'Yemen' },\n { value: 'ZM', name: 'Zambia' },\n { value: 'ZW', name: 'Zimbabwe' },\n];\nObject.freeze(countries);\n","import { LANG_CODES } from '../utils/mappers/langMapper';\n\nexport const contactLanguageOptions = Object.freeze([\n { value: LANG_CODES.GERMAN, name: 'German' },\n { value: LANG_CODES.ENGLISH, name: 'English' },\n { value: LANG_CODES.ARABIC, name: 'Arabic' },\n { value: LANG_CODES.RUSSIAN, name: 'Russian' },\n { value: 'fa', name: 'Persian' },\n { value: LANG_CODES.SPANISH, name: 'Spanish' },\n]);\n\nconst profileEditKeyPath = 'profile.edit';\nconst professionKeyPath = `${profileEditKeyPath}.profession`;\nexport const sexOptions = Object.freeze([\n { value: 'FEMALE', key: `${profileEditKeyPath}.sex.female` },\n { value: 'MALE', key: `${profileEditKeyPath}.sex.male` },\n { value: 'OTHER', key: `${profileEditKeyPath}.sex.other` },\n]);\n\nexport const professionOptions = Object.freeze([\n { value: 'ZFA_TEACHER', key: `${professionKeyPath}.zfa_teacher` },\n { value: 'PRIVATE_TEACHER', key: `${professionKeyPath}.private_teacher` },\n { value: 'INSTITUTE_MANAGER', key: `${professionKeyPath}.institute_manager` },\n { value: 'INSTITUTE_EMPLOYEE', key: `${professionKeyPath}.institute_employee` },\n { value: 'OTHER', key: `${professionKeyPath}.other` },\n]);\n\nconst languageLevelKeyPath = `${profileEditKeyPath}.languageLevel`;\nexport const languageLevelOptions = Object.freeze([\n { value: 'ZERO', key: `${languageLevelKeyPath}.zero` },\n { value: 'BEGINNER', key: `${languageLevelKeyPath}.beginner` },\n { value: 'INTERMEDIATE', key: `${languageLevelKeyPath}.intermediate` },\n { value: 'EXPERT', key: `${languageLevelKeyPath}.expert` },\n]);\n\nconst writingReadingLevelKeyPath = `${profileEditKeyPath}.writingReadingLevel`;\nexport const writingReadingLevelOptions = Object.freeze([\n { value: 'ZERO', key: `${writingReadingLevelKeyPath}.zero` },\n { value: 'NOT_LATIN', key: `${writingReadingLevelKeyPath}.not_latin` },\n { value: 'UNCERTAIN', key: `${writingReadingLevelKeyPath}.uncertain` },\n { value: 'CAN', key: `${writingReadingLevelKeyPath}.can` },\n]);\n\nconst handicapKeyPath = `${profileEditKeyPath}.handicap`;\nexport const handicapOptions = Object.freeze([\n {\n value: 'BLIND',\n key: `${handicapKeyPath}.blind.title`,\n ariaKey: `${handicapKeyPath}.blind.aria`,\n },\n {\n value: 'POOR_EYESIGHT',\n key: `${handicapKeyPath}.poor_eyesight.title`,\n ariaKey: `${handicapKeyPath}.blind.aria`,\n },\n {\n value: 'WEAK_HEARING',\n key: `${handicapKeyPath}.weak_hearing.title`,\n ariaKey: `${handicapKeyPath}.blind.aria`,\n },\n {\n value: 'MOUSE_USAGE',\n key: `${handicapKeyPath}.mouse_usage.title`,\n ariaKey: `${handicapKeyPath}.blind.aria`,\n },\n]);\n\nconst learningTypeKeyPath = `${profileEditKeyPath}.learningType`;\nexport const learningTypeOptions = Object.freeze([\n { value: 'MUSIC', key: `${learningTypeKeyPath}.music` },\n { value: 'AUDIO', key: `${learningTypeKeyPath}.audio` },\n { value: 'AUTHENTIC_TEXT', key: `${learningTypeKeyPath}.authentic_text` },\n]);\n","import { useRef, useState } from 'react';\nimport { useForm } from 'react-hook-form';\nimport { useHistory, useParams } from 'react-router-dom';\nimport { Input } from '../Input/Input';\nimport { Select } from '../Select/Select';\nimport { Checkbox } from '../Checkbox/Checkbox';\nimport { I18nText } from '../I18n/I18nText';\nimport { StyledStandardButton as StandardButton } from '../StandardButton/StandardButton';\nimport { BirthDateInput } from '../Input/BirthDateInput/BirthDateInput';\nimport {\n emailPattern,\n namePattern,\n passwordDiffersFromEmail,\n passwordRetypeValid,\n passwordValid,\n captcha,\n} from '../../utils/validation/validators';\nimport { ReCaptcha } from '../ReCaptcha/ReCaptcha';\nimport { scrollIntoViewCenter } from '../../utils/htmlUtils';\nimport { hasErrorClassAssigner } from '../../utils/errorClassAssigner';\nimport { Text } from '../Text/Text';\nimport { getDashboardUrl } from '../../utils/url/urlFactory';\nimport { countries } from '../../constants/countries';\nimport { registerUser } from '../../services/userService';\nimport { sexOptions } from '../../constants/userInputOptions';\nimport { CUSTOM_ERROR_TRANSLATION_KEYS } from '../../utils/validation/validationMessages';\nimport { feedbackHelper } from '../../utils/url/feedbackHelpers';\nimport { useI18nContext } from '../../context/I18nContext';\nimport { useTranslation } from '../../hooks/useTranslation';\n\nexport const Registration = () => {\n const { i18n } = useI18nContext();\n\n const [state, setState] = useState({\n isCaptchaPassed: false,\n captchaError: false,\n captchaToken: null,\n });\n\n const captchaRef = useRef();\n const { langCode } = useParams();\n const history = useHistory();\n\n const {\n register,\n handleSubmit,\n getValues,\n formState: { errors },\n } = useForm({\n mode: 'onSubmit',\n reValidateMode: 'onSubmit',\n });\n\n const captchaMessage = useTranslation('client.recaptcha');\n const captchaValidationMessage = useTranslation({\n key: 'client.validator.required',\n parameters: { first: captchaMessage },\n });\n\n const createLink = (href, text) => `<a\n href=\"${href}\"\n target=\"_blank\"\n rel='noopener noreferrer'\n >\n ${text}\n </a>`;\n\n const createPrivacyPolicyLink = t =>\n createLink('https://p.dw.com/p/1Edck', t('profile.register.privacyPolicy'));\n\n const createAgbLink = t => createLink('https://p.dw.com/p/16hIr', t('profile.register.agb'));\n\n const fullGdpr = t => {\n const label = t('profile.register.agbAndPrivacyPolicyFormat', {\n dataPrivacyPolicy: createPrivacyPolicyLink(t),\n conditionsOfParticipation: createAgbLink(t),\n });\n return (\n <>\n <I18nText translation=\"common.gdpr.overlay.agree\" />\n \n <I18nText translation=\"common.gdpr.overlay.dissent\" />\n \n <Text dangerouslySetInnerHTML={{ __html: label }} />\n </>\n );\n };\n\n const checkboxes = [\n {\n name: 'gdpr',\n labelTextFunc: fullGdpr,\n validationErrorTranslationKey: 'client.acceptTermsConditions',\n register: register('gdpr', { required: true }),\n validationError: errors.gdpr,\n },\n {\n name: 'teacher',\n labelText: <I18nText translation=\"profile.register.teacher\" />,\n register: register('teacher'),\n },\n {\n name: 'newsletter',\n labelText: <I18nText translation=\"profile.register.newsletter\" />,\n register: register('newsletter'),\n },\n ];\n\n const onSubmit = async userData => {\n if (captcha.validateCaptcha(state, setState)) {\n try {\n const response = await registerUser({\n userData,\n captchaToken: state.captchaToken,\n langCode,\n });\n if (response.ok) {\n history.push(feedbackHelper.forRegistered(langCode));\n } else {\n const responseJson = await response.json();\n history.push(feedbackHelper.getForErrorCode(responseJson, langCode));\n }\n } catch (err) {\n history.push(feedbackHelper.getForErrorCode(err, langCode));\n }\n } else {\n scrollIntoViewCenter(captchaRef.current);\n }\n };\n\n const onCaptchaSuccess = token => {\n setState({ ...state, isCaptchaPassed: true, captchaToken: token });\n };\n\n const onCaptchaExpired = () => {\n setState({ ...state, isCaptchaPassed: false, captchaToken: null });\n };\n\n const cancelRegistration = e => {\n e.preventDefault();\n history.push(getDashboardUrl(langCode));\n };\n\n return (\n <div className=\"section\">\n <div className=\"container\">\n <div className=\"row\">\n <div className=\"col-md-6 col-md-offset-3\">\n <I18nText isA=\"h1\" translation=\"profile.register.title\" />\n <I18nText isA=\"p\" translation=\"profile.register.subtitle\" />\n </div>\n </div>\n <div className=\"row\">\n <div className=\"col-md-6 col-md-offset-3\">\n <form\n id=\"main-form\"\n data-id=\"register-user\"\n className=\"validate\"\n onSubmit={handleSubmit(onSubmit)}\n >\n <Input\n titleTranslationKey=\"profile.register.firstName\"\n name=\"firstName\"\n register={register('firstName', { required: true, pattern: namePattern })}\n validationError={errors.firstName}\n customErrorTranslationKey={CUSTOM_ERROR_TRANSLATION_KEYS.SAFE_MONGO_CHARACTERS_ONLY}\n />\n <Input\n titleTranslationKey=\"profile.register.lastName\"\n name=\"lastName\"\n register={register('lastName', { required: true, pattern: namePattern })}\n validationError={errors.lastName}\n customErrorTranslationKey={CUSTOM_ERROR_TRANSLATION_KEYS.SAFE_MONGO_CHARACTERS_ONLY}\n />\n <Select\n name=\"sex\"\n validationError={errors.sex}\n register={register('sex', { required: true })}\n defaultOptionKey=\"profile.register.sex.title\"\n options={sexOptions}\n />\n <hr />\n <Input\n titleTranslationKey=\"profile.register.email\"\n name=\"email\"\n register={register('email', { required: true, pattern: emailPattern })}\n validationError={errors.email}\n />\n <Input\n titleTranslationKey=\"profile.register.password\"\n name=\"password\"\n type=\"password\"\n register={register('password', {\n required: true,\n validate: {\n pattern: value => passwordValid(value, getValues().email),\n differsFromEmail: value => passwordDiffersFromEmail(value, getValues().email),\n },\n })}\n validationError={errors.password}\n />\n <Input\n titleTranslationKey=\"profile.register.passwordRetype\"\n name=\"passwordRetype\"\n type=\"password\"\n register={register('passwordRetype', {\n required: true,\n validate: {\n passwordRetype: value => passwordRetypeValid(value, getValues().password),\n },\n })}\n validationError={errors.passwordRetype}\n />\n <Select\n name=\"country\"\n validationError={errors.country}\n register={register('country', { required: true })}\n defaultOptionKey=\"profile.register.country\"\n options={countries}\n />\n <BirthDateInput {...{ register, errors, translationPrefix: 'profile.register' }} />\n {checkboxes.map(checkbox => (\n <Checkbox\n key={checkbox.name}\n name={checkbox.name}\n labelText={\n checkbox.labelTextFunc ? checkbox.labelTextFunc(i18n.t) : checkbox.labelText\n }\n validationErrorTranslationKey=\"client.acceptTermsConditions\"\n register={checkbox.register}\n validationError={checkbox.validationError}\n />\n ))}\n <div ref={captchaRef} className=\"custom-checkbox\" aria-live=\"assertive\">\n <div className={hasErrorClassAssigner('form-group', state.captchaError)}>\n <div className=\"input-group\">\n <ReCaptcha\n languageCode={langCode}\n onSuccess={onCaptchaSuccess}\n onExpired={onCaptchaExpired}\n />\n {state.captchaError && (\n <small className=\"help-block\">{captchaValidationMessage}</small>\n )}\n </div>\n </div>\n </div>\n <StandardButton titleKey=\"profile.register.save\" className=\"btn main\" />\n <StandardButton\n titleKey=\"profile.register.cancel\"\n className=\"btn secondary\"\n handleClick={e => cancelRegistration(e)}\n />\n </form>\n </div>\n </div>\n </div>\n </div>\n );\n};\n","import { USER } from '../constants/userUrl';\nimport { BASIC_JSON_CONTENT_TYPE_HEADER } from '../constants/services';\nimport { formatPasswordResetUserData } from '../utils/mappers/passwordReset';\n\nconst PS_PREFIX = USER.PS_URL;\nconst PASSWORD_RESOURCE_PUBLIC_RESET = `${PS_PREFIX}public/user/password/reset`;\nexport const PASSWORD_RESOURCE_PUBLIC_RESET_REQUEST = `${PS_PREFIX}public/user/password/reset-request`;\nconst PASSWORD_RESOURCE_PROTECTED = `${PS_PREFIX}protected/user/password`;\n\nexport const changePassword = (oldUserPassword, userPassword) =>\n fetch(`${PASSWORD_RESOURCE_PROTECTED}/change`, {\n method: 'POST',\n body: JSON.stringify({\n oldPassword: oldUserPassword,\n newPassword: userPassword,\n }),\n ...BASIC_JSON_CONTENT_TYPE_HEADER,\n });\n\nexport const requestResetPassword = ({ userData, captchaToken }) => {\n const formattedData = formatPasswordResetUserData({ userData, captchaToken });\n return fetch(PASSWORD_RESOURCE_PUBLIC_RESET_REQUEST, {\n method: 'POST',\n body: JSON.stringify(formattedData),\n ...BASIC_JSON_CONTENT_TYPE_HEADER,\n }).then(response => (response.ok ? Promise.resolve(response) : Promise.reject(response)));\n};\n\nexport const setPasswordByToken = (newPassword, token) =>\n fetch(PASSWORD_RESOURCE_PUBLIC_RESET, {\n method: 'POST',\n body: JSON.stringify({\n newPassword,\n passwordResetToken: token,\n }),\n ...BASIC_JSON_CONTENT_TYPE_HEADER,\n }).then(response => (response.ok ? Promise.resolve(response) : Promise.reject(response)));\n\nexport const getUserByConfirmationId = confirmationId =>\n fetch(`${PS_PREFIX}public/user/mail?token=${confirmationId}`)\n .then(res => res.text())\n .catch(e => console.log(e));\n","export const formatPasswordResetUserData = ({ userData, captchaToken }) => ({\n email: userData.email,\n recaptcha: captchaToken,\n});\n","import { Input } from '../Input';\nimport {\n passwordDiffersFromEmail,\n passwordRetypeValid,\n passwordValid,\n} from '../../../utils/validation/validators';\n\nexport const NewPasswordInputs = ({\n passwordTitleKey,\n passwordPlaceholderKey,\n passwordRepeatTitleKey,\n passwordRepeatPlaceholderKey,\n email,\n register,\n errors,\n getValues,\n}) => {\n return (\n <>\n <Input\n titleTranslationKey={passwordTitleKey}\n placeholderTranslationKey={passwordPlaceholderKey}\n name=\"password\"\n type=\"password\"\n register={register('password', {\n required: true,\n validate: {\n pattern: value => passwordValid(value),\n differsFromEmail: value => passwordDiffersFromEmail(value, email),\n },\n })}\n validationError={errors.password}\n />\n <Input\n titleTranslationKey={passwordRepeatTitleKey}\n placeholderTranslationKey={passwordRepeatPlaceholderKey}\n name=\"passwordRetype\"\n type=\"password\"\n register={register('passwordRetype', {\n required: true,\n validate: {\n passwordRetype: value => passwordRetypeValid(value, getValues().password),\n },\n })}\n validationError={errors.passwordRetype}\n />\n </>\n );\n};\n","import { useForm } from 'react-hook-form';\nimport { useHistory, useParams } from 'react-router-dom';\nimport { useSelector } from 'react-redux';\nimport { I18nText } from '../I18n/I18nText';\nimport { Input } from '../Input/Input';\nimport { StyledStandardButton as StandardButton } from '../StandardButton/StandardButton';\nimport { changePassword } from '../../services/passwordService';\nimport { feedbackHelper } from '../../utils/url/feedbackHelpers';\nimport { NewPasswordInputs } from '../Input/NewPassword/NewPasswordInputs';\nimport { userDataSelector } from '../../state/user/userSelectors';\n\nexport const PasswordChange = () => {\n const { langCode } = useParams();\n const history = useHistory();\n\n const {\n register,\n handleSubmit,\n getValues,\n formState: { errors },\n } = useForm({\n mode: 'onSubmit',\n reValidateMode: 'onSubmit',\n });\n\n const { email } = useSelector(userDataSelector);\n\n const onSubmit = async data => {\n const { oldPassword, password } = data;\n\n try {\n const changePasswordResponse = await changePassword(oldPassword, password);\n\n if (!changePasswordResponse.ok) {\n const jsonResponse = await changePasswordResponse.json();\n history.push(feedbackHelper.getForPasswordChangeErrorCode(jsonResponse, langCode));\n } else {\n history.push(feedbackHelper.forPasswordChanged(langCode));\n }\n } catch (err) {\n history.push(feedbackHelper.forGeneralError(langCode));\n }\n };\n\n return (\n <div className=\"section\">\n <div className=\"container\">\n <div className=\"row\">\n <div className=\"col-md-6 col-md-offset-3\">\n <I18nText isA=\"h1\" translation=\"profile.edit.password.change.title\" />\n <p>\n <I18nText translation=\"profile.edit.password.change.subtitle\" />\n <br />\n \n <br />\n \n </p>\n </div>\n </div>\n <div className=\"row\">\n <div className=\"col-md-6 col-md-offset-3 text-center\">\n <form onSubmit={handleSubmit(onSubmit)}>\n <Input\n titleTranslationKey=\"profile.edit.password.change.oldPassword\"\n placeholderTranslationKey=\"profile.edit.password.change.oldPassword\"\n name=\"oldPassword\"\n type=\"password\"\n register={register('oldPassword', {\n required: true,\n })}\n validationError={errors.oldPassword}\n />\n <NewPasswordInputs\n passwordTitleKey=\"profile.edit.password.change.newPassword\"\n passwordPlaceholderKey=\"profile.edit.password.change.newPassword\"\n passwordRepeatTitleKey=\"profile.edit.password.change.newPasswordRepeat\"\n passwordRepeatPlaceholderKey=\"profile.edit.password.change.newPasswordRepeat\"\n email={email}\n errors={errors}\n register={register}\n getValues={getValues}\n />\n <StandardButton className=\"btn main\" titleKey=\"profile.edit.password.change.save\" />\n </form>\n </div>\n </div>\n </div>\n </div>\n );\n};\n","import { useRef, useState } from 'react';\nimport { useHistory, useParams } from 'react-router';\nimport { useForm } from 'react-hook-form';\nimport { I18nText } from '../I18n/I18nText';\nimport { Input } from '../Input/Input';\nimport { captcha, emailPattern } from '../../utils/validation/validators';\nimport { hasErrorClassAssigner } from '../../utils/errorClassAssigner';\nimport { ReCaptcha } from '../ReCaptcha/ReCaptcha';\nimport { StyledStandardButton as StandardButton } from '../StandardButton/StandardButton';\nimport { scrollIntoViewCenter } from '../../utils/htmlUtils';\nimport { requestResetPassword } from '../../services/passwordService';\nimport { feedbackHelper } from '../../utils/url/feedbackHelpers';\nimport { useTranslation } from '../../hooks/useTranslation';\n\nexport const PasswordReset = () => {\n const [state, setState] = useState({\n isCaptchaPassed: false,\n captchaError: false,\n captchaToken: null,\n });\n const { langCode } = useParams();\n const captchaRef = useRef();\n const history = useHistory();\n\n const {\n register,\n handleSubmit,\n formState: { errors },\n } = useForm({\n mode: 'onSubmit',\n reValidateMode: 'onSubmit',\n });\n\n const captchaMessage = useTranslation('client.recaptcha');\n const captchaValidationMessage = useTranslation({\n key: 'client.validator.required',\n parameters: { first: captchaMessage },\n });\n\n const onSubmit = async data => {\n if (!captcha.validateCaptcha(state, setState)) {\n scrollIntoViewCenter(captchaRef.current);\n return;\n }\n try {\n await requestResetPassword({ userData: data, captchaToken: state.captchaToken });\n history.push(feedbackHelper.forPasswordResetRequest(langCode));\n } catch (err) {\n history.push(feedbackHelper.getForErrorCode(err, langCode));\n }\n };\n\n const onCaptchaSuccess = token => {\n setState({ ...state, isCaptchaPassed: true, captchaToken: token });\n };\n\n const onCaptchaExpired = () => {\n setState({ ...state, isCaptchaPassed: false, captchaToken: null });\n };\n\n return (\n <div className=\"section\">\n <div className=\"container\">\n <div className=\"row\">\n <div className=\"col-md-6 col-md-offset-3\">\n <I18nText isA=\"h1\" translation=\"profile.edit.password.reset.title\" />\n <I18nText isA=\"p\" translation=\"profile.edit.password.reset.subtitle\" />\n <br />\n \n <br />\n \n </div>\n </div>\n <div className=\"row\">\n <div className=\"col-md-6 col-md-offset-3 text-center\">\n <form onSubmit={handleSubmit(onSubmit)}>\n <div className=\"form-group\" style={{ textAlign: 'left' }}>\n <Input\n name=\"email\"\n titleTranslationKey=\"profile.edit.password.reset.email\"\n register={register('email', {\n required: true,\n pattern: emailPattern,\n })}\n validationError={errors.email}\n />\n </div>\n <div ref={captchaRef} className=\"custom-checkbox\" aria-live=\"assertive\">\n <div className={hasErrorClassAssigner('form-group', state.captchaError)}>\n <div className=\"input-group\">\n <ReCaptcha\n languageCode={langCode}\n onSuccess={onCaptchaSuccess}\n onExpired={onCaptchaExpired}\n />\n {state.captchaError && (\n <small className=\"help-block\">{captchaValidationMessage}</small>\n )}\n </div>\n </div>\n </div>\n <StandardButton className=\"btn main\" titleKey=\"profile.edit.password.reset.submit\" />\n </form>\n </div>\n </div>\n </div>\n </div>\n );\n};\n","import { Link } from 'react-router-dom';\nimport { useLocation, useParams } from 'react-router';\nimport { I18nText } from '../I18n/I18nText';\nimport { StyledStandardButton } from '../StandardButton/StandardButton';\nimport { feedbackHelper } from '../../utils/url/feedbackHelpers';\nimport { getTargetPageUrl, URL_SEARCH_PARAM_TARGET_PATH } from '../../utils/url/urlFactory';\nimport { COMMON_FEEDBACK_TRANSLATION_KEYS } from '../../constants/feedback';\n\nexport const StatusFeedback = () => {\n const { langCode, feedbackType } = useParams();\n const { search } = useLocation();\n\n const feedbackContentKey = feedbackHelper.getFeedbackContentKey(feedbackType);\n const urlParams = new URLSearchParams(search);\n const targetPath = urlParams.get(URL_SEARCH_PARAM_TARGET_PATH);\n const targetPageUrl = targetPath || getTargetPageUrl(feedbackType, langCode);\n\n return (\n <div className=\"section\">\n <div className=\"container\">\n <div className=\"row\">\n <div className=\"col-md-6 col-md-offset-3\">\n <div>\n <I18nText isA=\"h1\" translation={COMMON_FEEDBACK_TRANSLATION_KEYS.TITLE} />\n <I18nText isA=\"p\" translation={feedbackContentKey} />\n <Link to={targetPageUrl}>\n <StyledStandardButton\n titleKey={COMMON_FEEDBACK_TRANSLATION_KEYS.OK_BUTTON}\n className=\"btn main\"\n />\n </Link>\n </div>\n </div>\n </div>\n </div>\n </div>\n );\n};\n","import { useDispatch } from 'react-redux';\nimport { useHistory, useParams } from 'react-router-dom';\nimport { useForm } from 'react-hook-form';\nimport { Checkbox } from '../../Checkbox/Checkbox';\nimport { I18nText } from '../../I18n/I18nText';\nimport { StyledStandardButton } from '../../StandardButton/StandardButton';\nimport { deleteUser } from '../../../services/userService';\nimport { deleteUserAccount } from '../../../state/user/userDuck';\nimport { feedbackHelper } from '../../../utils/url/feedbackHelpers';\nimport { useTranslation } from '../../../hooks/useTranslation';\n\nexport const DeleteAccountModal = ({ onClose }) => {\n const { langCode } = useParams();\n const history = useHistory();\n const dispatch = useDispatch();\n\n const { register, handleSubmit } = useForm({\n mode: 'onSubmit',\n });\n\n const confirmDeleteLabel = useTranslation('profile.edit.modal.confirmDelete');\n\n const onSubmit = async () => {\n try {\n const response = await deleteUser();\n if (response.ok) {\n dispatch(deleteUserAccount());\n history.push(feedbackHelper.forUserDelete(langCode));\n } else {\n const responseJson = await response.json();\n history.push(feedbackHelper.getForErrorCode(responseJson, langCode));\n }\n } catch (err) {\n history.push(feedbackHelper.getForErrorCode(err, langCode));\n }\n };\n\n return (\n <>\n <div className=\"modal fade modal-delete-account in\" style={{ display: 'block' }}>\n <div className=\"modal-dialog modal-sm\" role=\"document\">\n <div className=\"modal-content m-bubble\">\n <form\n id=\"main-form\"\n data-id=\"delete-user\"\n className=\"validate\"\n onSubmit={handleSubmit(onSubmit)}\n >\n <div className=\"modal-header\">\n <button onClick={onClose} className=\"close\" aria-label=\"Close\">\n <span aria-hidden=\"true\">×</span>\n </button>\n <I18nText translation=\"profile.edit.modal.title\" isA=\"h4\" className=\"modal-title\" />\n </div>\n <div className=\"modal-body\">\n <I18nText translation=\"profile.edit.modal.confirmQuestion\" />\n <div className=\"custom-checkbox\">\n <Checkbox\n name=\"confirmUserDelete\"\n labelText={confirmDeleteLabel}\n register={register('confirmUserDelete', { required: true })}\n />\n <StyledStandardButton\n titleKey=\"profile.edit.modal.deleteAccount\"\n className=\"btn main\"\n />\n <StyledStandardButton\n titleKey=\"profile.edit.modal.cancel\"\n className=\"btn secondary\"\n handleClick={onClose}\n />\n </div>\n </div>\n </form>\n </div>\n </div>\n </div>\n <div className=\"modal-backdrop fade in\" />\n </>\n );\n};\n","import { useState } from 'react';\nimport { useForm } from 'react-hook-form';\nimport { useDispatch, useSelector } from 'react-redux';\nimport { Link, useHistory } from 'react-router-dom';\nimport { useParams } from 'react-router';\nimport {\n contactLanguageOptions,\n handicapOptions,\n languageLevelOptions,\n learningTypeOptions,\n professionOptions,\n sexOptions,\n writingReadingLevelOptions,\n} from '../../constants/userInputOptions';\nimport { setUser } from '../../state/user/userDuck';\nimport { feedbackHelper } from '../../utils/url/feedbackHelpers';\nimport { updateUserProfile } from '../../services/userService';\nimport { I18nText } from '../I18n/I18nText';\nimport { DeleteAccountModal } from '../Modal/DeleteAccountModal/DeleteAccountModal';\nimport { ModalIntegration } from '../Modal/ModalIntegration';\nimport { StyledStandardButton } from '../StandardButton/StandardButton';\nimport { getPasswordChangeUrl } from '../../utils/url/urlFactory';\nimport { Checkbox } from '../Checkbox/Checkbox';\nimport { Select } from '../Select/Select';\nimport { BirthDateInput } from '../Input/BirthDateInput/BirthDateInput';\nimport { countries } from '../../constants/countries';\nimport { Input } from '../Input/Input';\nimport { emailPattern, namePattern, transcriptionPattern } from '../../utils/validation/validators';\nimport { CUSTOM_ERROR_TRANSLATION_KEYS } from '../../utils/validation/validationMessages';\nimport { userDataSelector } from '../../state/user/userSelectors';\nimport { useI18nContext } from '../../context/I18nContext';\n\nexport const UserProfile = () => {\n const history = useHistory();\n const { langCode } = useParams();\n const dispatch = useDispatch();\n const userData = useSelector(userDataSelector);\n const { i18n } = useI18nContext();\n\n const [isDeleteModalOpen, setDeleteModalOpen] = useState(false);\n\n const {\n register,\n handleSubmit,\n getValues,\n formState: { errors },\n } = useForm({\n mode: 'onSubmit',\n reValidateMode: 'onSubmit',\n });\n\n const additionalSelectInputs = [\n { name: 'contactLanguage', options: contactLanguageOptions, translationKeySuffix: '' },\n { name: 'profession', options: professionOptions },\n { name: 'languageLevel', options: languageLevelOptions },\n { name: 'writingReadingLevel', options: writingReadingLevelOptions },\n { name: 'handicap', options: handicapOptions },\n { name: 'learningType', options: learningTypeOptions },\n ];\n\n const checkboxInputs = [\n { name: 'teacher', translationKeySuffix: '.teacher' },\n { name: 'newsletter', translationKeySuffix: '.newsletter.subscribe' },\n { name: 'signalSoundDisabled', translationKeySuffix: '.signalSoundTurnOff' },\n ];\n\n const removeEmptySelectValues = data => {\n const cleanedData = { ...data };\n additionalSelectInputs.forEach(selectInputName => {\n const value = cleanedData[selectInputName.name];\n if (value === '') {\n // eslint-disable-next-line fp/no-delete\n delete cleanedData[selectInputName.name];\n }\n });\n return cleanedData;\n };\n\n const onSubmit = async data => {\n const cleanedData = removeEmptySelectValues(data);\n try {\n const updatedData = await updateUserProfile(cleanedData);\n dispatch(setUser(updatedData));\n updatedData.email !== getValues().email\n ? history.push(feedbackHelper.forMailChangeRequest(langCode))\n : history.push(feedbackHelper.forProfileUpdated(langCode));\n } catch (err) {\n history.push(feedbackHelper.getForErrorCode(err, langCode));\n }\n };\n\n const toggleDeleteAccountModal = () => {\n setDeleteModalOpen(!isDeleteModalOpen);\n };\n\n return (\n <div className=\"section\">\n <div className=\"container\">\n <div className=\"row\">\n <div className=\"col-md-6 col-md-offset-3\">\n <I18nText isA=\"h1\" translation=\"profile.edit.title\" />\n <I18nText isA=\"p\" translation=\"profile.edit.subtitle\" />\n </div>\n </div>\n <div className=\"row\">\n <div className=\"col-md-6 col-md-offset-3\">\n <form\n id=\"main-form\"\n data-id=\"update-profile\"\n className=\"validate\"\n onSubmit={handleSubmit(onSubmit)}\n >\n <Input\n titleTranslationKey=\"profile.edit.firstName\"\n name=\"firstName\"\n register={register('firstName', { required: true, pattern: namePattern })}\n validationError={errors.firstName}\n customErrorTranslationKey={CUSTOM_ERROR_TRANSLATION_KEYS.SAFE_MONGO_CHARACTERS_ONLY}\n defaultValue={userData.firstName}\n />\n <Input\n titleTranslationKey=\"profile.edit.lastName\"\n name=\"lastName\"\n register={register('lastName', { required: true, pattern: namePattern })}\n validationError={errors.lastName}\n customErrorTranslationKey={CUSTOM_ERROR_TRANSLATION_KEYS.SAFE_MONGO_CHARACTERS_ONLY}\n defaultValue={userData.lastName}\n />\n <Input\n titleTranslationKey=\"profile.edit.firstNameTranscription\"\n name=\"firstNameTranscription\"\n register={register('firstNameTranscription', { pattern: transcriptionPattern })}\n validationError={errors.firstNameTranscription}\n customErrorTranslationKey={CUSTOM_ERROR_TRANSLATION_KEYS.TRANSCRIPTION}\n defaultValue={userData.firstNameTranscription}\n />\n <Input\n titleTranslationKey=\"profile.edit.lastNameTranscription\"\n name=\"lastNameTranscription\"\n register={register('lastNameTranscription', { pattern: transcriptionPattern })}\n validationError={errors.lastNameTranscription}\n customErrorTranslationKey={CUSTOM_ERROR_TRANSLATION_KEYS.TRANSCRIPTION}\n defaultValue={userData.lastNameTranscription}\n />\n <Select\n name=\"sex\"\n validationError={errors.sex}\n register={register('sex', { required: true })}\n defaultOptionKey=\"profile.edit.sex.title\"\n options={sexOptions}\n defaultValue={userData.sex}\n />\n <Input\n titleTranslationKey=\"profile.edit.email\"\n name=\"email\"\n register={register('email', { required: true, pattern: emailPattern })}\n validationError={errors.email}\n defaultValue={userData.email}\n />\n <hr />\n <Input\n titleTranslationKey=\"profile.edit.street\"\n name=\"streetName\"\n register={register('streetName')}\n validationError={errors.streetName}\n defaultValue={userData.streetName}\n />\n <Input\n titleTranslationKey=\"profile.edit.postalCode\"\n name=\"postalCode\"\n register={register('postalCode')}\n validationError={errors.postalCode}\n defaultValue={userData.postalCode}\n />\n <Input\n titleTranslationKey=\"profile.edit.city\"\n name=\"city\"\n register={register('city')}\n validationError={errors.city}\n defaultValue={userData.city}\n />\n <Select\n name=\"country\"\n validationError={errors.country}\n register={register('country')}\n defaultOptionKey=\"profile.edit.country\"\n options={countries}\n defaultValue={userData.country}\n />\n <BirthDateInput\n {...{\n register,\n errors,\n initialDateOfBirth: userData.dateOfBirth,\n translationPrefix: 'profile.edit',\n }}\n />\n <hr />\n {additionalSelectInputs.map(({ name, options, translationKeySuffix = '.title' }) => (\n <Select\n {...{ name, register: register(name), options }}\n key={name}\n validationError={errors[name]}\n defaultOptionKey={`profile.edit.${name}${translationKeySuffix}`}\n defaultValue={userData[name]}\n />\n ))}\n {checkboxInputs.map(({ name, translationKeySuffix }) => (\n <Checkbox\n {...{ name, register: register(name) }}\n key={name}\n labelText={i18n.t(`profile.edit${translationKeySuffix}`)}\n defaultChecked={userData[name]}\n />\n ))}\n <StyledStandardButton titleKey=\"profile.edit.save\" className=\"btn main\" />\n </form>\n <Link to={getPasswordChangeUrl(langCode)} className=\"btn secondary user-profile-button\">\n <I18nText translation=\"profile.edit.passwordChange\" />\n </Link>\n <StyledStandardButton\n titleKey=\"profile.edit.deleteAccount\"\n className=\"btn secondary\"\n handleClick={toggleDeleteAccountModal}\n />\n <ModalIntegration isOpen={isDeleteModalOpen}>\n <DeleteAccountModal onClose={toggleDeleteAccountModal} />\n </ModalIntegration>\n </div>\n </div>\n </div>\n </div>\n );\n};\n","import { useEffect, useState } from 'react';\nimport { useForm } from 'react-hook-form';\nimport { useHistory, useParams } from 'react-router-dom';\nimport { feedbackHelper } from '../../utils/url/feedbackHelpers';\nimport { getUserByConfirmationId, setPasswordByToken } from '../../services/passwordService';\nimport { I18nText } from '../I18n/I18nText';\nimport { NewPasswordInputs } from '../Input/NewPassword/NewPasswordInputs';\nimport { StyledStandardButton as StandardButton } from '../StandardButton/StandardButton';\nimport { StyledLoadingMessage as LoadingMessage } from '../commons/LoadingMessage';\n\nexport const SetNewPassword = ({ confirmationId }) => {\n const history = useHistory();\n const { langCode } = useParams();\n const [email, setEmail] = useState(null);\n\n useEffect(() => {\n getUserByConfirmationId(confirmationId)\n .then(userEmailResponse => {\n if (!userEmailResponse.includes('@')) {\n history.push(feedbackHelper.forInvalidToken(langCode));\n } else {\n setEmail(userEmailResponse);\n }\n })\n .catch(e => {\n history.push(feedbackHelper.getForErrorCode(e, langCode));\n });\n // eslint-disable-next-line\n }, []);\n\n const {\n register,\n handleSubmit,\n getValues,\n formState: { errors },\n } = useForm({\n mode: 'onSubmit',\n reValidateMode: 'onSubmit',\n });\n\n const onSubmit = async () => {\n try {\n await setPasswordByToken(getValues().password, confirmationId);\n history.push(feedbackHelper.forSetPassword(langCode));\n } catch (err) {\n history.push(feedbackHelper.getForErrorCode(err, langCode));\n }\n };\n\n return email ? (\n <div className=\"section\">\n <div className=\"container\">\n <div className=\"row\">\n <div className=\"col-md-6 col-md-offset-3\">\n <I18nText isA=\"h1\" translation=\"profile.edit.password.set.title\" />\n <p>\n <I18nText translation=\"profile.edit.password.set.subtitle\" />\n <br />\n \n <br />\n \n </p>\n </div>\n </div>\n <div className=\"row\">\n <div className=\"col-md-6 col-md-offset-3 text-center\">\n <form onSubmit={handleSubmit(onSubmit)} style={{ textAlign: 'left' }}>\n <NewPasswordInputs\n passwordTitleKey=\"profile.register.password\"\n passwordPlaceholderKey=\"client.newPassword\"\n passwordRepeatTitleKey=\"profile.register.passwordRetype\"\n passwordRepeatPlaceholderKey=\"client.newPasswordRepeat\"\n email={email}\n errors={errors}\n register={register}\n getValues={getValues}\n />\n <StandardButton className=\"btn main\" titleKey=\"profile.edit.password.set.submit\" />\n </form>\n </div>\n </div>\n </div>\n </div>\n ) : (\n <LoadingMessage />\n );\n};\n","/* eslint-disable jsx-a11y/anchor-is-valid,jsx-a11y/aria-role */\nimport { useSelector } from 'react-redux';\nimport { Link } from 'react-router-dom';\nimport { createGlobalStyle } from 'styled-components';\nimport { DwPicture } from '../DwPicture/DwPicture';\nimport { I18nText } from '../I18n/I18nText';\nimport { getContentUrl } from '../../utils/url/urlFactory';\nimport { learningLevelMapper } from '../../utils/learningLevelUtils';\nimport { findLessonLearnProgressSelector } from '../../state/progress/learnProgressSelectors';\nimport { LearnProgressIcon } from '../LearnProgressIcon/LearnProgressIcon';\nimport { progressIconColors } from '../ProgressIcon/progressIconColors';\n\nexport const PlacementTile = ({ lesson, index }) => {\n const { dkLearningLevel, id, name, subTitle } = lesson;\n const lessonProgress = useSelector(findLessonLearnProgressSelector(id));\n const level = learningLevelMapper[dkLearningLevel];\n\n return (\n <Link className=\"main-course-container\" to={getContentUrl(lesson)}>\n <div className={`main-course ${level} assess${index + 1}`}>\n <span className=\"progress-icon\">\n <LearnProgressIcon learnProgress={lessonProgress} color={progressIconColors.GRAY} />\n </span>\n <h2 className=\"tile-learningLevel\">{level}</h2>\n <I18nText isA=\"p\" translation={name} className=\"course-title\" aria-label=\"course-title\" />\n <I18nText isA=\"p\" translation={subTitle} />\n </div>\n </Link>\n );\n};\n\nconst PlacementTestGlobalStyles = createGlobalStyle`\n div.allcourses .main-course {\n float: left;\n text-align: left\n }\n\n div.allcourses .main-course h2 {\n float: left;\n margin: 0 6px 0 0\n }\n\n @media (max-width: 767px) {\n div.allcourses .main-course h2 {\n margin: 5px 6px 0 10px\n }\n }\n\n div.allcourses .main-course p.course-title {\n margin: 6px 0 0\n }\n\n div.allcourses .main-course span.progress-icon {\n float: right;\n margin-top: 20px\n }\n\n div.allcourses .main-course span.progress-icon.half {\n margin-left: 8px\n }\n\n @media (min-width: 768px) {\n div.allcourses .main-course p {\n clear: left\n }\n\n div.allcourses .main-course p.course-title {\n margin: 32px 7px 0 16px\n }\n }\n\n @media (min-width: 992px) {\n div.allcourses .main-course span.progress-icon.half {\n margin-left: 10px\n }\n }\n\n @media (max-width: 767px) {\n div.allcourses .main-course[class*=assess] {\n height: 180px\n }\n\n div.allcourses .main-course[class*=assess] span.progress-icon {\n margin-top: 5px\n }\n\n div.allcourses .main-course[class*=assess] h2 {\n font-size: 36px;\n line-height: 40px;\n display: inline;\n float: none;\n width: auto;\n margin: 0\n }\n\n div.allcourses .main-course[class*=assess] p {\n max-width: 100%;\n max-height: 100%;\n overflow: visible;\n opacity: 1;\n margin: 0\n }\n }\n`;\n\nexport const PlacementTest = ({ data }) => {\n const { name, subTitle, mainContentImageLink, lessons } = data.content;\n return (\n <div className=\"section\">\n <div className=\"row\">\n <div className=\"col-xs-12\">\n <div className=\"respHeaderImgContainer course-headline allcourses-title\">\n <div className=\"course-headline-wrapper\">\n <div className=\"col-xs-12\">\n <h1>{name}</h1>\n </div>\n <div className=\"col-xs-12\">\n <p>{subTitle}</p>\n </div>\n </div>\n <DwPicture imageId={mainContentImageLink.targetId} alt={mainContentImageLink.name} />\n </div>\n <PlacementTestGlobalStyles />\n <div className=\"allcourses\">\n {lessons.map((lesson, index) => (\n <PlacementTile key={lesson.id} {...{ lesson, index }} />\n ))}\n <a href=\"#\" className=\"main-course-container hidden-xs\">\n <div className=\"main-course assess4\" />\n </a>\n </div>\n </div>\n </div>\n </div>\n );\n};\n","import gql from 'graphql-tag';\nimport { useParams } from 'react-router';\nimport { toLang } from '../utils/mappers/langMapper';\nimport { PageContainer } from '../components/Page/PageContainer';\nimport { PlacementTest } from '../components/PlacementTest/PlacementTest';\nimport { WithGraphQLQueryHandling } from '../components/WithGraphQLQueryHandling/WithGraphQLQueryHandling';\nimport { getPlacementTestIdForLangCode } from '../utils/mappers/placementTestCourseIds';\nimport { metaDataFragment, PageMetaData } from '../components/Page/PageMetaData';\nimport { PAGE_TYPES } from '../constants/pageTypes';\nimport {\n gtmDataLayerFragment,\n GtmScriptWithDataLayer,\n} from '../components/GoogleTagManager/GtmScriptWithDataLayer';\n\nexport const placementTestPageQuery = gql`\n query PlacementTestPage($id: Int!, $lang: Language!) {\n content(id: $id, lang: $lang) {\n ... on Course {\n id\n name\n subTitle\n mainContentImageLink {\n name\n targetId\n }\n lessons {\n subTitle: teaser\n id\n name\n language\n dkLearningLevel\n }\n ...${metaDataFragment.name}\n ${gtmDataLayerFragment.partial()}\n }\n }\n }\n ${metaDataFragment.fragment({ type: 'Course' })}\n`;\n\nexport const PlacementTestPage = () => {\n const { langCode } = useParams();\n const placementCourseId = getPlacementTestIdForLangCode(langCode);\n\n const placementTestPageQueryVariables = {\n id: placementCourseId,\n lang: toLang(langCode),\n };\n\n return (\n <PageContainer>\n <WithGraphQLQueryHandling\n query={placementTestPageQuery}\n queryVariables={placementTestPageQueryVariables}\n >\n {data => (\n <>\n <PageMetaData\n pageType={PAGE_TYPES.PLACEMENT_DASHBOARD}\n content={data.content}\n useOnlyCmsKeywords={true}\n />\n <GtmScriptWithDataLayer content={data.content} />\n <PlacementTest {...{ data }} />\n </>\n )}\n </WithGraphQLQueryHandling>\n </PageContainer>\n );\n};\n","/* eslint-disable jsx-a11y/aria-role */\nimport { useEffect, useState } from 'react';\nimport { Link } from 'react-router-dom';\nimport { useParams } from 'react-router';\nimport { I18nText } from '../I18n/I18nText';\nimport { getHelpUrl } from '../../utils/url/urlFactory';\nimport { StyledStandardButton } from '../StandardButton/StandardButton';\nimport { useI18nContext } from '../../context/I18nContext';\nimport { getLastEditedLessonsIds } from '../../services/learnProgressService';\n\nconst SCOPE = Object.freeze({\n LAST_LESSON: 1,\n LAST_THREE_LESSONS: 3,\n LAST_TEN_LESSONS: 10,\n ALL_LESSONS: 0,\n});\n\nconst scopeToTranslationKeyMapping = Object.freeze({\n [SCOPE.LAST_LESSON]: 'vocabularyTrainer.last',\n [SCOPE.LAST_THREE_LESSONS]: 'vocabularyTrainer.last3',\n [SCOPE.LAST_TEN_LESSONS]: 'vocabularyTrainer.last10',\n [SCOPE.ALL_LESSONS]: 'vocabularyTrainer.all',\n});\n\nexport const VocabularyTrainerStart = ({\n setLastLessonsIds,\n setNumberOfVocabularies,\n handleExerciseStart,\n}) => {\n const [numberOfLessons, setNumberOfLessons] = useState(SCOPE.LAST_LESSON);\n const { langCode } = useParams();\n const { i18n } = useI18nContext();\n\n const handleChangeScope = async value => {\n const lastEditedLessonIds = await getLastEditedLessonsIds(value, langCode);\n setNumberOfLessons(value);\n setLastLessonsIds && setLastLessonsIds(lastEditedLessonIds);\n };\n\n const handleSubmit = e => {\n e.preventDefault();\n handleExerciseStart && handleExerciseStart();\n };\n\n useEffect(() => {\n handleChangeScope(SCOPE.LAST_LESSON);\n // eslint-disable-next-line\n }, []);\n\n return (\n <form onSubmit={handleSubmit}>\n <div className=\"headline-container row voc-start\">\n <div className=\"col-sm-offset-2 col-sm-8 col-lg-offset-3 col-lg-6\">\n <div className=\"exercise-headline\" id=\"user-choice\">\n <I18nText isA=\"p\" translation={scopeToTranslationKeyMapping[numberOfLessons]} />\n </div>\n </div>\n </div>\n\n <div className=\"row voc-button-stack\" id=\"button-stack\">\n <div className=\"col-sm-offset-2 col-sm-8 col-lg-offset-3 col-lg-6\">\n <StyledStandardButton\n titleKey=\"vocabularyTrainer.10words\"\n className=\"btn main\"\n handleClick={() => setNumberOfVocabularies(10)}\n />\n <StyledStandardButton\n titleKey=\"vocabularyTrainer.30words\"\n className=\"btn main\"\n handleClick={() => setNumberOfVocabularies(30)}\n />\n <StyledStandardButton\n titleKey=\"vocabularyTrainer.50words\"\n className=\"btn main\"\n handleClick={() => setNumberOfVocabularies(50)}\n />\n </div>\n </div>\n\n <div className=\"row\">\n <div className=\"col-sm-offset-2 col-sm-8 col-lg-offset-3 col-lg-6 voc-start\">\n <div className=\"exercise-headline\">\n <p>\n <I18nText translation=\"vocabularyTrainer.others\" />\n </p>\n </div>\n\n <div className=\"form-group\">\n <select\n className=\"form-control\"\n id=\"vokabel-trainer-select-lecture\"\n name=\"country\"\n required=\"\"\n aria-label=\"select lesson\"\n onChange={e => handleChangeScope(e.target.value)}\n onBlur={e => handleChangeScope(e.target.value)}\n >\n <option value={SCOPE.LAST_LESSON}>\n {i18n.t(scopeToTranslationKeyMapping[SCOPE.LAST_LESSON])}\n </option>\n <option value={SCOPE.LAST_THREE_LESSONS}>\n {i18n.t(scopeToTranslationKeyMapping[SCOPE.LAST_THREE_LESSONS])}\n </option>\n <option value={SCOPE.LAST_TEN_LESSONS}>\n {i18n.t(scopeToTranslationKeyMapping[SCOPE.LAST_TEN_LESSONS])}\n </option>\n <option value={SCOPE.ALL_LESSONS}>\n {i18n.t(scopeToTranslationKeyMapping[SCOPE.ALL_LESSONS])}\n </option>\n </select>\n </div>\n\n <div className=\"need-help-link\">\n <Link to={getHelpUrl(langCode)}>\n <I18nText translation=\"vocabularyTrainer.needhelp\" />\n </Link>\n </div>\n </div>\n </div>\n </form>\n );\n};\n","import classnames from 'classnames';\nimport styled from 'styled-components';\nimport { I18nText } from '../I18n/I18nText';\nimport { useRtlContext } from '../../hooks/useRtl';\n\nexport const VocabularyTrainerStatus = ({ number, total, top, bottom, className }) => {\n const { isRtl } = useRtlContext();\n\n const rtlText = (\n <div className=\"exercise-nav-title rtl\">\n <I18nText isA=\"em\" translation={`vocabularyTrainer.correct`} />\n {` ${number} `}\n <I18nText isA=\"span\" translation={`vocabularyTrainer.outOf`} />\n <span data-value=\"total\">{` ${total}`}</span>\n </div>\n );\n\n const ltrText = (\n <div className=\"exercise-nav-title\">\n {`${number} `}\n <I18nText isA=\"span\" translation={`vocabularyTrainer.outOf`} />\n <span data-value=\"total\">{` ${total} `}</span>\n <I18nText isA=\"em\" translation={`vocabularyTrainer.correct`} />\n </div>\n );\n\n return (\n <div className={classnames('row noVMargins', className)}>\n <div className=\"col-sm-offset-1 col-sm-10 col-lg-offset-2 col-lg-8\">\n <div\n className={classnames('exercise-nav', {\n top,\n bottom,\n })}\n >\n {isRtl ? rtlText : ltrText}\n </div>\n </div>\n </div>\n );\n};\n\nexport const StyledVocabularyTrainerStatus = styled(VocabularyTrainerStatus)`\n & div.exercise-nav div.exercise-nav-title.rtl {\n direction: rtl;\n }\n`;\n","import { RichText } from '../RichText/RichText';\nimport { DwPicture } from '../DwPicture/DwPicture';\n\nexport const BubbleContainer = ({ children, mainContentImage }) => {\n return (\n <div className=\"bubble-image-container\">\n {mainContentImage && <DwPicture imageId={mainContentImage.id} alt={mainContentImage.name} />}\n <RichText content={children} isContainer={false} className=\"bubble image bubble-text-image\" />\n </div>\n );\n};\n","import { useRef, useState, useEffect } from 'react';\nimport styled, { createGlobalStyle } from 'styled-components';\nimport classnames from 'classnames';\nimport { BubbleContainer } from './BubbleContainer';\nimport { StyledSolveButton } from '../SolveCheckButton/SolveButton';\nimport { I18nText } from '../I18n/I18nText';\n\nconst VocabularyTrainerItemGlobalStyles = createGlobalStyle` \n /* @noflip */\n .alwaysLtr {\n text-align: left;\n direction: ltr;\n }\n`;\n\nexport const VocabularyTrainerItem = ({\n vocabulary: { text, audios, subTitle, name },\n onSolved,\n isHidden,\n className,\n}) => {\n const audioRef = useRef();\n const { mp3Src, mainContentImage } = audios[0] || {};\n const [isSolved, setSolved] = useState(false);\n const [audioStatus, setAudioStatus] = useState('');\n const [isDisabled, setDisabled] = useState(false);\n\n const onSolveClicked = event => {\n event.preventDefault();\n setSolved(true);\n setDisabled(true);\n if (!mp3Src) {\n setAudioStatus('ending');\n onSolved();\n }\n };\n\n const onAnswerClicked = event => {\n event.preventDefault();\n audioRef.current.play();\n setAudioStatus('playing');\n };\n\n const onAudioEnded = () => {\n setAudioStatus('ending');\n onSolved();\n };\n\n useEffect(() => {\n if (!isHidden) {\n setSolved(false);\n setAudioStatus('');\n setDisabled(false);\n }\n }, [text, isHidden]);\n\n return (\n <>\n <div className=\"exercise-questions\">\n <div className={classnames('question-row row', className)} dir=\"ltr\">\n <div className=\"col-sm-offset-1 col-sm-5 col-lg-offset-2 col-lg-4\">\n <BubbleContainer mainContentImage={mainContentImage}>{text}</BubbleContainer>\n </div>\n <div className=\"col-sm-5 col-lg-4\">\n <VocabularyTrainerItemGlobalStyles />\n {isSolved ? (\n // eslint-disable-next-line jsx-a11y/anchor-is-valid\n <a\n onClick={onAnswerClicked}\n href=\"#\"\n className={classnames('bubble audio right', audioStatus, 'alwaysLtr')}\n aria-label=\"Audio - \"\n >\n {/* eslint-disable-next-line jsx-a11y/media-has-caption */}\n <audio\n autoPlay\n onEnded={onAudioEnded}\n ref={audioRef}\n className=\"exercise-audio-file initialized\"\n tabIndex=\"0\"\n >\n <source src={mp3Src} type=\"audio/mpeg\" />\n </audio>\n\n <span>{name}</span>\n {subTitle && <span className=\"hint\">{subTitle}</span>}\n <div className=\"exercise-play-audio\"></div>\n </a>\n ) : (\n <div className=\"answer-multiple-text\">\n <a href=\"/#\" onClick={onSolveClicked} className=\"answer-link-container\">\n <div className=\"answer pronunciation-text-choice\">...</div>\n </a>\n </div>\n )}\n </div>\n </div>\n </div>\n {!isHidden && (\n <div className=\"row form-group topless\">\n <div className=\"col-sm-offset-4 col-sm-4 col-lg-offset-4 col-lg-4 col-xs-12 active\">\n <StyledSolveButton handleClick={onSolveClicked} isDisabled={isDisabled} fullWidth>\n <I18nText translation=\"exercise.resolve\" />\n </StyledSolveButton>\n </div>\n </div>\n )}\n </>\n );\n};\n\nexport const StyledVocabularyTrainerItem = styled(VocabularyTrainerItem)`\n & .answer-multiple-text:hover:after {\n -webkit-transition: all 0.3s linear;\n -moz-transition: all 0.3s linear;\n -o-transition: all 0.3s linear;\n transition: all 0.3s linear;\n border-left-color: #0098ff;\n }\n & .bubble .hint {\n display: block;\n font-size: 80%;\n font-style: italic;\n }\n`;\n","function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport * as React from \"react\";\n\nfunction SvgSmileyPositive(_ref, svgRef) {\n var title = _ref.title,\n titleId = _ref.titleId,\n props = _objectWithoutProperties(_ref, [\"title\", \"titleId\"]);\n\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n width: \"100%\",\n height: \"100%\",\n viewBox: \"0 0 55 54\",\n xmlns: \"http://www.w3.org/2000/svg\",\n xmlnsXlink: \"http://www.w3.org/1999/xlink\",\n xmlSpace: \"preserve\",\n style: {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n strokeLinejoin: \"round\",\n strokeMiterlimit: 1.41421\n },\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, /*#__PURE__*/React.createElement(\"circle\", {\n className: \"dot\",\n cx: 27.5,\n cy: 27,\n r: 27,\n style: {\n fill: \"#A9A094\"\n }\n }), /*#__PURE__*/React.createElement(\"g\", {\n id: \"face\"\n }, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M26.439,37.092l-11.313,-11.314l-2.829,2.829l11.314,11.313l2.828,-2.828Z\",\n style: {\n fill: \"#fff\"\n }\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M39.874,18l-19.092,19.092l2.829,2.828l19.092,-19.092l-2.829,-2.828Z\",\n style: {\n fill: \"#fff\"\n }\n })));\n}\n\nvar ForwardRef = /*#__PURE__*/React.forwardRef(SvgSmileyPositive);\nexport default __webpack_public_path__ + \"static/media/smiley-positive.3d91069e.svg\";\nexport { ForwardRef as ReactComponent };","function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport * as React from \"react\";\n\nfunction SvgSmileyNegative(_ref, svgRef) {\n var title = _ref.title,\n titleId = _ref.titleId,\n props = _objectWithoutProperties(_ref, [\"title\", \"titleId\"]);\n\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n width: \"100%\",\n height: \"100%\",\n viewBox: \"0 0 55 54\",\n xmlns: \"http://www.w3.org/2000/svg\",\n xmlnsXlink: \"http://www.w3.org/1999/xlink\",\n xmlSpace: \"preserve\",\n style: {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n strokeLinejoin: \"round\",\n strokeMiterlimit: 1.41421\n },\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, /*#__PURE__*/React.createElement(\"circle\", {\n className: \"dot\",\n cx: 27.5,\n cy: 27,\n r: 27,\n style: {\n fill: \"#A9A094\"\n }\n }), /*#__PURE__*/React.createElement(\"g\", {\n id: \"face\"\n }, /*#__PURE__*/React.createElement(\"circle\", {\n cx: 18.5,\n cy: 18.5,\n r: 3.5,\n style: {\n fill: \"#fff\"\n }\n }), /*#__PURE__*/React.createElement(\"circle\", {\n cx: 36.5,\n cy: 18.5,\n r: 3.5,\n style: {\n fill: \"#fff\"\n }\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M40.902,32.312l-26.41,5.613l0.624,2.935l26.41,-5.614l-0.624,-2.934Z\",\n style: {\n fill: \"#fff\"\n }\n })));\n}\n\nvar ForwardRef = /*#__PURE__*/React.forwardRef(SvgSmileyNegative);\nexport default __webpack_public_path__ + \"static/media/smiley-negative.6c289ab6.svg\";\nexport { ForwardRef as ReactComponent };","import styled from 'styled-components';\nimport { ReactComponent as SmileyPositive } from '../svg/smiley-positive.svg';\nimport { ReactComponent as SmileyNegative } from '../svg/smiley-negative.svg';\n\nexport const StyledSmileyPositive = styled(SmileyPositive)``;\nexport const StyledSmileyNegative = styled(SmileyNegative)``;\n","import { useState } from 'react';\nimport classnames from 'classnames';\nimport styled from 'styled-components';\nimport {\n StyledSmileyNegative as SmileyNegative,\n StyledSmileyPositive as SmileyPositive,\n} from '../../assets/icons/Smiley';\nimport { useRtlContext } from '../../hooks/useRtl';\n\nexport const VocabularyTrainerSmileys = ({ handleCorrectAnswer, handleWrongAnswer, className }) => {\n const ANSWER_STATE = Object.freeze({\n INITIAL: 'initial',\n WRONG: 'wrong',\n CORRECT: 'correct',\n });\n const { isRtl } = useRtlContext();\n const [answerState, setAnswerState] = useState(ANSWER_STATE.INITIAL);\n\n const onPositiveSmileyClicked = e => {\n e.preventDefault();\n setAnswerState(ANSWER_STATE.CORRECT);\n handleCorrectAnswer();\n };\n\n const onNegativeSmileyClicked = e => {\n e.preventDefault();\n setAnswerState(ANSWER_STATE.WRONG);\n handleWrongAnswer();\n };\n\n return (\n <div className={classnames('smileys-ltr', className, { isRtl })}>\n <div className=\"col-xs-offset-3 col-xs-3 col-sm-offset-4 col-sm-2 col-lg-offset-5 col-lg-1\">\n {/* eslint-disable-next-line jsx-a11y/anchor-is-valid */}\n <a\n href=\"#\"\n className={classnames('smileys', answerState === ANSWER_STATE.CORRECT ? 'fine' : null)}\n onClick={onPositiveSmileyClicked}\n >\n <SmileyPositive />\n </a>\n </div>\n <div className=\"col-xs-offset-0 col-xs-3 col-sm-offset-0 col-sm-2 col-lg-offset-0 col-lg-1\">\n {/* eslint-disable-next-line jsx-a11y/anchor-is-valid */}\n <a\n href=\"#\"\n className={classnames('smileys', answerState === ANSWER_STATE.WRONG ? 'notsogood' : null)}\n onClick={onNegativeSmileyClicked}\n >\n <SmileyNegative />\n </a>\n </div>\n </div>\n );\n};\n\nexport const StyledVocabularyTrainerSmileys = styled(VocabularyTrainerSmileys)`\n @media (min-width: 768px) {\n &.isRtl .col-lg-offset-5 {\n margin-right: 0;\n margin-left: 33.3333%;\n }\n }\n`;\n","import { useState } from 'react';\nimport { useTimeout } from './useTimeout';\n\nexport const TRANSITION_STATUS = Object.freeze({\n INITIAL: 'initial',\n BUSY: 'busy',\n READY: 'ready',\n});\n\nexport const useTransition = ({ delay }) => {\n const [transition, setTransition] = useState({ status: TRANSITION_STATUS.INITIAL });\n\n useTimeout(\n {\n callback: () => {\n if (transition.status === TRANSITION_STATUS.BUSY) {\n transition.onTransitionEnd();\n }\n setTransition({ status: TRANSITION_STATUS.READY });\n },\n delay,\n },\n [transition],\n );\n\n const startTransition = newTransition => {\n setTransition({ ...newTransition, status: TRANSITION_STATUS.BUSY });\n };\n\n return { transitionStatus: transition.status, startTransition };\n};\n","import { useEffect, useState } from 'react';\nimport styled from 'styled-components';\nimport classnames from 'classnames';\nimport { useHistory, useParams } from 'react-router';\nimport { StyledVocabularyTrainerStatus as VocabularyTrainerStatus } from './VocabularyTrainerStatus';\nimport { StyledVocabularyTrainerItem as VocabularyTrainerItem } from './VocabularyTrainerItem';\nimport { StyledVocabularyTrainerSmileys as VocabularyTrainerSmileys } from './VocabularyTrainerSmileys';\nimport { useTransition } from '../../hooks/useTransition';\nimport { getFeedbackUrl } from '../../utils/url/urlFactory';\nimport { FEEDBACK_TYPES } from '../../constants/feedback';\n\nexport const VocabularyTrainerExercise = ({ vocabularies, handleExerciseEnd, className }) => {\n const [isSolved, setSolved] = useState(false);\n const [correctAnswers, setCorrectAnswers] = useState(0);\n const [trainerVocabularies, setTrainerVocabularies] = useState(vocabularies);\n const history = useHistory();\n const { langCode } = useParams();\n\n const nextVocabulary = newTrainerVocabularies => {\n const slicedTrainerVocabularies = newTrainerVocabularies.slice(1);\n setTrainerVocabularies(slicedTrainerVocabularies);\n setSolved(false);\n if (!slicedTrainerVocabularies.length) {\n handleExerciseEnd();\n }\n };\n\n const { transitionStatus, startTransition } = useTransition({\n delay: 300,\n });\n\n useEffect(() => {\n if (vocabularies.length === 0) {\n history.push(getFeedbackUrl(FEEDBACK_TYPES.VOCABULARY_TRAINER_NO_VOCABULARIES, langCode));\n }\n }, [history, langCode, vocabularies.length]);\n\n const onSolved = () => {\n setSolved(true);\n };\n\n const handleCorrectAnswer = () => {\n startTransition({ onTransitionEnd: () => nextVocabulary(trainerVocabularies) });\n setCorrectAnswers(value => value + 1);\n };\n const handleWrongAnswer = () => {\n const newTrainerVocabularies = [...trainerVocabularies, trainerVocabularies[0]];\n startTransition({ onTransitionEnd: () => nextVocabulary(newTrainerVocabularies) });\n };\n\n if (!trainerVocabularies.length) {\n return null;\n }\n\n return (\n <div\n className={classnames(\n 'section exercise-container ltr-container',\n className,\n transitionStatus,\n )}\n >\n <VocabularyTrainerStatus top number={correctAnswers} total={vocabularies.length} />\n <VocabularyTrainerItem\n vocabulary={trainerVocabularies[0]}\n onSolved={onSolved}\n isHidden={isSolved}\n />\n {isSolved && (\n <div className=\"row form-group topless\">\n <VocabularyTrainerSmileys\n handleCorrectAnswer={handleCorrectAnswer}\n handleWrongAnswer={handleWrongAnswer}\n />\n </div>\n )}\n <VocabularyTrainerStatus bottom number={correctAnswers} total={vocabularies.length} />\n </div>\n );\n};\n\nexport const StyledVocabularyTrainerExercise = styled(VocabularyTrainerExercise)`\n &.busy {\n opacity: 0;\n }\n &.ready {\n opacity: 1;\n }\n & {\n opacity: 0;\n -webkit-transition: opacity 0.3s ease;\n -moz-transition: opacity 0.3s ease;\n -o-transition: opacity 0.3s ease;\n transition: opacity 0.3s ease;\n }\n`;\n","import gql from 'graphql-tag';\nimport { toLang } from '../../utils/mappers/langMapper';\n\nexport const knowledgeType = { field: 'knowledgeType', operator: 'match', value: 'VOCABULARY' };\n\nexport const getCondition = (searchQuery, field) => {\n if (!searchQuery) {\n return [knowledgeType];\n }\n return [knowledgeType, { field, operator: 'match', value: searchQuery }];\n};\n\nexport const getQueryVariables = ({\n langCode,\n offset = 0,\n amount = 12,\n searchQuery,\n sort = true,\n}) => ({\n lang: toLang(langCode),\n offset,\n amount,\n originalCondition: getCondition(searchQuery, 'name_partial'),\n translationCondition: getCondition(searchQuery, 'text_partial'),\n sort: !searchQuery && sort ? [{ field: 'name_not_analyzed', order: 'ASC' }] : [],\n});\n\nexport const vocabularyFragment = {\n name: 'vocabularyFragment',\n fragment() {\n return gql`\n fragment ${this.name} on Knowledge {\n id\n text\n name\n subTitle\n }\n `;\n },\n};\n\nexport const searchResultFragment = {\n name: 'searchResult',\n fragment() {\n return gql`\n fragment ${this.name} on SearchResult {\n totalHits\n amount\n offset\n hits {\n ...vocabularyFragment\n }\n }\n ${vocabularyFragment.fragment()}\n `;\n },\n};\n\nconst searchQueryPart = name => `${name}: findContents(\n lang: $lang\n types: [KNOWLEDGE]\n offset: $offset\n amount: $amount\n must: $${name}Condition\n should: []\n mustNot: []\n sort: $sort\n ) {\n ...searchResult\n }\n `;\n\nexport const vocabularySearchQuery = gql`\n query VocabularySearch(\n $lang: Language!, $offset: Int!\n $amount: Int!\n $originalCondition: [QueryConditionInput!]\n $translationCondition: [QueryConditionInput!] \n $sort: [QuerySortInput!]\n ) {\n ${searchQueryPart('original')}\n ${searchQueryPart('translation')}\n }\n ${searchResultFragment.fragment()}\n `;\n","import { useEffect, useState } from 'react';\nimport gql from 'graphql-tag';\nimport { useHistory, useLocation, useParams } from 'react-router';\nimport { VocabularyTrainerStart } from './VocabularyTrainerStart';\nimport { StyledVocabularyTrainerExercise as VocabularyTrainerExercise } from './VocabularyTrainerExercise';\nimport { WithGraphQLQueryHandling } from '../WithGraphQLQueryHandling/WithGraphQLQueryHandling';\nimport { toLang } from '../../utils/mappers/langMapper';\nimport { shuffle } from '../../utils/commons';\nimport {\n getFeedbackUrl,\n PAGE_VOCABULARY_TRAINER_START,\n getVocabularyTrainerPage,\n} from '../../utils/url/urlFactory';\nimport { FEEDBACK_TYPES } from '../../constants/feedback';\nimport { vocabularyFragment } from '../Vocabulary/VocabularyQuery';\n\nexport const vocabularyTrainerQuery = gql`\n query VocabularyTrainer($keys: [ContentKeyInput]!, $lang: Language!) {\n contents(keys: $keys, lang: $lang) {\n ... on Lesson {\n id\n vocabularies {\n ...vocabularyFragment\n audios {\n mp3Src\n mainContentImage {\n id\n name\n }\n }\n }\n }\n }\n }\n ${vocabularyFragment.fragment()}\n`;\n\nexport const makeQueryVariables = (ids, langCode) => ({\n keys: ids.map(lessonId => ({\n id: lessonId,\n type: 'LESSON',\n })),\n lang: toLang(langCode),\n});\n\nexport const VocabularyTrainer = () => {\n const [lastLessonsIds, setLastLessonsIds] = useState([]);\n const [numberOfVocabularies, setNumberOfVocabularies] = useState(0);\n const [isStarted, setStarted] = useState(false);\n const { langCode } = useParams();\n const location = useLocation();\n const history = useHistory();\n\n const handleExerciseStart = () => {\n setStarted(true);\n };\n\n const handleExerciseEnd = () => {\n setStarted(false);\n };\n\n useEffect(() => {\n if (location.pathname.includes(PAGE_VOCABULARY_TRAINER_START)) {\n setStarted(false);\n setLastLessonsIds([]);\n history.replace(getVocabularyTrainerPage(langCode));\n }\n if (isStarted && !lastLessonsIds.length) {\n history.push(getFeedbackUrl(FEEDBACK_TYPES.VOCABULARY_TRAINER_NO_VOCABULARIES, langCode));\n }\n }, [history, langCode, lastLessonsIds.length, isStarted, location.pathname]);\n\n const getRandomVocabularies = ({ contents }) => {\n const vocabularies = contents.map(content => (content ? content.vocabularies : [])).flat(1);\n const uniqueVocabularies = Array.from(new Set(vocabularies));\n return shuffle(uniqueVocabularies).slice(0, numberOfVocabularies);\n };\n\n if (!isStarted) {\n return (\n <VocabularyTrainerStart\n {...{ setLastLessonsIds, setNumberOfVocabularies, handleExerciseStart }}\n />\n );\n }\n\n return (\n <WithGraphQLQueryHandling\n query={vocabularyTrainerQuery}\n queryVariables={makeQueryVariables(lastLessonsIds, langCode)}\n >\n {data => (\n <VocabularyTrainerExercise\n vocabularies={getRandomVocabularies(data)}\n handleExerciseEnd={handleExerciseEnd}\n />\n )}\n </WithGraphQLQueryHandling>\n );\n};\n","/* eslint-disable react-hooks/exhaustive-deps */\nimport gql from 'graphql-tag';\nimport { useParams } from 'react-router';\nimport { useDispatch, useSelector } from 'react-redux';\nimport { Link, useHistory } from 'react-router-dom';\nimport { useEffect } from 'react';\nimport { ContentHeadline } from '../ContentContainer/ContentHeadline/ContentHeadline';\nimport { ContentSection } from '../ContentContainer/ContentSection/ContentSection';\nimport { I18nText } from '../I18n/I18nText';\nimport { LessonMenu } from '../Lesson/LessonMenu/LessonMenu';\nimport { Summary } from '../Lesson/LessonExercise/LessonExerciseResult/Summary';\nimport { calculatePercentage } from '../../utils/commons';\nimport { findLessonLearnProgressSelector } from '../../state/progress/learnProgressSelectors';\nimport { getContentUrl, getLessonExerciseUrl } from '../../utils/url/urlFactory';\nimport { getDWStructureUrl, normalizeUrlName } from '../../utils/url/url';\nimport { isPlacementTestCourse } from '../../utils/mappers/placementTestCourseIds';\nimport { learningLevelMapper } from '../../utils/learningLevelUtils';\nimport { MARKS } from '../../constants/marks';\nimport { userSelector } from '../../state/user/userSelectors';\nimport { handleCertificateGeneration } from '../../utils/certificateUtils';\nimport { readLessonProgress } from '../../state/progress/learnProgressDuck';\nimport { filterLessonExerciseOverviewItems, isFinalTestLesson } from '../../utils/lessonUtils';\nimport { PAGE_TYPES } from '../../constants/pageTypes';\nimport { PageMetaData } from '../Page/PageMetaData';\nimport { GtmScriptWithDataLayer } from '../GoogleTagManager/GtmScriptWithDataLayer';\n\nexport const placementResultFragment = gql`\n fragment PlacementResult on Course {\n id\n name\n language\n dkLearningLevel\n }\n`;\n\nconst getFirstCourseOfEachLevel = allDkCourses => {\n const result = [];\n Object.keys(learningLevelMapper).forEach(learningLevel => {\n const targetCourse = allDkCourses.find(course => course.dkLearningLevel === +learningLevel);\n if (targetCourse) {\n // eslint-disable-next-line fp/no-mutating-methods\n result.push(targetCourse);\n }\n });\n return result;\n};\n\nexport const PlacementAndFinalTestResult = ({ data }) => {\n const { lesson, course, dkCourses: allDkCourses } = data;\n const { dkLearningLevel: courseDkLearningLevel } = course;\n const dkCourses = getFirstCourseOfEachLevel(allDkCourses);\n const {\n dwLinks,\n id: lessonId,\n name,\n overviewParts,\n dkLearningLevel: lessonDkLearningLevel,\n } = lesson;\n const { id: courseId, name: courseName, contentLinks: lessonContentLinksFromCourse } = course;\n const dispatch = useDispatch();\n\n useEffect(() => {\n dispatch(readLessonProgress(lessonId));\n }, []);\n\n const history = useHistory();\n const { isLoggedIn } = useSelector(userSelector);\n const { langCode } = useParams();\n\n const lessonProgress = useSelector(findLessonLearnProgressSelector(lessonId));\n const { maxPointsForAllExercises = 0, resultPoints = 0, finalTest } = lessonProgress || {};\n\n const isFromPlacementCourse = isPlacementTestCourse(courseId);\n const isFinalTest = isFinalTestLesson({\n lessonContentLinksFromCourse,\n currentLessonId: lessonId,\n });\n\n const dkLearningLevel = isFinalTest ? courseDkLearningLevel : lessonDkLearningLevel;\n\n const level = learningLevelMapper[dkLearningLevel] || 'A1';\n const percentile = calculatePercentage(resultPoints, maxPointsForAllExercises);\n\n const calculateCourseNote = () => {\n if (percentile >= MARKS.GOOD) return 'veryGood';\n if (percentile >= MARKS.MEDIUM) return 'good';\n if (percentile >= MARKS.BAD) return 'bad';\n return 'veryBad';\n };\n\n const nextLevelRecommendation = () => {\n if (percentile <= MARKS.MEDIUM) return level;\n\n const levelValues = Object.values(learningLevelMapper);\n const currentIndex = levelValues.indexOf(level);\n const nextLevel = levelValues[currentIndex + 1];\n\n return nextLevel || level;\n };\n\n const nextLevel = nextLevelRecommendation();\n\n const getRecommendedCourseURL = () => {\n const nextCourse = dkCourses.find(\n dkCourse => learningLevelMapper[dkCourse.dkLearningLevel] === nextLevel,\n );\n\n return nextCourse ? getContentUrl(nextCourse) : null;\n };\n\n const handleOnCertificateClick = async () => {\n await handleCertificateGeneration({ id: lessonId, langCode, history });\n };\n\n const nextCourseUrl = getRecommendedCourseURL();\n const showCertificateButton = isLoggedIn && finalTest && percentile >= MARKS.MEDIUM;\n\n const lessonExerciseOverviewItems = filterLessonExerciseOverviewItems(overviewParts);\n const firstExerciseLink = getLessonExerciseUrl(\n langCode,\n lessonId,\n normalizeUrlName(lessonExerciseOverviewItems[0].target.name),\n lessonExerciseOverviewItems[0].targetId,\n );\n\n const PageMetaDataComponent = () => {\n if (isFinalTest) {\n return (\n <PageMetaData pageType={PAGE_TYPES.FINAL_TEST} content={lesson} translationFirst={true} />\n );\n }\n if (isFromPlacementCourse) {\n return <PageMetaData pageType={PAGE_TYPES.PLACEMENT_TEST} />;\n }\n return <PageMetaData />;\n };\n\n return (\n <>\n <PageMetaDataComponent />\n <GtmScriptWithDataLayer content={lesson} />\n <LessonMenu\n {...{\n lessonId,\n lessonName: name,\n lessonOverviewParts: overviewParts,\n firstExercisePath: firstExerciseLink,\n courseId,\n courseName,\n isFromPlacementCourse,\n isFinalTest,\n }}\n />\n <div className=\"section\">\n <div className=\"row\">\n <div className=\"col-xs-12\">\n <div className=\"section exercise-container copy\">\n <div className=\"row breakout\">\n <div className=\"col-xs-12 col-lg-offset-2 col-lg-8\">\n <div className=\"result-headline score\">\n <Summary\n {...{\n lessonId,\n showTitle: false,\n }}\n />\n </div>\n </div>\n </div>\n <ContentHeadline>\n <I18nText isA=\"p\" translation={`placementTest.${level}.${calculateCourseNote()}`} />\n </ContentHeadline>\n {showCertificateButton && (\n <div className=\"row noVMargins\" id=\"courseCertificateDiv\">\n <div className=\"col-xs-offset-2 col-xs-8 col-sm-offset-4 col-sm-4\">\n <I18nText\n isA=\"button\"\n translation=\"course.certificate\"\n onClick={handleOnCertificateClick}\n className=\"btn secondary\"\n />\n </div>\n </div>\n )}\n {nextCourseUrl && (\n <>\n <div className=\"row breakout\">\n <div className=\"col-xs-12 col-lg-offset-2 col-lg-8\">\n <div className=\"result-headline recommendation\">\n <I18nText translation=\"placementTest.recommendation\" isA=\"p\" />\n <h1>{nextLevel}</h1>\n </div>\n </div>\n </div>\n <div className=\"row noVMargins\">\n <div className=\"col-xs-offset-2 col-xs-8 col-sm-offset-4 col-sm-4\">\n <Link to={nextCourseUrl} className=\"btn main\">\n <I18nText translation=\"common.next\" />\n </Link>\n </div>\n </div>\n </>\n )}\n {dwLinks && dwLinks.length > 0 && (\n <ContentSection title=\"placementTest.moreStuff\">\n {dwLinks.map(link => {\n if (!link.name.includes(nextLevel)) return '';\n return (\n <div key={link.id}>\n <p className=\"grammarLink\">\n <a href={getDWStructureUrl({ ...link, langCode })}>{link.name}</a>\n </p>\n <p className=\"grammarLinkText\">{link.description}</p>\n </div>\n );\n })}\n </ContentSection>\n )}\n </div>\n </div>\n </div>\n </div>\n </>\n );\n};\n","import gql from 'graphql-tag';\nimport { useParams } from 'react-router';\nimport { useSelector } from 'react-redux';\nimport {\n PlacementAndFinalTestResult,\n placementResultFragment,\n} from '../components/PlacementResult/PlacementAndFinalTestResult';\nimport { PageContainer } from '../components/Page/PageContainer';\nimport { WithGraphQLQueryHandling } from '../components/WithGraphQLQueryHandling/WithGraphQLQueryHandling';\nimport { sortByLearningLevel } from '../utils/learningLevelUtils';\nimport { toLang } from '../utils/mappers/langMapper';\nimport { lessonOverviewPartsFragment } from '../components/Lesson/Lesson';\nimport { userDataSelector } from '../state/user/userSelectors';\nimport { metaDataFragment } from '../components/Page/PageMetaData';\nimport { gtmDataLayerFragment } from '../components/GoogleTagManager';\n\nexport const placementResultPageQuery = ({ handicap }) => gql`\n query PlacementResultPage($id: Int!, $lessonIdString: String!, $amount: Int!, $lang: Language!, $type: ModelType!) {\n lesson: content(id: $id, lang: $lang) {\n ... on Lesson {\n id\n name\n dkLearningLevel\n dwLinks: contentLinks(targetTypes: [NAVIGATION]) {\n id: targetId\n description\n name\n }\n }\n ...${`PlacementOverviewParts${handicap || ''}`}\n ...${metaDataFragment.name}\n ${gtmDataLayerFragment.partial()}\n }\n\n dkCourses: contentsByType(\n type: $type\n lang: $lang\n amount: $amount\n filters: { field: \"dkLearningLevel\", value: [\"2\", \"4\"] }\n ) {\n ...PlacementResult\n }\n\n dkCoursesInGerman: contentsByType(\n type: $type\n lang: GERMAN\n amount: $amount\n filters: { field: \"dkLearningLevel\", value: [\"8\"] }\n ) {\n ...PlacementResult\n }\n \n currentCourse: contentsByType(\n lang: $lang\n type: COURSE\n amount: 1\n filters: { field: \"contentLinks.targetId\", value: [$lessonIdString] }\n ) {\n ... on Course {\n id\n name\n dkLearningLevel\n contentLinks(targetTypes: LESSON) {\n targetId\n additionalInformation\n }\n }\n }\n }\n ${lessonOverviewPartsFragment.fragment({ scope: 'Placement', handicap })}\n ${placementResultFragment}\n ${metaDataFragment.fragment({ type: 'Lesson' })}\n`;\n\nexport const PlacementAndFinalTestResultPage = ({ contentId }) => {\n const { langCode } = useParams();\n const { handicap } = useSelector(userDataSelector) || {};\n\n const placementResultPageQueryVariables = {\n amount: 10,\n id: +contentId,\n lessonIdString: contentId,\n lang: toLang(langCode),\n type: 'COURSE',\n };\n\n return (\n <PageContainer>\n <WithGraphQLQueryHandling\n query={placementResultPageQuery({ handicap })}\n queryVariables={placementResultPageQueryVariables}\n >\n {data => (\n <PlacementAndFinalTestResult\n {...{\n data: {\n dkCourses: [\n ...sortByLearningLevel(data.dkCourses),\n ...sortByLearningLevel(data.dkCoursesInGerman),\n ],\n lesson: data.lesson,\n course: data.currentCourse[0],\n },\n }}\n />\n )}\n </WithGraphQLQueryHandling>\n </PageContainer>\n );\n};\n","import styled from 'styled-components';\nimport gql from 'graphql-tag';\nimport { RichText } from '../RichText/RichText';\nimport { useImagePlaceholderReplacementEffect } from '../../utils/replacers/useImagePlaceholderReplacementEffect';\n\nexport const helpFragment = {\n name: 'Help',\n fragment() {\n return gql`fragment ${this.name} on Article {\n id\n shortTitle\n text\n }\n `;\n },\n};\n\nexport const Help = ({ className, help }) => {\n useImagePlaceholderReplacementEffect({});\n const { shortTitle, text } = help;\n\n return (\n <div className={className}>\n <div id=\"page-header-container\">\n <h1>{shortTitle}</h1>\n </div>\n <RichText className=\"content\" content={text} />\n </div>\n );\n};\n\nexport const StyledHelp = styled(Help)`\n .content {\n margin: 10px;\n }\n`;\n","import gql from 'graphql-tag';\nimport { useParams } from 'react-router';\nimport { toLang } from '../utils/mappers/langMapper';\nimport { PageContainer } from '../components/Page/PageContainer';\nimport { WithGraphQLQueryHandling } from '../components/WithGraphQLQueryHandling/WithGraphQLQueryHandling';\nimport { helpFragment, StyledHelp as Help } from '../components/Help/Help';\nimport { PageMetaData } from '../components/Page/PageMetaData';\nimport { PAGE_TYPES } from '../constants/pageTypes';\nimport {\n gtmDataLayerFragment,\n GtmScriptWithDataLayer,\n} from '../components/GoogleTagManager/GtmScriptWithDataLayer';\n\nexport const helpPageQuery = gql`\n query HelpPage($lang: Language!) {\n help(lang: $lang, appName: \"mdl\") {\n ...${helpFragment.name}\n ${gtmDataLayerFragment.partial()}\n }\n }\n ${helpFragment.fragment()}\n`;\n\nexport const HelpPage = () => {\n const { langCode } = useParams();\n\n const helpPageQueryVariables = {\n lang: toLang(langCode),\n };\n\n return (\n <PageContainer>\n <WithGraphQLQueryHandling query={helpPageQuery} queryVariables={helpPageQueryVariables}>\n {({ help }) => (\n <>\n <PageMetaData pageType={PAGE_TYPES.HELP} useDescriptionTranslation={true} />\n <GtmScriptWithDataLayer content={help} />\n <Help help={help} />\n </>\n )}\n </WithGraphQLQueryHandling>\n </PageContainer>\n );\n};\n","import gql from 'graphql-tag';\nimport { useParams } from 'react-router';\nimport { toLang } from '../utils/mappers/langMapper';\nimport { PageContainer } from '../components/Page/PageContainer';\nimport { WithGraphQLQueryHandling } from '../components/WithGraphQLQueryHandling/WithGraphQLQueryHandling';\nimport { PageMetaData } from '../components/Page/PageMetaData';\nimport { PAGE_TYPES } from '../constants/pageTypes';\nimport {\n legalFragment,\n StyledLegalNotice as LegalNotice,\n} from '../components/LegalNotice/LegalNotice';\nimport { gtmDataLayerFragment } from '../components/GoogleTagManager';\nimport { GtmScriptWithDataLayer } from '../components/GoogleTagManager/GtmScriptWithDataLayer';\n\nexport const legalPageQuery = gql`\n query footer($lang: Language!) {\n footer(lang: $lang) {\n ${legalFragment.partial()}\n ${gtmDataLayerFragment.partial()}\n }\n }\n`;\n\nexport const LegalPage = () => {\n const { langCode } = useParams();\n\n const helpPageQueryVariables = {\n lang: toLang(langCode),\n };\n\n return (\n <PageContainer>\n <WithGraphQLQueryHandling query={legalPageQuery} queryVariables={helpPageQueryVariables}>\n {({ footer }) => (\n <>\n <PageMetaData pageType={PAGE_TYPES.LEGAL} useDescriptionTranslation={true} />\n <GtmScriptWithDataLayer content={footer} />\n <LegalNotice legal={footer.legal} />\n </>\n )}\n </WithGraphQLQueryHandling>\n </PageContainer>\n );\n};\n","export const TYPE_SET_INPUT = 'TYPE_SET_INPUT';\nexport const TYPE_GET_CACHED_RESULTS = 'TYPE_GET_CACHED_RESULTS';\nexport const TYPE_SET_HINTS_DATA = 'TYPE_RESET_CURSOR_AND_SET_HINTS_DATA';\nexport const TYPE_SET_HINTS_OPENED = 'TYPE_SET_HINTS_OPENED';\nexport const TYPE_SET_HINTS_CLOSED = 'TYPE_SET_HINTS_CLOSED';\nexport const TYPE_SET_CURSOR_ARROW_UP = 'TYPE_SET_CURSOR_ARROW_UP';\nexport const TYPE_SET_CURSOR_ARROW_DOWN = 'TYPE_SET_CURSOR_ARROW_DOWN';\nexport const TYPE_KEY_ESCAPE_CLICKED = 'TYPE_KEY_ESCAPE_CLICKED';\nexport const TYPE_KEY_BACKSPACE_CLICKED = 'TYPE_KEY_BACKSPACE_CLICKED';\nexport const TYPE_ANY_CHARACTER_TYPED = 'TYPE_KEY_ANY_CLICKED';\nexport const TYPE_ITEM_CLICKED = 'TYPE_ITEM_CLICKED';\nexport const TYPE_KEY_ENTER_CLICKED = 'TYPE_KEY_ENTER_CLICKED';\n\nexport const reducer = (state, action) => {\n switch (action.type) {\n case TYPE_GET_CACHED_RESULTS:\n return {\n ...state,\n vocabularyItems: state.recentlySearched.get(state.input),\n isOpened:\n !state.isEscapeClicked && !state.isEnterClicked && state.recentlySearched.get(state.input)\n ? state.recentlySearched.get(state.input).length > 0\n : false,\n isEscapeClicked: false,\n isEnterClicked: false,\n };\n case TYPE_SET_HINTS_DATA: {\n const { response, searchQuery } = action.payload;\n return {\n ...state,\n vocabularyItems: response ? response.slice(0, Math.min(8, response.length)) : [],\n recentlySearched: state.recentlySearched.set(searchQuery, response || []),\n cursor: -1,\n isOpened:\n !state.isEnterClicked && !state.isEscapeClicked && response ? response.length > 0 : false,\n };\n }\n case TYPE_SET_HINTS_OPENED:\n return {\n ...state,\n isOpened: true,\n };\n case TYPE_SET_HINTS_CLOSED:\n return {\n ...state,\n isOpened: false,\n };\n case TYPE_SET_INPUT:\n return {\n ...state,\n ...action.payload,\n };\n case TYPE_SET_CURSOR_ARROW_UP: {\n const cursorUp =\n state.cursor === -1\n ? state.vocabularyItems.length - 1\n : (state.cursor - 1) % state.vocabularyItems.length;\n return {\n ...state,\n isOpened: true,\n cursor: cursorUp,\n input: state.vocabularyItems[cursorUp !== -1 ? cursorUp : 0],\n };\n }\n case TYPE_SET_CURSOR_ARROW_DOWN: {\n const cursorDown = (state.cursor + 1) % state.vocabularyItems.length;\n return {\n ...state,\n isOpened: true,\n cursor: cursorDown,\n input: state.vocabularyItems[cursorDown],\n };\n }\n case TYPE_KEY_ESCAPE_CLICKED:\n return {\n ...state,\n cursor: -1,\n input: '',\n isOpened: false,\n isEscapeClicked: true,\n vocabularyItems: [],\n };\n case TYPE_KEY_BACKSPACE_CLICKED:\n return {\n ...state,\n ...action.payload,\n cursor: -1,\n vocabularyItems: action.payload.input === '' ? [] : state.vocabularyItems,\n isEnterClicked: false,\n isEscapeClicked: false,\n };\n case TYPE_ITEM_CLICKED:\n return {\n ...state,\n ...action.payload,\n cursor: -1,\n isOpened: false,\n };\n case TYPE_ANY_CHARACTER_TYPED:\n return {\n ...state,\n ...action.payload,\n cursor: -1,\n isOpened: true,\n };\n case TYPE_KEY_ENTER_CLICKED:\n return {\n ...state,\n ...action.payload,\n cursor: -1,\n isOpened: false,\n isEnterClicked: true,\n };\n default:\n return state;\n }\n};\n","import { useEffect } from 'react';\nimport { useParams } from 'react-router';\nimport {\n TYPE_GET_CACHED_RESULTS,\n TYPE_SET_HINTS_DATA,\n} from '../components/Vocabulary/VocabularySearch/duck/vocabularySearchDuck';\nimport { getQueryVariables } from '../components/Vocabulary/VocabularyQuery';\n\nexport const combineVocabularyData = data => {\n const mergedVocabularyData = [\n ...data.original.hits,\n ...data.translation.hits.map(obj => ({ ...obj, translation: true })),\n ];\n const idSet = new Set();\n return mergedVocabularyData.filter(vocabulary => {\n if (!idSet.has(vocabulary.id)) {\n idSet.add(vocabulary.id);\n return true;\n }\n return false;\n }, idSet);\n};\n\nexport const useGetCachedHintsResponse = (state, dispatch) => {\n useEffect(\n () => {\n if (state.recentlySearched.get(state.input) && state.cursor === -1) {\n dispatch({ type: TYPE_GET_CACHED_RESULTS });\n }\n }, // eslint-disable-next-line\n [state.searchQuery, state.cursor],\n );\n};\n\nexport const useGetHintsResponseAndCacheIt = (debouncedSearchQuery, state, dispatch, refetch) => {\n const { langCode } = useParams();\n useEffect(\n () => {\n if (debouncedSearchQuery) {\n const { searchQuery } = state;\n if (!state.recentlySearched.get(debouncedSearchQuery)) {\n refetch(\n getQueryVariables({\n langCode,\n searchQuery,\n sort: false,\n }),\n ).then(res => {\n return dispatch({\n type: TYPE_SET_HINTS_DATA,\n payload: {\n searchQuery: debouncedSearchQuery,\n response: combineVocabularyData(res.data),\n },\n });\n });\n }\n }\n }, // eslint-disable-next-line\n [debouncedSearchQuery],\n );\n};\n","import { useReducer, useRef } from 'react';\nimport styled from 'styled-components';\nimport classnames from 'classnames';\nimport { useQuery } from '@apollo/client';\nimport { useParams } from 'react-router-dom';\nimport useDebounce from '../../../hooks/useDebounce';\nimport {\n KEY_ARROW_DOWN,\n KEY_ARROW_UP,\n KEY_BACKSPACE,\n KEY_ENTER,\n KEY_ESCAPE,\n} from '../../../constants/keyCodes';\nimport {\n reducer,\n TYPE_ANY_CHARACTER_TYPED,\n TYPE_KEY_BACKSPACE_CLICKED,\n TYPE_KEY_ENTER_CLICKED,\n TYPE_KEY_ESCAPE_CLICKED,\n TYPE_SET_CURSOR_ARROW_DOWN,\n TYPE_SET_CURSOR_ARROW_UP,\n TYPE_SET_HINTS_CLOSED,\n TYPE_SET_HINTS_OPENED,\n TYPE_SET_INPUT,\n TYPE_ITEM_CLICKED,\n} from './duck/vocabularySearchDuck';\nimport {\n useGetCachedHintsResponse,\n useGetHintsResponseAndCacheIt,\n} from '../../../hooks/vocabularySearchHooks';\nimport { useTranslation } from '../../../hooks/useTranslation';\nimport { useRtlContext } from '../../../hooks/useRtl';\nimport { vocabularySearchQuery, getQueryVariables } from '../VocabularyQuery';\n\nconst specialCharactersRegex = new RegExp('[^\\\\p{L} @]', 'gui');\n\nconst VocabularySearch = ({ className, onItemSelected }) => {\n const { langCode } = useParams();\n const { refetch } = useQuery(vocabularySearchQuery, {\n variables: getQueryVariables({\n langCode,\n }),\n });\n const [state, dispatch] = useReducer(reducer, {\n input: '',\n searchQuery: '',\n vocabularyItems: [],\n cursor: -1,\n isOpened: false,\n recentlySearched: new Map(),\n isEscapeClicked: false,\n isEnterClicked: false,\n amount: 6,\n offset: 0,\n });\n\n const { isRtl } = useRtlContext();\n const vocabularyOverviewPlaceholder = useTranslation('vocabularyOverview.placeholder');\n const vocabularyOverviewAria = useTranslation('vocabularyOverview.aria');\n\n const { isOpened, input, cursor, vocabularyItems, searchQuery } = state;\n\n const debouncedSearchQuery = useDebounce(searchQuery, 350);\n\n useGetCachedHintsResponse(state, dispatch);\n useGetHintsResponseAndCacheIt(debouncedSearchQuery, state, dispatch, refetch);\n\n const searchInput = useRef(null);\n\n const handleFocus = () => {\n dispatch({ type: TYPE_SET_HINTS_OPENED });\n };\n\n const handleBlur = () => {\n dispatch({ type: TYPE_SET_HINTS_CLOSED });\n };\n\n const handleClick = e => {\n const target = e.target.tagName === 'STRONG' ? e.target.parentNode : e.target;\n const { textContent } = target;\n dispatch({\n type: TYPE_ITEM_CLICKED,\n payload: {\n input: textContent,\n },\n });\n onItemSelected(textContent);\n };\n\n const handleKeys = e => {\n switch (e.keyCode) {\n case KEY_ARROW_UP:\n dispatch({ type: TYPE_SET_CURSOR_ARROW_UP });\n break;\n\n case KEY_ARROW_DOWN:\n dispatch({ type: TYPE_SET_CURSOR_ARROW_DOWN });\n break;\n\n case KEY_ENTER:\n // eslint-disable-next-line no-case-declarations\n const conditionalSearchQuery = input;\n onItemSelected(conditionalSearchQuery);\n dispatch({\n type: TYPE_KEY_ENTER_CLICKED,\n payload: {\n searchQuery: conditionalSearchQuery,\n },\n });\n break;\n case KEY_ESCAPE:\n dispatch({ type: TYPE_KEY_ESCAPE_CLICKED });\n break;\n\n case KEY_BACKSPACE:\n dispatch({\n type: TYPE_KEY_BACKSPACE_CLICKED,\n payload: {\n input: e.target.value,\n searchQuery: e.target.value,\n },\n });\n break;\n\n default:\n dispatch({\n type: TYPE_ANY_CHARACTER_TYPED,\n payload: {\n input: e.target.value,\n searchQuery: e.target.value,\n },\n });\n }\n };\n const cleanSearchQuery = searchQuery.replace(specialCharactersRegex);\n const wordsRegex = new RegExp(\n `((?:(?:\\\\p{P}|\\\\p{Z} )*)((\\\\p{L}*)${cleanSearchQuery}(\\\\p{L}*))(?:(?:\\\\p{P}|\\\\p{Z} )*))`,\n 'imu',\n );\n const suggestions = vocabularyItems\n .map(item => {\n const vocabularyText = item.translation\n ? item.text.replace(/<[^>]*>?/gm, '').trim()\n : item.name;\n const matches = wordsRegex.exec(vocabularyText);\n return matches ? matches[2] : null;\n })\n .filter(item => !!item);\n const distinctSuggestions = [...new Set(suggestions)];\n\n const addBolding = text =>\n text.replace(\n new RegExp(searchQuery.replace(specialCharactersRegex, ''), 'gi'),\n m => `<strong>${m}</strong>`,\n );\n\n return (\n <div className={className} role=\"search\">\n <div className=\"col-sm-offset-1 col-sm-10 col-lg-offset-2 col-lg-8\">\n <div id=\"the-basics\" className={isRtl ? 'rtl' : ''}>\n <span className=\"twitter-typeahead\">\n <input\n type=\"search\"\n className=\"form-control input-lg typeahead tt-input\"\n id=\"search-vocabulary\"\n placeholder={vocabularyOverviewPlaceholder}\n aria-labelledby={vocabularyOverviewAria}\n autoComplete=\"off\"\n dir=\"auto\"\n value={input}\n onChange={e =>\n dispatch({\n type: TYPE_SET_INPUT,\n payload: { input: e.target.value },\n })\n }\n onKeyUp={handleKeys}\n onBlur={handleBlur}\n onFocus={handleFocus}\n ref={searchInput}\n />\n <div className={classnames('tt-menu', { 'tt-open': isOpened })}>\n <div className=\"tt-dataset tt-dataset-vocabularies\">\n {distinctSuggestions &&\n distinctSuggestions.length > 0 &&\n distinctSuggestions.map((suggestion, index) => (\n // eslint-disable-next-line jsx-a11y/no-static-element-interactions\n <div\n id={index}\n className={`override-strong tt-suggestion tt-selectable ${\n cursor === index && 'tt-cursor'\n }`}\n onMouseDown={handleClick}\n key={index}\n dangerouslySetInnerHTML={{ __html: addBolding(suggestion) }}\n />\n ))}\n </div>\n </div>\n </span>\n </div>\n </div>\n </div>\n );\n};\n\nexport const StyledVocabularySearch = styled(VocabularySearch)`\n .tt-menu {\n visibility: hidden;\n }\n\n .tt-open {\n visibility: visible;\n }\n\n .twitter-typeahead {\n position: relative;\n display: inline-block;\n }\n`;\n","import { useState, useEffect } from 'react';\n\nexport default function useDebounce(value, delay) {\n const [debouncedValue, setDebouncedValue] = useState(value);\n\n useEffect(() => {\n const handler = setTimeout(() => {\n setDebouncedValue(value);\n }, delay);\n return () => {\n clearTimeout(handler);\n };\n }, [delay, value]);\n\n return debouncedValue;\n}\n","import { StyledStandardButton as StandardButton } from '../../StandardButton/StandardButton';\n\nexport const VocabularyMoreButton = ({ handleClick, style }) => (\n <div className=\"row\" {...{ style }}>\n <div className=\"col-xs-offset-2 col-xs-8 col-sm-offset-4 col-sm-4 col-lg-offset-5 col-lg-2\">\n <div className=\"exercise-check\">\n <StandardButton {...{ handleClick }} titleKey=\"vocabularyOverview.more\" />\n </div>\n </div>\n </div>\n);\n","export const VocabularyItem = ({ item }) => {\n return (\n <div className=\"row vocabulary\">\n <div className=\"col-sm-offset-1 col-sm-3 col-lg-offset-2 col-lg-3 vocabulary-entry\">\n <div className=\"richtext-content-container\">\n <p>\n <span dir=\"auto\">\n <strong>{item.name}</strong>\n </span>\n <br />\n {item.subTitle}\n </p>\n </div>\n </div>\n <div className=\"col-sm-3 col-lg-2 vocabulary-entry\">\n <div className=\"richtext-content-container\" />\n </div>\n <div className=\"col-sm-4 col-lg-3 vocabulary-entry\">\n <div\n className=\"richtext-content-container\"\n dangerouslySetInnerHTML={{ __html: item.text }}\n />\n </div>\n </div>\n );\n};\n","/* eslint-disable react-hooks/exhaustive-deps */\nimport { useEffect, useState } from 'react';\nimport { useParams } from 'react-router';\nimport { ReactComponent as IconHintCircleOrange } from '../../assets/svg/icon-hint-circle-orange.svg';\nimport { StyledVocabularySearch } from './VocabularySearch/VocabularySearch';\nimport { VocabularyMoreButton } from './VocabularyMoreButton/VocabularyMoreButton';\nimport { I18nText } from '../I18n/I18nText';\nimport { ContentHeadline } from '../ContentContainer/ContentHeadline/ContentHeadline';\nimport { combineVocabularyData } from '../../hooks/vocabularySearchHooks';\nimport { VocabularyItem } from './VocabularyItem';\nimport { getQueryVariables } from './VocabularyQuery';\n\nexport const Vocabulary = ({ data, refetch }) => {\n const { langCode } = useParams();\n\n const [startValue, setStartValue] = useState(0);\n const [vocabularyData, setVocabularyData] = useState(combineVocabularyData(data));\n const [isNotEmptyResp, setIsNotEmptyResp] = useState(false);\n const [searchQuery, setSearchQuery] = useState('');\n\n const findAdditionalData = shouldConcat => {\n refetch(\n getQueryVariables({\n langCode,\n offset: startValue,\n searchQuery,\n }),\n ).then(resp => {\n const combinedVocabularyData = combineVocabularyData(resp.data);\n shouldConcat\n ? setVocabularyData(prevState => [...prevState, ...combinedVocabularyData])\n : setVocabularyData(combinedVocabularyData);\n setIsNotEmptyResp(combinedVocabularyData.length > 0);\n if (combinedVocabularyData.length > 0) {\n setStartValue(prevState => prevState + 12);\n }\n });\n };\n\n useEffect(() => {\n findAdditionalData();\n }, [searchQuery]);\n\n return (\n <div className=\"section\">\n <div className=\"row\">\n <div className=\"col-xs-12\">\n <div className=\"section exercise-container\">\n <ContentHeadline />\n <div className=\"row\">\n <StyledVocabularySearch\n onItemSelected={newSearchQuery => {\n setStartValue(0);\n setSearchQuery(newSearchQuery);\n }}\n />\n </div>\n </div>\n <header>\n <div className=\"section exercise-container vocabulary copy\">\n <div className=\"vocabularies\">\n {vocabularyData.map(item => (\n <VocabularyItem key={item.id} item={item} />\n ))}\n </div>\n <div\n style={{ visibility: isNotEmptyResp ? 'hidden' : 'visible' }}\n className=\"col-sm-offset-1 col-sm-10 col-lg-offset-2 col-lg-8\"\n >\n <div className=\"exercise-hint\">\n <span className=\"hint\">\n <IconHintCircleOrange />\n </span>\n <I18nText translation=\"vocabularyOverview.noMoreVocabularies\" />\n </div>\n </div>\n <VocabularyMoreButton\n style={{ visibility: isNotEmptyResp ? 'visible' : 'hidden' }}\n handleClick={() => findAdditionalData(true)}\n />\n </div>\n </header>\n </div>\n </div>\n </div>\n );\n};\n","import { useParams } from 'react-router-dom';\nimport { PageMetaData } from '../components/Page/PageMetaData';\nimport { WithGraphQLQueryHandling } from '../components/WithGraphQLQueryHandling/WithGraphQLQueryHandling';\nimport { GTM_NO_CONTENT_PAGE_IDS, PAGE_TYPES } from '../constants/pageTypes';\nimport { Vocabulary } from '../components/Vocabulary/Vocabulary';\nimport { PageContainer } from '../components/Page/PageContainer';\nimport { getQueryVariables, vocabularySearchQuery } from '../components/Vocabulary/VocabularyQuery';\nimport { GtmScriptWithDataLayer } from '../components/GoogleTagManager/GtmScriptWithDataLayer';\n\nexport const VocabularyPage = () => {\n const { langCode } = useParams();\n\n const vocabularyPageQueryVariables = getQueryVariables({\n langCode,\n });\n\n return (\n <PageContainer>\n <WithGraphQLQueryHandling\n query={vocabularySearchQuery}\n queryVariables={vocabularyPageQueryVariables}\n >\n {(data, refetch) => (\n <>\n <PageMetaData pageType={PAGE_TYPES.VOCABULARY_OVERVIEW} />\n <GtmScriptWithDataLayer noContentPageId={GTM_NO_CONTENT_PAGE_IDS.VOCABULARY_OVERVIEW} />\n <Vocabulary data={data} refetch={refetch} />\n </>\n )}\n </WithGraphQLQueryHandling>\n </PageContainer>\n );\n};\n","import { Redirect, Route, Switch } from 'react-router-dom';\nimport { useParams } from 'react-router';\nimport { Default404Page } from '../pages/Default404Page';\nimport { urlPrefixToType } from '../utils/url/url';\nimport { CoursePage } from '../pages/CoursePage';\nimport { GrammarPage } from '../pages/GrammarPage';\nimport { DashboardPage } from '../pages/DashboardPage';\nimport { GrammarOverviewPage } from '../pages/GrammarOverviewPage';\nimport { pathPartials } from '../utils/url/pathAnalyser';\nimport { LessonPage } from '../pages/LessonPage';\nimport {\n PAGE_GRAMMAR,\n PAGE_LEGAL,\n PAGE_OVERVIEW,\n PAGE_PASSWORD_CHANGE,\n PAGE_PASSWORD_RESET,\n PAGE_PLACEMENT_TEST,\n PAGE_PROFILE,\n PAGE_REGISTRATION,\n PAGE_VOCABULARY,\n PAGE_VOCABULARY_TRAINER,\n PAGE_VOCABULARY_TRAINER_START,\n STATUS_FEEDBACK,\n} from '../utils/url/urlFactory';\nimport { FEEDBACK_TYPES } from '../constants/feedback';\nimport { RestrictedRoute } from './RestrictedRoute/RestrictedRoute';\nimport { ConfirmUserRegistrationContainer } from './user/ConfirmUserRegistrationContainer';\nimport { Registration } from './user/Registration';\nimport { PasswordChange } from './user/PasswordChange';\nimport { PasswordReset } from './user/PasswordReset';\nimport { StatusFeedback } from './StatusFeedback/StatusFeedback';\nimport { PageContainer, withPageContainerAndMetadata } from './Page/PageContainer';\nimport { UserProfile } from './user/UserProfile';\nimport { SetNewPassword } from './user/SetNewPassword';\nimport { PlacementTestPage } from '../pages/PlacementTestPage';\nimport { VocabularyTrainer } from './VocabularyTrainer/VocabularyTrainer';\nimport { PlacementAndFinalTestResultPage } from '../pages/PlacementAndFinalTestResultPage';\nimport { HelpPage } from '../pages/HelpPage';\nimport { GTM_NO_CONTENT_PAGE_IDS, PAGE_TYPES } from '../constants/pageTypes';\nimport { PageMetaData } from './Page/PageMetaData';\nimport { LegalPage } from '../pages/LegalPage';\nimport { VocabularyPage } from '../pages/VocabularyPage';\nimport { GtmScriptWithDataLayer } from './GoogleTagManager';\n\nconst typeToPage = {\n COURSE: {\n type: 'Course',\n component: CoursePage,\n },\n GRAMMAR: {\n type: 'Grammar',\n component: GrammarPage,\n },\n LESSON: {\n type: 'Lesson',\n component: LessonPage,\n },\n PLACEMENT: {\n type: 'Placement',\n component: PlacementAndFinalTestResultPage,\n },\n FINAL: {\n type: 'Final',\n component: PlacementAndFinalTestResultPage,\n },\n};\n\nexport const ContentPage = () => {\n const params = useParams();\n const pageDef = typeToPage[urlPrefixToType(params.typeId)];\n const Tag = pageDef.component;\n return <Tag {...params} type={pageDef.type} />;\n};\n\nexport const App = () => (\n <Switch>\n <Route\n exact\n path=\"/\"\n render={() => (\n <Redirect\n to={{\n pathname: '/en/overview',\n }}\n />\n )}\n />\n <Route\n exact\n path={`/:langCode(${pathPartials.langCodeRegex})${PAGE_OVERVIEW}`}\n component={DashboardPage}\n />\n <Route\n path={`/:langCode(${pathPartials.langCodeRegex})/:title(${pathPartials.titlePathRegex})?/l-:lessonId(${pathPartials.contentIdRegex})`}\n component={LessonPage}\n />\n <Route\n path={`/:langCode(${pathPartials.langCodeRegex})/:title(${pathPartials.titlePathRegex})?/:typeId(${pathPartials.contentTypeRegex})-:contentId(${pathPartials.contentIdRegex})`}\n component={ContentPage}\n />\n <Route\n exact\n path={`/:langCode(${pathPartials.langCodeRegex})${PAGE_GRAMMAR}`}\n component={GrammarOverviewPage}\n />\n <Route exact path={`/:langCode(${pathPartials.langCodeRegex})/help`} component={HelpPage} />\n <Route\n exact\n path={`/:langCode(${pathPartials.langCodeRegex})${PAGE_LEGAL}`}\n component={LegalPage}\n />\n <Route\n exact\n path={`/:langCode(${pathPartials.langCodeRegex})${PAGE_VOCABULARY}`}\n component={VocabularyPage}\n />\n <Route\n exact\n path={`/:langCode(${pathPartials.langCodeRegex})${PAGE_REGISTRATION}`}\n render={() =>\n withPageContainerAndMetadata({\n component: Registration,\n pageType: PAGE_TYPES.REGISTER_USER,\n useDescriptionTranslation: true,\n })\n }\n />\n <Route\n path={`/:langCode(${pathPartials.langCodeRegex})/user/password/set`}\n render={({ location }) => (\n <PageContainer>\n <PageMetaData pageType={PAGE_TYPES.PASSWORD_SET} addKeywordsAndDescription={false} />\n <GtmScriptWithDataLayer noContentPageId={GTM_NO_CONTENT_PAGE_IDS.PASSWORD_SET} />\n <SetNewPassword\n confirmationId={new URLSearchParams(location.search).get('confirmationId')}\n />\n </PageContainer>\n )}\n />\n <Route\n path={`/:langCode(${pathPartials.langCodeRegex})/user/register/confirm`}\n render={({ location }) => (\n <ConfirmUserRegistrationContainer\n confirmationId={new URLSearchParams(location.search).get('confirmationId')}\n />\n )}\n />\n <RestrictedRoute\n path={`/:langCode(${pathPartials.langCodeRegex})${PAGE_PROFILE}`}\n render={() =>\n withPageContainerAndMetadata({\n component: UserProfile,\n pageType: PAGE_TYPES.USER_PROFILE,\n addDescriptionAndKeywordsMeta: false,\n })\n }\n feedbackType={FEEDBACK_TYPES.MISSING_USER_PROFILE}\n />\n <RestrictedRoute\n exact\n path={`/:langCode(${pathPartials.langCodeRegex})${PAGE_PASSWORD_CHANGE}`}\n render={() =>\n withPageContainerAndMetadata({\n component: PasswordChange,\n pageType: PAGE_TYPES.PASSWORD_CHANGE,\n addDescriptionAndKeywordsMeta: false,\n })\n }\n />\n <RestrictedRoute\n exact\n path={[\n `/:langCode(${pathPartials.langCodeRegex})${PAGE_VOCABULARY_TRAINER}`,\n `/:langCode(${pathPartials.langCodeRegex})${PAGE_VOCABULARY_TRAINER_START}`,\n ]}\n render={() =>\n withPageContainerAndMetadata({\n component: VocabularyTrainer,\n pageType: PAGE_TYPES.VOCABULARY_TRAINER,\n addDescriptionAndKeywordsMeta: false,\n })\n }\n />\n <Route\n exact\n path={`/:langCode(${pathPartials.langCodeRegex})${PAGE_PASSWORD_RESET}`}\n render={() =>\n withPageContainerAndMetadata({\n component: PasswordReset,\n pageType: PAGE_TYPES.PASSWORD_RESET,\n addDescriptionAndKeywordsMeta: false,\n })\n }\n />\n <Route\n exact\n path={`/:langCode(${pathPartials.langCodeRegex})${STATUS_FEEDBACK}/:feedbackType(${pathPartials.feedbackTypes})`}\n render={() =>\n withPageContainerAndMetadata({\n component: StatusFeedback,\n pageType: PAGE_TYPES.FEEDBACK_STATUS,\n addDescriptionAndKeywordsMeta: false,\n })\n }\n />\n <Route\n exact\n path={`/:langCode(${pathPartials.langCodeRegex})${PAGE_PLACEMENT_TEST}`}\n component={PlacementTestPage}\n />\n <Route exact path={`/:langCode(${pathPartials.langCodeRegex})`} component={Default404Page} />\n <Route component={Default404Page} />\n </Switch>\n);\n","import { combineReducers } from 'redux';\nimport { userReducer } from './user/userDuck';\nimport { learnProgressReducer } from './progress/learnProgressDuck';\nimport { lessonExerciseModeReducer } from './mode/lessonExerciseModeDuck';\n\nconst rootReducer = combineReducers({\n user: userReducer,\n learnProgress: learnProgressReducer,\n lessonExerciseMode: lessonExerciseModeReducer,\n});\n\nexport default rootReducer;\n","import * as storage from 'redux-storage';\nimport createEngine from 'redux-storage-engine-localstorage';\nimport { createStore, applyMiddleware, compose } from 'redux';\nimport thunk from 'redux-thunk';\nimport rootReducer from './rootReducers';\nimport { apiMiddleware } from './middlewares/apiMiddleware';\nimport globals from '../utils/globals';\nimport { isServer } from '../utils/ssr';\n\nconst reducer = storage.reducer(rootReducer);\nconst engine = createEngine('learngerman');\nconst storageMiddleware = storage.createMiddleware(engine);\n\n// eslint-disable-next-line no-underscore-dangle\nconst composeEnhancers = globals.window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose;\n\nconst createStoreWithMiddleware = composeEnhancers(\n applyMiddleware(apiMiddleware, thunk, storageMiddleware),\n)(createStore);\n\nconst store = createStoreWithMiddleware(reducer);\n\nconst load = storage.createLoader(engine);\nif (!isServer()) {\n load(store);\n}\n\nexport default store;\n","import { API_CALL } from '../common/apiActions';\n\nexport const apiMiddleware = ({ dispatch }) => next => action => {\n next(action);\n\n if (action.type !== API_CALL) {\n return;\n }\n\n const { url, method, data, onSuccess, onFailure, headers } = action.payload;\n\n const dataOrParams = ['GET', 'DELETE'].includes(method) ? 'params' : 'data';\n\n fetch(url, {\n method,\n headers,\n [dataOrParams]: data,\n })\n .then(response => {\n const contentType = response.headers.get('content-type');\n return contentType && contentType.indexOf('application/json') !== -1 ? response.json() : {};\n })\n .then(userData => {\n dispatch(onSuccess(userData));\n })\n .catch(error => {\n dispatch(onFailure(error));\n });\n};\n","import ReactDOM from 'react-dom';\nimport { BrowserRouter as Router } from 'react-router-dom';\nimport { HelmetProvider } from 'react-helmet-async';\n\nimport { ApolloProvider, ApolloClient, createHttpLink } from '@apollo/client';\nimport { createPersistedQueryLink } from '@apollo/client/link/persisted-queries';\nimport { sha256 } from 'crypto-hash';\nimport { InMemoryCache } from '@apollo/client/cache';\n\nimport { Provider } from 'react-redux';\nimport * as serviceWorker from './serviceWorker';\nimport { App } from './components/App';\nimport config from './config';\n\nimport { possibleTypes } from './utils/apolloClient';\nimport store from './state/store';\n\nconst cache = new InMemoryCache({\n possibleTypes,\n addTypename: true,\n});\n\nconst link = createPersistedQueryLink({ sha256, useGETForHashedQueries: true }).concat(\n createHttpLink({ uri: config.graphQL.baseUrl }),\n);\n\nconst client = new ApolloClient({\n link,\n ssrForceFetchDelay: 100,\n cache: cache.restore(window.__APOLLO_STATE__), // eslint-disable-line no-underscore-dangle\n});\n\nReactDOM.hydrate(\n <ApolloProvider client={client}>\n <Provider store={store}>\n <Router>\n <HelmetProvider>\n <App />\n </HelmetProvider>\n </Router>\n </Provider>\n </ApolloProvider>,\n document.getElementById('root'),\n);\n\nserviceWorker.unregister();\n","/* eslint-disable */\nexport const possibleTypes = {\n ModelAspect: ['Exercise', 'Knowledge', 'Article', 'Category', 'Course', 'Subject', 'GeographicLocation', 'Lesson', 'Navigation', 'Person', 'Image', 'Audio', 'Video', 'Widget', 'Livestream', 'Download', 'Keyword', 'ImageGallery', 'GalleryImage', 'GeographicRegion', 'ExternalLink', 'PhysicalImage', 'ContentComposition', 'InformationSpace', 'CompositionComponent', 'CompositionComponentConfiguration'],\n DeliveryAspect: ['Exercise', 'Knowledge', 'Article', 'Category', 'Course', 'Lesson', 'Navigation', 'Person', 'Image', 'Audio', 'Video', 'Widget', 'ImageGallery', 'GeographicRegion', 'ContentComposition'],\n NamedAspect: ['Exercise', 'Knowledge', 'Article', 'Category', 'Course', 'Subject', 'GeographicLocation', 'Lesson', 'Navigation', 'Person', 'Image', 'Audio', 'Video', 'Widget', 'Livestream', 'Download', 'Keyword', 'ImageGallery', 'GalleryImage', 'GeographicRegion', 'ExternalLink', 'ContentComposition', 'InformationSpace'],\n AssociationsAspect: ['Exercise', 'Knowledge', 'Article', 'Course', 'Lesson', 'Navigation', 'Person', 'Image', 'Audio', 'Video', 'Widget', 'ImageGallery', 'GalleryImage'],\n TextualAspect: ['Article', 'Person', 'Audio', 'Video', 'ImageGallery'],\n ContactAspect: ['Article', 'Person', 'Audio', 'Video', 'ImageGallery'],\n MetadataAspect: ['Article', 'Audio', 'Video', 'ImageGallery'],\n DkMetadataAspect: ['Article'],\n GeographicLocationAspect: ['GeographicLocation'],\n TreeAspect: ['Category', 'Navigation', 'GeographicRegion'],\n DeletionAspect: ['Image', 'Audio', 'Video'],\n PlaybackResourceAspect: ['Audio', 'Video'],\n BinaryDataAspect: ['Download', 'PhysicalImage'],\n SocialMediaAspect: ['Article', 'Audio', 'Video', 'ImageGallery'],\n FooterAspect: ['Article', 'Navigation', 'Person', 'Audio', 'Video', 'ImageGallery'],\n BetaLayerAspect: ['Article', 'Navigation', 'Person', 'Audio', 'Video', 'ImageGallery'],\n UrlAspect: ['Article', 'Navigation', 'Person', 'Audio', 'Video', 'ImageGallery'],\n PersonRelatedContent: ['Article', 'Audio', 'Video', 'Image', 'ImageGallery'],\n Content: ['Article', 'Category', 'Subject', 'GeographicLocation', 'Navigation', 'Person', 'Image', 'Audio', 'Video', 'Widget', 'Livestream', 'Download', 'Keyword', 'ImageGallery', 'GalleryImage', 'GeographicRegion', 'CocoContent'],\n};\n\n// fetch(`http://localhost:4000/graphql`, {\n// method: 'POST',\n// headers: { 'Content-Type': 'application/json' },\n// body: JSON.stringify({\n// variables: {},\n// query: `\n// {\n// __schema {\n// types {\n// kind\n// name\n// possibleTypes {\n// name\n// }\n// }\n// }\n// }\n// `,\n// }),\n// })\n// .then(result => result.json())\n// .then(result => {\n// const possibleTypes = {};\n\n// result.data.__schema.types.forEach(supertype => {\n// if (supertype.possibleTypes) {\n// possibleTypes[supertype.name] =\n// supertype.possibleTypes.map(subtype => subtype.name);\n// }\n// });\n// console.log(JSON.stringify(possibleTypes));\n// });\n","import { useI18nContext } from '../context/I18nContext';\n\nconst isPlainKey = translation => typeof translation === 'string' || !translation;\n\nconst normalizeTranslation = translation =>\n isPlainKey(translation) ? { key: translation, parameters: {} } : translation;\n\nexport const useTranslation = translation => {\n const { i18n } = useI18nContext();\n const { key, parameters } = normalizeTranslation(translation);\n if (!key) {\n return null;\n }\n return i18n.t(key, parameters);\n};\n","import { isServer } from './ssr';\n\nconst globals = {\n window: isServer() ? global.window || {} : window,\n document: isServer() ? {} : document,\n navigator: isServer() ? {} : navigator,\n localStorage: isServer() ? {} : window.localStorage,\n};\n\nexport default globals;\n","export const noop = () => {};\n\nexport const invert = inMap =>\n Object.entries(inMap).reduce((acc, next) => ({ ...acc, [next[1]]: next[0] }), {});\n\nexport const not = predicate => args => !predicate(args);\n\n// eslint-disable-next-line fp/no-rest-parameters\nexport const pipe = (...fns) => fns.reduce((v, f) => (...args) => f(v(...args)));\n\n// a functionality that groups a collection of items together into an object based on a given key\nexport const groupBy = (key, array) =>\n array.reduce(\n // eslint-disable-next-line fp/no-mutating-assign\n (acc, next) => Object.assign(acc, { [next[key]]: (acc[next[key]] || []).concat(next) }),\n {},\n );\n\nexport const removeContentLinksWithEmptyTarget = contentLinks =>\n contentLinks.filter(contentLink => !!contentLink.target);\n\nexport const isFinalTestPredicate = contentLink =>\n contentLink.additionalInformation && contentLink.additionalInformation.includes('final_test');\n\nexport const capitalize = text => text.charAt(0).toUpperCase() + text.slice(1).toLowerCase();\n\nexport const getMediaFileSizeInKBorMB = fileSizeInBytes =>\n fileSizeInBytes > 999999\n ? `${Math.floor(fileSizeInBytes / 1000000)}MB`\n : `${Math.floor(fileSizeInBytes / 1000)}KB`;\n\nexport const shuffle = array => {\n // eslint-disable-next-line\n for (let i = array.length - 1; i > 0; i--) {\n const j = Math.floor(Math.random() * (i + 1));\n // eslint-disable-next-line\n [array[i], array[j]] = [array[j], array[i]];\n }\n return array;\n};\n\nexport const calculatePercentage = (fraction, total) => Math.round((fraction / total) * 100) || 0;\n\nexport const generateRandomNumber = (min, max) => Math.floor(Math.random() * (max - min)) + min;\n\nexport const sortObjectsByProp = (array, prop, order = 1) => {\n // eslint-disable-next-line fp/no-mutating-methods\n return [...array].sort((a, b) => {\n if (a[prop] === b[prop]) {\n return 0;\n }\n return a[prop] < b[prop] ? -order : order;\n });\n};\n","function isServer() {\n return !(typeof window !== 'undefined' && window.document);\n}\n// CommonJS export to be able to use it on server and client\nmodule.exports = {\n isServer,\n};\n","import { css } from 'styled-components';\n\nexport const resolutions = Object.freeze({\n min: Object.freeze({\n zero: 0,\n mobile: 320,\n tablet: 768,\n tabletLandscape: 1024,\n desktop: 1200,\n full: 1280,\n }),\n max: Object.freeze({\n mobile: 767,\n tablet: 1199,\n tabletLandscape: 992,\n desktop: Number.MAX_SAFE_INTEGER,\n }),\n});\n\nconst wrapInMedia = (sizes, type) =>\n Object.keys(sizes).reduce(\n (acc, label) => ({\n ...acc,\n ...{\n // eslint-disable-next-line fp/no-rest-parameters\n [label]: (...args) => css`\n @media (${type}-width: ${sizes[label]}px) {\n ${css(...args)}\n }\n `,\n },\n }),\n {},\n );\n\nexport const mediaMin = wrapInMedia(resolutions.min, 'min');\nexport const mediaMax = wrapInMedia(resolutions.max, 'max');\n\n// eslint-disable-next-line fp/no-rest-parameters\nconst wrapInHoverPointerMedia = (hover, pointer) => (...args) => css`\n @media (hover: ${hover}) and (pointer: ${pointer}) {\n ${css(...args)}\n }\n`;\n\n/* https://medium.com/@ferie/detect-a-touch-device-with-only-css-9f8e30fa1134 */\n/* https://media.kulturbanause.de/2017/05/interaction-type-media-queries.html */\nexport const mediaDevice = {\n mouse: wrapInHoverPointerMedia('hover', 'fine'),\n touch: wrapInHoverPointerMedia('none', 'coarse'),\n};\n\nexport const colors = Object.freeze({\n LG_WHITE: '#FFF',\n LG_BLACK: '#000',\n\n LG_ORANGE: '#F08C00',\n LG_ORANGE_DARK: '#E1500F',\n LG_PINK: '#DC1978',\n LG_RED: '#BE0046',\n LG_RED_SCORE: '#BE232D',\n LG_RED_DARK: '#B20028',\n LG_GREEN_YELLOW: '#CDBE00',\n LG_GREEN_LIGHT: '#91B423',\n LG_GREEN: '#55911E',\n LG_GREEN_SCORE: '#82B905',\n\n DW_BLUE: '#002D5A',\n DW_DARK_BLUE: '#032F59',\n DW_LIGHT_BLUE: '#0098FF',\n\n LG_BLUE_1: '#0098FF',\n LG_BLUE_2: '#0096FA',\n LG_BLUE_3: '#1B9EFD',\n LG_BLUE_4: '#99d7ff',\n LG_BLUE_5: '#1464A5',\n LG_BLUE_6: '#032F59',\n LG_BLUE_7: '#1B9EFD',\n\n LG_BAHAMA_BLUE: '#23527c',\n\n LG_GRAY_1: '#938A7F',\n LG_GRAY_2: '#BBB',\n LG_GRAY_3: '#F5F4F2',\n LG_GRAY_4: '#ddd',\n LG_GRAY_5: '#444',\n LG_GRAY_6: '#ccc',\n LG_GRAY_7: '#eee',\n LG_GRAY_8: '#9B9B9B',\n LG_GRAY_9: '#3e3e3e',\n LG_GRAY_10: '#252629',\n LG_GRAY_11: '#666',\n LG_GRAY_12: '#E6E1DD',\n LG_GRAY_13: '#4a4a4a',\n LG_GRAY_14: '#e7e7e7',\n LG_GRAY_15: '#777777',\n\n LG_ORANGE1: '#bf6f00',\n\n LIGHT_KHAKI: '#f4f3f2',\n\n LG_GRAY_TRANSPARENT_1: 'rgba(128,128,128,.5)',\n LG_GRAY_TRANSPARENT_15: 'rgba(128,128,128,.15)',\n LG_TRANSPARENT_BLACK_075: 'rgba(0,0,0,0.075)',\n LG_TRANSPARENT_BLACK_20: 'rgba(0,0,0,0.2)',\n LG_TRANSPARENT_BLACK_25: 'rgba(0,0,0,0.25)',\n LG_TRANSPARENT_BLACK_30: 'rgba(0,0,0,0.3)',\n LG_TRANSPARENT_BLACK_40: 'rgba(0,0,0,0.4)',\n LG_TRANSPARENT_BLACK_50: 'rgba(0,0,0,0.5)',\n LG_TRANSPARENT_WHITE_10: 'rgba(255,255,255,0.1)',\n LG_TRANSPARENT_WHITE_15: 'rgba(255,255,255,0.15)',\n LG_TRANSPARENT_WHITE_25: 'rgba(255,255,255,0.25)',\n LG_TRANSPARENT_WHITE_50: 'rgba(255,255,255,0.5)',\n});\n\nexport const selector = Object.freeze({\n composition: Object.freeze({\n even: ':first-child:nth-last-child(2n)',\n odd: ':first-child:nth-last-child(2n+1)',\n _369: ':first-child:nth-last-child(3n)',\n _258: ':first-child:nth-last-child(3n+2)',\n _4710: ':first-child:nth-last-child(3n+1)',\n }),\n notFirst: ':not(:first-child)',\n notLast: ':not(:last-child)',\n disabled: '[disabled]:not([disabled=\"false\"])',\n topElements: numberOfElements => `:nth-child(-n+${numberOfElements})`,\n justNElements: numberOfElements => `:first-child:nth-last-child(${numberOfElements})`,\n});\n\nexport const clearfix = `\n &:after {\n display: table;\n content: \"\";\n clear: both;\n }\n `;\n","import { createContext, useContext } from 'react';\nimport { t, clearTranslations, hasTranslations } from '../utils/i18n';\n\nconst i18n = { t, clearTranslations, hasTranslations };\n\nexport const I18nContext = createContext({ i18n });\n\nexport const useI18nContext = () => useContext(I18nContext);\n","import styled from 'styled-components';\nimport { colors } from '../../utils/css';\n\n// eslint-disable-next-line react/prop-types,no-unused-vars\nexport const Text = ({\n isA = 'span',\n children,\n // eslint-disable-next-line no-unused-vars\n isRtl,\n className,\n ...restProps\n}) => {\n const Tag = isA;\n return (\n <Tag className={className} {...restProps}>\n {children}\n </Tag>\n );\n};\n\nexport const StyledText = styled(Text)`\n direction: ${({ isRtl }) => (isRtl ? 'rtl' : 'ltr')};\n`;\n\nexport const StyledTextGray12 = styled(StyledText)`\n color: ${colors.LG_GRAY_12};\n`;\n","export const KEY_ARROW_UP = 38;\nexport const KEY_ARROW_DOWN = 40;\nexport const KEY_ENTER = 13;\nexport const KEY_ESCAPE = 27;\nexport const KEY_BACKSPACE = 8;\n\nexport const keyCodes = Object.freeze({\n TAB: 'Tab',\n ENTER: 'Enter',\n SPACEBAR: ' ',\n ARROW_LEFT: 'ArrowLeft',\n ARROW_RIGHT: 'ArrowRight',\n ESCAPE: 'Escape',\n});\n","// watch out - arrays not supported ;) Maybe in future\n// we should replace this small function with something more powerful\n// but let us wait till it is really needed.\n\nfunction accessPathByArr(keysArr, obj) {\n if (!obj) {\n return null;\n }\n const objPartial = obj[keysArr[0]];\n\n if (!objPartial) {\n return null;\n }\n if (keysArr.length === 1) {\n return objPartial;\n }\n return accessPathByArr(keysArr.slice(1), objPartial);\n}\n\nexport function accessPath(pathStr, obj) {\n if (!pathStr) {\n return obj;\n }\n return accessPathByArr(pathStr.split('.'), obj);\n}\n","import { accessPath } from './jsonPath';\n\n// eslint-disable-next-line fp/no-let\nlet translations = null;\n\nexport const replaceInPattern = (pattern, options) =>\n Object.keys(options).reduce((acc, nextVar) => {\n const varNameRegex = new RegExp(/\\${/.source + nextVar + /}/.source, 'g'); // ${nextVar}\n return acc.replace(varNameRegex, options[nextVar]);\n }, pattern);\n\nconst retrieveLabel = key => {\n const translation = accessPath(key, translations);\n if (!translation) {\n return key;\n }\n return translation;\n};\n\nexport function hasTranslations() {\n return !!translations;\n}\n\nexport function setTranslations(inTranslations) {\n translations = inTranslations; // eslint-disable-line fp/no-mutation\n}\n\nexport function clearTranslations() {\n translations = null; // eslint-disable-line fp/no-mutation\n}\n\nexport function t(key, options) {\n const label = retrieveLabel(key);\n return options ? replaceInPattern(label, options) : label;\n}\n\nexport function gqlQueryByLang(lang) {\n const langValue = lang || '$lang';\n return `\n i18n: i18nByLang(lang: ${langValue}, appName: \"mdl\"){\n all\n }\n `;\n}\n\nexport function gqlQueryByContent({ id, lang } = {}) {\n const idValue = id || '$id';\n const langValue = lang || '$lang';\n\n return `\n i18n: i18nByContent (id: ${idValue}, lang: ${langValue}){\n all\n }\n `;\n}\n"],"sourceRoot":""} |