{"version":3,"file":"index-eqzmzuC1.js","sources":["../../../client/app/bundles/Shared/components/shared/archivedButton.tsx","../../../client/app/bundles/Shared/components/shared/progressBar.tsx","../../../client/app/bundles/Shared/libs/responseTools.ts","../../../client/app/bundles/Shared/utils/languageList.js","../../../client/app/bundles/Shared/libs/translations/helpers.tsx","../../../client/app/bundles/Shared/components/questions/affectedResponse.tsx","../../../client/app/bundles/Shared/components/questions/questionBar.tsx","../../../client/app/bundles/Shared/components/questions/responseSortFields.tsx","../../../client/app/bundles/Shared/components/questions/responseToggleFields.tsx","../../../client/app/bundles/Shared/components/translations/languagePicker.tsx","../../../client/app/bundles/Diagnostic/libs/getParameterByName.js","../../../client/app/bundles/Diagnostic/modules/analytics/index.ts","../../../client/app/bundles/Diagnostic/actions/analytics.ts","../../../client/app/bundles/Shared/components/translations/languageSelectionPage.tsx","../../../client/app/bundles/Shared/components/internalTools/incorrectSequencesInputAndConceptSelectorForm.tsx","../../../client/app/bundles/Shared/components/internalTools/focusPointsInputAndConceptSelectorForm.tsx","../../../client/node_modules/@sentry/types/esm/session.js","../../../client/node_modules/@sentry/types/esm/severity.js","../../../client/node_modules/@sentry/types/esm/status.js","../../../client/node_modules/@sentry/utils/esm/is.js","../../../client/node_modules/@sentry/utils/esm/browser.js","../../../client/node_modules/@sentry/utils/esm/polyfill.js","../../../client/node_modules/@sentry/utils/esm/error.js","../../../client/node_modules/@sentry/utils/esm/dsn.js","../../../client/node_modules/@sentry/utils/esm/memo.js","../../../client/node_modules/@sentry/utils/esm/stacktrace.js","../../../client/node_modules/@sentry/utils/esm/string.js","../../../client/node_modules/@sentry/utils/esm/object.js","../../../client/node_modules/@sentry/utils/esm/node.js","../../../client/node_modules/@sentry/utils/esm/misc.js","../../../client/node_modules/@sentry/utils/esm/logger.js","../../../client/node_modules/@sentry/utils/esm/supports.js","../../../client/node_modules/@sentry/utils/esm/instrument.js","../../../client/node_modules/@sentry/utils/esm/syncpromise.js","../../../client/node_modules/@sentry/utils/esm/promisebuffer.js","../../../client/node_modules/@sentry/utils/esm/time.js","../../../client/node_modules/@sentry/hub/esm/scope.js","../../../client/node_modules/@sentry/hub/esm/session.js","../../../client/node_modules/@sentry/hub/esm/hub.js","../../../client/node_modules/@sentry/minimal/esm/index.js","../../../client/node_modules/@sentry/core/esm/api.js","../../../client/node_modules/@sentry/core/esm/integration.js","../../../client/node_modules/@sentry/core/esm/baseclient.js","../../../client/node_modules/@sentry/core/esm/transports/noop.js","../../../client/node_modules/@sentry/core/esm/basebackend.js","../../../client/node_modules/@sentry/core/esm/request.js","../../../client/node_modules/@sentry/core/esm/sdk.js","../../../client/node_modules/@sentry/core/esm/integrations/functiontostring.js","../../../client/node_modules/@sentry/core/esm/integrations/inboundfilters.js","../../../client/node_modules/@sentry/browser/esm/tracekit.js","../../../client/node_modules/@sentry/browser/esm/parsers.js","../../../client/node_modules/@sentry/browser/esm/eventbuilder.js","../../../client/node_modules/@sentry/browser/esm/transports/base.js","../../../client/node_modules/@sentry/browser/esm/transports/fetch.js","../../../client/node_modules/@sentry/browser/esm/transports/xhr.js","../../../client/node_modules/@sentry/browser/esm/backend.js","../../../client/node_modules/@sentry/browser/esm/helpers.js","../../../client/node_modules/@sentry/browser/esm/integrations/globalhandlers.js","../../../client/node_modules/@sentry/browser/esm/integrations/trycatch.js","../../../client/node_modules/@sentry/browser/esm/integrations/breadcrumbs.js","../../../client/node_modules/@sentry/browser/esm/integrations/linkederrors.js","../../../client/node_modules/@sentry/browser/esm/integrations/useragent.js","../../../client/node_modules/@sentry/browser/esm/version.js","../../../client/node_modules/@sentry/browser/esm/client.js","../../../client/node_modules/@sentry/browser/esm/sdk.js","../../../client/app/bundles/Grammar/actions/questions.ts","../../../client/app/bundles/Connect/libs/lessons_api.ts","../../../client/app/bundles/Connect/libs/questions_api.ts","../../../client/app/bundles/Connect/libs/objectWithSnakeKeysFromCamel.js","../../../client/app/bundles/Connect/actions/responses.js","../../../client/app/bundles/Connect/actions/questions.ts","../../../client/app/bundles/Diagnostic/constants.js","../../../client/app/bundles/Diagnostic/utils/api.ts","../../../client/app/bundles/Diagnostic/libs/questions_api.ts","../../../client/app/bundles/Diagnostic/libs/objectWithSnakeKeysFromCamel.js","../../../client/app/bundles/Diagnostic/actions/responses.js","../../../client/app/bundles/Diagnostic/libs/sessions_api.ts","../../../client/app/bundles/Diagnostic/actions/sessions.js","../../../client/app/bundles/Diagnostic/actions/questions.ts","../../../client/app/bundles/Shared/actions/questions.ts","../../../client/app/bundles/Connect/libs/title_cards_api.ts","../../../client/app/bundles/Connect/actions/lessons.ts","../../../client/node_modules/react-i18next/dist/es/context.js","../../../client/node_modules/react-i18next/dist/es/utils.js","../../../client/node_modules/react-i18next/dist/es/useTranslation.js","../../../client/node_modules/react-i18next/dist/es/withTranslation.js","../../../client/app/bundles/Shared/hooks/addKeyDownListener.tsx","../../../client/node_modules/@babel/runtime/helpers/esm/objectSpread.js","../../../client/node_modules/i18next/dist/esm/i18next.js","../../../client/app/bundles/Shared/libs/translations/i18n.js","../../../client/node_modules/react/cjs/react-jsx-runtime.development.js","../../../client/node_modules/react/jsx-runtime.js","../../../client/node_modules/react-select-search/dist/esm/index.js"],"sourcesContent":["import * as React from 'react';\n\nconst ArchivedButton = (props) => {\n let tagClass = 'tag';\n if (props.showOnlyArchived) {\n tagClass += ' is-info';\n }\n\n const text = props.lessons ? \"Activities With Archived Questions\" : \"Archived Questions\";\n\n return (\n
\n \n
\n )\n}\n\nexport { ArchivedButton };\n\n","import * as React from 'react';\n\ninterface ProgressBarProps {\n percent: number;\n answeredQuestionCount: number;\n questionCount: number;\n label: string;\n}\n\nconst ProgressBar = ({ percent, answeredQuestionCount, questionCount, label, }: ProgressBarProps) => (\n
\n \n

{answeredQuestionCount} of {questionCount} {label}

\n
)\n\nexport { ProgressBar };\n\n","import Levenshtein from 'levenshtein';\nimport _ from 'underscore';\n\nexport function getStatusForResponse(response = {}) {\n if (response.optimal === null && !response.parent_id && !response.author) {\n return 4;\n } else if (response.parent_id || response.author) {\n return (response.optimal ? 2 : 3);\n }\n return (response.optimal ? 0 : 1);\n}\n\nexport function responsesWithStatus(responses = {}) {\n return _.mapObject(responses, (value, key) => {\n const statusCode = getStatusForResponse(value);\n return Object.assign({}, value, { statusCode, });\n });\n}\n\nexport function sortByLevenshteinAndOptimal(userString, responses) {\n responses.forEach((res) => { res.levenshtein = new Levenshtein(res.text, userString).distance; });\n return responses.sort((a, b) => {\n if ((a.levenshtein - b.levenshtein) != 0) {\n return a.levenshtein - b.levenshtein;\n }\n // sorts by boolean\n // from http://stackoverflow.com/questions/17387435/javascript-sort-array-of-objects-by-a-boolean-property\n return (a.optimal === b.optimal) ? 0 : a.optimal ? -1 : 1;\n });\n}\n\nexport function extractConceptResultsFromResponse(response) {\n const { concept_results, } = response\n\n if (!concept_results) { return {} }\n\n if (typeof concept_results === 'string') {\n return JSON.parse(concept_results)\n } else {\n return concept_results\n }\n}\n","import languageConstants from '../../../../../config/locales/languageConstants.json';\n\nexport const {\n ENGLISH,\n CHINESE,\n HINDI,\n SPANISH,\n FRENCH,\n ARABIC,\n RUSSIAN,\n PORTUGUESE,\n URDU,\n GERMAN,\n JAPANESE,\n KOREAN,\n VIETNAMESE,\n THAI,\n UKRAINIAN,\n TAGALOG,\n DARI\n} = languageConstants;\n\nexport const defaultLanguages = [ENGLISH, CHINESE, HINDI, SPANISH, FRENCH, ARABIC, RUSSIAN, PORTUGUESE, URDU, GERMAN, JAPANESE, KOREAN, VIETNAMESE, THAI, UKRAINIAN, TAGALOG, DARI];\nexport const rightToLeftLanguages = [ARABIC, URDU, DARI];\n\nexport const defaultLanguageOptions = {\n [ENGLISH]: {\n flag: 'https://assets.quill.org/images/flags/usa.png',\n label: 'English'\n },\n [CHINESE]: {\n flag: 'https://assets.quill.org/images/flags/china.png',\n label: '中文'\n },\n [HINDI]: {\n flag: 'https://assets.quill.org/images/flags/india.png',\n label: 'हिंदी'\n },\n [SPANISH]: {\n flag: 'https://assets.quill.org/images/flags/spain.png',\n label: 'Español'\n },\n [FRENCH]: {\n flag: 'https://assets.quill.org/images/flags/france.png',\n label: 'Français'\n },\n [ARABIC]: {\n flag: 'https://assets.quill.org/images/flags/egypt.png',\n label: 'العربية'\n\n },\n [RUSSIAN]: {\n flag: 'https://assets.quill.org/images/flags/russia.png',\n label: 'Русский'\n\n },\n [PORTUGUESE]: {\n flag: 'https://assets.quill.org/images/flags/brazil.png',\n label: 'Português'\n\n },\n [URDU]: {\n flag: 'https://assets.quill.org/images/flags/pakistan.png',\n label: 'اردو'\n },\n [GERMAN]: {\n flag: 'https://assets.quill.org/images/flags/germany.png',\n label: 'Deutsch'\n },\n [JAPANESE]: {\n flag: 'https://assets.quill.org/images/flags/japan.png',\n label: '日本語'\n },\n [KOREAN]: {\n flag: 'https://assets.quill.org/images/flags/south_korea.png',\n label: '한국어'\n },\n [VIETNAMESE]: {\n flag: 'https://assets.quill.org/images/flags/vietnam.png',\n label: 'Tiếng Việt'\n },\n [THAI]: {\n flag: 'https://assets.quill.org/images/flags/thailand.png',\n label: 'ไทย'\n },\n [UKRAINIAN]: {\n flag: 'https://assets.quill.org/images/flags/ukraine.png',\n label: 'Українська'\n },\n [TAGALOG]: {\n flag: 'https://assets.quill.org/images/flags/philippines.png',\n label: 'Tagalog'\n },\n [DARI]: {\n flag: 'https://assets.quill.org/images/flags/afghanistan.png',\n label: 'درى'\n },\n}\n\nexport const languageToLocale = {\n [ENGLISH]: 'en',\n [CHINESE]: 'zh-cn',\n [HINDI]: 'hi',\n [SPANISH]: 'es-la',\n [FRENCH]: 'fr',\n [ARABIC]: 'ar',\n [RUSSIAN]: 'ru',\n [PORTUGUESE]: 'pt-br',\n [URDU]: 'ur',\n [GERMAN]: 'de',\n [JAPANESE]: 'ja',\n [KOREAN]: 'ko',\n [VIETNAMESE]: 'vi',\n [THAI]: 'th',\n [UKRAINIAN]: 'uk',\n [TAGALOG]: 'tl',\n [DARI]: 'prs'\n}\n\n// we'll keep this for when new activities are translated and the translations still need to be QA'ed\nexport const ALPHA_TRANSLATED_ACTIVITY_UIDS = []\n","import * as React from 'react';\nimport { ENGLISH } from '../../utils/languageList'\nimport { ConceptExplanation } from '../../components/feedback/conceptExplanation';\nimport { defaultLanguages } from '../../utils/languageList.js'\n\nexport const getlanguageOptions = (translations) => ([\n { value: ENGLISH, label: ENGLISH },\n ...Object.keys(translations).map(language => ({\n value: language,\n label: language\n }))\n]);\n\ninterface renderSaveAndExitArguments {\n isELLDiagnostic: boolean,\n language: string,\n languageOptions?: { label: string, value: string }[],\n translate: (language: string) => string\n}\n\nexport function renderSaveAndExitButton({ isELLDiagnostic, language, languageOptions, translate }: renderSaveAndExitArguments) {\n const languages = isELLDiagnostic ? defaultLanguages : languageOptions?.map(option => option.value)\n let buttonText = 'Save and exit'\n if (language && language !== ENGLISH && languages && languages.includes(language)) {\n buttonText = translate('buttons^save and exit')\n }\n return {buttonText}\n}\n\nexport const showTranslations = (language, languageOptions): boolean => {\n const permittedLanguages = JSON.parse(window.postbuildEnv.PERMITTED_LANGUAGES)\n return !!languageOptions && !!language && Object.keys(languageOptions).length > 1 && permittedLanguages.includes(language);\n};\n\nconst getTranslatedConceptsFeedbackData = (key, conceptsFeedback, showTranslation) => {\n return showTranslation && conceptsFeedback?.translated_data ? conceptsFeedback.translated_data[key] : null\n}\n\nexport const renderExplanation = ({ data, key, conceptsFeedback, showTranslation }) => {\n if (!data) return null;\n const translatedData = getTranslatedConceptsFeedbackData(key, conceptsFeedback, showTranslation);\n return ;\n};\n","import * as React from 'react';\n\nconst AffectedResponse = (props: any) =>\n (
\n {props.children}\n
);\n\nexport { AffectedResponse };\n","import * as React from 'react';\n\nconst QuestionBar = (props: any) => (\n
\n {\n props.data.map((d: any, i: number) => (\n \n ))\n }\n
\n)\n\nexport { QuestionBar };\n\n","import * as React from 'react';\n\nclass ResponseSortFields extends React.Component {\n constructor(props: any) {\n super(props)\n\n this.stateSpecificClass = this.stateSpecificClass.bind(this)\n this.renderAscendingArrow = this.renderAscendingArrow.bind(this)\n this.renderSortField = this.renderSortField.bind(this)\n }\n\n stateSpecificClass(stateName: string) {\n if (this.props.sorting === stateName) {\n return ' is-active';\n }\n }\n\n renderAscendingArrow(stateName: string) {\n if (this.props.sorting === stateName) {\n return this.props.ascending ? ' ⬆' : ' ⬇';\n }\n }\n\n renderSortField(displayName: string, stateName: string) {\n return (\n
  • \n \n {displayName} {this.renderAscendingArrow(stateName)}\n \n
  • \n );\n }\n\n render() {\n return (\n \n );\n }\n\n}\n\nexport { ResponseSortFields };\n\n","import * as React from 'react';\n\nclass ResponseToggleFields extends React.Component {\n constructor(props: any) {\n super(props)\n\n this.toggleFieldAndResetPage = this.toggleFieldAndResetPage.bind(this)\n this.renderToggleField = this.renderToggleField.bind(this)\n }\n\n renderToggleField(status: string, index: number) {\n let tagClass = 'tag';\n let addColorToTag = false;\n if (this.props.visibleStatuses[status]) addColorToTag = true;\n\n if (addColorToTag) {\n switch (status) {\n case 'Human Optimal':\n tagClass += ' is-success';\n break;\n\n case 'Human Sub-Optimal':\n tagClass += ' is-warning';\n break;\n\n case 'Algorithm Optimal':\n tagClass += ' is-success is-algo-optimal';\n break;\n\n case 'Algorithm Sub-Optimal':\n tagClass += ' is-info';\n break;\n\n case 'Unmatched':\n tagClass += ' is-danger';\n break;\n\n default:\n tagClass += ' is-dark';\n }\n }\n\n return (\n \n );\n }\n\n toggleFieldAndResetPage(status: string) {\n this.props.toggleFieldAndResetPage(status);\n }\n\n render() {\n return (\n
    \n
    \n {this.props.qualityLabels.map((label: string, i: number) => this.renderToggleField(label, i))}\n
    \n
    \n {this.props.labels.map((label: string, i: number) => this.renderToggleField(label, i))}\n
    \n
    \n {this.props.regexLabels.map((label: string, i: number) => this.renderToggleField(label, i))}\n
    \n
    \n );\n }\n}\n\nexport { ResponseToggleFields };\n\n","import * as React from 'react';\n\nimport { DropdownInput, titleCase } from '../../index';\nimport { defaultLanguageOptions, defaultLanguages } from \"../../utils/languageList\";\n\ninterface LanguagePickerProps {\n language: string,\n languageOptions?: any,\n updateLanguage(language: string): any\n}\n\nconst LanguagePicker = ({ language, updateLanguage, languageOptions }: LanguagePickerProps) => {\n const permittedLanguages = JSON.parse(window.postbuildEnv.PERMITTED_LANGUAGES)\n let capitalizedLanguageOptions = languageOptions ? languageOptions.map(option => {\n return permittedLanguages.includes(option.value) && { value: option.value, label: titleCase(option.label) }\n }) : null\n capitalizedLanguageOptions = capitalizedLanguageOptions ? capitalizedLanguageOptions.filter(Boolean) : null\n const options = (): Array<{value: string, label: string}> =>\n capitalizedLanguageOptions ?? defaultLanguages.map(language => ({\n value: language,\n label: defaultLanguageOptions[language].label\n }));\n\n const onChange = (option: { value: string}) => {\n const language = option.value;\n updateLanguage(language)\n }\n\n const value = options().find(opt => language === opt.value)\n\n return (\n \n )\n}\n\nexport default LanguagePicker;\n","export function getParameterByName(name, url) {\n if (!url) url = window.location.href;\n name = name.replace(/[\\[\\]]/g, '\\\\$&');\n let regex = new RegExp(`[?&]${name}(=([^&#]*)|&|#|$)`),\n results = regex.exec(url);\n if (!results) return null;\n if (!results[2]) return '';\n return decodeURIComponent(results[2].replace(/\\+/g, ' '));\n}\n","import { Event } from './event_definitions';\nimport Events from './events';\n\nimport { isTrackableStudentEvent } from '../../../Shared';\nimport { fetchUserIdsForSession } from '../../../Shared/utils/userAPIs';\nimport { getParameterByName } from '../../libs/getParameterByName';\n\n\n\nclass SegmentAnalytics {\n analytics: Object;\n\n constructor() {\n this.analytics = window['analytics'] ? window['analytics'] : null\n }\n\n async track(event: Event, params?: object) {\n const sessionID = getParameterByName('student', window.location.href)\n const idData = await fetchUserIdsForSession(sessionID)\n\n if(!isTrackableStudentEvent(idData)) { return }\n\n const { teacherId, studentId } = idData\n const customProperties = {\n ...params,\n event: event.name,\n user_id: teacherId,\n properties: {\n student_id: studentId\n }\n }\n\n try {\n // Make sure that the event reference is one that's defined\n if (!event) {\n throw new Error('The event referenced does not exist.');\n }\n\n // Validate that required properties are present\n this.validateEvent(event, customProperties);\n\n // Check to make sure that we have access to the analytics global\n if (!this.analytics) {\n throw new Error(`Error sending event '${event.name}'. SegmentAnalytics was instantiated before an instance of window.analytics could be found to connect to.`);\n }\n } catch(e) {\n this.reportError(e);\n return false;\n }\n\n const eventProperties = Object.assign({...customProperties}, this.getDefaultProperties());\n this.analytics['identify'](teacherId, { event: event.name });\n this.analytics['track'](event.name, eventProperties);\n return true;\n }\n\n validateEvent (event: Event, properties?: object): void {\n if (properties === undefined) {\n properties = {};\n }\n if (event.requiredProperties) {\n let passedEventProperties = Object.keys(properties);\n event.requiredProperties.forEach((p) => {\n if (passedEventProperties.indexOf(p) == -1) {\n throw new Error(`Can not track event \"${event.name}\" without required property \"${p}\".`);\n }\n });\n }\n }\n\n formatCustomProperties(properties: object): object {\n if (typeof properties !== 'object') {\n properties = {};\n }\n return Object.keys(properties).reduce((accumulator, key) => {\n const keysToSkip = ['event', 'user_id', 'properties'];\n let customKeyName = keysToSkip.includes(key) ? key : `custom_${key}`;\n accumulator[customKeyName] = properties[key];\n return accumulator;\n }, {});\n }\n\n getDefaultProperties(): object {\n return {\n path: `${window.location.pathname}${window.location.search}${window.location.hash}`,\n referrer: document.referrer,\n };\n }\n\n reportError(e: Error): {\n // placeholder for actual error reporting\n // to do - do something with this error\n }\n}\n\nconst segmentInstance = new SegmentAnalytics();\n\nexport {\n Events, segmentInstance as SegmentAnalytics\n};\n\n","import { SegmentAnalytics } from '../modules/analytics';\nimport { Event } from '../modules/analytics/event_definitions';\n\nexport const TrackAnalyticsEvent = (event: Event, params: Object) => {\n return (dispatch: Function) => {\n SegmentAnalytics.track(event, params);\n }\n}","import React from 'react';\n\nimport { defaultLanguageOptions, ENGLISH } from '../../utils/languageList';\nimport { TrackAnalyticsEvent } from '../../../Diagnostic/actions/analytics';\nimport { Events } from '../../../Diagnostic/modules/analytics';\n\ninterface LanguageSelectionPageProps {\n questionCount?: number,\n dispatch: Function,\n setLanguage: (language: string) => void,\n previewMode: boolean,\n beginActivity?: () => void,\n languages: string[],\n handlePageLoaded?: () => void\n}\n\nexport const LanguageSelectionPage = ({\n questionCount,\n dispatch,\n setLanguage,\n previewMode,\n beginActivity,\n languages,\n handlePageLoaded\n}: LanguageSelectionPageProps) => {\n\n const isDiagnosticActivity = window.location.href.includes('diagnostic')\n\n function handleClickLanguage (e) {\n if (handlePageLoaded) {\n handlePageLoaded()\n }\n const language = e.currentTarget.value;\n if (isDiagnosticActivity && language !== ENGLISH) {\n dispatch(TrackAnalyticsEvent(Events.DIAGNOSTIC_LANGUAGE_SELECTED, { language }));\n }\n setLanguage(language);\n if (previewMode && beginActivity) { beginActivity() }\n }\n return (\n
    \n
    \n {questionCount &&

    {`Hello there! You are about to start a ${questionCount} question placement activity.`}

    }\n

    First, let's set up your language preference. All the directions are in English by default.

    \n

    Show directions in English only.

    \n
    \n
    \n \n
    \n
    \n
    \n

    or

    \n
    \n
    \n
    \n

    Show directions in English and another language.

    \n
    \n
    \n {languages.map(language => {\n const permittedLanguages = JSON.parse(window.postbuildEnv.PERMITTED_LANGUAGES)\n const isPermittedLanguage = permittedLanguages.includes(language) || isDiagnosticActivity\n if (language !== ENGLISH && isPermittedLanguage) {\n return (\n \n );\n }\n })}\n
    \n
    \n );\n}\n\nexport default LanguageSelectionPage;\n","import * as React from 'react';\n\nimport { RegexInputAndConceptSelectorForm, INCORRECT_SEQUENCE, } from './regexInputAndConceptSelectorForm'\n\nexport const IncorrectSequencesInputAndConceptSelectorForm = (props) => (\n \n)\n","import * as React from 'react';\n\nimport { RegexInputAndConceptSelectorForm, FOCUS_POINT, } from './regexInputAndConceptSelectorForm'\n\nexport const FocusPointsInputAndConceptSelectorForm = (props) => (\n \n)\n","/**\n * Session Status\n */\nexport var SessionStatus;\n(function (SessionStatus) {\n /** JSDoc */\n SessionStatus[\"Ok\"] = \"ok\";\n /** JSDoc */\n SessionStatus[\"Exited\"] = \"exited\";\n /** JSDoc */\n SessionStatus[\"Crashed\"] = \"crashed\";\n /** JSDoc */\n SessionStatus[\"Abnormal\"] = \"abnormal\";\n})(SessionStatus || (SessionStatus = {}));\n//# sourceMappingURL=session.js.map","/** JSDoc */\n// eslint-disable-next-line import/export\nexport var Severity;\n(function (Severity) {\n /** JSDoc */\n Severity[\"Fatal\"] = \"fatal\";\n /** JSDoc */\n Severity[\"Error\"] = \"error\";\n /** JSDoc */\n Severity[\"Warning\"] = \"warning\";\n /** JSDoc */\n Severity[\"Log\"] = \"log\";\n /** JSDoc */\n Severity[\"Info\"] = \"info\";\n /** JSDoc */\n Severity[\"Debug\"] = \"debug\";\n /** JSDoc */\n Severity[\"Critical\"] = \"critical\";\n})(Severity || (Severity = {}));\n// eslint-disable-next-line @typescript-eslint/no-namespace, import/export\n(function (Severity) {\n /**\n * Converts a string-based level into a {@link Severity}.\n *\n * @param level string representation of Severity\n * @returns Severity\n */\n function fromString(level) {\n switch (level) {\n case 'debug':\n return Severity.Debug;\n case 'info':\n return Severity.Info;\n case 'warn':\n case 'warning':\n return Severity.Warning;\n case 'error':\n return Severity.Error;\n case 'fatal':\n return Severity.Fatal;\n case 'critical':\n return Severity.Critical;\n case 'log':\n default:\n return Severity.Log;\n }\n }\n Severity.fromString = fromString;\n})(Severity || (Severity = {}));\n//# sourceMappingURL=severity.js.map","/** The status of an event. */\n// eslint-disable-next-line import/export\nexport var Status;\n(function (Status) {\n /** The status could not be determined. */\n Status[\"Unknown\"] = \"unknown\";\n /** The event was skipped due to configuration or callbacks. */\n Status[\"Skipped\"] = \"skipped\";\n /** The event was sent to Sentry successfully. */\n Status[\"Success\"] = \"success\";\n /** The client is currently rate limited and will try again later. */\n Status[\"RateLimit\"] = \"rate_limit\";\n /** The event could not be processed. */\n Status[\"Invalid\"] = \"invalid\";\n /** A server-side error ocurred during submission. */\n Status[\"Failed\"] = \"failed\";\n})(Status || (Status = {}));\n// eslint-disable-next-line @typescript-eslint/no-namespace, import/export\n(function (Status) {\n /**\n * Converts a HTTP status code into a {@link Status}.\n *\n * @param code The HTTP response status code.\n * @returns The send status or {@link Status.Unknown}.\n */\n function fromHttpCode(code) {\n if (code >= 200 && code < 300) {\n return Status.Success;\n }\n if (code === 429) {\n return Status.RateLimit;\n }\n if (code >= 400 && code < 500) {\n return Status.Invalid;\n }\n if (code >= 500) {\n return Status.Failed;\n }\n return Status.Unknown;\n }\n Status.fromHttpCode = fromHttpCode;\n})(Status || (Status = {}));\n//# sourceMappingURL=status.js.map","/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable @typescript-eslint/explicit-module-boundary-types */\n/**\n * Checks whether given value's type is one of a few Error or Error-like\n * {@link isError}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isError(wat) {\n switch (Object.prototype.toString.call(wat)) {\n case '[object Error]':\n return true;\n case '[object Exception]':\n return true;\n case '[object DOMException]':\n return true;\n default:\n return isInstanceOf(wat, Error);\n }\n}\n/**\n * Checks whether given value's type is ErrorEvent\n * {@link isErrorEvent}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isErrorEvent(wat) {\n return Object.prototype.toString.call(wat) === '[object ErrorEvent]';\n}\n/**\n * Checks whether given value's type is DOMError\n * {@link isDOMError}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isDOMError(wat) {\n return Object.prototype.toString.call(wat) === '[object DOMError]';\n}\n/**\n * Checks whether given value's type is DOMException\n * {@link isDOMException}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isDOMException(wat) {\n return Object.prototype.toString.call(wat) === '[object DOMException]';\n}\n/**\n * Checks whether given value's type is a string\n * {@link isString}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isString(wat) {\n return Object.prototype.toString.call(wat) === '[object String]';\n}\n/**\n * Checks whether given value's is a primitive (undefined, null, number, boolean, string, bigint, symbol)\n * {@link isPrimitive}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isPrimitive(wat) {\n return wat === null || (typeof wat !== 'object' && typeof wat !== 'function');\n}\n/**\n * Checks whether given value's type is an object literal\n * {@link isPlainObject}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isPlainObject(wat) {\n return Object.prototype.toString.call(wat) === '[object Object]';\n}\n/**\n * Checks whether given value's type is an Event instance\n * {@link isEvent}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isEvent(wat) {\n return typeof Event !== 'undefined' && isInstanceOf(wat, Event);\n}\n/**\n * Checks whether given value's type is an Element instance\n * {@link isElement}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isElement(wat) {\n return typeof Element !== 'undefined' && isInstanceOf(wat, Element);\n}\n/**\n * Checks whether given value's type is an regexp\n * {@link isRegExp}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isRegExp(wat) {\n return Object.prototype.toString.call(wat) === '[object RegExp]';\n}\n/**\n * Checks whether given value has a then function.\n * @param wat A value to be checked.\n */\nexport function isThenable(wat) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return Boolean(wat && wat.then && typeof wat.then === 'function');\n}\n/**\n * Checks whether given value's type is a SyntheticEvent\n * {@link isSyntheticEvent}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isSyntheticEvent(wat) {\n return isPlainObject(wat) && 'nativeEvent' in wat && 'preventDefault' in wat && 'stopPropagation' in wat;\n}\n/**\n * Checks whether given value's type is an instance of provided constructor.\n * {@link isInstanceOf}.\n *\n * @param wat A value to be checked.\n * @param base A constructor to be used in a check.\n * @returns A boolean representing the result.\n */\nexport function isInstanceOf(wat, base) {\n try {\n return wat instanceof base;\n }\n catch (_e) {\n return false;\n }\n}\n//# sourceMappingURL=is.js.map","import { isString } from './is';\n/**\n * Given a child DOM element, returns a query-selector statement describing that\n * and its ancestors\n * e.g. [HTMLElement] => body > div > input#foo.btn[name=baz]\n * @returns generated DOM path\n */\nexport function htmlTreeAsString(elem) {\n // try/catch both:\n // - accessing event.target (see getsentry/raven-js#838, #768)\n // - `htmlTreeAsString` because it's complex, and just accessing the DOM incorrectly\n // - can throw an exception in some circumstances.\n try {\n var currentElem = elem;\n var MAX_TRAVERSE_HEIGHT = 5;\n var MAX_OUTPUT_LEN = 80;\n var out = [];\n var height = 0;\n var len = 0;\n var separator = ' > ';\n var sepLength = separator.length;\n var nextStr = void 0;\n // eslint-disable-next-line no-plusplus\n while (currentElem && height++ < MAX_TRAVERSE_HEIGHT) {\n nextStr = _htmlElementAsString(currentElem);\n // bail out if\n // - nextStr is the 'html' element\n // - the length of the string that would be created exceeds MAX_OUTPUT_LEN\n // (ignore this limit if we are on the first iteration)\n if (nextStr === 'html' || (height > 1 && len + out.length * sepLength + nextStr.length >= MAX_OUTPUT_LEN)) {\n break;\n }\n out.push(nextStr);\n len += nextStr.length;\n currentElem = currentElem.parentNode;\n }\n return out.reverse().join(separator);\n }\n catch (_oO) {\n return '';\n }\n}\n/**\n * Returns a simple, query-selector representation of a DOM element\n * e.g. [HTMLElement] => input#foo.btn[name=baz]\n * @returns generated DOM path\n */\nfunction _htmlElementAsString(el) {\n var elem = el;\n var out = [];\n var className;\n var classes;\n var key;\n var attr;\n var i;\n if (!elem || !elem.tagName) {\n return '';\n }\n out.push(elem.tagName.toLowerCase());\n if (elem.id) {\n out.push(\"#\" + elem.id);\n }\n // eslint-disable-next-line prefer-const\n className = elem.className;\n if (className && isString(className)) {\n classes = className.split(/\\s+/);\n for (i = 0; i < classes.length; i++) {\n out.push(\".\" + classes[i]);\n }\n }\n var allowedAttrs = ['type', 'name', 'title', 'alt'];\n for (i = 0; i < allowedAttrs.length; i++) {\n key = allowedAttrs[i];\n attr = elem.getAttribute(key);\n if (attr) {\n out.push(\"[\" + key + \"=\\\"\" + attr + \"\\\"]\");\n }\n }\n return out.join('');\n}\n//# sourceMappingURL=browser.js.map","export var setPrototypeOf = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array ? setProtoOf : mixinProperties);\n/**\n * setPrototypeOf polyfill using __proto__\n */\n// eslint-disable-next-line @typescript-eslint/ban-types\nfunction setProtoOf(obj, proto) {\n // @ts-ignore __proto__ does not exist on obj\n obj.__proto__ = proto;\n return obj;\n}\n/**\n * setPrototypeOf polyfill using mixin\n */\n// eslint-disable-next-line @typescript-eslint/ban-types\nfunction mixinProperties(obj, proto) {\n for (var prop in proto) {\n // eslint-disable-next-line no-prototype-builtins\n if (!obj.hasOwnProperty(prop)) {\n // @ts-ignore typescript complains about indexing so we remove\n obj[prop] = proto[prop];\n }\n }\n return obj;\n}\n//# sourceMappingURL=polyfill.js.map","import { __extends } from \"tslib\";\nimport { setPrototypeOf } from './polyfill';\n/** An error emitted by Sentry SDKs and related utilities. */\nvar SentryError = /** @class */ (function (_super) {\n __extends(SentryError, _super);\n function SentryError(message) {\n var _newTarget = this.constructor;\n var _this = _super.call(this, message) || this;\n _this.message = message;\n _this.name = _newTarget.prototype.constructor.name;\n setPrototypeOf(_this, _newTarget.prototype);\n return _this;\n }\n return SentryError;\n}(Error));\nexport { SentryError };\n//# sourceMappingURL=error.js.map","import { __read } from \"tslib\";\nimport { SentryError } from './error';\n/** Regular expression used to parse a Dsn. */\nvar DSN_REGEX = /^(?:(\\w+):)\\/\\/(?:(\\w+)(?::(\\w+))?@)([\\w.-]+)(?::(\\d+))?\\/(.+)/;\n/** Error message */\nvar ERROR_MESSAGE = 'Invalid Dsn';\n/** The Sentry Dsn, identifying a Sentry instance and project. */\nvar Dsn = /** @class */ (function () {\n /** Creates a new Dsn component */\n function Dsn(from) {\n if (typeof from === 'string') {\n this._fromString(from);\n }\n else {\n this._fromComponents(from);\n }\n this._validate();\n }\n /**\n * Renders the string representation of this Dsn.\n *\n * By default, this will render the public representation without the password\n * component. To get the deprecated private representation, set `withPassword`\n * to true.\n *\n * @param withPassword When set to true, the password will be included.\n */\n Dsn.prototype.toString = function (withPassword) {\n if (withPassword === void 0) { withPassword = false; }\n var _a = this, host = _a.host, path = _a.path, pass = _a.pass, port = _a.port, projectId = _a.projectId, protocol = _a.protocol, user = _a.user;\n return (protocol + \"://\" + user + (withPassword && pass ? \":\" + pass : '') +\n (\"@\" + host + (port ? \":\" + port : '') + \"/\" + (path ? path + \"/\" : path) + projectId));\n };\n /** Parses a string into this Dsn. */\n Dsn.prototype._fromString = function (str) {\n var match = DSN_REGEX.exec(str);\n if (!match) {\n throw new SentryError(ERROR_MESSAGE);\n }\n var _a = __read(match.slice(1), 6), protocol = _a[0], user = _a[1], _b = _a[2], pass = _b === void 0 ? '' : _b, host = _a[3], _c = _a[4], port = _c === void 0 ? '' : _c, lastPath = _a[5];\n var path = '';\n var projectId = lastPath;\n var split = projectId.split('/');\n if (split.length > 1) {\n path = split.slice(0, -1).join('/');\n projectId = split.pop();\n }\n if (projectId) {\n var projectMatch = projectId.match(/^\\d+/);\n if (projectMatch) {\n projectId = projectMatch[0];\n }\n }\n this._fromComponents({ host: host, pass: pass, path: path, projectId: projectId, port: port, protocol: protocol, user: user });\n };\n /** Maps Dsn components into this instance. */\n Dsn.prototype._fromComponents = function (components) {\n this.protocol = components.protocol;\n this.user = components.user;\n this.pass = components.pass || '';\n this.host = components.host;\n this.port = components.port || '';\n this.path = components.path || '';\n this.projectId = components.projectId;\n };\n /** Validates this Dsn and throws on error. */\n Dsn.prototype._validate = function () {\n var _this = this;\n ['protocol', 'user', 'host', 'projectId'].forEach(function (component) {\n if (!_this[component]) {\n throw new SentryError(ERROR_MESSAGE + \": \" + component + \" missing\");\n }\n });\n if (!this.projectId.match(/^\\d+$/)) {\n throw new SentryError(ERROR_MESSAGE + \": Invalid projectId \" + this.projectId);\n }\n if (this.protocol !== 'http' && this.protocol !== 'https') {\n throw new SentryError(ERROR_MESSAGE + \": Invalid protocol \" + this.protocol);\n }\n if (this.port && isNaN(parseInt(this.port, 10))) {\n throw new SentryError(ERROR_MESSAGE + \": Invalid port \" + this.port);\n }\n };\n return Dsn;\n}());\nexport { Dsn };\n//# sourceMappingURL=dsn.js.map","/* eslint-disable @typescript-eslint/no-unsafe-member-access */\n/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable @typescript-eslint/explicit-module-boundary-types */\n/**\n * Memo class used for decycle json objects. Uses WeakSet if available otherwise array.\n */\nvar Memo = /** @class */ (function () {\n function Memo() {\n this._hasWeakSet = typeof WeakSet === 'function';\n this._inner = this._hasWeakSet ? new WeakSet() : [];\n }\n /**\n * Sets obj to remember.\n * @param obj Object to remember\n */\n Memo.prototype.memoize = function (obj) {\n if (this._hasWeakSet) {\n if (this._inner.has(obj)) {\n return true;\n }\n this._inner.add(obj);\n return false;\n }\n // eslint-disable-next-line @typescript-eslint/prefer-for-of\n for (var i = 0; i < this._inner.length; i++) {\n var value = this._inner[i];\n if (value === obj) {\n return true;\n }\n }\n this._inner.push(obj);\n return false;\n };\n /**\n * Removes object from internal storage.\n * @param obj Object to forget\n */\n Memo.prototype.unmemoize = function (obj) {\n if (this._hasWeakSet) {\n this._inner.delete(obj);\n }\n else {\n for (var i = 0; i < this._inner.length; i++) {\n if (this._inner[i] === obj) {\n this._inner.splice(i, 1);\n break;\n }\n }\n }\n };\n return Memo;\n}());\nexport { Memo };\n//# sourceMappingURL=memo.js.map","var defaultFunctionName = '';\n/**\n * Safely extract function name from itself\n */\nexport function getFunctionName(fn) {\n try {\n if (!fn || typeof fn !== 'function') {\n return defaultFunctionName;\n }\n return fn.name || defaultFunctionName;\n }\n catch (e) {\n // Just accessing custom props in some Selenium environments\n // can cause a \"Permission denied\" exception (see raven-js#495).\n return defaultFunctionName;\n }\n}\n//# sourceMappingURL=stacktrace.js.map","import { isRegExp, isString } from './is';\n/**\n * Truncates given string to the maximum characters count\n *\n * @param str An object that contains serializable values\n * @param max Maximum number of characters in truncated string (0 = unlimited)\n * @returns string Encoded\n */\nexport function truncate(str, max) {\n if (max === void 0) { max = 0; }\n if (typeof str !== 'string' || max === 0) {\n return str;\n }\n return str.length <= max ? str : str.substr(0, max) + \"...\";\n}\n/**\n * This is basically just `trim_line` from\n * https://github.com/getsentry/sentry/blob/master/src/sentry/lang/javascript/processor.py#L67\n *\n * @param str An object that contains serializable values\n * @param max Maximum number of characters in truncated string\n * @returns string Encoded\n */\nexport function snipLine(line, colno) {\n var newLine = line;\n var ll = newLine.length;\n if (ll <= 150) {\n return newLine;\n }\n if (colno > ll) {\n // eslint-disable-next-line no-param-reassign\n colno = ll;\n }\n var start = Math.max(colno - 60, 0);\n if (start < 5) {\n start = 0;\n }\n var end = Math.min(start + 140, ll);\n if (end > ll - 5) {\n end = ll;\n }\n if (end === ll) {\n start = Math.max(end - 140, 0);\n }\n newLine = newLine.slice(start, end);\n if (start > 0) {\n newLine = \"'{snip} \" + newLine;\n }\n if (end < ll) {\n newLine += ' {snip}';\n }\n return newLine;\n}\n/**\n * Join values in array\n * @param input array of values to be joined together\n * @param delimiter string to be placed in-between values\n * @returns Joined values\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function safeJoin(input, delimiter) {\n if (!Array.isArray(input)) {\n return '';\n }\n var output = [];\n // eslint-disable-next-line @typescript-eslint/prefer-for-of\n for (var i = 0; i < input.length; i++) {\n var value = input[i];\n try {\n output.push(String(value));\n }\n catch (e) {\n output.push('[value cannot be serialized]');\n }\n }\n return output.join(delimiter);\n}\n/**\n * Checks if the value matches a regex or includes the string\n * @param value The string value to be checked against\n * @param pattern Either a regex or a string that must be contained in value\n */\nexport function isMatchingPattern(value, pattern) {\n if (!isString(value)) {\n return false;\n }\n if (isRegExp(pattern)) {\n return pattern.test(value);\n }\n if (typeof pattern === 'string') {\n return value.indexOf(pattern) !== -1;\n }\n return false;\n}\n//# sourceMappingURL=string.js.map","import { __values } from \"tslib\";\nimport { htmlTreeAsString } from './browser';\nimport { isElement, isError, isEvent, isInstanceOf, isPlainObject, isPrimitive, isSyntheticEvent } from './is';\nimport { Memo } from './memo';\nimport { getFunctionName } from './stacktrace';\nimport { truncate } from './string';\n/**\n * Wrap a given object method with a higher-order function\n *\n * @param source An object that contains a method to be wrapped.\n * @param name A name of method to be wrapped.\n * @param replacementFactory A function that should be used to wrap a given method, returning the wrapped method which\n * will be substituted in for `source[name]`.\n * @returns void\n */\nexport function fill(source, name, replacementFactory) {\n if (!(name in source)) {\n return;\n }\n var original = source[name];\n var wrapped = replacementFactory(original);\n // Make sure it's a function first, as we need to attach an empty prototype for `defineProperties` to work\n // otherwise it'll throw \"TypeError: Object.defineProperties called on non-object\"\n if (typeof wrapped === 'function') {\n try {\n wrapped.prototype = wrapped.prototype || {};\n Object.defineProperties(wrapped, {\n __sentry_original__: {\n enumerable: false,\n value: original,\n },\n });\n }\n catch (_Oo) {\n // This can throw if multiple fill happens on a global object like XMLHttpRequest\n // Fixes https://github.com/getsentry/sentry-javascript/issues/2043\n }\n }\n source[name] = wrapped;\n}\n/**\n * Encodes given object into url-friendly format\n *\n * @param object An object that contains serializable values\n * @returns string Encoded\n */\nexport function urlEncode(object) {\n return Object.keys(object)\n .map(function (key) { return encodeURIComponent(key) + \"=\" + encodeURIComponent(object[key]); })\n .join('&');\n}\n/**\n * Transforms any object into an object literal with all its attributes\n * attached to it.\n *\n * @param value Initial source that we have to transform in order for it to be usable by the serializer\n */\nfunction getWalkSource(value) {\n if (isError(value)) {\n var error = value;\n var err = {\n message: error.message,\n name: error.name,\n stack: error.stack,\n };\n for (var i in error) {\n if (Object.prototype.hasOwnProperty.call(error, i)) {\n err[i] = error[i];\n }\n }\n return err;\n }\n if (isEvent(value)) {\n var event_1 = value;\n var source = {};\n source.type = event_1.type;\n // Accessing event.target can throw (see getsentry/raven-js#838, #768)\n try {\n source.target = isElement(event_1.target)\n ? htmlTreeAsString(event_1.target)\n : Object.prototype.toString.call(event_1.target);\n }\n catch (_oO) {\n source.target = '';\n }\n try {\n source.currentTarget = isElement(event_1.currentTarget)\n ? htmlTreeAsString(event_1.currentTarget)\n : Object.prototype.toString.call(event_1.currentTarget);\n }\n catch (_oO) {\n source.currentTarget = '';\n }\n if (typeof CustomEvent !== 'undefined' && isInstanceOf(value, CustomEvent)) {\n source.detail = event_1.detail;\n }\n for (var i in event_1) {\n if (Object.prototype.hasOwnProperty.call(event_1, i)) {\n source[i] = event_1;\n }\n }\n return source;\n }\n return value;\n}\n/** Calculates bytes size of input string */\nfunction utf8Length(value) {\n // eslint-disable-next-line no-bitwise\n return ~-encodeURI(value).split(/%..|./).length;\n}\n/** Calculates bytes size of input object */\nfunction jsonSize(value) {\n return utf8Length(JSON.stringify(value));\n}\n/** JSDoc */\nexport function normalizeToSize(object, \n// Default Node.js REPL depth\ndepth, \n// 100kB, as 200kB is max payload size, so half sounds reasonable\nmaxSize) {\n if (depth === void 0) { depth = 3; }\n if (maxSize === void 0) { maxSize = 100 * 1024; }\n var serialized = normalize(object, depth);\n if (jsonSize(serialized) > maxSize) {\n return normalizeToSize(object, depth - 1, maxSize);\n }\n return serialized;\n}\n/**\n * Transform any non-primitive, BigInt, or Symbol-type value into a string. Acts as a no-op on strings, numbers,\n * booleans, null, and undefined.\n *\n * @param value The value to stringify\n * @returns For non-primitive, BigInt, and Symbol-type values, a string denoting the value's type, type and value, or\n * type and `description` property, respectively. For non-BigInt, non-Symbol primitives, returns the original value,\n * unchanged.\n */\nfunction serializeValue(value) {\n var type = Object.prototype.toString.call(value);\n // Node.js REPL notation\n if (typeof value === 'string') {\n return value;\n }\n if (type === '[object Object]') {\n return '[Object]';\n }\n if (type === '[object Array]') {\n return '[Array]';\n }\n var normalized = normalizeValue(value);\n return isPrimitive(normalized) ? normalized : type;\n}\n/**\n * normalizeValue()\n *\n * Takes unserializable input and make it serializable friendly\n *\n * - translates undefined/NaN values to \"[undefined]\"/\"[NaN]\" respectively,\n * - serializes Error objects\n * - filter global objects\n */\nfunction normalizeValue(value, key) {\n if (key === 'domain' && value && typeof value === 'object' && value._events) {\n return '[Domain]';\n }\n if (key === 'domainEmitter') {\n return '[DomainEmitter]';\n }\n if (typeof global !== 'undefined' && value === global) {\n return '[Global]';\n }\n if (typeof window !== 'undefined' && value === window) {\n return '[Window]';\n }\n if (typeof document !== 'undefined' && value === document) {\n return '[Document]';\n }\n // React's SyntheticEvent thingy\n if (isSyntheticEvent(value)) {\n return '[SyntheticEvent]';\n }\n if (typeof value === 'number' && value !== value) {\n return '[NaN]';\n }\n if (value === void 0) {\n return '[undefined]';\n }\n if (typeof value === 'function') {\n return \"[Function: \" + getFunctionName(value) + \"]\";\n }\n // symbols and bigints are considered primitives by TS, but aren't natively JSON-serilaizable\n if (typeof value === 'symbol') {\n return \"[\" + String(value) + \"]\";\n }\n if (typeof value === 'bigint') {\n return \"[BigInt: \" + String(value) + \"]\";\n }\n return value;\n}\n/**\n * Walks an object to perform a normalization on it\n *\n * @param key of object that's walked in current iteration\n * @param value object to be walked\n * @param depth Optional number indicating how deep should walking be performed\n * @param memo Optional Memo class handling decycling\n */\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\nexport function walk(key, value, depth, memo) {\n if (depth === void 0) { depth = +Infinity; }\n if (memo === void 0) { memo = new Memo(); }\n // If we reach the maximum depth, serialize whatever has left\n if (depth === 0) {\n return serializeValue(value);\n }\n /* eslint-disable @typescript-eslint/no-unsafe-member-access */\n // If value implements `toJSON` method, call it and return early\n if (value !== null && value !== undefined && typeof value.toJSON === 'function') {\n return value.toJSON();\n }\n /* eslint-enable @typescript-eslint/no-unsafe-member-access */\n // If normalized value is a primitive, there are no branches left to walk, so we can just bail out, as theres no point in going down that branch any further\n var normalized = normalizeValue(value, key);\n if (isPrimitive(normalized)) {\n return normalized;\n }\n // Create source that we will use for next itterations, either objectified error object (Error type with extracted keys:value pairs) or the input itself\n var source = getWalkSource(value);\n // Create an accumulator that will act as a parent for all future itterations of that branch\n var acc = Array.isArray(value) ? [] : {};\n // If we already walked that branch, bail out, as it's circular reference\n if (memo.memoize(value)) {\n return '[Circular ~]';\n }\n // Walk all keys of the source\n for (var innerKey in source) {\n // Avoid iterating over fields in the prototype if they've somehow been exposed to enumeration.\n if (!Object.prototype.hasOwnProperty.call(source, innerKey)) {\n continue;\n }\n // Recursively walk through all the child nodes\n acc[innerKey] = walk(innerKey, source[innerKey], depth - 1, memo);\n }\n // Once walked through all the branches, remove the parent from memo storage\n memo.unmemoize(value);\n // Return accumulated values\n return acc;\n}\n/**\n * normalize()\n *\n * - Creates a copy to prevent original input mutation\n * - Skip non-enumerablers\n * - Calls `toJSON` if implemented\n * - Removes circular references\n * - Translates non-serializeable values (undefined/NaN/Functions) to serializable format\n * - Translates known global objects/Classes to a string representations\n * - Takes care of Error objects serialization\n * - Optionally limit depth of final output\n */\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\nexport function normalize(input, depth) {\n try {\n return JSON.parse(JSON.stringify(input, function (key, value) { return walk(key, value, depth); }));\n }\n catch (_oO) {\n return '**non-serializable**';\n }\n}\n/**\n * Given any captured exception, extract its keys and create a sorted\n * and truncated list that will be used inside the event message.\n * eg. `Non-error exception captured with keys: foo, bar, baz`\n */\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\nexport function extractExceptionKeysForMessage(exception, maxLength) {\n if (maxLength === void 0) { maxLength = 40; }\n var keys = Object.keys(getWalkSource(exception));\n keys.sort();\n if (!keys.length) {\n return '[object has no keys]';\n }\n if (keys[0].length >= maxLength) {\n return truncate(keys[0], maxLength);\n }\n for (var includedKeys = keys.length; includedKeys > 0; includedKeys--) {\n var serialized = keys.slice(0, includedKeys).join(', ');\n if (serialized.length > maxLength) {\n continue;\n }\n if (includedKeys === keys.length) {\n return serialized;\n }\n return truncate(serialized, maxLength);\n }\n return '';\n}\n/**\n * Given any object, return the new object with removed keys that value was `undefined`.\n * Works recursively on objects and arrays.\n */\nexport function dropUndefinedKeys(val) {\n var e_1, _a;\n if (isPlainObject(val)) {\n var obj = val;\n var rv = {};\n try {\n for (var _b = __values(Object.keys(obj)), _c = _b.next(); !_c.done; _c = _b.next()) {\n var key = _c.value;\n if (typeof obj[key] !== 'undefined') {\n rv[key] = dropUndefinedKeys(obj[key]);\n }\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_1) throw e_1.error; }\n }\n return rv;\n }\n if (Array.isArray(val)) {\n return val.map(dropUndefinedKeys);\n }\n return val;\n}\n//# sourceMappingURL=object.js.map","import { isString } from './is';\nimport { normalize } from './object';\n/**\n * Checks whether we're in the Node.js or Browser environment\n *\n * @returns Answer to given question\n */\nexport function isNodeEnv() {\n return Object.prototype.toString.call(typeof process !== 'undefined' ? process : 0) === '[object process]';\n}\n/**\n * Requires a module which is protected against bundler minification.\n *\n * @param request The module path to resolve\n */\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\nexport function dynamicRequire(mod, request) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return mod.require(request);\n}\n/** Default request keys that'll be used to extract data from the request */\nvar DEFAULT_REQUEST_KEYS = ['cookies', 'data', 'headers', 'method', 'query_string', 'url'];\n/**\n * Normalizes data from the request object, accounting for framework differences.\n *\n * @param req The request object from which to extract data\n * @param keys An optional array of keys to include in the normalized data. Defaults to DEFAULT_REQUEST_KEYS if not\n * provided.\n * @returns An object containing normalized request data\n */\nexport function extractNodeRequestData(req, keys) {\n if (keys === void 0) { keys = DEFAULT_REQUEST_KEYS; }\n // make sure we can safely use dynamicRequire below\n if (!isNodeEnv()) {\n throw new Error(\"Can't get node request data outside of a node environment\");\n }\n var requestData = {};\n // headers:\n // node, express: req.headers\n // koa: req.header\n var headers = (req.headers || req.header || {});\n // method:\n // node, express, koa: req.method\n var method = req.method;\n // host:\n // express: req.hostname in > 4 and req.host in < 4\n // koa: req.host\n // node: req.headers.host\n var host = req.hostname || req.host || headers.host || '';\n // protocol:\n // node: \n // express, koa: req.protocol\n var protocol = req.protocol === 'https' || req.secure || (req.socket || {}).encrypted\n ? 'https'\n : 'http';\n // url (including path and query string):\n // node, express: req.originalUrl\n // koa: req.url\n var originalUrl = (req.originalUrl || req.url || '');\n // absolute url\n var absoluteUrl = protocol + \"://\" + host + originalUrl;\n keys.forEach(function (key) {\n switch (key) {\n case 'headers':\n requestData.headers = headers;\n break;\n case 'method':\n requestData.method = method;\n break;\n case 'url':\n requestData.url = absoluteUrl;\n break;\n case 'cookies':\n // cookies:\n // node, express, koa: req.headers.cookie\n // vercel, sails.js, express (w/ cookie middleware): req.cookies\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n requestData.cookies = req.cookies || dynamicRequire(module, 'cookie').parse(headers.cookie || '');\n break;\n case 'query_string':\n // query string:\n // node: req.url (raw)\n // express, koa: req.query\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n requestData.query_string = dynamicRequire(module, 'url').parse(originalUrl || '', false).query;\n break;\n case 'data':\n if (method === 'GET' || method === 'HEAD') {\n break;\n }\n // body data:\n // node, express, koa: req.body\n if (req.body !== undefined) {\n requestData.data = isString(req.body) ? req.body : JSON.stringify(normalize(req.body));\n }\n break;\n default:\n if ({}.hasOwnProperty.call(req, key)) {\n requestData[key] = req[key];\n }\n }\n });\n return requestData;\n}\n//# sourceMappingURL=node.js.map","import { isNodeEnv } from './node';\nimport { snipLine } from './string';\nvar fallbackGlobalObject = {};\n/**\n * Safely get global scope object\n *\n * @returns Global scope object\n */\nexport function getGlobalObject() {\n return (isNodeEnv()\n ? global\n : typeof window !== 'undefined'\n ? window\n : typeof self !== 'undefined'\n ? self\n : fallbackGlobalObject);\n}\n/**\n * UUID4 generator\n *\n * @returns string Generated UUID4.\n */\nexport function uuid4() {\n var global = getGlobalObject();\n var crypto = global.crypto || global.msCrypto;\n if (!(crypto === void 0) && crypto.getRandomValues) {\n // Use window.crypto API if available\n var arr = new Uint16Array(8);\n crypto.getRandomValues(arr);\n // set 4 in byte 7\n // eslint-disable-next-line no-bitwise\n arr[3] = (arr[3] & 0xfff) | 0x4000;\n // set 2 most significant bits of byte 9 to '10'\n // eslint-disable-next-line no-bitwise\n arr[4] = (arr[4] & 0x3fff) | 0x8000;\n var pad = function (num) {\n var v = num.toString(16);\n while (v.length < 4) {\n v = \"0\" + v;\n }\n return v;\n };\n return (pad(arr[0]) + pad(arr[1]) + pad(arr[2]) + pad(arr[3]) + pad(arr[4]) + pad(arr[5]) + pad(arr[6]) + pad(arr[7]));\n }\n // http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/2117523#2117523\n return 'xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx'.replace(/[xy]/g, function (c) {\n // eslint-disable-next-line no-bitwise\n var r = (Math.random() * 16) | 0;\n // eslint-disable-next-line no-bitwise\n var v = c === 'x' ? r : (r & 0x3) | 0x8;\n return v.toString(16);\n });\n}\n/**\n * Parses string form of URL into an object\n * // borrowed from https://tools.ietf.org/html/rfc3986#appendix-B\n * // intentionally using regex and not href parsing trick because React Native and other\n * // environments where DOM might not be available\n * @returns parsed URL object\n */\nexport function parseUrl(url) {\n if (!url) {\n return {};\n }\n var match = url.match(/^(([^:/?#]+):)?(\\/\\/([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$/);\n if (!match) {\n return {};\n }\n // coerce to undefined values to empty string so we don't get 'undefined'\n var query = match[6] || '';\n var fragment = match[8] || '';\n return {\n host: match[4],\n path: match[5],\n protocol: match[2],\n relative: match[5] + query + fragment,\n };\n}\n/**\n * Extracts either message or type+value from an event that can be used for user-facing logs\n * @returns event's description\n */\nexport function getEventDescription(event) {\n if (event.message) {\n return event.message;\n }\n if (event.exception && event.exception.values && event.exception.values[0]) {\n var exception = event.exception.values[0];\n if (exception.type && exception.value) {\n return exception.type + \": \" + exception.value;\n }\n return exception.type || exception.value || event.event_id || '';\n }\n return event.event_id || '';\n}\n/** JSDoc */\nexport function consoleSandbox(callback) {\n var global = getGlobalObject();\n var levels = ['debug', 'info', 'warn', 'error', 'log', 'assert'];\n if (!('console' in global)) {\n return callback();\n }\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n var originalConsole = global.console;\n var wrappedLevels = {};\n // Restore all wrapped console methods\n levels.forEach(function (level) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n if (level in global.console && originalConsole[level].__sentry_original__) {\n wrappedLevels[level] = originalConsole[level];\n originalConsole[level] = originalConsole[level].__sentry_original__;\n }\n });\n // Perform callback manipulations\n var result = callback();\n // Revert restoration to wrapped state\n Object.keys(wrappedLevels).forEach(function (level) {\n originalConsole[level] = wrappedLevels[level];\n });\n return result;\n}\n/**\n * Adds exception values, type and value to an synthetic Exception.\n * @param event The event to modify.\n * @param value Value of the exception.\n * @param type Type of the exception.\n * @hidden\n */\nexport function addExceptionTypeValue(event, value, type) {\n event.exception = event.exception || {};\n event.exception.values = event.exception.values || [];\n event.exception.values[0] = event.exception.values[0] || {};\n event.exception.values[0].value = event.exception.values[0].value || value || '';\n event.exception.values[0].type = event.exception.values[0].type || type || 'Error';\n}\n/**\n * Adds exception mechanism to a given event.\n * @param event The event to modify.\n * @param mechanism Mechanism of the mechanism.\n * @hidden\n */\nexport function addExceptionMechanism(event, mechanism) {\n if (mechanism === void 0) { mechanism = {}; }\n // TODO: Use real type with `keyof Mechanism` thingy and maybe make it better?\n try {\n // @ts-ignore Type 'Mechanism | {}' is not assignable to type 'Mechanism | undefined'\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n event.exception.values[0].mechanism = event.exception.values[0].mechanism || {};\n Object.keys(mechanism).forEach(function (key) {\n // @ts-ignore Mechanism has no index signature\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n event.exception.values[0].mechanism[key] = mechanism[key];\n });\n }\n catch (_oO) {\n // no-empty\n }\n}\n/**\n * A safe form of location.href\n */\nexport function getLocationHref() {\n try {\n return document.location.href;\n }\n catch (oO) {\n return '';\n }\n}\n// https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string\nvar SEMVER_REGEXP = /^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$/;\n/**\n * Parses input into a SemVer interface\n * @param input string representation of a semver version\n */\nexport function parseSemver(input) {\n var match = input.match(SEMVER_REGEXP) || [];\n var major = parseInt(match[1], 10);\n var minor = parseInt(match[2], 10);\n var patch = parseInt(match[3], 10);\n return {\n buildmetadata: match[5],\n major: isNaN(major) ? undefined : major,\n minor: isNaN(minor) ? undefined : minor,\n patch: isNaN(patch) ? undefined : patch,\n prerelease: match[4],\n };\n}\nvar defaultRetryAfter = 60 * 1000; // 60 seconds\n/**\n * Extracts Retry-After value from the request header or returns default value\n * @param now current unix timestamp\n * @param header string representation of 'Retry-After' header\n */\nexport function parseRetryAfterHeader(now, header) {\n if (!header) {\n return defaultRetryAfter;\n }\n var headerDelay = parseInt(\"\" + header, 10);\n if (!isNaN(headerDelay)) {\n return headerDelay * 1000;\n }\n var headerDate = Date.parse(\"\" + header);\n if (!isNaN(headerDate)) {\n return headerDate - now;\n }\n return defaultRetryAfter;\n}\n/**\n * This function adds context (pre/post/line) lines to the provided frame\n *\n * @param lines string[] containing all lines\n * @param frame StackFrame that will be mutated\n * @param linesOfContext number of context lines we want to add pre/post\n */\nexport function addContextToFrame(lines, frame, linesOfContext) {\n if (linesOfContext === void 0) { linesOfContext = 5; }\n var lineno = frame.lineno || 0;\n var maxLines = lines.length;\n var sourceLine = Math.max(Math.min(maxLines, lineno - 1), 0);\n frame.pre_context = lines\n .slice(Math.max(0, sourceLine - linesOfContext), sourceLine)\n .map(function (line) { return snipLine(line, 0); });\n frame.context_line = snipLine(lines[Math.min(maxLines - 1, sourceLine)], frame.colno || 0);\n frame.post_context = lines\n .slice(Math.min(sourceLine + 1, maxLines), sourceLine + 1 + linesOfContext)\n .map(function (line) { return snipLine(line, 0); });\n}\n/**\n * Strip the query string and fragment off of a given URL or path (if present)\n *\n * @param urlPath Full URL or path, including possible query string and/or fragment\n * @returns URL or path without query string or fragment\n */\nexport function stripUrlQueryAndFragment(urlPath) {\n // eslint-disable-next-line no-useless-escape\n return urlPath.split(/[\\?#]/, 1)[0];\n}\n//# sourceMappingURL=misc.js.map","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { consoleSandbox, getGlobalObject } from './misc';\n// TODO: Implement different loggers for different environments\nvar global = getGlobalObject();\n/** Prefix for logging strings */\nvar PREFIX = 'Sentry Logger ';\n/** JSDoc */\nvar Logger = /** @class */ (function () {\n /** JSDoc */\n function Logger() {\n this._enabled = false;\n }\n /** JSDoc */\n Logger.prototype.disable = function () {\n this._enabled = false;\n };\n /** JSDoc */\n Logger.prototype.enable = function () {\n this._enabled = true;\n };\n /** JSDoc */\n Logger.prototype.log = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n if (!this._enabled) {\n return;\n }\n consoleSandbox(function () {\n global.console.log(PREFIX + \"[Log]: \" + args.join(' '));\n });\n };\n /** JSDoc */\n Logger.prototype.warn = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n if (!this._enabled) {\n return;\n }\n consoleSandbox(function () {\n global.console.warn(PREFIX + \"[Warn]: \" + args.join(' '));\n });\n };\n /** JSDoc */\n Logger.prototype.error = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n if (!this._enabled) {\n return;\n }\n consoleSandbox(function () {\n global.console.error(PREFIX + \"[Error]: \" + args.join(' '));\n });\n };\n return Logger;\n}());\n// Ensure we only have a single logger instance, even if multiple versions of @sentry/utils are being used\nglobal.__SENTRY__ = global.__SENTRY__ || {};\nvar logger = global.__SENTRY__.logger || (global.__SENTRY__.logger = new Logger());\nexport { logger };\n//# sourceMappingURL=logger.js.map","import { logger } from './logger';\nimport { getGlobalObject } from './misc';\n/**\n * Tells whether current environment supports ErrorEvent objects\n * {@link supportsErrorEvent}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsErrorEvent() {\n try {\n new ErrorEvent('');\n return true;\n }\n catch (e) {\n return false;\n }\n}\n/**\n * Tells whether current environment supports DOMError objects\n * {@link supportsDOMError}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsDOMError() {\n try {\n // Chrome: VM89:1 Uncaught TypeError: Failed to construct 'DOMError':\n // 1 argument required, but only 0 present.\n // @ts-ignore It really needs 1 argument, not 0.\n new DOMError('');\n return true;\n }\n catch (e) {\n return false;\n }\n}\n/**\n * Tells whether current environment supports DOMException objects\n * {@link supportsDOMException}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsDOMException() {\n try {\n new DOMException('');\n return true;\n }\n catch (e) {\n return false;\n }\n}\n/**\n * Tells whether current environment supports Fetch API\n * {@link supportsFetch}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsFetch() {\n if (!('fetch' in getGlobalObject())) {\n return false;\n }\n try {\n new Headers();\n new Request('');\n new Response();\n return true;\n }\n catch (e) {\n return false;\n }\n}\n/**\n * isNativeFetch checks if the given function is a native implementation of fetch()\n */\n// eslint-disable-next-line @typescript-eslint/ban-types\nfunction isNativeFetch(func) {\n return func && /^function fetch\\(\\)\\s+\\{\\s+\\[native code\\]\\s+\\}$/.test(func.toString());\n}\n/**\n * Tells whether current environment supports Fetch API natively\n * {@link supportsNativeFetch}.\n *\n * @returns true if `window.fetch` is natively implemented, false otherwise\n */\nexport function supportsNativeFetch() {\n if (!supportsFetch()) {\n return false;\n }\n var global = getGlobalObject();\n // Fast path to avoid DOM I/O\n // eslint-disable-next-line @typescript-eslint/unbound-method\n if (isNativeFetch(global.fetch)) {\n return true;\n }\n // window.fetch is implemented, but is polyfilled or already wrapped (e.g: by a chrome extension)\n // so create a \"pure\" iframe to see if that has native fetch\n var result = false;\n var doc = global.document;\n // eslint-disable-next-line deprecation/deprecation\n if (doc && typeof doc.createElement === \"function\") {\n try {\n var sandbox = doc.createElement('iframe');\n sandbox.hidden = true;\n doc.head.appendChild(sandbox);\n if (sandbox.contentWindow && sandbox.contentWindow.fetch) {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n result = isNativeFetch(sandbox.contentWindow.fetch);\n }\n doc.head.removeChild(sandbox);\n }\n catch (err) {\n logger.warn('Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ', err);\n }\n }\n return result;\n}\n/**\n * Tells whether current environment supports ReportingObserver API\n * {@link supportsReportingObserver}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsReportingObserver() {\n return 'ReportingObserver' in getGlobalObject();\n}\n/**\n * Tells whether current environment supports Referrer Policy API\n * {@link supportsReferrerPolicy}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsReferrerPolicy() {\n // Despite all stars in the sky saying that Edge supports old draft syntax, aka 'never', 'always', 'origin' and 'default\n // https://caniuse.com/#feat=referrer-policy\n // It doesn't. And it throw exception instead of ignoring this parameter...\n // REF: https://github.com/getsentry/raven-js/issues/1233\n if (!supportsFetch()) {\n return false;\n }\n try {\n new Request('_', {\n referrerPolicy: 'origin',\n });\n return true;\n }\n catch (e) {\n return false;\n }\n}\n/**\n * Tells whether current environment supports History API\n * {@link supportsHistory}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsHistory() {\n // NOTE: in Chrome App environment, touching history.pushState, *even inside\n // a try/catch block*, will cause Chrome to output an error to console.error\n // borrowed from: https://github.com/angular/angular.js/pull/13945/files\n var global = getGlobalObject();\n /* eslint-disable @typescript-eslint/no-unsafe-member-access */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n var chrome = global.chrome;\n var isChromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n /* eslint-enable @typescript-eslint/no-unsafe-member-access */\n var hasHistoryApi = 'history' in global && !!global.history.pushState && !!global.history.replaceState;\n return !isChromePackagedApp && hasHistoryApi;\n}\n//# sourceMappingURL=supports.js.map","import { __assign, __values } from \"tslib\";\nimport { isInstanceOf, isString } from './is';\nimport { logger } from './logger';\nimport { getGlobalObject } from './misc';\nimport { fill } from './object';\nimport { getFunctionName } from './stacktrace';\nimport { supportsHistory, supportsNativeFetch } from './supports';\nvar global = getGlobalObject();\n/**\n * Instrument native APIs to call handlers that can be used to create breadcrumbs, APM spans etc.\n * - Console API\n * - Fetch API\n * - XHR API\n * - History API\n * - DOM API (click/typing)\n * - Error API\n * - UnhandledRejection API\n */\nvar handlers = {};\nvar instrumented = {};\n/** Instruments given API */\nfunction instrument(type) {\n if (instrumented[type]) {\n return;\n }\n instrumented[type] = true;\n switch (type) {\n case 'console':\n instrumentConsole();\n break;\n case 'dom':\n instrumentDOM();\n break;\n case 'xhr':\n instrumentXHR();\n break;\n case 'fetch':\n instrumentFetch();\n break;\n case 'history':\n instrumentHistory();\n break;\n case 'error':\n instrumentError();\n break;\n case 'unhandledrejection':\n instrumentUnhandledRejection();\n break;\n default:\n logger.warn('unknown instrumentation type:', type);\n }\n}\n/**\n * Add handler that will be called when given type of instrumentation triggers.\n * Use at your own risk, this might break without changelog notice, only used internally.\n * @hidden\n */\nexport function addInstrumentationHandler(handler) {\n if (!handler || typeof handler.type !== 'string' || typeof handler.callback !== 'function') {\n return;\n }\n handlers[handler.type] = handlers[handler.type] || [];\n handlers[handler.type].push(handler.callback);\n instrument(handler.type);\n}\n/** JSDoc */\nfunction triggerHandlers(type, data) {\n var e_1, _a;\n if (!type || !handlers[type]) {\n return;\n }\n try {\n for (var _b = __values(handlers[type] || []), _c = _b.next(); !_c.done; _c = _b.next()) {\n var handler = _c.value;\n try {\n handler(data);\n }\n catch (e) {\n logger.error(\"Error while triggering instrumentation handler.\\nType: \" + type + \"\\nName: \" + getFunctionName(handler) + \"\\nError: \" + e);\n }\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_1) throw e_1.error; }\n }\n}\n/** JSDoc */\nfunction instrumentConsole() {\n if (!('console' in global)) {\n return;\n }\n ['debug', 'info', 'warn', 'error', 'log', 'assert'].forEach(function (level) {\n if (!(level in global.console)) {\n return;\n }\n fill(global.console, level, function (originalConsoleLevel) {\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n triggerHandlers('console', { args: args, level: level });\n // this fails for some browsers. :(\n if (originalConsoleLevel) {\n Function.prototype.apply.call(originalConsoleLevel, global.console, args);\n }\n };\n });\n });\n}\n/** JSDoc */\nfunction instrumentFetch() {\n if (!supportsNativeFetch()) {\n return;\n }\n fill(global, 'fetch', function (originalFetch) {\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var handlerData = {\n args: args,\n fetchData: {\n method: getFetchMethod(args),\n url: getFetchUrl(args),\n },\n startTimestamp: Date.now(),\n };\n triggerHandlers('fetch', __assign({}, handlerData));\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return originalFetch.apply(global, args).then(function (response) {\n triggerHandlers('fetch', __assign(__assign({}, handlerData), { endTimestamp: Date.now(), response: response }));\n return response;\n }, function (error) {\n triggerHandlers('fetch', __assign(__assign({}, handlerData), { endTimestamp: Date.now(), error: error }));\n // NOTE: If you are a Sentry user, and you are seeing this stack frame,\n // it means the sentry.javascript SDK caught an error invoking your application code.\n // This is expected behavior and NOT indicative of a bug with sentry.javascript.\n throw error;\n });\n };\n });\n}\n/* eslint-disable @typescript-eslint/no-unsafe-member-access */\n/** Extract `method` from fetch call arguments */\nfunction getFetchMethod(fetchArgs) {\n if (fetchArgs === void 0) { fetchArgs = []; }\n if ('Request' in global && isInstanceOf(fetchArgs[0], Request) && fetchArgs[0].method) {\n return String(fetchArgs[0].method).toUpperCase();\n }\n if (fetchArgs[1] && fetchArgs[1].method) {\n return String(fetchArgs[1].method).toUpperCase();\n }\n return 'GET';\n}\n/** Extract `url` from fetch call arguments */\nfunction getFetchUrl(fetchArgs) {\n if (fetchArgs === void 0) { fetchArgs = []; }\n if (typeof fetchArgs[0] === 'string') {\n return fetchArgs[0];\n }\n if ('Request' in global && isInstanceOf(fetchArgs[0], Request)) {\n return fetchArgs[0].url;\n }\n return String(fetchArgs[0]);\n}\n/* eslint-enable @typescript-eslint/no-unsafe-member-access */\n/** JSDoc */\nfunction instrumentXHR() {\n if (!('XMLHttpRequest' in global)) {\n return;\n }\n // Poor man's implementation of ES6 `Map`, tracking and keeping in sync key and value separately.\n var requestKeys = [];\n var requestValues = [];\n var xhrproto = XMLHttpRequest.prototype;\n fill(xhrproto, 'open', function (originalOpen) {\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n var xhr = this;\n var url = args[1];\n xhr.__sentry_xhr__ = {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n method: isString(args[0]) ? args[0].toUpperCase() : args[0],\n url: args[1],\n };\n // if Sentry key appears in URL, don't capture it as a request\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n if (isString(url) && xhr.__sentry_xhr__.method === 'POST' && url.match(/sentry_key/)) {\n xhr.__sentry_own_request__ = true;\n }\n var onreadystatechangeHandler = function () {\n if (xhr.readyState === 4) {\n try {\n // touching statusCode in some platforms throws\n // an exception\n if (xhr.__sentry_xhr__) {\n xhr.__sentry_xhr__.status_code = xhr.status;\n }\n }\n catch (e) {\n /* do nothing */\n }\n try {\n var requestPos = requestKeys.indexOf(xhr);\n if (requestPos !== -1) {\n // Make sure to pop both key and value to keep it in sync.\n requestKeys.splice(requestPos);\n var args_1 = requestValues.splice(requestPos)[0];\n if (xhr.__sentry_xhr__ && args_1[0] !== undefined) {\n xhr.__sentry_xhr__.body = args_1[0];\n }\n }\n }\n catch (e) {\n /* do nothing */\n }\n triggerHandlers('xhr', {\n args: args,\n endTimestamp: Date.now(),\n startTimestamp: Date.now(),\n xhr: xhr,\n });\n }\n };\n if ('onreadystatechange' in xhr && typeof xhr.onreadystatechange === 'function') {\n fill(xhr, 'onreadystatechange', function (original) {\n return function () {\n var readyStateArgs = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n readyStateArgs[_i] = arguments[_i];\n }\n onreadystatechangeHandler();\n return original.apply(xhr, readyStateArgs);\n };\n });\n }\n else {\n xhr.addEventListener('readystatechange', onreadystatechangeHandler);\n }\n return originalOpen.apply(xhr, args);\n };\n });\n fill(xhrproto, 'send', function (originalSend) {\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n requestKeys.push(this);\n requestValues.push(args);\n triggerHandlers('xhr', {\n args: args,\n startTimestamp: Date.now(),\n xhr: this,\n });\n return originalSend.apply(this, args);\n };\n });\n}\nvar lastHref;\n/** JSDoc */\nfunction instrumentHistory() {\n if (!supportsHistory()) {\n return;\n }\n var oldOnPopState = global.onpopstate;\n global.onpopstate = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var to = global.location.href;\n // keep track of the current URL state, as we always receive only the updated state\n var from = lastHref;\n lastHref = to;\n triggerHandlers('history', {\n from: from,\n to: to,\n });\n if (oldOnPopState) {\n return oldOnPopState.apply(this, args);\n }\n };\n /** @hidden */\n function historyReplacementFunction(originalHistoryFunction) {\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var url = args.length > 2 ? args[2] : undefined;\n if (url) {\n // coerce to string (this is what pushState does)\n var from = lastHref;\n var to = String(url);\n // keep track of the current URL state, as we always receive only the updated state\n lastHref = to;\n triggerHandlers('history', {\n from: from,\n to: to,\n });\n }\n return originalHistoryFunction.apply(this, args);\n };\n }\n fill(global.history, 'pushState', historyReplacementFunction);\n fill(global.history, 'replaceState', historyReplacementFunction);\n}\n/** JSDoc */\nfunction instrumentDOM() {\n if (!('document' in global)) {\n return;\n }\n // Capture breadcrumbs from any click that is unhandled / bubbled up all the way\n // to the document. Do this before we instrument addEventListener.\n global.document.addEventListener('click', domEventHandler('click', triggerHandlers.bind(null, 'dom')), false);\n global.document.addEventListener('keypress', keypressEventHandler(triggerHandlers.bind(null, 'dom')), false);\n // After hooking into document bubbled up click and keypresses events, we also hook into user handled click & keypresses.\n ['EventTarget', 'Node'].forEach(function (target) {\n /* eslint-disable @typescript-eslint/no-unsafe-member-access */\n var proto = global[target] && global[target].prototype;\n // eslint-disable-next-line no-prototype-builtins\n if (!proto || !proto.hasOwnProperty || !proto.hasOwnProperty('addEventListener')) {\n return;\n }\n /* eslint-enable @typescript-eslint/no-unsafe-member-access */\n fill(proto, 'addEventListener', function (original) {\n return function (eventName, fn, options) {\n if (fn && fn.handleEvent) {\n if (eventName === 'click') {\n fill(fn, 'handleEvent', function (innerOriginal) {\n return function (event) {\n domEventHandler('click', triggerHandlers.bind(null, 'dom'))(event);\n return innerOriginal.call(this, event);\n };\n });\n }\n if (eventName === 'keypress') {\n fill(fn, 'handleEvent', function (innerOriginal) {\n return function (event) {\n keypressEventHandler(triggerHandlers.bind(null, 'dom'))(event);\n return innerOriginal.call(this, event);\n };\n });\n }\n }\n else {\n if (eventName === 'click') {\n domEventHandler('click', triggerHandlers.bind(null, 'dom'), true)(this);\n }\n if (eventName === 'keypress') {\n keypressEventHandler(triggerHandlers.bind(null, 'dom'))(this);\n }\n }\n return original.call(this, eventName, fn, options);\n };\n });\n fill(proto, 'removeEventListener', function (original) {\n return function (eventName, fn, options) {\n try {\n original.call(this, eventName, fn.__sentry_wrapped__, options);\n }\n catch (e) {\n // ignore, accessing __sentry_wrapped__ will throw in some Selenium environments\n }\n return original.call(this, eventName, fn, options);\n };\n });\n });\n}\nvar debounceDuration = 1000;\nvar debounceTimer = 0;\nvar keypressTimeout;\nvar lastCapturedEvent;\n/**\n * Wraps addEventListener to capture UI breadcrumbs\n * @param name the event name (e.g. \"click\")\n * @param handler function that will be triggered\n * @param debounce decides whether it should wait till another event loop\n * @returns wrapped breadcrumb events handler\n * @hidden\n */\nfunction domEventHandler(name, handler, debounce) {\n if (debounce === void 0) { debounce = false; }\n return function (event) {\n // reset keypress timeout; e.g. triggering a 'click' after\n // a 'keypress' will reset the keypress debounce so that a new\n // set of keypresses can be recorded\n keypressTimeout = undefined;\n // It's possible this handler might trigger multiple times for the same\n // event (e.g. event propagation through node ancestors). Ignore if we've\n // already captured the event.\n if (!event || lastCapturedEvent === event) {\n return;\n }\n lastCapturedEvent = event;\n if (debounceTimer) {\n clearTimeout(debounceTimer);\n }\n if (debounce) {\n debounceTimer = setTimeout(function () {\n handler({ event: event, name: name });\n });\n }\n else {\n handler({ event: event, name: name });\n }\n };\n}\n/**\n * Wraps addEventListener to capture keypress UI events\n * @param handler function that will be triggered\n * @returns wrapped keypress events handler\n * @hidden\n */\nfunction keypressEventHandler(handler) {\n // TODO: if somehow user switches keypress target before\n // debounce timeout is triggered, we will only capture\n // a single breadcrumb from the FIRST target (acceptable?)\n return function (event) {\n var target;\n try {\n target = event.target;\n }\n catch (e) {\n // just accessing event properties can throw an exception in some rare circumstances\n // see: https://github.com/getsentry/raven-js/issues/838\n return;\n }\n var tagName = target && target.tagName;\n // only consider keypress events on actual input elements\n // this will disregard keypresses targeting body (e.g. tabbing\n // through elements, hotkeys, etc)\n if (!tagName || (tagName !== 'INPUT' && tagName !== 'TEXTAREA' && !target.isContentEditable)) {\n return;\n }\n // record first keypress in a series, but ignore subsequent\n // keypresses until debounce clears\n if (!keypressTimeout) {\n domEventHandler('input', handler)(event);\n }\n clearTimeout(keypressTimeout);\n keypressTimeout = setTimeout(function () {\n keypressTimeout = undefined;\n }, debounceDuration);\n };\n}\nvar _oldOnErrorHandler = null;\n/** JSDoc */\nfunction instrumentError() {\n _oldOnErrorHandler = global.onerror;\n global.onerror = function (msg, url, line, column, error) {\n triggerHandlers('error', {\n column: column,\n error: error,\n line: line,\n msg: msg,\n url: url,\n });\n if (_oldOnErrorHandler) {\n // eslint-disable-next-line prefer-rest-params\n return _oldOnErrorHandler.apply(this, arguments);\n }\n return false;\n };\n}\nvar _oldOnUnhandledRejectionHandler = null;\n/** JSDoc */\nfunction instrumentUnhandledRejection() {\n _oldOnUnhandledRejectionHandler = global.onunhandledrejection;\n global.onunhandledrejection = function (e) {\n triggerHandlers('unhandledrejection', e);\n if (_oldOnUnhandledRejectionHandler) {\n // eslint-disable-next-line prefer-rest-params\n return _oldOnUnhandledRejectionHandler.apply(this, arguments);\n }\n return true;\n };\n}\n//# sourceMappingURL=instrument.js.map","/* eslint-disable @typescript-eslint/explicit-function-return-type */\n/* eslint-disable @typescript-eslint/typedef */\n/* eslint-disable @typescript-eslint/explicit-module-boundary-types */\n/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { isThenable } from './is';\n/** SyncPromise internal states */\nvar States;\n(function (States) {\n /** Pending */\n States[\"PENDING\"] = \"PENDING\";\n /** Resolved / OK */\n States[\"RESOLVED\"] = \"RESOLVED\";\n /** Rejected / Error */\n States[\"REJECTED\"] = \"REJECTED\";\n})(States || (States = {}));\n/**\n * Thenable class that behaves like a Promise and follows it's interface\n * but is not async internally\n */\nvar SyncPromise = /** @class */ (function () {\n function SyncPromise(executor) {\n var _this = this;\n this._state = States.PENDING;\n this._handlers = [];\n /** JSDoc */\n this._resolve = function (value) {\n _this._setResult(States.RESOLVED, value);\n };\n /** JSDoc */\n this._reject = function (reason) {\n _this._setResult(States.REJECTED, reason);\n };\n /** JSDoc */\n this._setResult = function (state, value) {\n if (_this._state !== States.PENDING) {\n return;\n }\n if (isThenable(value)) {\n value.then(_this._resolve, _this._reject);\n return;\n }\n _this._state = state;\n _this._value = value;\n _this._executeHandlers();\n };\n // TODO: FIXME\n /** JSDoc */\n this._attachHandler = function (handler) {\n _this._handlers = _this._handlers.concat(handler);\n _this._executeHandlers();\n };\n /** JSDoc */\n this._executeHandlers = function () {\n if (_this._state === States.PENDING) {\n return;\n }\n var cachedHandlers = _this._handlers.slice();\n _this._handlers = [];\n cachedHandlers.forEach(function (handler) {\n if (handler.done) {\n return;\n }\n if (_this._state === States.RESOLVED) {\n if (handler.onfulfilled) {\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n handler.onfulfilled(_this._value);\n }\n }\n if (_this._state === States.REJECTED) {\n if (handler.onrejected) {\n handler.onrejected(_this._value);\n }\n }\n handler.done = true;\n });\n };\n try {\n executor(this._resolve, this._reject);\n }\n catch (e) {\n this._reject(e);\n }\n }\n /** JSDoc */\n SyncPromise.resolve = function (value) {\n return new SyncPromise(function (resolve) {\n resolve(value);\n });\n };\n /** JSDoc */\n SyncPromise.reject = function (reason) {\n return new SyncPromise(function (_, reject) {\n reject(reason);\n });\n };\n /** JSDoc */\n SyncPromise.all = function (collection) {\n return new SyncPromise(function (resolve, reject) {\n if (!Array.isArray(collection)) {\n reject(new TypeError(\"Promise.all requires an array as input.\"));\n return;\n }\n if (collection.length === 0) {\n resolve([]);\n return;\n }\n var counter = collection.length;\n var resolvedCollection = [];\n collection.forEach(function (item, index) {\n SyncPromise.resolve(item)\n .then(function (value) {\n resolvedCollection[index] = value;\n counter -= 1;\n if (counter !== 0) {\n return;\n }\n resolve(resolvedCollection);\n })\n .then(null, reject);\n });\n });\n };\n /** JSDoc */\n SyncPromise.prototype.then = function (onfulfilled, onrejected) {\n var _this = this;\n return new SyncPromise(function (resolve, reject) {\n _this._attachHandler({\n done: false,\n onfulfilled: function (result) {\n if (!onfulfilled) {\n // TODO: ¯\\_(ツ)_/¯\n // TODO: FIXME\n resolve(result);\n return;\n }\n try {\n resolve(onfulfilled(result));\n return;\n }\n catch (e) {\n reject(e);\n return;\n }\n },\n onrejected: function (reason) {\n if (!onrejected) {\n reject(reason);\n return;\n }\n try {\n resolve(onrejected(reason));\n return;\n }\n catch (e) {\n reject(e);\n return;\n }\n },\n });\n });\n };\n /** JSDoc */\n SyncPromise.prototype.catch = function (onrejected) {\n return this.then(function (val) { return val; }, onrejected);\n };\n /** JSDoc */\n SyncPromise.prototype.finally = function (onfinally) {\n var _this = this;\n return new SyncPromise(function (resolve, reject) {\n var val;\n var isRejected;\n return _this.then(function (value) {\n isRejected = false;\n val = value;\n if (onfinally) {\n onfinally();\n }\n }, function (reason) {\n isRejected = true;\n val = reason;\n if (onfinally) {\n onfinally();\n }\n }).then(function () {\n if (isRejected) {\n reject(val);\n return;\n }\n resolve(val);\n });\n });\n };\n /** JSDoc */\n SyncPromise.prototype.toString = function () {\n return '[object SyncPromise]';\n };\n return SyncPromise;\n}());\nexport { SyncPromise };\n//# sourceMappingURL=syncpromise.js.map","import { SentryError } from './error';\nimport { SyncPromise } from './syncpromise';\n/** A simple queue that holds promises. */\nvar PromiseBuffer = /** @class */ (function () {\n function PromiseBuffer(_limit) {\n this._limit = _limit;\n /** Internal set of queued Promises */\n this._buffer = [];\n }\n /**\n * Says if the buffer is ready to take more requests\n */\n PromiseBuffer.prototype.isReady = function () {\n return this._limit === undefined || this.length() < this._limit;\n };\n /**\n * Add a promise to the queue.\n *\n * @param task Can be any PromiseLike\n * @returns The original promise.\n */\n PromiseBuffer.prototype.add = function (task) {\n var _this = this;\n if (!this.isReady()) {\n return SyncPromise.reject(new SentryError('Not adding Promise due to buffer limit reached.'));\n }\n if (this._buffer.indexOf(task) === -1) {\n this._buffer.push(task);\n }\n task\n .then(function () { return _this.remove(task); })\n .then(null, function () {\n return _this.remove(task).then(null, function () {\n // We have to add this catch here otherwise we have an unhandledPromiseRejection\n // because it's a new Promise chain.\n });\n });\n return task;\n };\n /**\n * Remove a promise to the queue.\n *\n * @param task Can be any PromiseLike\n * @returns Removed promise.\n */\n PromiseBuffer.prototype.remove = function (task) {\n var removedTask = this._buffer.splice(this._buffer.indexOf(task), 1)[0];\n return removedTask;\n };\n /**\n * This function returns the number of unresolved promises in the queue.\n */\n PromiseBuffer.prototype.length = function () {\n return this._buffer.length;\n };\n /**\n * This will drain the whole queue, returns true if queue is empty or drained.\n * If timeout is provided and the queue takes longer to drain, the promise still resolves but with false.\n *\n * @param timeout Number in ms to wait until it resolves with false.\n */\n PromiseBuffer.prototype.drain = function (timeout) {\n var _this = this;\n return new SyncPromise(function (resolve) {\n var capturedSetTimeout = setTimeout(function () {\n if (timeout && timeout > 0) {\n resolve(false);\n }\n }, timeout);\n SyncPromise.all(_this._buffer)\n .then(function () {\n clearTimeout(capturedSetTimeout);\n resolve(true);\n })\n .then(null, function () {\n resolve(true);\n });\n });\n };\n return PromiseBuffer;\n}());\nexport { PromiseBuffer };\n//# sourceMappingURL=promisebuffer.js.map","import { getGlobalObject } from './misc';\nimport { dynamicRequire, isNodeEnv } from './node';\n/**\n * A TimestampSource implementation for environments that do not support the Performance Web API natively.\n *\n * Note that this TimestampSource does not use a monotonic clock. A call to `nowSeconds` may return a timestamp earlier\n * than a previously returned value. We do not try to emulate a monotonic behavior in order to facilitate debugging. It\n * is more obvious to explain \"why does my span have negative duration\" than \"why my spans have zero duration\".\n */\nvar dateTimestampSource = {\n nowSeconds: function () { return Date.now() / 1000; },\n};\n/**\n * Returns a wrapper around the native Performance API browser implementation, or undefined for browsers that do not\n * support the API.\n *\n * Wrapping the native API works around differences in behavior from different browsers.\n */\nfunction getBrowserPerformance() {\n var performance = getGlobalObject().performance;\n if (!performance || !performance.now) {\n return undefined;\n }\n // Replace performance.timeOrigin with our own timeOrigin based on Date.now().\n //\n // This is a partial workaround for browsers reporting performance.timeOrigin such that performance.timeOrigin +\n // performance.now() gives a date arbitrarily in the past.\n //\n // Additionally, computing timeOrigin in this way fills the gap for browsers where performance.timeOrigin is\n // undefined.\n //\n // The assumption that performance.timeOrigin + performance.now() ~= Date.now() is flawed, but we depend on it to\n // interact with data coming out of performance entries.\n //\n // Note that despite recommendations against it in the spec, browsers implement the Performance API with a clock that\n // might stop when the computer is asleep (and perhaps under other circumstances). Such behavior causes\n // performance.timeOrigin + performance.now() to have an arbitrary skew over Date.now(). In laptop computers, we have\n // observed skews that can be as long as days, weeks or months.\n //\n // See https://github.com/getsentry/sentry-javascript/issues/2590.\n //\n // BUG: despite our best intentions, this workaround has its limitations. It mostly addresses timings of pageload\n // transactions, but ignores the skew built up over time that can aversely affect timestamps of navigation\n // transactions of long-lived web pages.\n var timeOrigin = Date.now() - performance.now();\n return {\n now: function () { return performance.now(); },\n timeOrigin: timeOrigin,\n };\n}\n/**\n * Returns the native Performance API implementation from Node.js. Returns undefined in old Node.js versions that don't\n * implement the API.\n */\nfunction getNodePerformance() {\n try {\n var perfHooks = dynamicRequire(module, 'perf_hooks');\n return perfHooks.performance;\n }\n catch (_) {\n return undefined;\n }\n}\n/**\n * The Performance API implementation for the current platform, if available.\n */\nvar platformPerformance = isNodeEnv() ? getNodePerformance() : getBrowserPerformance();\nvar timestampSource = platformPerformance === undefined\n ? dateTimestampSource\n : {\n nowSeconds: function () { return (platformPerformance.timeOrigin + platformPerformance.now()) / 1000; },\n };\n/**\n * Returns a timestamp in seconds since the UNIX epoch using the Date API.\n */\nexport var dateTimestampInSeconds = dateTimestampSource.nowSeconds.bind(dateTimestampSource);\n/**\n * Returns a timestamp in seconds since the UNIX epoch using either the Performance or Date APIs, depending on the\n * availability of the Performance API.\n *\n * See `usingPerformanceAPI` to test whether the Performance API is used.\n *\n * BUG: Note that because of how browsers implement the Performance API, the clock might stop when the computer is\n * asleep. This creates a skew between `dateTimestampInSeconds` and `timestampInSeconds`. The\n * skew can grow to arbitrary amounts like days, weeks or months.\n * See https://github.com/getsentry/sentry-javascript/issues/2590.\n */\nexport var timestampInSeconds = timestampSource.nowSeconds.bind(timestampSource);\n// Re-exported with an old name for backwards-compatibility.\nexport var timestampWithMs = timestampInSeconds;\n/**\n * A boolean that is true when timestampInSeconds uses the Performance API to produce monotonic timestamps.\n */\nexport var usingPerformanceAPI = platformPerformance !== undefined;\n/**\n * The number of milliseconds since the UNIX epoch. This value is only usable in a browser, and only when the\n * performance API is available.\n */\nexport var browserPerformanceTimeOrigin = (function () {\n var performance = getGlobalObject().performance;\n if (!performance) {\n return undefined;\n }\n if (performance.timeOrigin) {\n return performance.timeOrigin;\n }\n // While performance.timing.navigationStart is deprecated in favor of performance.timeOrigin, performance.timeOrigin\n // is not as widely supported. Namely, performance.timeOrigin is undefined in Safari as of writing.\n // Also as of writing, performance.timing is not available in Web Workers in mainstream browsers, so it is not always\n // a valid fallback. In the absence of an initial time provided by the browser, fallback to the current time from the\n // Date API.\n // eslint-disable-next-line deprecation/deprecation\n return (performance.timing && performance.timing.navigationStart) || Date.now();\n})();\n//# sourceMappingURL=time.js.map","import { __assign, __read, __spread } from \"tslib\";\nimport { dateTimestampInSeconds, getGlobalObject, isPlainObject, isThenable, SyncPromise } from '@sentry/utils';\n/**\n * Holds additional event information. {@link Scope.applyToEvent} will be\n * called by the client before an event will be sent.\n */\nvar Scope = /** @class */ (function () {\n function Scope() {\n /** Flag if notifiying is happening. */\n this._notifyingListeners = false;\n /** Callback for client to receive scope changes. */\n this._scopeListeners = [];\n /** Callback list that will be called after {@link applyToEvent}. */\n this._eventProcessors = [];\n /** Array of breadcrumbs. */\n this._breadcrumbs = [];\n /** User */\n this._user = {};\n /** Tags */\n this._tags = {};\n /** Extra */\n this._extra = {};\n /** Contexts */\n this._contexts = {};\n }\n /**\n * Inherit values from the parent scope.\n * @param scope to clone.\n */\n Scope.clone = function (scope) {\n var newScope = new Scope();\n if (scope) {\n newScope._breadcrumbs = __spread(scope._breadcrumbs);\n newScope._tags = __assign({}, scope._tags);\n newScope._extra = __assign({}, scope._extra);\n newScope._contexts = __assign({}, scope._contexts);\n newScope._user = scope._user;\n newScope._level = scope._level;\n newScope._span = scope._span;\n newScope._session = scope._session;\n newScope._transactionName = scope._transactionName;\n newScope._fingerprint = scope._fingerprint;\n newScope._eventProcessors = __spread(scope._eventProcessors);\n }\n return newScope;\n };\n /**\n * Add internal on change listener. Used for sub SDKs that need to store the scope.\n * @hidden\n */\n Scope.prototype.addScopeListener = function (callback) {\n this._scopeListeners.push(callback);\n };\n /**\n * @inheritDoc\n */\n Scope.prototype.addEventProcessor = function (callback) {\n this._eventProcessors.push(callback);\n return this;\n };\n /**\n * @inheritDoc\n */\n Scope.prototype.setUser = function (user) {\n this._user = user || {};\n if (this._session) {\n this._session.update({ user: user });\n }\n this._notifyScopeListeners();\n return this;\n };\n /**\n * @inheritDoc\n */\n Scope.prototype.getUser = function () {\n return this._user;\n };\n /**\n * @inheritDoc\n */\n Scope.prototype.setTags = function (tags) {\n this._tags = __assign(__assign({}, this._tags), tags);\n this._notifyScopeListeners();\n return this;\n };\n /**\n * @inheritDoc\n */\n Scope.prototype.setTag = function (key, value) {\n var _a;\n this._tags = __assign(__assign({}, this._tags), (_a = {}, _a[key] = value, _a));\n this._notifyScopeListeners();\n return this;\n };\n /**\n * @inheritDoc\n */\n Scope.prototype.setExtras = function (extras) {\n this._extra = __assign(__assign({}, this._extra), extras);\n this._notifyScopeListeners();\n return this;\n };\n /**\n * @inheritDoc\n */\n Scope.prototype.setExtra = function (key, extra) {\n var _a;\n this._extra = __assign(__assign({}, this._extra), (_a = {}, _a[key] = extra, _a));\n this._notifyScopeListeners();\n return this;\n };\n /**\n * @inheritDoc\n */\n Scope.prototype.setFingerprint = function (fingerprint) {\n this._fingerprint = fingerprint;\n this._notifyScopeListeners();\n return this;\n };\n /**\n * @inheritDoc\n */\n Scope.prototype.setLevel = function (level) {\n this._level = level;\n this._notifyScopeListeners();\n return this;\n };\n /**\n * @inheritDoc\n */\n Scope.prototype.setTransactionName = function (name) {\n this._transactionName = name;\n this._notifyScopeListeners();\n return this;\n };\n /**\n * Can be removed in major version.\n * @deprecated in favor of {@link this.setTransactionName}\n */\n Scope.prototype.setTransaction = function (name) {\n return this.setTransactionName(name);\n };\n /**\n * @inheritDoc\n */\n Scope.prototype.setContext = function (key, context) {\n var _a;\n if (context === null) {\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete this._contexts[key];\n }\n else {\n this._contexts = __assign(__assign({}, this._contexts), (_a = {}, _a[key] = context, _a));\n }\n this._notifyScopeListeners();\n return this;\n };\n /**\n * @inheritDoc\n */\n Scope.prototype.setSpan = function (span) {\n this._span = span;\n this._notifyScopeListeners();\n return this;\n };\n /**\n * @inheritDoc\n */\n Scope.prototype.getSpan = function () {\n return this._span;\n };\n /**\n * @inheritDoc\n */\n Scope.prototype.getTransaction = function () {\n var _a, _b, _c, _d;\n // often, this span will be a transaction, but it's not guaranteed to be\n var span = this.getSpan();\n // try it the new way first\n if ((_a = span) === null || _a === void 0 ? void 0 : _a.transaction) {\n return (_b = span) === null || _b === void 0 ? void 0 : _b.transaction;\n }\n // fallback to the old way (known bug: this only finds transactions with sampled = true)\n if ((_d = (_c = span) === null || _c === void 0 ? void 0 : _c.spanRecorder) === null || _d === void 0 ? void 0 : _d.spans[0]) {\n return span.spanRecorder.spans[0];\n }\n // neither way found a transaction\n return undefined;\n };\n /**\n * @inheritDoc\n */\n Scope.prototype.setSession = function (session) {\n if (!session) {\n delete this._session;\n }\n else {\n this._session = session;\n }\n this._notifyScopeListeners();\n return this;\n };\n /**\n * @inheritDoc\n */\n Scope.prototype.getSession = function () {\n return this._session;\n };\n /**\n * @inheritDoc\n */\n Scope.prototype.update = function (captureContext) {\n if (!captureContext) {\n return this;\n }\n if (typeof captureContext === 'function') {\n var updatedScope = captureContext(this);\n return updatedScope instanceof Scope ? updatedScope : this;\n }\n if (captureContext instanceof Scope) {\n this._tags = __assign(__assign({}, this._tags), captureContext._tags);\n this._extra = __assign(__assign({}, this._extra), captureContext._extra);\n this._contexts = __assign(__assign({}, this._contexts), captureContext._contexts);\n if (captureContext._user && Object.keys(captureContext._user).length) {\n this._user = captureContext._user;\n }\n if (captureContext._level) {\n this._level = captureContext._level;\n }\n if (captureContext._fingerprint) {\n this._fingerprint = captureContext._fingerprint;\n }\n }\n else if (isPlainObject(captureContext)) {\n // eslint-disable-next-line no-param-reassign\n captureContext = captureContext;\n this._tags = __assign(__assign({}, this._tags), captureContext.tags);\n this._extra = __assign(__assign({}, this._extra), captureContext.extra);\n this._contexts = __assign(__assign({}, this._contexts), captureContext.contexts);\n if (captureContext.user) {\n this._user = captureContext.user;\n }\n if (captureContext.level) {\n this._level = captureContext.level;\n }\n if (captureContext.fingerprint) {\n this._fingerprint = captureContext.fingerprint;\n }\n }\n return this;\n };\n /**\n * @inheritDoc\n */\n Scope.prototype.clear = function () {\n this._breadcrumbs = [];\n this._tags = {};\n this._extra = {};\n this._user = {};\n this._contexts = {};\n this._level = undefined;\n this._transactionName = undefined;\n this._fingerprint = undefined;\n this._span = undefined;\n this._session = undefined;\n this._notifyScopeListeners();\n return this;\n };\n /**\n * @inheritDoc\n */\n Scope.prototype.addBreadcrumb = function (breadcrumb, maxBreadcrumbs) {\n var mergedBreadcrumb = __assign({ timestamp: dateTimestampInSeconds() }, breadcrumb);\n this._breadcrumbs =\n maxBreadcrumbs !== undefined && maxBreadcrumbs >= 0\n ? __spread(this._breadcrumbs, [mergedBreadcrumb]).slice(-maxBreadcrumbs)\n : __spread(this._breadcrumbs, [mergedBreadcrumb]);\n this._notifyScopeListeners();\n return this;\n };\n /**\n * @inheritDoc\n */\n Scope.prototype.clearBreadcrumbs = function () {\n this._breadcrumbs = [];\n this._notifyScopeListeners();\n return this;\n };\n /**\n * Applies the current context and fingerprint to the event.\n * Note that breadcrumbs will be added by the client.\n * Also if the event has already breadcrumbs on it, we do not merge them.\n * @param event Event\n * @param hint May contain additional informartion about the original exception.\n * @hidden\n */\n Scope.prototype.applyToEvent = function (event, hint) {\n var _a;\n if (this._extra && Object.keys(this._extra).length) {\n event.extra = __assign(__assign({}, this._extra), event.extra);\n }\n if (this._tags && Object.keys(this._tags).length) {\n event.tags = __assign(__assign({}, this._tags), event.tags);\n }\n if (this._user && Object.keys(this._user).length) {\n event.user = __assign(__assign({}, this._user), event.user);\n }\n if (this._contexts && Object.keys(this._contexts).length) {\n event.contexts = __assign(__assign({}, this._contexts), event.contexts);\n }\n if (this._level) {\n event.level = this._level;\n }\n if (this._transactionName) {\n event.transaction = this._transactionName;\n }\n // We want to set the trace context for normal events only if there isn't already\n // a trace context on the event. There is a product feature in place where we link\n // errors with transaction and it relys on that.\n if (this._span) {\n event.contexts = __assign({ trace: this._span.getTraceContext() }, event.contexts);\n var transactionName = (_a = this._span.transaction) === null || _a === void 0 ? void 0 : _a.name;\n if (transactionName) {\n event.tags = __assign({ transaction: transactionName }, event.tags);\n }\n }\n this._applyFingerprint(event);\n event.breadcrumbs = __spread((event.breadcrumbs || []), this._breadcrumbs);\n event.breadcrumbs = event.breadcrumbs.length > 0 ? event.breadcrumbs : undefined;\n return this._notifyEventProcessors(__spread(getGlobalEventProcessors(), this._eventProcessors), event, hint);\n };\n /**\n * This will be called after {@link applyToEvent} is finished.\n */\n Scope.prototype._notifyEventProcessors = function (processors, event, hint, index) {\n var _this = this;\n if (index === void 0) { index = 0; }\n return new SyncPromise(function (resolve, reject) {\n var processor = processors[index];\n if (event === null || typeof processor !== 'function') {\n resolve(event);\n }\n else {\n var result = processor(__assign({}, event), hint);\n if (isThenable(result)) {\n result\n .then(function (final) { return _this._notifyEventProcessors(processors, final, hint, index + 1).then(resolve); })\n .then(null, reject);\n }\n else {\n _this._notifyEventProcessors(processors, result, hint, index + 1)\n .then(resolve)\n .then(null, reject);\n }\n }\n });\n };\n /**\n * This will be called on every set call.\n */\n Scope.prototype._notifyScopeListeners = function () {\n var _this = this;\n // We need this check for this._notifyingListeners to be able to work on scope during updates\n // If this check is not here we'll produce endless recursion when something is done with the scope\n // during the callback.\n if (!this._notifyingListeners) {\n this._notifyingListeners = true;\n this._scopeListeners.forEach(function (callback) {\n callback(_this);\n });\n this._notifyingListeners = false;\n }\n };\n /**\n * Applies fingerprint from the scope to the event if there's one,\n * uses message if there's one instead or get rid of empty fingerprint\n */\n Scope.prototype._applyFingerprint = function (event) {\n // Make sure it's an array first and we actually have something in place\n event.fingerprint = event.fingerprint\n ? Array.isArray(event.fingerprint)\n ? event.fingerprint\n : [event.fingerprint]\n : [];\n // If we have something on the scope, then merge it with event\n if (this._fingerprint) {\n event.fingerprint = event.fingerprint.concat(this._fingerprint);\n }\n // If we have no data at all, remove empty array default\n if (event.fingerprint && !event.fingerprint.length) {\n delete event.fingerprint;\n }\n };\n return Scope;\n}());\nexport { Scope };\n/**\n * Retruns the global event processors.\n */\nfunction getGlobalEventProcessors() {\n /* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access */\n var global = getGlobalObject();\n global.__SENTRY__ = global.__SENTRY__ || {};\n global.__SENTRY__.globalEventProcessors = global.__SENTRY__.globalEventProcessors || [];\n return global.__SENTRY__.globalEventProcessors;\n /* eslint-enable @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access */\n}\n/**\n * Add a EventProcessor to be kept globally.\n * @param callback EventProcessor to add\n */\nexport function addGlobalEventProcessor(callback) {\n getGlobalEventProcessors().push(callback);\n}\n//# sourceMappingURL=scope.js.map","import { SessionStatus } from '@sentry/types';\nimport { dropUndefinedKeys, uuid4 } from '@sentry/utils';\n/**\n * @inheritdoc\n */\nvar Session = /** @class */ (function () {\n function Session(context) {\n this.errors = 0;\n this.sid = uuid4();\n this.timestamp = Date.now();\n this.started = Date.now();\n this.duration = 0;\n this.status = SessionStatus.Ok;\n if (context) {\n this.update(context);\n }\n }\n /** JSDoc */\n // eslint-disable-next-line complexity\n Session.prototype.update = function (context) {\n if (context === void 0) { context = {}; }\n if (context.user) {\n if (context.user.ip_address) {\n this.ipAddress = context.user.ip_address;\n }\n if (!context.did) {\n this.did = context.user.id || context.user.email || context.user.username;\n }\n }\n this.timestamp = context.timestamp || Date.now();\n if (context.sid) {\n // Good enough uuid validation. — Kamil\n this.sid = context.sid.length === 32 ? context.sid : uuid4();\n }\n if (context.did) {\n this.did = \"\" + context.did;\n }\n if (typeof context.started === 'number') {\n this.started = context.started;\n }\n if (typeof context.duration === 'number') {\n this.duration = context.duration;\n }\n else {\n this.duration = this.timestamp - this.started;\n }\n if (context.release) {\n this.release = context.release;\n }\n if (context.environment) {\n this.environment = context.environment;\n }\n if (context.ipAddress) {\n this.ipAddress = context.ipAddress;\n }\n if (context.userAgent) {\n this.userAgent = context.userAgent;\n }\n if (typeof context.errors === 'number') {\n this.errors = context.errors;\n }\n if (context.status) {\n this.status = context.status;\n }\n };\n /** JSDoc */\n Session.prototype.close = function (status) {\n if (status) {\n this.update({ status: status });\n }\n else if (this.status === SessionStatus.Ok) {\n this.update({ status: SessionStatus.Exited });\n }\n else {\n this.update();\n }\n };\n /** JSDoc */\n Session.prototype.toJSON = function () {\n return dropUndefinedKeys({\n sid: \"\" + this.sid,\n init: true,\n started: new Date(this.started).toISOString(),\n timestamp: new Date(this.timestamp).toISOString(),\n status: this.status,\n errors: this.errors,\n did: typeof this.did === 'number' || typeof this.did === 'string' ? \"\" + this.did : undefined,\n duration: this.duration,\n attrs: dropUndefinedKeys({\n release: this.release,\n environment: this.environment,\n ip_address: this.ipAddress,\n user_agent: this.userAgent,\n }),\n });\n };\n return Session;\n}());\nexport { Session };\n//# sourceMappingURL=session.js.map","import { __assign, __read, __spread } from \"tslib\";\nimport { consoleSandbox, dateTimestampInSeconds, getGlobalObject, isNodeEnv, logger, uuid4 } from '@sentry/utils';\nimport { Scope } from './scope';\nimport { Session } from './session';\n/**\n * API compatibility version of this hub.\n *\n * WARNING: This number should only be increased when the global interface\n * changes and new methods are introduced.\n *\n * @hidden\n */\nexport var API_VERSION = 3;\n/**\n * Default maximum number of breadcrumbs added to an event. Can be overwritten\n * with {@link Options.maxBreadcrumbs}.\n */\nvar DEFAULT_BREADCRUMBS = 100;\n/**\n * Absolute maximum number of breadcrumbs added to an event. The\n * `maxBreadcrumbs` option cannot be higher than this value.\n */\nvar MAX_BREADCRUMBS = 100;\n/**\n * @inheritDoc\n */\nvar Hub = /** @class */ (function () {\n /**\n * Creates a new instance of the hub, will push one {@link Layer} into the\n * internal stack on creation.\n *\n * @param client bound to the hub.\n * @param scope bound to the hub.\n * @param version number, higher number means higher priority.\n */\n function Hub(client, scope, _version) {\n if (scope === void 0) { scope = new Scope(); }\n if (_version === void 0) { _version = API_VERSION; }\n this._version = _version;\n /** Is a {@link Layer}[] containing the client and scope */\n this._stack = [{}];\n this.getStackTop().scope = scope;\n this.bindClient(client);\n }\n /**\n * @inheritDoc\n */\n Hub.prototype.isOlderThan = function (version) {\n return this._version < version;\n };\n /**\n * @inheritDoc\n */\n Hub.prototype.bindClient = function (client) {\n var top = this.getStackTop();\n top.client = client;\n if (client && client.setupIntegrations) {\n client.setupIntegrations();\n }\n };\n /**\n * @inheritDoc\n */\n Hub.prototype.pushScope = function () {\n // We want to clone the content of prev scope\n var scope = Scope.clone(this.getScope());\n this.getStack().push({\n client: this.getClient(),\n scope: scope,\n });\n return scope;\n };\n /**\n * @inheritDoc\n */\n Hub.prototype.popScope = function () {\n if (this.getStack().length <= 1)\n return false;\n return !!this.getStack().pop();\n };\n /**\n * @inheritDoc\n */\n Hub.prototype.withScope = function (callback) {\n var scope = this.pushScope();\n try {\n callback(scope);\n }\n finally {\n this.popScope();\n }\n };\n /**\n * @inheritDoc\n */\n Hub.prototype.getClient = function () {\n return this.getStackTop().client;\n };\n /** Returns the scope of the top stack. */\n Hub.prototype.getScope = function () {\n return this.getStackTop().scope;\n };\n /** Returns the scope stack for domains or the process. */\n Hub.prototype.getStack = function () {\n return this._stack;\n };\n /** Returns the topmost scope layer in the order domain > local > process. */\n Hub.prototype.getStackTop = function () {\n return this._stack[this._stack.length - 1];\n };\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types\n Hub.prototype.captureException = function (exception, hint) {\n var eventId = (this._lastEventId = uuid4());\n var finalHint = hint;\n // If there's no explicit hint provided, mimick the same thing that would happen\n // in the minimal itself to create a consistent behavior.\n // We don't do this in the client, as it's the lowest level API, and doing this,\n // would prevent user from having full control over direct calls.\n if (!hint) {\n var syntheticException = void 0;\n try {\n throw new Error('Sentry syntheticException');\n }\n catch (exception) {\n syntheticException = exception;\n }\n finalHint = {\n originalException: exception,\n syntheticException: syntheticException,\n };\n }\n this._invokeClient('captureException', exception, __assign(__assign({}, finalHint), { event_id: eventId }));\n return eventId;\n };\n /**\n * @inheritDoc\n */\n Hub.prototype.captureMessage = function (message, level, hint) {\n var eventId = (this._lastEventId = uuid4());\n var finalHint = hint;\n // If there's no explicit hint provided, mimick the same thing that would happen\n // in the minimal itself to create a consistent behavior.\n // We don't do this in the client, as it's the lowest level API, and doing this,\n // would prevent user from having full control over direct calls.\n if (!hint) {\n var syntheticException = void 0;\n try {\n throw new Error(message);\n }\n catch (exception) {\n syntheticException = exception;\n }\n finalHint = {\n originalException: message,\n syntheticException: syntheticException,\n };\n }\n this._invokeClient('captureMessage', message, level, __assign(__assign({}, finalHint), { event_id: eventId }));\n return eventId;\n };\n /**\n * @inheritDoc\n */\n Hub.prototype.captureEvent = function (event, hint) {\n var eventId = (this._lastEventId = uuid4());\n this._invokeClient('captureEvent', event, __assign(__assign({}, hint), { event_id: eventId }));\n return eventId;\n };\n /**\n * @inheritDoc\n */\n Hub.prototype.lastEventId = function () {\n return this._lastEventId;\n };\n /**\n * @inheritDoc\n */\n Hub.prototype.addBreadcrumb = function (breadcrumb, hint) {\n var _a = this.getStackTop(), scope = _a.scope, client = _a.client;\n if (!scope || !client)\n return;\n // eslint-disable-next-line @typescript-eslint/unbound-method\n var _b = (client.getOptions && client.getOptions()) || {}, _c = _b.beforeBreadcrumb, beforeBreadcrumb = _c === void 0 ? null : _c, _d = _b.maxBreadcrumbs, maxBreadcrumbs = _d === void 0 ? DEFAULT_BREADCRUMBS : _d;\n if (maxBreadcrumbs <= 0)\n return;\n var timestamp = dateTimestampInSeconds();\n var mergedBreadcrumb = __assign({ timestamp: timestamp }, breadcrumb);\n var finalBreadcrumb = beforeBreadcrumb\n ? consoleSandbox(function () { return beforeBreadcrumb(mergedBreadcrumb, hint); })\n : mergedBreadcrumb;\n if (finalBreadcrumb === null)\n return;\n scope.addBreadcrumb(finalBreadcrumb, Math.min(maxBreadcrumbs, MAX_BREADCRUMBS));\n };\n /**\n * @inheritDoc\n */\n Hub.prototype.setUser = function (user) {\n var scope = this.getScope();\n if (scope)\n scope.setUser(user);\n };\n /**\n * @inheritDoc\n */\n Hub.prototype.setTags = function (tags) {\n var scope = this.getScope();\n if (scope)\n scope.setTags(tags);\n };\n /**\n * @inheritDoc\n */\n Hub.prototype.setExtras = function (extras) {\n var scope = this.getScope();\n if (scope)\n scope.setExtras(extras);\n };\n /**\n * @inheritDoc\n */\n Hub.prototype.setTag = function (key, value) {\n var scope = this.getScope();\n if (scope)\n scope.setTag(key, value);\n };\n /**\n * @inheritDoc\n */\n Hub.prototype.setExtra = function (key, extra) {\n var scope = this.getScope();\n if (scope)\n scope.setExtra(key, extra);\n };\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n Hub.prototype.setContext = function (name, context) {\n var scope = this.getScope();\n if (scope)\n scope.setContext(name, context);\n };\n /**\n * @inheritDoc\n */\n Hub.prototype.configureScope = function (callback) {\n var _a = this.getStackTop(), scope = _a.scope, client = _a.client;\n if (scope && client) {\n callback(scope);\n }\n };\n /**\n * @inheritDoc\n */\n Hub.prototype.run = function (callback) {\n var oldHub = makeMain(this);\n try {\n callback(this);\n }\n finally {\n makeMain(oldHub);\n }\n };\n /**\n * @inheritDoc\n */\n Hub.prototype.getIntegration = function (integration) {\n var client = this.getClient();\n if (!client)\n return null;\n try {\n return client.getIntegration(integration);\n }\n catch (_oO) {\n logger.warn(\"Cannot retrieve integration \" + integration.id + \" from the current Hub\");\n return null;\n }\n };\n /**\n * @inheritDoc\n */\n Hub.prototype.startSpan = function (context) {\n return this._callExtensionMethod('startSpan', context);\n };\n /**\n * @inheritDoc\n */\n Hub.prototype.startTransaction = function (context, customSamplingContext) {\n return this._callExtensionMethod('startTransaction', context, customSamplingContext);\n };\n /**\n * @inheritDoc\n */\n Hub.prototype.traceHeaders = function () {\n return this._callExtensionMethod('traceHeaders');\n };\n /**\n * @inheritDoc\n */\n Hub.prototype.startSession = function (context) {\n // End existing session if there's one\n this.endSession();\n var _a = this.getStackTop(), scope = _a.scope, client = _a.client;\n var _b = (client && client.getOptions()) || {}, release = _b.release, environment = _b.environment;\n var session = new Session(__assign(__assign({ release: release,\n environment: environment }, (scope && { user: scope.getUser() })), context));\n if (scope) {\n scope.setSession(session);\n }\n return session;\n };\n /**\n * @inheritDoc\n */\n Hub.prototype.endSession = function () {\n var _a = this.getStackTop(), scope = _a.scope, client = _a.client;\n if (!scope)\n return;\n var session = scope.getSession && scope.getSession();\n if (session) {\n session.close();\n if (client && client.captureSession) {\n client.captureSession(session);\n }\n scope.setSession();\n }\n };\n /**\n * Internal helper function to call a method on the top client if it exists.\n *\n * @param method The method to call on the client.\n * @param args Arguments to pass to the client function.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n Hub.prototype._invokeClient = function (method) {\n var _a;\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n var _b = this.getStackTop(), scope = _b.scope, client = _b.client;\n if (client && client[method]) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-explicit-any\n (_a = client)[method].apply(_a, __spread(args, [scope]));\n }\n };\n /**\n * Calls global extension method and binding current instance to the function call\n */\n // @ts-ignore Function lacks ending return statement and return type does not include 'undefined'. ts(2366)\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n Hub.prototype._callExtensionMethod = function (method) {\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n var carrier = getMainCarrier();\n var sentry = carrier.__SENTRY__;\n if (sentry && sentry.extensions && typeof sentry.extensions[method] === 'function') {\n return sentry.extensions[method].apply(this, args);\n }\n logger.warn(\"Extension method \" + method + \" couldn't be found, doing nothing.\");\n };\n return Hub;\n}());\nexport { Hub };\n/** Returns the global shim registry. */\nexport function getMainCarrier() {\n var carrier = getGlobalObject();\n carrier.__SENTRY__ = carrier.__SENTRY__ || {\n extensions: {},\n hub: undefined,\n };\n return carrier;\n}\n/**\n * Replaces the current main hub with the passed one on the global object\n *\n * @returns The old replaced hub\n */\nexport function makeMain(hub) {\n var registry = getMainCarrier();\n var oldHub = getHubFromCarrier(registry);\n setHubOnCarrier(registry, hub);\n return oldHub;\n}\n/**\n * Returns the default hub instance.\n *\n * If a hub is already registered in the global carrier but this module\n * contains a more recent version, it replaces the registered version.\n * Otherwise, the currently registered hub will be returned.\n */\nexport function getCurrentHub() {\n // Get main carrier (global for every environment)\n var registry = getMainCarrier();\n // If there's no hub, or its an old API, assign a new one\n if (!hasHubOnCarrier(registry) || getHubFromCarrier(registry).isOlderThan(API_VERSION)) {\n setHubOnCarrier(registry, new Hub());\n }\n // Prefer domains over global if they are there (applicable only to Node environment)\n if (isNodeEnv()) {\n return getHubFromActiveDomain(registry);\n }\n // Return hub that lives on a global object\n return getHubFromCarrier(registry);\n}\n/**\n * Returns the active domain, if one exists\n *\n * @returns The domain, or undefined if there is no active domain\n */\nexport function getActiveDomain() {\n var sentry = getMainCarrier().__SENTRY__;\n return sentry && sentry.extensions && sentry.extensions.domain && sentry.extensions.domain.active;\n}\n/**\n * Try to read the hub from an active domain, and fallback to the registry if one doesn't exist\n * @returns discovered hub\n */\nfunction getHubFromActiveDomain(registry) {\n try {\n var activeDomain = getActiveDomain();\n // If there's no active domain, just return global hub\n if (!activeDomain) {\n return getHubFromCarrier(registry);\n }\n // If there's no hub on current domain, or it's an old API, assign a new one\n if (!hasHubOnCarrier(activeDomain) || getHubFromCarrier(activeDomain).isOlderThan(API_VERSION)) {\n var registryHubTopStack = getHubFromCarrier(registry).getStackTop();\n setHubOnCarrier(activeDomain, new Hub(registryHubTopStack.client, Scope.clone(registryHubTopStack.scope)));\n }\n // Return hub that lives on a domain\n return getHubFromCarrier(activeDomain);\n }\n catch (_Oo) {\n // Return hub that lives on a global object\n return getHubFromCarrier(registry);\n }\n}\n/**\n * This will tell whether a carrier has a hub on it or not\n * @param carrier object\n */\nfunction hasHubOnCarrier(carrier) {\n return !!(carrier && carrier.__SENTRY__ && carrier.__SENTRY__.hub);\n}\n/**\n * This will create a new {@link Hub} and add to the passed object on\n * __SENTRY__.hub.\n * @param carrier object\n * @hidden\n */\nexport function getHubFromCarrier(carrier) {\n if (carrier && carrier.__SENTRY__ && carrier.__SENTRY__.hub)\n return carrier.__SENTRY__.hub;\n carrier.__SENTRY__ = carrier.__SENTRY__ || {};\n carrier.__SENTRY__.hub = new Hub();\n return carrier.__SENTRY__.hub;\n}\n/**\n * This will set passed {@link Hub} on the passed object's __SENTRY__.hub attribute\n * @param carrier object\n * @param hub Hub\n */\nexport function setHubOnCarrier(carrier, hub) {\n if (!carrier)\n return false;\n carrier.__SENTRY__ = carrier.__SENTRY__ || {};\n carrier.__SENTRY__.hub = hub;\n return true;\n}\n//# sourceMappingURL=hub.js.map","import { __assign, __read, __spread } from \"tslib\";\nimport { getCurrentHub } from '@sentry/hub';\n/**\n * This calls a function on the current hub.\n * @param method function to call on hub.\n * @param args to pass to function.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction callOnHub(method) {\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n var hub = getCurrentHub();\n if (hub && hub[method]) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return hub[method].apply(hub, __spread(args));\n }\n throw new Error(\"No hub defined or \" + method + \" was not found on the hub, please open a bug report.\");\n}\n/**\n * Captures an exception event and sends it to Sentry.\n *\n * @param exception An exception-like object.\n * @returns The generated eventId.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types\nexport function captureException(exception, captureContext) {\n var syntheticException;\n try {\n throw new Error('Sentry syntheticException');\n }\n catch (exception) {\n syntheticException = exception;\n }\n return callOnHub('captureException', exception, {\n captureContext: captureContext,\n originalException: exception,\n syntheticException: syntheticException,\n });\n}\n/**\n * Captures a message event and sends it to Sentry.\n *\n * @param message The message to send to Sentry.\n * @param level Define the level of the message.\n * @returns The generated eventId.\n */\nexport function captureMessage(message, captureContext) {\n var syntheticException;\n try {\n throw new Error(message);\n }\n catch (exception) {\n syntheticException = exception;\n }\n // This is necessary to provide explicit scopes upgrade, without changing the original\n // arity of the `captureMessage(message, level)` method.\n var level = typeof captureContext === 'string' ? captureContext : undefined;\n var context = typeof captureContext !== 'string' ? { captureContext: captureContext } : undefined;\n return callOnHub('captureMessage', message, level, __assign({ originalException: message, syntheticException: syntheticException }, context));\n}\n/**\n * Captures a manually created event and sends it to Sentry.\n *\n * @param event The event to send to Sentry.\n * @returns The generated eventId.\n */\nexport function captureEvent(event) {\n return callOnHub('captureEvent', event);\n}\n/**\n * Callback to set context information onto the scope.\n * @param callback Callback function that receives Scope.\n */\nexport function configureScope(callback) {\n callOnHub('configureScope', callback);\n}\n/**\n * Records a new breadcrumb which will be attached to future events.\n *\n * Breadcrumbs will be added to subsequent events to provide more context on\n * user's actions prior to an error or crash.\n *\n * @param breadcrumb The breadcrumb to record.\n */\nexport function addBreadcrumb(breadcrumb) {\n callOnHub('addBreadcrumb', breadcrumb);\n}\n/**\n * Sets context data with the given name.\n * @param name of the context\n * @param context Any kind of data. This data will be normalized.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function setContext(name, context) {\n callOnHub('setContext', name, context);\n}\n/**\n * Set an object that will be merged sent as extra data with the event.\n * @param extras Extras object to merge into current context.\n */\nexport function setExtras(extras) {\n callOnHub('setExtras', extras);\n}\n/**\n * Set an object that will be merged sent as tags data with the event.\n * @param tags Tags context object to merge into current context.\n */\nexport function setTags(tags) {\n callOnHub('setTags', tags);\n}\n/**\n * Set key:value that will be sent as extra data with the event.\n * @param key String of extra\n * @param extra Any kind of data. This data will be normalized.\n */\nexport function setExtra(key, extra) {\n callOnHub('setExtra', key, extra);\n}\n/**\n * Set key:value that will be sent as tags data with the event.\n *\n * Can also be used to unset a tag, by passing `undefined`.\n *\n * @param key String key of tag\n * @param value Value of tag\n */\nexport function setTag(key, value) {\n callOnHub('setTag', key, value);\n}\n/**\n * Updates user context information for future events.\n *\n * @param user User context object to be set in the current context. Pass `null` to unset the user.\n */\nexport function setUser(user) {\n callOnHub('setUser', user);\n}\n/**\n * Creates a new scope with and executes the given operation within.\n * The scope is automatically removed once the operation\n * finishes or throws.\n *\n * This is essentially a convenience function for:\n *\n * pushScope();\n * callback();\n * popScope();\n *\n * @param callback that will be enclosed into push/popScope.\n */\nexport function withScope(callback) {\n callOnHub('withScope', callback);\n}\n/**\n * Calls a function on the latest client. Use this with caution, it's meant as\n * in \"internal\" helper so we don't need to expose every possible function in\n * the shim. It is not guaranteed that the client actually implements the\n * function.\n *\n * @param method The method to call on the client/client.\n * @param args Arguments to pass to the client/fontend.\n * @hidden\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function _callOnClient(method) {\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n callOnHub.apply(void 0, __spread(['_invokeClient', method], args));\n}\n/**\n * Starts a new `Transaction` and returns it. This is the entry point to manual tracing instrumentation.\n *\n * A tree structure can be built by adding child spans to the transaction, and child spans to other spans. To start a\n * new child span within the transaction or any span, call the respective `.startChild()` method.\n *\n * Every child span must be finished before the transaction is finished, otherwise the unfinished spans are discarded.\n *\n * The transaction must be finished with a call to its `.finish()` method, at which point the transaction with all its\n * finished child spans will be sent to Sentry.\n *\n * @param context Properties of the new `Transaction`.\n * @param customSamplingContext Information given to the transaction sampling function (along with context-dependent\n * default values). See {@link Options.tracesSampler}.\n *\n * @returns The transaction which was just started\n */\nexport function startTransaction(context, customSamplingContext) {\n return callOnHub('startTransaction', __assign({}, context), customSamplingContext);\n}\n//# sourceMappingURL=index.js.map","import { Dsn, urlEncode } from '@sentry/utils';\nvar SENTRY_API_VERSION = '7';\n/** Helper class to provide urls to different Sentry endpoints. */\nvar API = /** @class */ (function () {\n /** Create a new instance of API */\n function API(dsn) {\n this.dsn = dsn;\n this._dsnObject = new Dsn(dsn);\n }\n /** Returns the Dsn object. */\n API.prototype.getDsn = function () {\n return this._dsnObject;\n };\n /** Returns the prefix to construct Sentry ingestion API endpoints. */\n API.prototype.getBaseApiEndpoint = function () {\n var dsn = this._dsnObject;\n var protocol = dsn.protocol ? dsn.protocol + \":\" : '';\n var port = dsn.port ? \":\" + dsn.port : '';\n return protocol + \"//\" + dsn.host + port + (dsn.path ? \"/\" + dsn.path : '') + \"/api/\";\n };\n /** Returns the store endpoint URL. */\n API.prototype.getStoreEndpoint = function () {\n return this._getIngestEndpoint('store');\n };\n /**\n * Returns the store endpoint URL with auth in the query string.\n *\n * Sending auth as part of the query string and not as custom HTTP headers avoids CORS preflight requests.\n */\n API.prototype.getStoreEndpointWithUrlEncodedAuth = function () {\n return this.getStoreEndpoint() + \"?\" + this._encodedAuth();\n };\n /**\n * Returns the envelope endpoint URL with auth in the query string.\n *\n * Sending auth as part of the query string and not as custom HTTP headers avoids CORS preflight requests.\n */\n API.prototype.getEnvelopeEndpointWithUrlEncodedAuth = function () {\n return this._getEnvelopeEndpoint() + \"?\" + this._encodedAuth();\n };\n /** Returns only the path component for the store endpoint. */\n API.prototype.getStoreEndpointPath = function () {\n var dsn = this._dsnObject;\n return (dsn.path ? \"/\" + dsn.path : '') + \"/api/\" + dsn.projectId + \"/store/\";\n };\n /**\n * Returns an object that can be used in request headers.\n * This is needed for node and the old /store endpoint in sentry\n */\n API.prototype.getRequestHeaders = function (clientName, clientVersion) {\n var dsn = this._dsnObject;\n var header = [\"Sentry sentry_version=\" + SENTRY_API_VERSION];\n header.push(\"sentry_client=\" + clientName + \"/\" + clientVersion);\n header.push(\"sentry_key=\" + dsn.user);\n if (dsn.pass) {\n header.push(\"sentry_secret=\" + dsn.pass);\n }\n return {\n 'Content-Type': 'application/json',\n 'X-Sentry-Auth': header.join(', '),\n };\n };\n /** Returns the url to the report dialog endpoint. */\n API.prototype.getReportDialogEndpoint = function (dialogOptions) {\n if (dialogOptions === void 0) { dialogOptions = {}; }\n var dsn = this._dsnObject;\n var endpoint = this.getBaseApiEndpoint() + \"embed/error-page/\";\n var encodedOptions = [];\n encodedOptions.push(\"dsn=\" + dsn.toString());\n for (var key in dialogOptions) {\n if (key === 'dsn') {\n continue;\n }\n if (key === 'user') {\n if (!dialogOptions.user) {\n continue;\n }\n if (dialogOptions.user.name) {\n encodedOptions.push(\"name=\" + encodeURIComponent(dialogOptions.user.name));\n }\n if (dialogOptions.user.email) {\n encodedOptions.push(\"email=\" + encodeURIComponent(dialogOptions.user.email));\n }\n }\n else {\n encodedOptions.push(encodeURIComponent(key) + \"=\" + encodeURIComponent(dialogOptions[key]));\n }\n }\n if (encodedOptions.length) {\n return endpoint + \"?\" + encodedOptions.join('&');\n }\n return endpoint;\n };\n /** Returns the envelope endpoint URL. */\n API.prototype._getEnvelopeEndpoint = function () {\n return this._getIngestEndpoint('envelope');\n };\n /** Returns the ingest API endpoint for target. */\n API.prototype._getIngestEndpoint = function (target) {\n var base = this.getBaseApiEndpoint();\n var dsn = this._dsnObject;\n return \"\" + base + dsn.projectId + \"/\" + target + \"/\";\n };\n /** Returns a URL-encoded string with auth config suitable for a query string. */\n API.prototype._encodedAuth = function () {\n var dsn = this._dsnObject;\n var auth = {\n // We send only the minimum set of required information. See\n // https://github.com/getsentry/sentry-javascript/issues/2572.\n sentry_key: dsn.user,\n sentry_version: SENTRY_API_VERSION,\n };\n return urlEncode(auth);\n };\n return API;\n}());\nexport { API };\n//# sourceMappingURL=api.js.map","import { __read, __spread } from \"tslib\";\nimport { addGlobalEventProcessor, getCurrentHub } from '@sentry/hub';\nimport { logger } from '@sentry/utils';\nexport var installedIntegrations = [];\n/** Gets integration to install */\nexport function getIntegrationsToSetup(options) {\n var defaultIntegrations = (options.defaultIntegrations && __spread(options.defaultIntegrations)) || [];\n var userIntegrations = options.integrations;\n var integrations = [];\n if (Array.isArray(userIntegrations)) {\n var userIntegrationsNames_1 = userIntegrations.map(function (i) { return i.name; });\n var pickedIntegrationsNames_1 = [];\n // Leave only unique default integrations, that were not overridden with provided user integrations\n defaultIntegrations.forEach(function (defaultIntegration) {\n if (userIntegrationsNames_1.indexOf(defaultIntegration.name) === -1 &&\n pickedIntegrationsNames_1.indexOf(defaultIntegration.name) === -1) {\n integrations.push(defaultIntegration);\n pickedIntegrationsNames_1.push(defaultIntegration.name);\n }\n });\n // Don't add same user integration twice\n userIntegrations.forEach(function (userIntegration) {\n if (pickedIntegrationsNames_1.indexOf(userIntegration.name) === -1) {\n integrations.push(userIntegration);\n pickedIntegrationsNames_1.push(userIntegration.name);\n }\n });\n }\n else if (typeof userIntegrations === 'function') {\n integrations = userIntegrations(defaultIntegrations);\n integrations = Array.isArray(integrations) ? integrations : [integrations];\n }\n else {\n integrations = __spread(defaultIntegrations);\n }\n // Make sure that if present, `Debug` integration will always run last\n var integrationsNames = integrations.map(function (i) { return i.name; });\n var alwaysLastToRun = 'Debug';\n if (integrationsNames.indexOf(alwaysLastToRun) !== -1) {\n integrations.push.apply(integrations, __spread(integrations.splice(integrationsNames.indexOf(alwaysLastToRun), 1)));\n }\n return integrations;\n}\n/** Setup given integration */\nexport function setupIntegration(integration) {\n if (installedIntegrations.indexOf(integration.name) !== -1) {\n return;\n }\n integration.setupOnce(addGlobalEventProcessor, getCurrentHub);\n installedIntegrations.push(integration.name);\n logger.log(\"Integration installed: \" + integration.name);\n}\n/**\n * Given a list of integration instances this installs them all. When `withDefaults` is set to `true` then all default\n * integrations are added unless they were already provided before.\n * @param integrations array of integration instances\n * @param withDefault should enable default integrations\n */\nexport function setupIntegrations(options) {\n var integrations = {};\n getIntegrationsToSetup(options).forEach(function (integration) {\n integrations[integration.name] = integration;\n setupIntegration(integration);\n });\n return integrations;\n}\n//# sourceMappingURL=integration.js.map","import { __assign, __values } from \"tslib\";\n/* eslint-disable max-lines */\nimport { Scope } from '@sentry/hub';\nimport { SessionStatus, } from '@sentry/types';\nimport { dateTimestampInSeconds, Dsn, isPrimitive, isThenable, logger, normalize, SentryError, SyncPromise, truncate, uuid4, } from '@sentry/utils';\nimport { setupIntegrations } from './integration';\n/**\n * Base implementation for all JavaScript SDK clients.\n *\n * Call the constructor with the corresponding backend constructor and options\n * specific to the client subclass. To access these options later, use\n * {@link Client.getOptions}. Also, the Backend instance is available via\n * {@link Client.getBackend}.\n *\n * If a Dsn is specified in the options, it will be parsed and stored. Use\n * {@link Client.getDsn} to retrieve the Dsn at any moment. In case the Dsn is\n * invalid, the constructor will throw a {@link SentryException}. Note that\n * without a valid Dsn, the SDK will not send any events to Sentry.\n *\n * Before sending an event via the backend, it is passed through\n * {@link BaseClient.prepareEvent} to add SDK information and scope data\n * (breadcrumbs and context). To add more custom information, override this\n * method and extend the resulting prepared event.\n *\n * To issue automatically created events (e.g. via instrumentation), use\n * {@link Client.captureEvent}. It will prepare the event and pass it through\n * the callback lifecycle. To issue auto-breadcrumbs, use\n * {@link Client.addBreadcrumb}.\n *\n * @example\n * class NodeClient extends BaseClient {\n * public constructor(options: NodeOptions) {\n * super(NodeBackend, options);\n * }\n *\n * // ...\n * }\n */\nvar BaseClient = /** @class */ (function () {\n /**\n * Initializes this client instance.\n *\n * @param backendClass A constructor function to create the backend.\n * @param options Options for the client.\n */\n function BaseClient(backendClass, options) {\n /** Array of used integrations. */\n this._integrations = {};\n /** Number of call being processed */\n this._processing = 0;\n this._backend = new backendClass(options);\n this._options = options;\n if (options.dsn) {\n this._dsn = new Dsn(options.dsn);\n }\n }\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types\n BaseClient.prototype.captureException = function (exception, hint, scope) {\n var _this = this;\n var eventId = hint && hint.event_id;\n this._process(this._getBackend()\n .eventFromException(exception, hint)\n .then(function (event) { return _this._captureEvent(event, hint, scope); })\n .then(function (result) {\n eventId = result;\n }));\n return eventId;\n };\n /**\n * @inheritDoc\n */\n BaseClient.prototype.captureMessage = function (message, level, hint, scope) {\n var _this = this;\n var eventId = hint && hint.event_id;\n var promisedEvent = isPrimitive(message)\n ? this._getBackend().eventFromMessage(String(message), level, hint)\n : this._getBackend().eventFromException(message, hint);\n this._process(promisedEvent\n .then(function (event) { return _this._captureEvent(event, hint, scope); })\n .then(function (result) {\n eventId = result;\n }));\n return eventId;\n };\n /**\n * @inheritDoc\n */\n BaseClient.prototype.captureEvent = function (event, hint, scope) {\n var eventId = hint && hint.event_id;\n this._process(this._captureEvent(event, hint, scope).then(function (result) {\n eventId = result;\n }));\n return eventId;\n };\n /**\n * @inheritDoc\n */\n BaseClient.prototype.captureSession = function (session) {\n if (!session.release) {\n logger.warn('Discarded session because of missing release');\n }\n else {\n this._sendSession(session);\n }\n };\n /**\n * @inheritDoc\n */\n BaseClient.prototype.getDsn = function () {\n return this._dsn;\n };\n /**\n * @inheritDoc\n */\n BaseClient.prototype.getOptions = function () {\n return this._options;\n };\n /**\n * @inheritDoc\n */\n BaseClient.prototype.flush = function (timeout) {\n var _this = this;\n return this._isClientProcessing(timeout).then(function (ready) {\n return _this._getBackend()\n .getTransport()\n .close(timeout)\n .then(function (transportFlushed) { return ready && transportFlushed; });\n });\n };\n /**\n * @inheritDoc\n */\n BaseClient.prototype.close = function (timeout) {\n var _this = this;\n return this.flush(timeout).then(function (result) {\n _this.getOptions().enabled = false;\n return result;\n });\n };\n /**\n * Sets up the integrations\n */\n BaseClient.prototype.setupIntegrations = function () {\n if (this._isEnabled()) {\n this._integrations = setupIntegrations(this._options);\n }\n };\n /**\n * @inheritDoc\n */\n BaseClient.prototype.getIntegration = function (integration) {\n try {\n return this._integrations[integration.id] || null;\n }\n catch (_oO) {\n logger.warn(\"Cannot retrieve integration \" + integration.id + \" from the current Client\");\n return null;\n }\n };\n /** Updates existing session based on the provided event */\n BaseClient.prototype._updateSessionFromEvent = function (session, event) {\n var e_1, _a;\n var crashed = false;\n var errored = false;\n var userAgent;\n var exceptions = event.exception && event.exception.values;\n if (exceptions) {\n errored = true;\n try {\n for (var exceptions_1 = __values(exceptions), exceptions_1_1 = exceptions_1.next(); !exceptions_1_1.done; exceptions_1_1 = exceptions_1.next()) {\n var ex = exceptions_1_1.value;\n var mechanism = ex.mechanism;\n if (mechanism && mechanism.handled === false) {\n crashed = true;\n break;\n }\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (exceptions_1_1 && !exceptions_1_1.done && (_a = exceptions_1.return)) _a.call(exceptions_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n }\n var user = event.user;\n if (!session.userAgent) {\n var headers = event.request ? event.request.headers : {};\n for (var key in headers) {\n if (key.toLowerCase() === 'user-agent') {\n userAgent = headers[key];\n break;\n }\n }\n }\n session.update(__assign(__assign({}, (crashed && { status: SessionStatus.Crashed })), { user: user,\n userAgent: userAgent, errors: session.errors + Number(errored || crashed) }));\n };\n /** Deliver captured session to Sentry */\n BaseClient.prototype._sendSession = function (session) {\n this._getBackend().sendSession(session);\n };\n /** Waits for the client to be done with processing. */\n BaseClient.prototype._isClientProcessing = function (timeout) {\n var _this = this;\n return new SyncPromise(function (resolve) {\n var ticked = 0;\n var tick = 1;\n var interval = setInterval(function () {\n if (_this._processing == 0) {\n clearInterval(interval);\n resolve(true);\n }\n else {\n ticked += tick;\n if (timeout && ticked >= timeout) {\n clearInterval(interval);\n resolve(false);\n }\n }\n }, tick);\n });\n };\n /** Returns the current backend. */\n BaseClient.prototype._getBackend = function () {\n return this._backend;\n };\n /** Determines whether this SDK is enabled and a valid Dsn is present. */\n BaseClient.prototype._isEnabled = function () {\n return this.getOptions().enabled !== false && this._dsn !== undefined;\n };\n /**\n * Adds common information to events.\n *\n * The information includes release and environment from `options`,\n * breadcrumbs and context (extra, tags and user) from the scope.\n *\n * Information that is already present in the event is never overwritten. For\n * nested objects, such as the context, keys are merged.\n *\n * @param event The original event.\n * @param hint May contain additional information about the original exception.\n * @param scope A scope containing event metadata.\n * @returns A new event with more information.\n */\n BaseClient.prototype._prepareEvent = function (event, scope, hint) {\n var _this = this;\n var _a = this.getOptions().normalizeDepth, normalizeDepth = _a === void 0 ? 3 : _a;\n var prepared = __assign(__assign({}, event), { event_id: event.event_id || (hint && hint.event_id ? hint.event_id : uuid4()), timestamp: event.timestamp || dateTimestampInSeconds() });\n this._applyClientOptions(prepared);\n this._applyIntegrationsMetadata(prepared);\n // If we have scope given to us, use it as the base for further modifications.\n // This allows us to prevent unnecessary copying of data if `captureContext` is not provided.\n var finalScope = scope;\n if (hint && hint.captureContext) {\n finalScope = Scope.clone(finalScope).update(hint.captureContext);\n }\n // We prepare the result here with a resolved Event.\n var result = SyncPromise.resolve(prepared);\n // This should be the last thing called, since we want that\n // {@link Hub.addEventProcessor} gets the finished prepared event.\n if (finalScope) {\n // In case we have a hub we reassign it.\n result = finalScope.applyToEvent(prepared, hint);\n }\n return result.then(function (evt) {\n if (typeof normalizeDepth === 'number' && normalizeDepth > 0) {\n return _this._normalizeEvent(evt, normalizeDepth);\n }\n return evt;\n });\n };\n /**\n * Applies `normalize` function on necessary `Event` attributes to make them safe for serialization.\n * Normalized keys:\n * - `breadcrumbs.data`\n * - `user`\n * - `contexts`\n * - `extra`\n * @param event Event\n * @returns Normalized event\n */\n BaseClient.prototype._normalizeEvent = function (event, depth) {\n if (!event) {\n return null;\n }\n var normalized = __assign(__assign(__assign(__assign(__assign({}, event), (event.breadcrumbs && {\n breadcrumbs: event.breadcrumbs.map(function (b) { return (__assign(__assign({}, b), (b.data && {\n data: normalize(b.data, depth),\n }))); }),\n })), (event.user && {\n user: normalize(event.user, depth),\n })), (event.contexts && {\n contexts: normalize(event.contexts, depth),\n })), (event.extra && {\n extra: normalize(event.extra, depth),\n }));\n // event.contexts.trace stores information about a Transaction. Similarly,\n // event.spans[] stores information about child Spans. Given that a\n // Transaction is conceptually a Span, normalization should apply to both\n // Transactions and Spans consistently.\n // For now the decision is to skip normalization of Transactions and Spans,\n // so this block overwrites the normalized event to add back the original\n // Transaction information prior to normalization.\n if (event.contexts && event.contexts.trace) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n normalized.contexts.trace = event.contexts.trace;\n }\n return normalized;\n };\n /**\n * Enhances event using the client configuration.\n * It takes care of all \"static\" values like environment, release and `dist`,\n * as well as truncating overly long values.\n * @param event event instance to be enhanced\n */\n BaseClient.prototype._applyClientOptions = function (event) {\n var options = this.getOptions();\n var environment = options.environment, release = options.release, dist = options.dist, _a = options.maxValueLength, maxValueLength = _a === void 0 ? 250 : _a;\n if (!('environment' in event)) {\n event.environment = 'environment' in options ? environment : 'production';\n }\n if (event.release === undefined && release !== undefined) {\n event.release = release;\n }\n if (event.dist === undefined && dist !== undefined) {\n event.dist = dist;\n }\n if (event.message) {\n event.message = truncate(event.message, maxValueLength);\n }\n var exception = event.exception && event.exception.values && event.exception.values[0];\n if (exception && exception.value) {\n exception.value = truncate(exception.value, maxValueLength);\n }\n var request = event.request;\n if (request && request.url) {\n request.url = truncate(request.url, maxValueLength);\n }\n };\n /**\n * This function adds all used integrations to the SDK info in the event.\n * @param sdkInfo The sdkInfo of the event that will be filled with all integrations.\n */\n BaseClient.prototype._applyIntegrationsMetadata = function (event) {\n var sdkInfo = event.sdk;\n var integrationsArray = Object.keys(this._integrations);\n if (sdkInfo && integrationsArray.length > 0) {\n sdkInfo.integrations = integrationsArray;\n }\n };\n /**\n * Tells the backend to send this event\n * @param event The Sentry event to send\n */\n BaseClient.prototype._sendEvent = function (event) {\n this._getBackend().sendEvent(event);\n };\n /**\n * Processes the event and logs an error in case of rejection\n * @param event\n * @param hint\n * @param scope\n */\n BaseClient.prototype._captureEvent = function (event, hint, scope) {\n return this._processEvent(event, hint, scope).then(function (finalEvent) {\n return finalEvent.event_id;\n }, function (reason) {\n logger.error(reason);\n return undefined;\n });\n };\n /**\n * Processes an event (either error or message) and sends it to Sentry.\n *\n * This also adds breadcrumbs and context information to the event. However,\n * platform specific meta data (such as the User's IP address) must be added\n * by the SDK implementor.\n *\n *\n * @param event The event to send to Sentry.\n * @param hint May contain additional information about the original exception.\n * @param scope A scope containing event metadata.\n * @returns A SyncPromise that resolves with the event or rejects in case event was/will not be send.\n */\n BaseClient.prototype._processEvent = function (event, hint, scope) {\n var _this = this;\n // eslint-disable-next-line @typescript-eslint/unbound-method\n var _a = this.getOptions(), beforeSend = _a.beforeSend, sampleRate = _a.sampleRate;\n if (!this._isEnabled()) {\n return SyncPromise.reject(new SentryError('SDK not enabled, will not send event.'));\n }\n var isTransaction = event.type === 'transaction';\n // 1.0 === 100% events are sent\n // 0.0 === 0% events are sent\n // Sampling for transaction happens somewhere else\n if (!isTransaction && typeof sampleRate === 'number' && Math.random() > sampleRate) {\n return SyncPromise.reject(new SentryError(\"Discarding event because it's not included in the random sample (sampling rate = \" + sampleRate + \")\"));\n }\n return this._prepareEvent(event, scope, hint)\n .then(function (prepared) {\n if (prepared === null) {\n throw new SentryError('An event processor returned null, will not send event.');\n }\n var isInternalException = hint && hint.data && hint.data.__sentry__ === true;\n if (isInternalException || isTransaction || !beforeSend) {\n return prepared;\n }\n var beforeSendResult = beforeSend(prepared, hint);\n if (typeof beforeSendResult === 'undefined') {\n throw new SentryError('`beforeSend` method has to return `null` or a valid event.');\n }\n else if (isThenable(beforeSendResult)) {\n return beforeSendResult.then(function (event) { return event; }, function (e) {\n throw new SentryError(\"beforeSend rejected with \" + e);\n });\n }\n return beforeSendResult;\n })\n .then(function (processedEvent) {\n if (processedEvent === null) {\n throw new SentryError('`beforeSend` returned `null`, will not send event.');\n }\n var session = scope && scope.getSession && scope.getSession();\n if (!isTransaction && session) {\n _this._updateSessionFromEvent(session, processedEvent);\n }\n _this._sendEvent(processedEvent);\n return processedEvent;\n })\n .then(null, function (reason) {\n if (reason instanceof SentryError) {\n throw reason;\n }\n _this.captureException(reason, {\n data: {\n __sentry__: true,\n },\n originalException: reason,\n });\n throw new SentryError(\"Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\\nReason: \" + reason);\n });\n };\n /**\n * Occupies the client with processing and event\n */\n BaseClient.prototype._process = function (promise) {\n var _this = this;\n this._processing += 1;\n promise.then(function (value) {\n _this._processing -= 1;\n return value;\n }, function (reason) {\n _this._processing -= 1;\n return reason;\n });\n };\n return BaseClient;\n}());\nexport { BaseClient };\n//# sourceMappingURL=baseclient.js.map","import { Status } from '@sentry/types';\nimport { SyncPromise } from '@sentry/utils';\n/** Noop transport */\nvar NoopTransport = /** @class */ (function () {\n function NoopTransport() {\n }\n /**\n * @inheritDoc\n */\n NoopTransport.prototype.sendEvent = function (_) {\n return SyncPromise.resolve({\n reason: \"NoopTransport: Event has been skipped because no Dsn is configured.\",\n status: Status.Skipped,\n });\n };\n /**\n * @inheritDoc\n */\n NoopTransport.prototype.close = function (_) {\n return SyncPromise.resolve(true);\n };\n return NoopTransport;\n}());\nexport { NoopTransport };\n//# sourceMappingURL=noop.js.map","import { logger, SentryError } from '@sentry/utils';\nimport { NoopTransport } from './transports/noop';\n/**\n * This is the base implemention of a Backend.\n * @hidden\n */\nvar BaseBackend = /** @class */ (function () {\n /** Creates a new backend instance. */\n function BaseBackend(options) {\n this._options = options;\n if (!this._options.dsn) {\n logger.warn('No DSN provided, backend will not do anything.');\n }\n this._transport = this._setupTransport();\n }\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types\n BaseBackend.prototype.eventFromException = function (_exception, _hint) {\n throw new SentryError('Backend has to implement `eventFromException` method');\n };\n /**\n * @inheritDoc\n */\n BaseBackend.prototype.eventFromMessage = function (_message, _level, _hint) {\n throw new SentryError('Backend has to implement `eventFromMessage` method');\n };\n /**\n * @inheritDoc\n */\n BaseBackend.prototype.sendEvent = function (event) {\n this._transport.sendEvent(event).then(null, function (reason) {\n logger.error(\"Error while sending event: \" + reason);\n });\n };\n /**\n * @inheritDoc\n */\n BaseBackend.prototype.sendSession = function (session) {\n if (!this._transport.sendSession) {\n logger.warn(\"Dropping session because custom transport doesn't implement sendSession\");\n return;\n }\n this._transport.sendSession(session).then(null, function (reason) {\n logger.error(\"Error while sending session: \" + reason);\n });\n };\n /**\n * @inheritDoc\n */\n BaseBackend.prototype.getTransport = function () {\n return this._transport;\n };\n /**\n * Sets up the transport so it can be used later to send requests.\n */\n BaseBackend.prototype._setupTransport = function () {\n return new NoopTransport();\n };\n return BaseBackend;\n}());\nexport { BaseBackend };\n//# sourceMappingURL=basebackend.js.map","import { __rest } from \"tslib\";\n/** Creates a SentryRequest from an event. */\nexport function sessionToSentryRequest(session, api) {\n var envelopeHeaders = JSON.stringify({\n sent_at: new Date().toISOString(),\n });\n var itemHeaders = JSON.stringify({\n type: 'session',\n });\n return {\n body: envelopeHeaders + \"\\n\" + itemHeaders + \"\\n\" + JSON.stringify(session),\n type: 'session',\n url: api.getEnvelopeEndpointWithUrlEncodedAuth(),\n };\n}\n/** Creates a SentryRequest from an event. */\nexport function eventToSentryRequest(event, api) {\n // since JS has no Object.prototype.pop()\n var _a = event.tags || {}, samplingMethod = _a.__sentry_samplingMethod, sampleRate = _a.__sentry_sampleRate, otherTags = __rest(_a, [\"__sentry_samplingMethod\", \"__sentry_sampleRate\"]);\n event.tags = otherTags;\n var useEnvelope = event.type === 'transaction';\n var req = {\n body: JSON.stringify(event),\n type: event.type || 'event',\n url: useEnvelope ? api.getEnvelopeEndpointWithUrlEncodedAuth() : api.getStoreEndpointWithUrlEncodedAuth(),\n };\n // https://develop.sentry.dev/sdk/envelopes/\n // Since we don't need to manipulate envelopes nor store them, there is no\n // exported concept of an Envelope with operations including serialization and\n // deserialization. Instead, we only implement a minimal subset of the spec to\n // serialize events inline here.\n if (useEnvelope) {\n var envelopeHeaders = JSON.stringify({\n event_id: event.event_id,\n sent_at: new Date().toISOString(),\n });\n var itemHeaders = JSON.stringify({\n type: event.type,\n // TODO: Right now, sampleRate may or may not be defined (it won't be in the cases of inheritance and\n // explicitly-set sampling decisions). Are we good with that?\n sample_rates: [{ id: samplingMethod, rate: sampleRate }],\n });\n // The trailing newline is optional. We intentionally don't send it to avoid\n // sending unnecessary bytes.\n //\n // const envelope = `${envelopeHeaders}\\n${itemHeaders}\\n${req.body}\\n`;\n var envelope = envelopeHeaders + \"\\n\" + itemHeaders + \"\\n\" + req.body;\n req.body = envelope;\n }\n return req;\n}\n//# sourceMappingURL=request.js.map","import { getCurrentHub } from '@sentry/hub';\nimport { logger } from '@sentry/utils';\n/**\n * Internal function to create a new SDK client instance. The client is\n * installed and then bound to the current scope.\n *\n * @param clientClass The client class to instantiate.\n * @param options Options to pass to the client.\n */\nexport function initAndBind(clientClass, options) {\n if (options.debug === true) {\n logger.enable();\n }\n var hub = getCurrentHub();\n var client = new clientClass(options);\n hub.bindClient(client);\n}\n//# sourceMappingURL=sdk.js.map","var originalFunctionToString;\n/** Patch toString calls to return proper name for wrapped functions */\nvar FunctionToString = /** @class */ (function () {\n function FunctionToString() {\n /**\n * @inheritDoc\n */\n this.name = FunctionToString.id;\n }\n /**\n * @inheritDoc\n */\n FunctionToString.prototype.setupOnce = function () {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n originalFunctionToString = Function.prototype.toString;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n Function.prototype.toString = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var context = this.__sentry_original__ || this;\n return originalFunctionToString.apply(context, args);\n };\n };\n /**\n * @inheritDoc\n */\n FunctionToString.id = 'FunctionToString';\n return FunctionToString;\n}());\nexport { FunctionToString };\n//# sourceMappingURL=functiontostring.js.map","import { __read, __spread } from \"tslib\";\nimport { addGlobalEventProcessor, getCurrentHub } from '@sentry/hub';\nimport { getEventDescription, isMatchingPattern, logger } from '@sentry/utils';\n// \"Script error.\" is hard coded into browsers for errors that it can't read.\n// this is the result of a script being pulled in from an external domain and CORS.\nvar DEFAULT_IGNORE_ERRORS = [/^Script error\\.?$/, /^Javascript error: Script error\\.? on line 0$/];\n/** Inbound filters configurable by the user */\nvar InboundFilters = /** @class */ (function () {\n function InboundFilters(_options) {\n if (_options === void 0) { _options = {}; }\n this._options = _options;\n /**\n * @inheritDoc\n */\n this.name = InboundFilters.id;\n }\n /**\n * @inheritDoc\n */\n InboundFilters.prototype.setupOnce = function () {\n addGlobalEventProcessor(function (event) {\n var hub = getCurrentHub();\n if (!hub) {\n return event;\n }\n var self = hub.getIntegration(InboundFilters);\n if (self) {\n var client = hub.getClient();\n var clientOptions = client ? client.getOptions() : {};\n var options = self._mergeOptions(clientOptions);\n if (self._shouldDropEvent(event, options)) {\n return null;\n }\n }\n return event;\n });\n };\n /** JSDoc */\n InboundFilters.prototype._shouldDropEvent = function (event, options) {\n if (this._isSentryError(event, options)) {\n logger.warn(\"Event dropped due to being internal Sentry Error.\\nEvent: \" + getEventDescription(event));\n return true;\n }\n if (this._isIgnoredError(event, options)) {\n logger.warn(\"Event dropped due to being matched by `ignoreErrors` option.\\nEvent: \" + getEventDescription(event));\n return true;\n }\n if (this._isDeniedUrl(event, options)) {\n logger.warn(\"Event dropped due to being matched by `denyUrls` option.\\nEvent: \" + getEventDescription(event) + \".\\nUrl: \" + this._getEventFilterUrl(event));\n return true;\n }\n if (!this._isAllowedUrl(event, options)) {\n logger.warn(\"Event dropped due to not being matched by `allowUrls` option.\\nEvent: \" + getEventDescription(event) + \".\\nUrl: \" + this._getEventFilterUrl(event));\n return true;\n }\n return false;\n };\n /** JSDoc */\n InboundFilters.prototype._isSentryError = function (event, options) {\n if (!options.ignoreInternal) {\n return false;\n }\n try {\n return ((event &&\n event.exception &&\n event.exception.values &&\n event.exception.values[0] &&\n event.exception.values[0].type === 'SentryError') ||\n false);\n }\n catch (_oO) {\n return false;\n }\n };\n /** JSDoc */\n InboundFilters.prototype._isIgnoredError = function (event, options) {\n if (!options.ignoreErrors || !options.ignoreErrors.length) {\n return false;\n }\n return this._getPossibleEventMessages(event).some(function (message) {\n // Not sure why TypeScript complains here...\n return options.ignoreErrors.some(function (pattern) { return isMatchingPattern(message, pattern); });\n });\n };\n /** JSDoc */\n InboundFilters.prototype._isDeniedUrl = function (event, options) {\n // TODO: Use Glob instead?\n if (!options.denyUrls || !options.denyUrls.length) {\n return false;\n }\n var url = this._getEventFilterUrl(event);\n return !url ? false : options.denyUrls.some(function (pattern) { return isMatchingPattern(url, pattern); });\n };\n /** JSDoc */\n InboundFilters.prototype._isAllowedUrl = function (event, options) {\n // TODO: Use Glob instead?\n if (!options.allowUrls || !options.allowUrls.length) {\n return true;\n }\n var url = this._getEventFilterUrl(event);\n return !url ? true : options.allowUrls.some(function (pattern) { return isMatchingPattern(url, pattern); });\n };\n /** JSDoc */\n InboundFilters.prototype._mergeOptions = function (clientOptions) {\n if (clientOptions === void 0) { clientOptions = {}; }\n return {\n allowUrls: __spread((this._options.whitelistUrls || []), (this._options.allowUrls || []), (clientOptions.whitelistUrls || []), (clientOptions.allowUrls || [])),\n denyUrls: __spread((this._options.blacklistUrls || []), (this._options.denyUrls || []), (clientOptions.blacklistUrls || []), (clientOptions.denyUrls || [])),\n ignoreErrors: __spread((this._options.ignoreErrors || []), (clientOptions.ignoreErrors || []), DEFAULT_IGNORE_ERRORS),\n ignoreInternal: typeof this._options.ignoreInternal !== 'undefined' ? this._options.ignoreInternal : true,\n };\n };\n /** JSDoc */\n InboundFilters.prototype._getPossibleEventMessages = function (event) {\n if (event.message) {\n return [event.message];\n }\n if (event.exception) {\n try {\n var _a = (event.exception.values && event.exception.values[0]) || {}, _b = _a.type, type = _b === void 0 ? '' : _b, _c = _a.value, value = _c === void 0 ? '' : _c;\n return [\"\" + value, type + \": \" + value];\n }\n catch (oO) {\n logger.error(\"Cannot extract message for event \" + getEventDescription(event));\n return [];\n }\n }\n return [];\n };\n /** JSDoc */\n InboundFilters.prototype._getEventFilterUrl = function (event) {\n try {\n if (event.stacktrace) {\n var frames_1 = event.stacktrace.frames;\n return (frames_1 && frames_1[frames_1.length - 1].filename) || null;\n }\n if (event.exception) {\n var frames_2 = event.exception.values && event.exception.values[0].stacktrace && event.exception.values[0].stacktrace.frames;\n return (frames_2 && frames_2[frames_2.length - 1].filename) || null;\n }\n return null;\n }\n catch (oO) {\n logger.error(\"Cannot extract url for event \" + getEventDescription(event));\n return null;\n }\n };\n /**\n * @inheritDoc\n */\n InboundFilters.id = 'InboundFilters';\n return InboundFilters;\n}());\nexport { InboundFilters };\n//# sourceMappingURL=inboundfilters.js.map","/**\n * This was originally forked from https://github.com/occ/TraceKit, but has since been\n * largely modified and is now maintained as part of Sentry JS SDK.\n */\nimport { __assign } from \"tslib\";\n// global reference to slice\nvar UNKNOWN_FUNCTION = '?';\n// Chromium based browsers: Chrome, Brave, new Opera, new Edge\nvar chrome = /^\\s*at (?:(.*?) ?\\()?((?:file|https?|blob|chrome-extension|address|native|eval|webpack||[-a-z]+:|.*bundle|\\/).*?)(?::(\\d+))?(?::(\\d+))?\\)?\\s*$/i;\n// gecko regex: `(?:bundle|\\d+\\.js)`: `bundle` is for react native, `\\d+\\.js` also but specifically for ram bundles because it\n// generates filenames without a prefix like `file://` the filenames in the stacktrace are just 42.js\n// We need this specific case for now because we want no other regex to match.\nvar gecko = /^\\s*(.*?)(?:\\((.*?)\\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension|capacitor).*?:\\/.*?|\\[native code\\]|[^@]*(?:bundle|\\d+\\.js)|\\/[\\w\\-. /=]+)(?::(\\d+))?(?::(\\d+))?\\s*$/i;\nvar winjs = /^\\s*at (?:((?:\\[object object\\])?.+) )?\\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\\d+)(?::(\\d+))?\\)?\\s*$/i;\nvar geckoEval = /(\\S+) line (\\d+)(?: > eval line \\d+)* > eval/i;\nvar chromeEval = /\\((\\S*)(?::(\\d+))(?::(\\d+))\\)/;\n// Based on our own mapping pattern - https://github.com/getsentry/sentry/blob/9f08305e09866c8bd6d0c24f5b0aabdd7dd6c59c/src/sentry/lang/javascript/errormapping.py#L83-L108\nvar reactMinifiedRegexp = /Minified React error #\\d+;/i;\n/** JSDoc */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types\nexport function computeStackTrace(ex) {\n var stack = null;\n var popSize = 0;\n if (ex) {\n if (typeof ex.framesToPop === 'number') {\n popSize = ex.framesToPop;\n }\n else if (reactMinifiedRegexp.test(ex.message)) {\n popSize = 1;\n }\n }\n try {\n // This must be tried first because Opera 10 *destroys*\n // its stacktrace property if you try to access the stack\n // property first!!\n stack = computeStackTraceFromStacktraceProp(ex);\n if (stack) {\n return popFrames(stack, popSize);\n }\n }\n catch (e) {\n // no-empty\n }\n try {\n stack = computeStackTraceFromStackProp(ex);\n if (stack) {\n return popFrames(stack, popSize);\n }\n }\n catch (e) {\n // no-empty\n }\n return {\n message: extractMessage(ex),\n name: ex && ex.name,\n stack: [],\n failed: true,\n };\n}\n/** JSDoc */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any, complexity\nfunction computeStackTraceFromStackProp(ex) {\n if (!ex || !ex.stack) {\n return null;\n }\n var stack = [];\n var lines = ex.stack.split('\\n');\n var isEval;\n var submatch;\n var parts;\n var element;\n for (var i = 0; i < lines.length; ++i) {\n if ((parts = chrome.exec(lines[i]))) {\n var isNative = parts[2] && parts[2].indexOf('native') === 0; // start of line\n isEval = parts[2] && parts[2].indexOf('eval') === 0; // start of line\n if (isEval && (submatch = chromeEval.exec(parts[2]))) {\n // throw out eval line/column and use top-most line/column number\n parts[2] = submatch[1]; // url\n parts[3] = submatch[2]; // line\n parts[4] = submatch[3]; // column\n }\n element = {\n // working with the regexp above is super painful. it is quite a hack, but just stripping the `address at `\n // prefix here seems like the quickest solution for now.\n url: parts[2] && parts[2].indexOf('address at ') === 0 ? parts[2].substr('address at '.length) : parts[2],\n func: parts[1] || UNKNOWN_FUNCTION,\n args: isNative ? [parts[2]] : [],\n line: parts[3] ? +parts[3] : null,\n column: parts[4] ? +parts[4] : null,\n };\n }\n else if ((parts = winjs.exec(lines[i]))) {\n element = {\n url: parts[2],\n func: parts[1] || UNKNOWN_FUNCTION,\n args: [],\n line: +parts[3],\n column: parts[4] ? +parts[4] : null,\n };\n }\n else if ((parts = gecko.exec(lines[i]))) {\n isEval = parts[3] && parts[3].indexOf(' > eval') > -1;\n if (isEval && (submatch = geckoEval.exec(parts[3]))) {\n // throw out eval line/column and use top-most line number\n parts[1] = parts[1] || \"eval\";\n parts[3] = submatch[1];\n parts[4] = submatch[2];\n parts[5] = ''; // no column when eval\n }\n else if (i === 0 && !parts[5] && ex.columnNumber !== void 0) {\n // FireFox uses this awesome columnNumber property for its top frame\n // Also note, Firefox's column number is 0-based and everything else expects 1-based,\n // so adding 1\n // NOTE: this hack doesn't work if top-most frame is eval\n stack[0].column = ex.columnNumber + 1;\n }\n element = {\n url: parts[3],\n func: parts[1] || UNKNOWN_FUNCTION,\n args: parts[2] ? parts[2].split(',') : [],\n line: parts[4] ? +parts[4] : null,\n column: parts[5] ? +parts[5] : null,\n };\n }\n else {\n continue;\n }\n if (!element.func && element.line) {\n element.func = UNKNOWN_FUNCTION;\n }\n stack.push(element);\n }\n if (!stack.length) {\n return null;\n }\n return {\n message: extractMessage(ex),\n name: ex.name,\n stack: stack,\n };\n}\n/** JSDoc */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction computeStackTraceFromStacktraceProp(ex) {\n if (!ex || !ex.stacktrace) {\n return null;\n }\n // Access and store the stacktrace property before doing ANYTHING\n // else to it because Opera is not very good at providing it\n // reliably in other circumstances.\n var stacktrace = ex.stacktrace;\n var opera10Regex = / line (\\d+).*script (?:in )?(\\S+)(?:: in function (\\S+))?$/i;\n var opera11Regex = / line (\\d+), column (\\d+)\\s*(?:in (?:]+)>|([^)]+))\\((.*)\\))? in (.*):\\s*$/i;\n var lines = stacktrace.split('\\n');\n var stack = [];\n var parts;\n for (var line = 0; line < lines.length; line += 2) {\n var element = null;\n if ((parts = opera10Regex.exec(lines[line]))) {\n element = {\n url: parts[2],\n func: parts[3],\n args: [],\n line: +parts[1],\n column: null,\n };\n }\n else if ((parts = opera11Regex.exec(lines[line]))) {\n element = {\n url: parts[6],\n func: parts[3] || parts[4],\n args: parts[5] ? parts[5].split(',') : [],\n line: +parts[1],\n column: +parts[2],\n };\n }\n if (element) {\n if (!element.func && element.line) {\n element.func = UNKNOWN_FUNCTION;\n }\n stack.push(element);\n }\n }\n if (!stack.length) {\n return null;\n }\n return {\n message: extractMessage(ex),\n name: ex.name,\n stack: stack,\n };\n}\n/** Remove N number of frames from the stack */\nfunction popFrames(stacktrace, popSize) {\n try {\n return __assign(__assign({}, stacktrace), { stack: stacktrace.stack.slice(popSize) });\n }\n catch (e) {\n return stacktrace;\n }\n}\n/**\n * There are cases where stacktrace.message is an Event object\n * https://github.com/getsentry/sentry-javascript/issues/1949\n * In this specific case we try to extract stacktrace.message.error.message\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction extractMessage(ex) {\n var message = ex && ex.message;\n if (!message) {\n return 'No error message';\n }\n if (message.error && typeof message.error.message === 'string') {\n return message.error.message;\n }\n return message;\n}\n//# sourceMappingURL=tracekit.js.map","import { extractExceptionKeysForMessage, isEvent, normalizeToSize } from '@sentry/utils';\nimport { computeStackTrace } from './tracekit';\nvar STACKTRACE_LIMIT = 50;\n/**\n * This function creates an exception from an TraceKitStackTrace\n * @param stacktrace TraceKitStackTrace that will be converted to an exception\n * @hidden\n */\nexport function exceptionFromStacktrace(stacktrace) {\n var frames = prepareFramesForEvent(stacktrace.stack);\n var exception = {\n type: stacktrace.name,\n value: stacktrace.message,\n };\n if (frames && frames.length) {\n exception.stacktrace = { frames: frames };\n }\n if (exception.type === undefined && exception.value === '') {\n exception.value = 'Unrecoverable error caught';\n }\n return exception;\n}\n/**\n * @hidden\n */\nexport function eventFromPlainObject(exception, syntheticException, rejection) {\n var event = {\n exception: {\n values: [\n {\n type: isEvent(exception) ? exception.constructor.name : rejection ? 'UnhandledRejection' : 'Error',\n value: \"Non-Error \" + (rejection ? 'promise rejection' : 'exception') + \" captured with keys: \" + extractExceptionKeysForMessage(exception),\n },\n ],\n },\n extra: {\n __serialized__: normalizeToSize(exception),\n },\n };\n if (syntheticException) {\n var stacktrace = computeStackTrace(syntheticException);\n var frames_1 = prepareFramesForEvent(stacktrace.stack);\n event.stacktrace = {\n frames: frames_1,\n };\n }\n return event;\n}\n/**\n * @hidden\n */\nexport function eventFromStacktrace(stacktrace) {\n var exception = exceptionFromStacktrace(stacktrace);\n return {\n exception: {\n values: [exception],\n },\n };\n}\n/**\n * @hidden\n */\nexport function prepareFramesForEvent(stack) {\n if (!stack || !stack.length) {\n return [];\n }\n var localStack = stack;\n var firstFrameFunction = localStack[0].func || '';\n var lastFrameFunction = localStack[localStack.length - 1].func || '';\n // If stack starts with one of our API calls, remove it (starts, meaning it's the top of the stack - aka last call)\n if (firstFrameFunction.indexOf('captureMessage') !== -1 || firstFrameFunction.indexOf('captureException') !== -1) {\n localStack = localStack.slice(1);\n }\n // If stack ends with one of our internal API calls, remove it (ends, meaning it's the bottom of the stack - aka top-most call)\n if (lastFrameFunction.indexOf('sentryWrapped') !== -1) {\n localStack = localStack.slice(0, -1);\n }\n // The frame where the crash happened, should be the last entry in the array\n return localStack\n .slice(0, STACKTRACE_LIMIT)\n .map(function (frame) { return ({\n colno: frame.column === null ? undefined : frame.column,\n filename: frame.url || localStack[0].url,\n function: frame.func || '?',\n in_app: true,\n lineno: frame.line === null ? undefined : frame.line,\n }); })\n .reverse();\n}\n//# sourceMappingURL=parsers.js.map","import { __assign } from \"tslib\";\nimport { Severity } from '@sentry/types';\nimport { addExceptionMechanism, addExceptionTypeValue, isDOMError, isDOMException, isError, isErrorEvent, isEvent, isPlainObject, SyncPromise, } from '@sentry/utils';\nimport { eventFromPlainObject, eventFromStacktrace, prepareFramesForEvent } from './parsers';\nimport { computeStackTrace } from './tracekit';\n/**\n * Builds and Event from a Exception\n * @hidden\n */\nexport function eventFromException(options, exception, hint) {\n var syntheticException = (hint && hint.syntheticException) || undefined;\n var event = eventFromUnknownInput(exception, syntheticException, {\n attachStacktrace: options.attachStacktrace,\n });\n addExceptionMechanism(event, {\n handled: true,\n type: 'generic',\n });\n event.level = Severity.Error;\n if (hint && hint.event_id) {\n event.event_id = hint.event_id;\n }\n return SyncPromise.resolve(event);\n}\n/**\n * Builds and Event from a Message\n * @hidden\n */\nexport function eventFromMessage(options, message, level, hint) {\n if (level === void 0) { level = Severity.Info; }\n var syntheticException = (hint && hint.syntheticException) || undefined;\n var event = eventFromString(message, syntheticException, {\n attachStacktrace: options.attachStacktrace,\n });\n event.level = level;\n if (hint && hint.event_id) {\n event.event_id = hint.event_id;\n }\n return SyncPromise.resolve(event);\n}\n/**\n * @hidden\n */\nexport function eventFromUnknownInput(exception, syntheticException, options) {\n if (options === void 0) { options = {}; }\n var event;\n if (isErrorEvent(exception) && exception.error) {\n // If it is an ErrorEvent with `error` property, extract it to get actual Error\n var errorEvent = exception;\n // eslint-disable-next-line no-param-reassign\n exception = errorEvent.error;\n event = eventFromStacktrace(computeStackTrace(exception));\n return event;\n }\n if (isDOMError(exception) || isDOMException(exception)) {\n // If it is a DOMError or DOMException (which are legacy APIs, but still supported in some browsers)\n // then we just extract the name, code, and message, as they don't provide anything else\n // https://developer.mozilla.org/en-US/docs/Web/API/DOMError\n // https://developer.mozilla.org/en-US/docs/Web/API/DOMException\n var domException = exception;\n var name_1 = domException.name || (isDOMError(domException) ? 'DOMError' : 'DOMException');\n var message = domException.message ? name_1 + \": \" + domException.message : name_1;\n event = eventFromString(message, syntheticException, options);\n addExceptionTypeValue(event, message);\n if ('code' in domException) {\n event.tags = __assign(__assign({}, event.tags), { 'DOMException.code': \"\" + domException.code });\n }\n return event;\n }\n if (isError(exception)) {\n // we have a real Error object, do nothing\n event = eventFromStacktrace(computeStackTrace(exception));\n return event;\n }\n if (isPlainObject(exception) || isEvent(exception)) {\n // If it is plain Object or Event, serialize it manually and extract options\n // This will allow us to group events based on top-level keys\n // which is much better than creating new group when any key/value change\n var objectException = exception;\n event = eventFromPlainObject(objectException, syntheticException, options.rejection);\n addExceptionMechanism(event, {\n synthetic: true,\n });\n return event;\n }\n // If none of previous checks were valid, then it means that it's not:\n // - an instance of DOMError\n // - an instance of DOMException\n // - an instance of Event\n // - an instance of Error\n // - a valid ErrorEvent (one with an error property)\n // - a plain Object\n //\n // So bail out and capture it as a simple message:\n event = eventFromString(exception, syntheticException, options);\n addExceptionTypeValue(event, \"\" + exception, undefined);\n addExceptionMechanism(event, {\n synthetic: true,\n });\n return event;\n}\n/**\n * @hidden\n */\nexport function eventFromString(input, syntheticException, options) {\n if (options === void 0) { options = {}; }\n var event = {\n message: input,\n };\n if (options.attachStacktrace && syntheticException) {\n var stacktrace = computeStackTrace(syntheticException);\n var frames_1 = prepareFramesForEvent(stacktrace.stack);\n event.stacktrace = {\n frames: frames_1,\n };\n }\n return event;\n}\n//# sourceMappingURL=eventbuilder.js.map","import { __values } from \"tslib\";\nimport { API } from '@sentry/core';\nimport { Status, } from '@sentry/types';\nimport { logger, parseRetryAfterHeader, PromiseBuffer, SentryError } from '@sentry/utils';\n/** Base Transport class implementation */\nvar BaseTransport = /** @class */ (function () {\n function BaseTransport(options) {\n this.options = options;\n /** A simple buffer holding all requests. */\n this._buffer = new PromiseBuffer(30);\n /** Locks transport after receiving rate limits in a response */\n this._rateLimits = {};\n this._api = new API(this.options.dsn);\n // eslint-disable-next-line deprecation/deprecation\n this.url = this._api.getStoreEndpointWithUrlEncodedAuth();\n }\n /**\n * @inheritDoc\n */\n BaseTransport.prototype.sendEvent = function (_) {\n throw new SentryError('Transport Class has to implement `sendEvent` method');\n };\n /**\n * @inheritDoc\n */\n BaseTransport.prototype.close = function (timeout) {\n return this._buffer.drain(timeout);\n };\n /**\n * Handle Sentry repsonse for promise-based transports.\n */\n BaseTransport.prototype._handleResponse = function (_a) {\n var requestType = _a.requestType, response = _a.response, headers = _a.headers, resolve = _a.resolve, reject = _a.reject;\n var status = Status.fromHttpCode(response.status);\n /**\n * \"The name is case-insensitive.\"\n * https://developer.mozilla.org/en-US/docs/Web/API/Headers/get\n */\n var limited = this._handleRateLimit(headers);\n if (limited)\n logger.warn(\"Too many requests, backing off until: \" + this._disabledUntil(requestType));\n if (status === Status.Success) {\n resolve({ status: status });\n return;\n }\n reject(response);\n };\n /**\n * Gets the time that given category is disabled until for rate limiting\n */\n BaseTransport.prototype._disabledUntil = function (category) {\n return this._rateLimits[category] || this._rateLimits.all;\n };\n /**\n * Checks if a category is rate limited\n */\n BaseTransport.prototype._isRateLimited = function (category) {\n return this._disabledUntil(category) > new Date(Date.now());\n };\n /**\n * Sets internal _rateLimits from incoming headers. Returns true if headers contains a non-empty rate limiting header.\n */\n BaseTransport.prototype._handleRateLimit = function (headers) {\n var e_1, _a, e_2, _b;\n var now = Date.now();\n var rlHeader = headers['x-sentry-rate-limits'];\n var raHeader = headers['retry-after'];\n if (rlHeader) {\n try {\n // rate limit headers are of the form\n //
    ,
    ,..\n // where each
    is of the form\n // : : : \n // where\n // is a delay in ms\n // is the event type(s) (error, transaction, etc) being rate limited and is of the form\n // ;;...\n // is what's being limited (org, project, or key) - ignored by SDK\n // is an arbitrary string like \"org_quota\" - ignored by SDK\n for (var _c = __values(rlHeader.trim().split(',')), _d = _c.next(); !_d.done; _d = _c.next()) {\n var limit = _d.value;\n var parameters = limit.split(':', 2);\n var headerDelay = parseInt(parameters[0], 10);\n var delay = (!isNaN(headerDelay) ? headerDelay : 60) * 1000; // 60sec default\n try {\n for (var _e = (e_2 = void 0, __values(parameters[1].split(';'))), _f = _e.next(); !_f.done; _f = _e.next()) {\n var category = _f.value;\n this._rateLimits[category || 'all'] = new Date(now + delay);\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (_f && !_f.done && (_b = _e.return)) _b.call(_e);\n }\n finally { if (e_2) throw e_2.error; }\n }\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_d && !_d.done && (_a = _c.return)) _a.call(_c);\n }\n finally { if (e_1) throw e_1.error; }\n }\n return true;\n }\n else if (raHeader) {\n this._rateLimits.all = new Date(now + parseRetryAfterHeader(now, raHeader));\n return true;\n }\n return false;\n };\n return BaseTransport;\n}());\nexport { BaseTransport };\n//# sourceMappingURL=base.js.map","import { __extends } from \"tslib\";\nimport { eventToSentryRequest, sessionToSentryRequest } from '@sentry/core';\nimport { getGlobalObject, supportsReferrerPolicy, SyncPromise } from '@sentry/utils';\nimport { BaseTransport } from './base';\nvar global = getGlobalObject();\n/** `fetch` based transport */\nvar FetchTransport = /** @class */ (function (_super) {\n __extends(FetchTransport, _super);\n function FetchTransport() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * @inheritDoc\n */\n FetchTransport.prototype.sendEvent = function (event) {\n return this._sendRequest(eventToSentryRequest(event, this._api), event);\n };\n /**\n * @inheritDoc\n */\n FetchTransport.prototype.sendSession = function (session) {\n return this._sendRequest(sessionToSentryRequest(session, this._api), session);\n };\n /**\n * @param sentryRequest Prepared SentryRequest to be delivered\n * @param originalPayload Original payload used to create SentryRequest\n */\n FetchTransport.prototype._sendRequest = function (sentryRequest, originalPayload) {\n var _this = this;\n if (this._isRateLimited(sentryRequest.type)) {\n return Promise.reject({\n event: originalPayload,\n type: sentryRequest.type,\n reason: \"Transport locked till \" + this._disabledUntil(sentryRequest.type) + \" due to too many requests.\",\n status: 429,\n });\n }\n var options = {\n body: sentryRequest.body,\n method: 'POST',\n // Despite all stars in the sky saying that Edge supports old draft syntax, aka 'never', 'always', 'origin' and 'default\n // https://caniuse.com/#feat=referrer-policy\n // It doesn't. And it throw exception instead of ignoring this parameter...\n // REF: https://github.com/getsentry/raven-js/issues/1233\n referrerPolicy: (supportsReferrerPolicy() ? 'origin' : ''),\n };\n if (this.options.fetchParameters !== undefined) {\n Object.assign(options, this.options.fetchParameters);\n }\n if (this.options.headers !== undefined) {\n options.headers = this.options.headers;\n }\n return this._buffer.add(new SyncPromise(function (resolve, reject) {\n global\n .fetch(sentryRequest.url, options)\n .then(function (response) {\n var headers = {\n 'x-sentry-rate-limits': response.headers.get('X-Sentry-Rate-Limits'),\n 'retry-after': response.headers.get('Retry-After'),\n };\n _this._handleResponse({\n requestType: sentryRequest.type,\n response: response,\n headers: headers,\n resolve: resolve,\n reject: reject,\n });\n })\n .catch(reject);\n }));\n };\n return FetchTransport;\n}(BaseTransport));\nexport { FetchTransport };\n//# sourceMappingURL=fetch.js.map","import { __extends } from \"tslib\";\nimport { eventToSentryRequest, sessionToSentryRequest } from '@sentry/core';\nimport { SyncPromise } from '@sentry/utils';\nimport { BaseTransport } from './base';\n/** `XHR` based transport */\nvar XHRTransport = /** @class */ (function (_super) {\n __extends(XHRTransport, _super);\n function XHRTransport() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * @inheritDoc\n */\n XHRTransport.prototype.sendEvent = function (event) {\n return this._sendRequest(eventToSentryRequest(event, this._api), event);\n };\n /**\n * @inheritDoc\n */\n XHRTransport.prototype.sendSession = function (session) {\n return this._sendRequest(sessionToSentryRequest(session, this._api), session);\n };\n /**\n * @param sentryRequest Prepared SentryRequest to be delivered\n * @param originalPayload Original payload used to create SentryRequest\n */\n XHRTransport.prototype._sendRequest = function (sentryRequest, originalPayload) {\n var _this = this;\n if (this._isRateLimited(sentryRequest.type)) {\n return Promise.reject({\n event: originalPayload,\n type: sentryRequest.type,\n reason: \"Transport locked till \" + this._disabledUntil(sentryRequest.type) + \" due to too many requests.\",\n status: 429,\n });\n }\n return this._buffer.add(new SyncPromise(function (resolve, reject) {\n var request = new XMLHttpRequest();\n request.onreadystatechange = function () {\n if (request.readyState === 4) {\n var headers = {\n 'x-sentry-rate-limits': request.getResponseHeader('X-Sentry-Rate-Limits'),\n 'retry-after': request.getResponseHeader('Retry-After'),\n };\n _this._handleResponse({ requestType: sentryRequest.type, response: request, headers: headers, resolve: resolve, reject: reject });\n }\n };\n request.open('POST', sentryRequest.url);\n for (var header in _this.options.headers) {\n if (_this.options.headers.hasOwnProperty(header)) {\n request.setRequestHeader(header, _this.options.headers[header]);\n }\n }\n request.send(sentryRequest.body);\n }));\n };\n return XHRTransport;\n}(BaseTransport));\nexport { XHRTransport };\n//# sourceMappingURL=xhr.js.map","import { __assign, __extends } from \"tslib\";\nimport { BaseBackend } from '@sentry/core';\nimport { Severity } from '@sentry/types';\nimport { supportsFetch } from '@sentry/utils';\nimport { eventFromException, eventFromMessage } from './eventbuilder';\nimport { FetchTransport, XHRTransport } from './transports';\n/**\n * The Sentry Browser SDK Backend.\n * @hidden\n */\nvar BrowserBackend = /** @class */ (function (_super) {\n __extends(BrowserBackend, _super);\n function BrowserBackend() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * @inheritDoc\n */\n BrowserBackend.prototype.eventFromException = function (exception, hint) {\n return eventFromException(this._options, exception, hint);\n };\n /**\n * @inheritDoc\n */\n BrowserBackend.prototype.eventFromMessage = function (message, level, hint) {\n if (level === void 0) { level = Severity.Info; }\n return eventFromMessage(this._options, message, level, hint);\n };\n /**\n * @inheritDoc\n */\n BrowserBackend.prototype._setupTransport = function () {\n if (!this._options.dsn) {\n // We return the noop transport here in case there is no Dsn.\n return _super.prototype._setupTransport.call(this);\n }\n var transportOptions = __assign(__assign({}, this._options.transportOptions), { dsn: this._options.dsn });\n if (this._options.transport) {\n return new this._options.transport(transportOptions);\n }\n if (supportsFetch()) {\n return new FetchTransport(transportOptions);\n }\n return new XHRTransport(transportOptions);\n };\n return BrowserBackend;\n}(BaseBackend));\nexport { BrowserBackend };\n//# sourceMappingURL=backend.js.map","import { __assign } from \"tslib\";\nimport { API, captureException, withScope } from '@sentry/core';\nimport { addExceptionMechanism, addExceptionTypeValue, logger } from '@sentry/utils';\nvar ignoreOnError = 0;\n/**\n * @hidden\n */\nexport function shouldIgnoreOnError() {\n return ignoreOnError > 0;\n}\n/**\n * @hidden\n */\nexport function ignoreNextOnError() {\n // onerror should trigger before setTimeout\n ignoreOnError += 1;\n setTimeout(function () {\n ignoreOnError -= 1;\n });\n}\n/**\n * Instruments the given function and sends an event to Sentry every time the\n * function throws an exception.\n *\n * @param fn A function to wrap.\n * @returns The wrapped function.\n * @hidden\n */\nexport function wrap(fn, options, before) {\n if (options === void 0) { options = {}; }\n if (typeof fn !== 'function') {\n return fn;\n }\n try {\n // We don't wanna wrap it twice\n if (fn.__sentry__) {\n return fn;\n }\n // If this has already been wrapped in the past, return that wrapped function\n if (fn.__sentry_wrapped__) {\n return fn.__sentry_wrapped__;\n }\n }\n catch (e) {\n // Just accessing custom props in some Selenium environments\n // can cause a \"Permission denied\" exception (see raven-js#495).\n // Bail on wrapping and return the function as-is (defers to window.onerror).\n return fn;\n }\n /* eslint-disable prefer-rest-params */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n var sentryWrapped = function () {\n var args = Array.prototype.slice.call(arguments);\n try {\n if (before && typeof before === 'function') {\n before.apply(this, arguments);\n }\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access\n var wrappedArguments = args.map(function (arg) { return wrap(arg, options); });\n if (fn.handleEvent) {\n // Attempt to invoke user-land function\n // NOTE: If you are a Sentry user, and you are seeing this stack frame, it\n // means the sentry.javascript SDK caught an error invoking your application code. This\n // is expected behavior and NOT indicative of a bug with sentry.javascript.\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return fn.handleEvent.apply(this, wrappedArguments);\n }\n // Attempt to invoke user-land function\n // NOTE: If you are a Sentry user, and you are seeing this stack frame, it\n // means the sentry.javascript SDK caught an error invoking your application code. This\n // is expected behavior and NOT indicative of a bug with sentry.javascript.\n return fn.apply(this, wrappedArguments);\n }\n catch (ex) {\n ignoreNextOnError();\n withScope(function (scope) {\n scope.addEventProcessor(function (event) {\n var processedEvent = __assign({}, event);\n if (options.mechanism) {\n addExceptionTypeValue(processedEvent, undefined, undefined);\n addExceptionMechanism(processedEvent, options.mechanism);\n }\n processedEvent.extra = __assign(__assign({}, processedEvent.extra), { arguments: args });\n return processedEvent;\n });\n captureException(ex);\n });\n throw ex;\n }\n };\n /* eslint-enable prefer-rest-params */\n // Accessing some objects may throw\n // ref: https://github.com/getsentry/sentry-javascript/issues/1168\n try {\n for (var property in fn) {\n if (Object.prototype.hasOwnProperty.call(fn, property)) {\n sentryWrapped[property] = fn[property];\n }\n }\n }\n catch (_oO) { } // eslint-disable-line no-empty\n fn.prototype = fn.prototype || {};\n sentryWrapped.prototype = fn.prototype;\n Object.defineProperty(fn, '__sentry_wrapped__', {\n enumerable: false,\n value: sentryWrapped,\n });\n // Signal that this function has been wrapped/filled already\n // for both debugging and to prevent it to being wrapped/filled twice\n Object.defineProperties(sentryWrapped, {\n __sentry__: {\n enumerable: false,\n value: true,\n },\n __sentry_original__: {\n enumerable: false,\n value: fn,\n },\n });\n // Restore original function name (not all browsers allow that)\n try {\n var descriptor = Object.getOwnPropertyDescriptor(sentryWrapped, 'name');\n if (descriptor.configurable) {\n Object.defineProperty(sentryWrapped, 'name', {\n get: function () {\n return fn.name;\n },\n });\n }\n // eslint-disable-next-line no-empty\n }\n catch (_oO) { }\n return sentryWrapped;\n}\n/**\n * Injects the Report Dialog script\n * @hidden\n */\nexport function injectReportDialog(options) {\n if (options === void 0) { options = {}; }\n if (!options.eventId) {\n logger.error(\"Missing eventId option in showReportDialog call\");\n return;\n }\n if (!options.dsn) {\n logger.error(\"Missing dsn option in showReportDialog call\");\n return;\n }\n var script = document.createElement('script');\n script.async = true;\n script.src = new API(options.dsn).getReportDialogEndpoint(options);\n if (options.onLoad) {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n script.onload = options.onLoad;\n }\n (document.head || document.body).appendChild(script);\n}\n//# sourceMappingURL=helpers.js.map","import { __assign } from \"tslib\";\n/* eslint-disable @typescript-eslint/no-unsafe-member-access */\nimport { getCurrentHub } from '@sentry/core';\nimport { Severity } from '@sentry/types';\nimport { addExceptionMechanism, addInstrumentationHandler, getLocationHref, isErrorEvent, isPrimitive, isString, logger, } from '@sentry/utils';\nimport { eventFromUnknownInput } from '../eventbuilder';\nimport { shouldIgnoreOnError } from '../helpers';\n/** Global handlers */\nvar GlobalHandlers = /** @class */ (function () {\n /** JSDoc */\n function GlobalHandlers(options) {\n /**\n * @inheritDoc\n */\n this.name = GlobalHandlers.id;\n /** JSDoc */\n this._onErrorHandlerInstalled = false;\n /** JSDoc */\n this._onUnhandledRejectionHandlerInstalled = false;\n this._options = __assign({ onerror: true, onunhandledrejection: true }, options);\n }\n /**\n * @inheritDoc\n */\n GlobalHandlers.prototype.setupOnce = function () {\n Error.stackTraceLimit = 50;\n if (this._options.onerror) {\n logger.log('Global Handler attached: onerror');\n this._installGlobalOnErrorHandler();\n }\n if (this._options.onunhandledrejection) {\n logger.log('Global Handler attached: onunhandledrejection');\n this._installGlobalOnUnhandledRejectionHandler();\n }\n };\n /** JSDoc */\n GlobalHandlers.prototype._installGlobalOnErrorHandler = function () {\n var _this = this;\n if (this._onErrorHandlerInstalled) {\n return;\n }\n addInstrumentationHandler({\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n callback: function (data) {\n var error = data.error;\n var currentHub = getCurrentHub();\n var hasIntegration = currentHub.getIntegration(GlobalHandlers);\n var isFailedOwnDelivery = error && error.__sentry_own_request__ === true;\n if (!hasIntegration || shouldIgnoreOnError() || isFailedOwnDelivery) {\n return;\n }\n var client = currentHub.getClient();\n var event = isPrimitive(error)\n ? _this._eventFromIncompleteOnError(data.msg, data.url, data.line, data.column)\n : _this._enhanceEventWithInitialFrame(eventFromUnknownInput(error, undefined, {\n attachStacktrace: client && client.getOptions().attachStacktrace,\n rejection: false,\n }), data.url, data.line, data.column);\n addExceptionMechanism(event, {\n handled: false,\n type: 'onerror',\n });\n currentHub.captureEvent(event, {\n originalException: error,\n });\n },\n type: 'error',\n });\n this._onErrorHandlerInstalled = true;\n };\n /** JSDoc */\n GlobalHandlers.prototype._installGlobalOnUnhandledRejectionHandler = function () {\n var _this = this;\n if (this._onUnhandledRejectionHandlerInstalled) {\n return;\n }\n addInstrumentationHandler({\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n callback: function (e) {\n var error = e;\n // dig the object of the rejection out of known event types\n try {\n // PromiseRejectionEvents store the object of the rejection under 'reason'\n // see https://developer.mozilla.org/en-US/docs/Web/API/PromiseRejectionEvent\n if ('reason' in e) {\n error = e.reason;\n }\n // something, somewhere, (likely a browser extension) effectively casts PromiseRejectionEvents\n // to CustomEvents, moving the `promise` and `reason` attributes of the PRE into\n // the CustomEvent's `detail` attribute, since they're not part of CustomEvent's spec\n // see https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent and\n // https://github.com/getsentry/sentry-javascript/issues/2380\n else if ('detail' in e && 'reason' in e.detail) {\n error = e.detail.reason;\n }\n }\n catch (_oO) {\n // no-empty\n }\n var currentHub = getCurrentHub();\n var hasIntegration = currentHub.getIntegration(GlobalHandlers);\n var isFailedOwnDelivery = error && error.__sentry_own_request__ === true;\n if (!hasIntegration || shouldIgnoreOnError() || isFailedOwnDelivery) {\n return true;\n }\n var client = currentHub.getClient();\n var event = isPrimitive(error)\n ? _this._eventFromRejectionWithPrimitive(error)\n : eventFromUnknownInput(error, undefined, {\n attachStacktrace: client && client.getOptions().attachStacktrace,\n rejection: true,\n });\n event.level = Severity.Error;\n addExceptionMechanism(event, {\n handled: false,\n type: 'onunhandledrejection',\n });\n currentHub.captureEvent(event, {\n originalException: error,\n });\n return;\n },\n type: 'unhandledrejection',\n });\n this._onUnhandledRejectionHandlerInstalled = true;\n };\n /**\n * This function creates a stack from an old, error-less onerror handler.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n GlobalHandlers.prototype._eventFromIncompleteOnError = function (msg, url, line, column) {\n var ERROR_TYPES_RE = /^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;\n // If 'message' is ErrorEvent, get real message from inside\n var message = isErrorEvent(msg) ? msg.message : msg;\n var name;\n if (isString(message)) {\n var groups = message.match(ERROR_TYPES_RE);\n if (groups) {\n name = groups[1];\n message = groups[2];\n }\n }\n var event = {\n exception: {\n values: [\n {\n type: name || 'Error',\n value: message,\n },\n ],\n },\n };\n return this._enhanceEventWithInitialFrame(event, url, line, column);\n };\n /**\n * Create an event from a promise rejection where the `reason` is a primitive.\n *\n * @param reason: The `reason` property of the promise rejection\n * @returns An Event object with an appropriate `exception` value\n */\n GlobalHandlers.prototype._eventFromRejectionWithPrimitive = function (reason) {\n return {\n exception: {\n values: [\n {\n type: 'UnhandledRejection',\n // String() is needed because the Primitive type includes symbols (which can't be automatically stringified)\n value: \"Non-Error promise rejection captured with value: \" + String(reason),\n },\n ],\n },\n };\n };\n /** JSDoc */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n GlobalHandlers.prototype._enhanceEventWithInitialFrame = function (event, url, line, column) {\n event.exception = event.exception || {};\n event.exception.values = event.exception.values || [];\n event.exception.values[0] = event.exception.values[0] || {};\n event.exception.values[0].stacktrace = event.exception.values[0].stacktrace || {};\n event.exception.values[0].stacktrace.frames = event.exception.values[0].stacktrace.frames || [];\n var colno = isNaN(parseInt(column, 10)) ? undefined : column;\n var lineno = isNaN(parseInt(line, 10)) ? undefined : line;\n var filename = isString(url) && url.length > 0 ? url : getLocationHref();\n if (event.exception.values[0].stacktrace.frames.length === 0) {\n event.exception.values[0].stacktrace.frames.push({\n colno: colno,\n filename: filename,\n function: '?',\n in_app: true,\n lineno: lineno,\n });\n }\n return event;\n };\n /**\n * @inheritDoc\n */\n GlobalHandlers.id = 'GlobalHandlers';\n return GlobalHandlers;\n}());\nexport { GlobalHandlers };\n//# sourceMappingURL=globalhandlers.js.map","import { __assign } from \"tslib\";\nimport { fill, getFunctionName, getGlobalObject } from '@sentry/utils';\nimport { wrap } from '../helpers';\nvar DEFAULT_EVENT_TARGET = [\n 'EventTarget',\n 'Window',\n 'Node',\n 'ApplicationCache',\n 'AudioTrackList',\n 'ChannelMergerNode',\n 'CryptoOperation',\n 'EventSource',\n 'FileReader',\n 'HTMLUnknownElement',\n 'IDBDatabase',\n 'IDBRequest',\n 'IDBTransaction',\n 'KeyOperation',\n 'MediaController',\n 'MessagePort',\n 'ModalWindow',\n 'Notification',\n 'SVGElementInstance',\n 'Screen',\n 'TextTrack',\n 'TextTrackCue',\n 'TextTrackList',\n 'WebSocket',\n 'WebSocketWorker',\n 'Worker',\n 'XMLHttpRequest',\n 'XMLHttpRequestEventTarget',\n 'XMLHttpRequestUpload',\n];\n/** Wrap timer functions and event targets to catch errors and provide better meta data */\nvar TryCatch = /** @class */ (function () {\n /**\n * @inheritDoc\n */\n function TryCatch(options) {\n /**\n * @inheritDoc\n */\n this.name = TryCatch.id;\n this._options = __assign({ XMLHttpRequest: true, eventTarget: true, requestAnimationFrame: true, setInterval: true, setTimeout: true }, options);\n }\n /**\n * Wrap timer functions and event targets to catch errors\n * and provide better metadata.\n */\n TryCatch.prototype.setupOnce = function () {\n var global = getGlobalObject();\n if (this._options.setTimeout) {\n fill(global, 'setTimeout', this._wrapTimeFunction.bind(this));\n }\n if (this._options.setInterval) {\n fill(global, 'setInterval', this._wrapTimeFunction.bind(this));\n }\n if (this._options.requestAnimationFrame) {\n fill(global, 'requestAnimationFrame', this._wrapRAF.bind(this));\n }\n if (this._options.XMLHttpRequest && 'XMLHttpRequest' in global) {\n fill(XMLHttpRequest.prototype, 'send', this._wrapXHR.bind(this));\n }\n if (this._options.eventTarget) {\n var eventTarget = Array.isArray(this._options.eventTarget) ? this._options.eventTarget : DEFAULT_EVENT_TARGET;\n eventTarget.forEach(this._wrapEventTarget.bind(this));\n }\n };\n /** JSDoc */\n TryCatch.prototype._wrapTimeFunction = function (original) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var originalCallback = args[0];\n args[0] = wrap(originalCallback, {\n mechanism: {\n data: { function: getFunctionName(original) },\n handled: true,\n type: 'instrument',\n },\n });\n return original.apply(this, args);\n };\n };\n /** JSDoc */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n TryCatch.prototype._wrapRAF = function (original) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return function (callback) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return original.call(this, wrap(callback, {\n mechanism: {\n data: {\n function: 'requestAnimationFrame',\n handler: getFunctionName(original),\n },\n handled: true,\n type: 'instrument',\n },\n }));\n };\n };\n /** JSDoc */\n TryCatch.prototype._wrapEventTarget = function (target) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n var global = getGlobalObject();\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n var proto = global[target] && global[target].prototype;\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n if (!proto || !proto.hasOwnProperty || !proto.hasOwnProperty('addEventListener')) {\n return;\n }\n fill(proto, 'addEventListener', function (original) {\n return function (eventName, fn, options) {\n try {\n if (typeof fn.handleEvent === 'function') {\n fn.handleEvent = wrap(fn.handleEvent.bind(fn), {\n mechanism: {\n data: {\n function: 'handleEvent',\n handler: getFunctionName(fn),\n target: target,\n },\n handled: true,\n type: 'instrument',\n },\n });\n }\n }\n catch (err) {\n // can sometimes get 'Permission denied to access property \"handle Event'\n }\n return original.call(this, eventName, \n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n wrap(fn, {\n mechanism: {\n data: {\n function: 'addEventListener',\n handler: getFunctionName(fn),\n target: target,\n },\n handled: true,\n type: 'instrument',\n },\n }), options);\n };\n });\n fill(proto, 'removeEventListener', function (originalRemoveEventListener) {\n return function (eventName, fn, options) {\n var _a;\n /**\n * There are 2 possible scenarios here:\n *\n * 1. Someone passes a callback, which was attached prior to Sentry initialization, or by using unmodified\n * method, eg. `document.addEventListener.call(el, name, handler). In this case, we treat this function\n * as a pass-through, and call original `removeEventListener` with it.\n *\n * 2. Someone passes a callback, which was attached after Sentry was initialized, which means that it was using\n * our wrapped version of `addEventListener`, which internally calls `wrap` helper.\n * This helper \"wraps\" whole callback inside a try/catch statement, and attached appropriate metadata to it,\n * in order for us to make a distinction between wrapped/non-wrapped functions possible.\n * If a function was wrapped, it has additional property of `__sentry_wrapped__`, holding the handler.\n *\n * When someone adds a handler prior to initialization, and then do it again, but after,\n * then we have to detach both of them. Otherwise, if we'd detach only wrapped one, it'd be impossible\n * to get rid of the initial handler and it'd stick there forever.\n */\n var wrappedEventHandler = fn;\n try {\n var originalEventHandler = (_a = wrappedEventHandler) === null || _a === void 0 ? void 0 : _a.__sentry_wrapped__;\n if (originalEventHandler) {\n originalRemoveEventListener.call(this, eventName, originalEventHandler, options);\n }\n }\n catch (e) {\n // ignore, accessing __sentry_wrapped__ will throw in some Selenium environments\n }\n return originalRemoveEventListener.call(this, eventName, wrappedEventHandler, options);\n };\n });\n };\n /** JSDoc */\n TryCatch.prototype._wrapXHR = function (originalSend) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n var xhr = this;\n var xmlHttpRequestProps = ['onload', 'onerror', 'onprogress', 'onreadystatechange'];\n xmlHttpRequestProps.forEach(function (prop) {\n if (prop in xhr && typeof xhr[prop] === 'function') {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n fill(xhr, prop, function (original) {\n var wrapOptions = {\n mechanism: {\n data: {\n function: prop,\n handler: getFunctionName(original),\n },\n handled: true,\n type: 'instrument',\n },\n };\n // If Instrument integration has been called before TryCatch, get the name of original function\n if (original.__sentry_original__) {\n wrapOptions.mechanism.data.handler = getFunctionName(original.__sentry_original__);\n }\n // Otherwise wrap directly\n return wrap(original, wrapOptions);\n });\n }\n });\n return originalSend.apply(this, args);\n };\n };\n /**\n * @inheritDoc\n */\n TryCatch.id = 'TryCatch';\n return TryCatch;\n}());\nexport { TryCatch };\n//# sourceMappingURL=trycatch.js.map","import { __assign, __read, __spread } from \"tslib\";\n/* eslint-disable @typescript-eslint/no-unsafe-member-access */\n/* eslint-disable max-lines */\nimport { getCurrentHub } from '@sentry/core';\nimport { Severity } from '@sentry/types';\nimport { addInstrumentationHandler, getEventDescription, getGlobalObject, htmlTreeAsString, parseUrl, safeJoin, } from '@sentry/utils';\n/**\n * Default Breadcrumbs instrumentations\n * TODO: Deprecated - with v6, this will be renamed to `Instrument`\n */\nvar Breadcrumbs = /** @class */ (function () {\n /**\n * @inheritDoc\n */\n function Breadcrumbs(options) {\n /**\n * @inheritDoc\n */\n this.name = Breadcrumbs.id;\n this._options = __assign({ console: true, dom: true, fetch: true, history: true, sentry: true, xhr: true }, options);\n }\n /**\n * Create a breadcrumb of `sentry` from the events themselves\n */\n Breadcrumbs.prototype.addSentryBreadcrumb = function (event) {\n if (!this._options.sentry) {\n return;\n }\n getCurrentHub().addBreadcrumb({\n category: \"sentry.\" + (event.type === 'transaction' ? 'transaction' : 'event'),\n event_id: event.event_id,\n level: event.level,\n message: getEventDescription(event),\n }, {\n event: event,\n });\n };\n /**\n * Instrument browser built-ins w/ breadcrumb capturing\n * - Console API\n * - DOM API (click/typing)\n * - XMLHttpRequest API\n * - Fetch API\n * - History API\n */\n Breadcrumbs.prototype.setupOnce = function () {\n var _this = this;\n if (this._options.console) {\n addInstrumentationHandler({\n callback: function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n _this._consoleBreadcrumb.apply(_this, __spread(args));\n },\n type: 'console',\n });\n }\n if (this._options.dom) {\n addInstrumentationHandler({\n callback: function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n _this._domBreadcrumb.apply(_this, __spread(args));\n },\n type: 'dom',\n });\n }\n if (this._options.xhr) {\n addInstrumentationHandler({\n callback: function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n _this._xhrBreadcrumb.apply(_this, __spread(args));\n },\n type: 'xhr',\n });\n }\n if (this._options.fetch) {\n addInstrumentationHandler({\n callback: function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n _this._fetchBreadcrumb.apply(_this, __spread(args));\n },\n type: 'fetch',\n });\n }\n if (this._options.history) {\n addInstrumentationHandler({\n callback: function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n _this._historyBreadcrumb.apply(_this, __spread(args));\n },\n type: 'history',\n });\n }\n };\n /**\n * Creates breadcrumbs from console API calls\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n Breadcrumbs.prototype._consoleBreadcrumb = function (handlerData) {\n var breadcrumb = {\n category: 'console',\n data: {\n arguments: handlerData.args,\n logger: 'console',\n },\n level: Severity.fromString(handlerData.level),\n message: safeJoin(handlerData.args, ' '),\n };\n if (handlerData.level === 'assert') {\n if (handlerData.args[0] === false) {\n breadcrumb.message = \"Assertion failed: \" + (safeJoin(handlerData.args.slice(1), ' ') || 'console.assert');\n breadcrumb.data.arguments = handlerData.args.slice(1);\n }\n else {\n // Don't capture a breadcrumb for passed assertions\n return;\n }\n }\n getCurrentHub().addBreadcrumb(breadcrumb, {\n input: handlerData.args,\n level: handlerData.level,\n });\n };\n /**\n * Creates breadcrumbs from DOM API calls\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n Breadcrumbs.prototype._domBreadcrumb = function (handlerData) {\n var target;\n // Accessing event.target can throw (see getsentry/raven-js#838, #768)\n try {\n target = handlerData.event.target\n ? htmlTreeAsString(handlerData.event.target)\n : htmlTreeAsString(handlerData.event);\n }\n catch (e) {\n target = '';\n }\n if (target.length === 0) {\n return;\n }\n getCurrentHub().addBreadcrumb({\n category: \"ui.\" + handlerData.name,\n message: target,\n }, {\n event: handlerData.event,\n name: handlerData.name,\n });\n };\n /**\n * Creates breadcrumbs from XHR API calls\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n Breadcrumbs.prototype._xhrBreadcrumb = function (handlerData) {\n if (handlerData.endTimestamp) {\n // We only capture complete, non-sentry requests\n if (handlerData.xhr.__sentry_own_request__) {\n return;\n }\n var _a = handlerData.xhr.__sentry_xhr__ || {}, method = _a.method, url = _a.url, status_code = _a.status_code, body = _a.body;\n getCurrentHub().addBreadcrumb({\n category: 'xhr',\n data: {\n method: method,\n url: url,\n status_code: status_code,\n },\n type: 'http',\n }, {\n xhr: handlerData.xhr,\n input: body,\n });\n return;\n }\n };\n /**\n * Creates breadcrumbs from fetch API calls\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n Breadcrumbs.prototype._fetchBreadcrumb = function (handlerData) {\n // We only capture complete fetch requests\n if (!handlerData.endTimestamp) {\n return;\n }\n if (handlerData.fetchData.url.match(/sentry_key/) && handlerData.fetchData.method === 'POST') {\n // We will not create breadcrumbs for fetch requests that contain `sentry_key` (internal sentry requests)\n return;\n }\n if (handlerData.error) {\n getCurrentHub().addBreadcrumb({\n category: 'fetch',\n data: handlerData.fetchData,\n level: Severity.Error,\n type: 'http',\n }, {\n data: handlerData.error,\n input: handlerData.args,\n });\n }\n else {\n getCurrentHub().addBreadcrumb({\n category: 'fetch',\n data: __assign(__assign({}, handlerData.fetchData), { status_code: handlerData.response.status }),\n type: 'http',\n }, {\n input: handlerData.args,\n response: handlerData.response,\n });\n }\n };\n /**\n * Creates breadcrumbs from history API calls\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n Breadcrumbs.prototype._historyBreadcrumb = function (handlerData) {\n var global = getGlobalObject();\n var from = handlerData.from;\n var to = handlerData.to;\n var parsedLoc = parseUrl(global.location.href);\n var parsedFrom = parseUrl(from);\n var parsedTo = parseUrl(to);\n // Initial pushState doesn't provide `from` information\n if (!parsedFrom.path) {\n parsedFrom = parsedLoc;\n }\n // Use only the path component of the URL if the URL matches the current\n // document (almost all the time when using pushState)\n if (parsedLoc.protocol === parsedTo.protocol && parsedLoc.host === parsedTo.host) {\n to = parsedTo.relative;\n }\n if (parsedLoc.protocol === parsedFrom.protocol && parsedLoc.host === parsedFrom.host) {\n from = parsedFrom.relative;\n }\n getCurrentHub().addBreadcrumb({\n category: 'navigation',\n data: {\n from: from,\n to: to,\n },\n });\n };\n /**\n * @inheritDoc\n */\n Breadcrumbs.id = 'Breadcrumbs';\n return Breadcrumbs;\n}());\nexport { Breadcrumbs };\n//# sourceMappingURL=breadcrumbs.js.map","import { __read, __spread } from \"tslib\";\nimport { addGlobalEventProcessor, getCurrentHub } from '@sentry/core';\nimport { isInstanceOf } from '@sentry/utils';\nimport { exceptionFromStacktrace } from '../parsers';\nimport { computeStackTrace } from '../tracekit';\nvar DEFAULT_KEY = 'cause';\nvar DEFAULT_LIMIT = 5;\n/** Adds SDK info to an event. */\nvar LinkedErrors = /** @class */ (function () {\n /**\n * @inheritDoc\n */\n function LinkedErrors(options) {\n if (options === void 0) { options = {}; }\n /**\n * @inheritDoc\n */\n this.name = LinkedErrors.id;\n this._key = options.key || DEFAULT_KEY;\n this._limit = options.limit || DEFAULT_LIMIT;\n }\n /**\n * @inheritDoc\n */\n LinkedErrors.prototype.setupOnce = function () {\n addGlobalEventProcessor(function (event, hint) {\n var self = getCurrentHub().getIntegration(LinkedErrors);\n if (self) {\n return self._handler(event, hint);\n }\n return event;\n });\n };\n /**\n * @inheritDoc\n */\n LinkedErrors.prototype._handler = function (event, hint) {\n if (!event.exception || !event.exception.values || !hint || !isInstanceOf(hint.originalException, Error)) {\n return event;\n }\n var linkedErrors = this._walkErrorTree(hint.originalException, this._key);\n event.exception.values = __spread(linkedErrors, event.exception.values);\n return event;\n };\n /**\n * @inheritDoc\n */\n LinkedErrors.prototype._walkErrorTree = function (error, key, stack) {\n if (stack === void 0) { stack = []; }\n if (!isInstanceOf(error[key], Error) || stack.length + 1 >= this._limit) {\n return stack;\n }\n var stacktrace = computeStackTrace(error[key]);\n var exception = exceptionFromStacktrace(stacktrace);\n return this._walkErrorTree(error[key], key, __spread([exception], stack));\n };\n /**\n * @inheritDoc\n */\n LinkedErrors.id = 'LinkedErrors';\n return LinkedErrors;\n}());\nexport { LinkedErrors };\n//# sourceMappingURL=linkederrors.js.map","import { __assign } from \"tslib\";\nimport { addGlobalEventProcessor, getCurrentHub } from '@sentry/core';\nimport { getGlobalObject } from '@sentry/utils';\nvar global = getGlobalObject();\n/** UserAgent */\nvar UserAgent = /** @class */ (function () {\n function UserAgent() {\n /**\n * @inheritDoc\n */\n this.name = UserAgent.id;\n }\n /**\n * @inheritDoc\n */\n UserAgent.prototype.setupOnce = function () {\n addGlobalEventProcessor(function (event) {\n var _a, _b, _c;\n if (getCurrentHub().getIntegration(UserAgent)) {\n // if none of the information we want exists, don't bother\n if (!global.navigator && !global.location && !global.document) {\n return event;\n }\n // grab as much info as exists and add it to the event\n var url = ((_a = event.request) === null || _a === void 0 ? void 0 : _a.url) || ((_b = global.location) === null || _b === void 0 ? void 0 : _b.href);\n var referrer = (global.document || {}).referrer;\n var userAgent = (global.navigator || {}).userAgent;\n var headers = __assign(__assign(__assign({}, (_c = event.request) === null || _c === void 0 ? void 0 : _c.headers), (referrer && { Referer: referrer })), (userAgent && { 'User-Agent': userAgent }));\n var request = __assign(__assign({}, (url && { url: url })), { headers: headers });\n return __assign(__assign({}, event), { request: request });\n }\n return event;\n });\n };\n /**\n * @inheritDoc\n */\n UserAgent.id = 'UserAgent';\n return UserAgent;\n}());\nexport { UserAgent };\n//# sourceMappingURL=useragent.js.map","export var SDK_NAME = 'sentry.javascript.browser';\nexport var SDK_VERSION = '5.30.0';\n//# sourceMappingURL=version.js.map","import { __assign, __extends, __read, __spread } from \"tslib\";\nimport { BaseClient } from '@sentry/core';\nimport { getGlobalObject, logger } from '@sentry/utils';\nimport { BrowserBackend } from './backend';\nimport { injectReportDialog } from './helpers';\nimport { Breadcrumbs } from './integrations';\nimport { SDK_NAME, SDK_VERSION } from './version';\n/**\n * The Sentry Browser SDK Client.\n *\n * @see BrowserOptions for documentation on configuration options.\n * @see SentryClient for usage documentation.\n */\nvar BrowserClient = /** @class */ (function (_super) {\n __extends(BrowserClient, _super);\n /**\n * Creates a new Browser SDK instance.\n *\n * @param options Configuration options for this SDK.\n */\n function BrowserClient(options) {\n if (options === void 0) { options = {}; }\n return _super.call(this, BrowserBackend, options) || this;\n }\n /**\n * Show a report dialog to the user to send feedback to a specific event.\n *\n * @param options Set individual options for the dialog\n */\n BrowserClient.prototype.showReportDialog = function (options) {\n if (options === void 0) { options = {}; }\n // doesn't work without a document (React Native)\n var document = getGlobalObject().document;\n if (!document) {\n return;\n }\n if (!this._isEnabled()) {\n logger.error('Trying to call showReportDialog with Sentry Client disabled');\n return;\n }\n injectReportDialog(__assign(__assign({}, options), { dsn: options.dsn || this.getDsn() }));\n };\n /**\n * @inheritDoc\n */\n BrowserClient.prototype._prepareEvent = function (event, scope, hint) {\n event.platform = event.platform || 'javascript';\n event.sdk = __assign(__assign({}, event.sdk), { name: SDK_NAME, packages: __spread(((event.sdk && event.sdk.packages) || []), [\n {\n name: 'npm:@sentry/browser',\n version: SDK_VERSION,\n },\n ]), version: SDK_VERSION });\n return _super.prototype._prepareEvent.call(this, event, scope, hint);\n };\n /**\n * @inheritDoc\n */\n BrowserClient.prototype._sendEvent = function (event) {\n var integration = this.getIntegration(Breadcrumbs);\n if (integration) {\n integration.addSentryBreadcrumb(event);\n }\n _super.prototype._sendEvent.call(this, event);\n };\n return BrowserClient;\n}(BaseClient));\nexport { BrowserClient };\n//# sourceMappingURL=client.js.map","import { getCurrentHub, initAndBind, Integrations as CoreIntegrations } from '@sentry/core';\nimport { getGlobalObject, SyncPromise } from '@sentry/utils';\nimport { BrowserClient } from './client';\nimport { wrap as internalWrap } from './helpers';\nimport { Breadcrumbs, GlobalHandlers, LinkedErrors, TryCatch, UserAgent } from './integrations';\nexport var defaultIntegrations = [\n new CoreIntegrations.InboundFilters(),\n new CoreIntegrations.FunctionToString(),\n new TryCatch(),\n new Breadcrumbs(),\n new GlobalHandlers(),\n new LinkedErrors(),\n new UserAgent(),\n];\n/**\n * The Sentry Browser SDK Client.\n *\n * To use this SDK, call the {@link init} function as early as possible when\n * loading the web page. To set context information or send manual events, use\n * the provided methods.\n *\n * @example\n *\n * ```\n *\n * import { init } from '@sentry/browser';\n *\n * init({\n * dsn: '__DSN__',\n * // ...\n * });\n * ```\n *\n * @example\n * ```\n *\n * import { configureScope } from '@sentry/browser';\n * configureScope((scope: Scope) => {\n * scope.setExtra({ battery: 0.7 });\n * scope.setTag({ user_mode: 'admin' });\n * scope.setUser({ id: '4711' });\n * });\n * ```\n *\n * @example\n * ```\n *\n * import { addBreadcrumb } from '@sentry/browser';\n * addBreadcrumb({\n * message: 'My Breadcrumb',\n * // ...\n * });\n * ```\n *\n * @example\n *\n * ```\n *\n * import * as Sentry from '@sentry/browser';\n * Sentry.captureMessage('Hello, world!');\n * Sentry.captureException(new Error('Good bye'));\n * Sentry.captureEvent({\n * message: 'Manual',\n * stacktrace: [\n * // ...\n * ],\n * });\n * ```\n *\n * @see {@link BrowserOptions} for documentation on configuration options.\n */\nexport function init(options) {\n if (options === void 0) { options = {}; }\n if (options.defaultIntegrations === undefined) {\n options.defaultIntegrations = defaultIntegrations;\n }\n if (options.release === undefined) {\n var window_1 = getGlobalObject();\n // This supports the variable that sentry-webpack-plugin injects\n if (window_1.SENTRY_RELEASE && window_1.SENTRY_RELEASE.id) {\n options.release = window_1.SENTRY_RELEASE.id;\n }\n }\n if (options.autoSessionTracking === undefined) {\n options.autoSessionTracking = false;\n }\n initAndBind(BrowserClient, options);\n if (options.autoSessionTracking) {\n startSessionTracking();\n }\n}\n/**\n * Present the user with a report dialog.\n *\n * @param options Everything is optional, we try to fetch all info need from the global scope.\n */\nexport function showReportDialog(options) {\n if (options === void 0) { options = {}; }\n if (!options.eventId) {\n options.eventId = getCurrentHub().lastEventId();\n }\n var client = getCurrentHub().getClient();\n if (client) {\n client.showReportDialog(options);\n }\n}\n/**\n * This is the getter for lastEventId.\n *\n * @returns The last event id of a captured event.\n */\nexport function lastEventId() {\n return getCurrentHub().lastEventId();\n}\n/**\n * This function is here to be API compatible with the loader.\n * @hidden\n */\nexport function forceLoad() {\n // Noop\n}\n/**\n * This function is here to be API compatible with the loader.\n * @hidden\n */\nexport function onLoad(callback) {\n callback();\n}\n/**\n * A promise that resolves when all current events have been sent.\n * If you provide a timeout and the queue takes longer to drain the promise returns false.\n *\n * @param timeout Maximum time in ms the client should wait.\n */\nexport function flush(timeout) {\n var client = getCurrentHub().getClient();\n if (client) {\n return client.flush(timeout);\n }\n return SyncPromise.reject(false);\n}\n/**\n * A promise that resolves when all current events have been sent.\n * If you provide a timeout and the queue takes longer to drain the promise returns false.\n *\n * @param timeout Maximum time in ms the client should wait.\n */\nexport function close(timeout) {\n var client = getCurrentHub().getClient();\n if (client) {\n return client.close(timeout);\n }\n return SyncPromise.reject(false);\n}\n/**\n * Wrap code within a try/catch block so the SDK is able to capture errors.\n *\n * @param fn A function to wrap.\n *\n * @returns The result of wrapped function call.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function wrap(fn) {\n return internalWrap(fn)();\n}\n/**\n * Enable automatic Session Tracking for the initial page load.\n */\nfunction startSessionTracking() {\n var window = getGlobalObject();\n var hub = getCurrentHub();\n /**\n * We should be using `Promise.all([windowLoaded, firstContentfulPaint])` here,\n * but, as always, it's not available in the IE10-11. Thanks IE.\n */\n var loadResolved = document.readyState === 'complete';\n var fcpResolved = false;\n var possiblyEndSession = function () {\n if (fcpResolved && loadResolved) {\n hub.endSession();\n }\n };\n var resolveWindowLoaded = function () {\n loadResolved = true;\n possiblyEndSession();\n window.removeEventListener('load', resolveWindowLoaded);\n };\n hub.startSession();\n if (!loadResolved) {\n // IE doesn't support `{ once: true }` for event listeners, so we have to manually\n // attach and then detach it once completed.\n window.addEventListener('load', resolveWindowLoaded);\n }\n try {\n var po = new PerformanceObserver(function (entryList, po) {\n entryList.getEntries().forEach(function (entry) {\n if (entry.name === 'first-contentful-paint' && entry.startTime < firstHiddenTime_1) {\n po.disconnect();\n fcpResolved = true;\n possiblyEndSession();\n }\n });\n });\n // There's no need to even attach this listener if `PerformanceObserver` constructor will fail,\n // so we do it below here.\n var firstHiddenTime_1 = document.visibilityState === 'hidden' ? 0 : Infinity;\n document.addEventListener('visibilitychange', function (event) {\n firstHiddenTime_1 = Math.min(firstHiddenTime_1, event.timeStamp);\n }, { once: true });\n po.observe({\n type: 'paint',\n buffered: true,\n });\n }\n catch (e) {\n fcpResolved = true;\n possiblyEndSession();\n }\n}\n//# sourceMappingURL=sdk.js.map","import Pusher from 'pusher-js';\nimport { push } from 'react-router-redux';\nimport _ from 'underscore';\n\nimport { ActionTypes } from './actionTypes';\nimport * as responseActions from './responses';\nimport { populateQuestions, setSessionReducerToSavedSession } from './session.ts';\n\nimport { FocusPoint, IncorrectSequence, Question, Questions } from '../interfaces/questions';\nimport { ConceptResult, Response } from '../../Shared/quill-marking-logic/src/main';\nimport { requestGet, requestPost, } from '../../../modules/request/index';\nimport {\n FocusPointApi,\n GRAMMAR_QUESTION_TYPE,\n IncorrectSequenceApi,\n QuestionApi\n} from '../libs/questions_api';\n\nexport const startListeningToQuestions = (activityUID?: string, sessionID?: string) => {\n return (dispatch: Function) => {\n const fetchQuestions = QuestionApi.getAllForType(GRAMMAR_QUESTION_TYPE);\n\n fetchQuestions.then((questions: Array) => {\n if (questions) {\n if (sessionID) {\n populateQuestions(questions)\n dispatch(setSessionReducerToSavedSession(sessionID))\n }\n dispatch({ type: ActionTypes.RECEIVE_QUESTIONS_DATA, data: questions, });\n } else {\n dispatch({ type: ActionTypes.NO_QUESTIONS_FOUND })\n }\n });\n }\n}\n\nexport const getQuestion = (questionID: string) => {\n return (dispatch: Function) => {\n QuestionApi.get(questionID).then((question: Question) => {\n dispatch({ type: ActionTypes.RECEIVE_SINGLE_QUESTION_DATA, uid: questionID, data: question })\n })\n }\n}\n\nexport const getGradedResponsesWithCallback = (questionID: string, callback: Function) => {\n requestGet(`${window.postbuildEnv.QUILL_CMS}/questions/${questionID}/responses`, (body) => {\n const bodyToObj: {[key: string]: Response} = {};\n body.forEach((resp: Response) => {\n bodyToObj[resp.id] = resp;\n if (typeof resp.concept_results === 'string') {\n resp.concept_results = JSON.parse(resp.concept_results);\n }\n if (resp.concept_results) {\n for (const cr in resp.concept_results) {\n if (resp.concept_results.hasOwnProperty(cr)) {\n const formattedCr: ConceptResult = { conceptUID: '', correct: false};\n formattedCr.conceptUID = cr;\n formattedCr.correct = resp.concept_results[cr];\n resp.concept_results[cr] = formattedCr;\n }\n }\n resp.conceptResults = resp.concept_results;\n delete resp.concept_results;\n }\n });\n callback(bodyToObj);\n });\n}\n\nexport const incrementRequestCount = () => {\n return { type: ActionTypes.INCREMENT_REQUEST_COUNT }\n}\n\nexport const searchResponses = (qid: string, callback: Function) => {\n return (dispatch: Function, getState: Function) => {\n const requestNumber = getState().filters.requestCount\n // check for request number in state, save as const\n requestPost(\n `${window.postbuildEnv.QUILL_CMS}/questions/${qid}/responses/search`,\n { search: getFormattedSearchData(getState()), },\n (data) => {\n // check again for number in state\n // if equal to const set earlier, update the state\n // otherwise, do nothing\n if (getState().filters.requestCount === requestNumber && data) {\n const embeddedOrder = _.map(data.results, (response, i) => {\n response.sortOrder = i;\n return response;\n });\n const parsedResponses = _.indexBy(embeddedOrder, 'id');\n\n const responseData = {\n responses: parsedResponses,\n numberOfResponses: data.numberOfResults,\n numberOfPages: data.numberOfPages,\n };\n dispatch(updateResponses(responseData));\n callback();\n }\n }\n );\n };\n}\n\nexport const getFormattedSearchData = (state) => {\n const searchData = state.filters.formattedFilterData;\n searchData.text = state.filters.stringFilter;\n searchData.pageNumber = state.filters.responsePageNumber;\n return searchData;\n}\n\nexport const updateResponses = (data: Response[]) => {\n return { type: ActionTypes.UPDATE_SEARCHED_RESPONSES, data, };\n}\n\nexport const initializeSubscription = (qid: string) => {\n return (dispatch: Function) => {\n if (window.postbuildEnv.NODE_ENV === 'development') {\n Pusher.logToConsole = true;\n }\n if (!window.pusher) {\n window.pusher = new Pusher(window.postbuildEnv.PUSHER_KEY, { cluster: window.postbuildEnv.PUSHER_CLUSTER });\n }\n const channel = window.pusher.subscribe(`admin-${qid}`);\n channel.bind('new-response', (data) => {\n setTimeout(() => dispatch(searchResponses(qid)), 1000);\n });\n channel.bind('rematching-finished', () => {\n window.alert(`Rematching finished for the Grammar question with uid ${qid}! Reload the page to see the rematched responses.`)\n })\n };\n}\n\nexport const removeSubscription = (qid: string) => {\n return (dispatch: Function) => {\n if (window.pusher) {\n window.pusher.unsubscribe(`admin-${qid}`);\n }\n };\n}\n\nexport const submitNewQuestion = (content: Question) => {\n return (dispatch: Function) => {\n dispatch({ type: ActionTypes.AWAIT_NEW_QUESTION_RESPONSE, });\n QuestionApi.create(GRAMMAR_QUESTION_TYPE, content).then((question) => {\n dispatch({ type: ActionTypes.RECEIVE_NEW_QUESTION_RESPONSE, });\n dispatch({ type: ActionTypes.DISPLAY_MESSAGE, message: 'Submission successfully saved!', });\n const question_uid = Object.keys(question)[0]\n dispatch(getQuestion(question_uid))\n const action = push(`/admin/questions/${question.uid}`);\n dispatch(action);\n content.answers.forEach(a => dispatch(saveOptimalResponse(question_uid, content.concept_uid, a)))\n }).catch((error: string) => {\n dispatch({ type: ActionTypes.RECEIVE_NEW_QUESTION_RESPONSE, });\n dispatch({ type: ActionTypes.DISPLAY_ERROR, error: `Submission failed! ${error}`, });\n });\n };\n}\n\nexport const startQuestionEdit = (qid: string) => {\n return { type: ActionTypes.START_QUESTION_EDIT, qid, };\n}\n\nexport const cancelQuestionEdit = (qid: string) => {\n return { type: ActionTypes.FINISH_QUESTION_EDIT, qid, };\n}\n\nexport const submitQuestionEdit = (qid: string, formContent: Question) => {\n return (dispatch: Function, getState: Function) => {\n const unmodifiedContent = getState().questions.data[qid]\n const updatedContent = Object.assign(unmodifiedContent, formContent)\n dispatch({ type: ActionTypes.SUBMIT_QUESTION_EDIT, qid, });\n updatedContent.answers.forEach(a => dispatch(saveOptimalResponse(qid, updatedContent.concept_uid, a)))\n QuestionApi.update(qid, updatedContent).then(() => {\n dispatch(getQuestion(qid))\n dispatch({ type: ActionTypes.FINISH_QUESTION_EDIT, qid, });\n dispatch({ type: ActionTypes.DISPLAY_MESSAGE, message: 'Update successfully saved!', });\n\n }).catch((error: string) => {\n dispatch({ type: ActionTypes.FINISH_QUESTION_EDIT, qid, });\n dispatch({ type: ActionTypes.DISPLAY_ERROR, error: `Update failed! ${error}`, });\n });\n };\n}\n\nexport const saveOptimalResponse = (qid: string, conceptUid: string, answer: {text: string}) => {\n return (dispatch: Function) => {\n if (answer.text) {\n const conceptResults = [{ conceptUID: conceptUid, correct: true }]\n const formattedResponse = {\n optimal: true,\n count: 1,\n text: answer.text.replace(/{|}/gm, ''),\n question_uid: qid,\n feedback: \"Well done! That's the correct answer.\",\n concept_results: conceptResults\n }\n dispatch(responseActions.submitResponse(formattedResponse, null, false))\n }\n }\n}\n\nexport const submitNewIncorrectSequence = (qid: string, data: IncorrectSequence, callback?: Function) => {\n return (dispatch: Function) => {\n IncorrectSequenceApi.create(qid, data).then(() => {\n dispatch(getQuestion(qid))\n callback ? callback() : null\n }).catch((error: string) => {\n alert(`Submission failed! ${error}`);\n })\n };\n}\n\nexport const submitEditedIncorrectSequence = (qid: string, data: IncorrectSequence, seqid: string) => {\n return (dispatch: Function) => {\n IncorrectSequenceApi.update(qid, seqid, data).then(() => {\n dispatch(getQuestion(qid))\n }).catch((error: string) => {\n alert(`Submission failed! ${error}`);\n })\n };\n}\n\nexport const deleteIncorrectSequence = (qid: string, seqid: string) => {\n return (dispatch: Function) => {\n IncorrectSequenceApi.remove(qid, seqid).then(() => {\n dispatch(getQuestion(qid));\n }).catch((error) => {\n alert(`Delete failed! ${error}`);\n });\n };\n}\n\nexport const updateIncorrectSequences = (qid: string, data: Array, callback: Function) => {\n return (dispatch: Function) => {\n IncorrectSequenceApi.updateAllForQuestion(qid, data).then(() => {\n dispatch(getQuestion(qid))\n callback()\n }).catch((error: string) => {\n alert(`Order update failed! ${error}`);\n });\n }\n}\n\nexport const submitNewFocusPoint = (qid:string, data: FocusPoint) => {\n return (dispatch: Function) => {\n FocusPointApi.create(qid, data).then(() => {\n dispatch(getQuestion(qid))\n }).catch((error: string) => {\n alert(`Submission failed! ${error}`);\n });\n }\n}\n\nexport const submitEditedFocusPoint = (qid:string, data: FocusPoint, fpid: string) => {\n return (dispatch: Function) => {\n FocusPointApi.update(qid, fpid, data).then(() => {\n dispatch(getQuestion(qid))\n }).catch((error) => {\n alert(`Submission failed! ${error}`);\n });\n };\n}\n\nexport const submitBatchEditedFocusPoint = (qid:string, data: Array) => {\n return (dispatch: Function) => {\n FocusPointApi.updateAllForQuestion(qid, data).then(() => {\n dispatch(getQuestion(qid))\n }).catch((error) => {\n alert(`Submission failed! ${error}`);\n });\n };\n}\n\nexport const deleteFocusPoint = (qid:string, fpid: string) => {\n return (dispatch: Function) => {\n FocusPointApi.remove(qid, fpid).then(() => {\n dispatch(getQuestion(qid))\n }).catch((error) => {\n alert(`Delete failed! ${error}`);\n });\n };\n}\n\nexport const getUsedSequences = (qid: string) => {\n return (dispatch: Function, getState: Function) => {\n const existingIncorrectSeqs = getState().questions.data[qid].incorrectSequences\n const usedSeqs: Array = []\n if (existingIncorrectSeqs) {\n Object.values(existingIncorrectSeqs).forEach(inSeq => {\n const phrases = inSeq.text.split('|||')\n phrases.forEach((p) => {\n usedSeqs.push(p)\n })\n })\n }\n dispatch(setUsedSequences(qid, usedSeqs));\n }\n}\n\nexport const setUsedSequences = (qid: string, seq: Array) => {\n return {type: ActionTypes.SET_USED_SEQUENCES, qid, seq}\n}\n\nexport const updateStringFilter = (stringFilter: string, qid: string) => {\n return (dispatch: Function) => {\n dispatch(setStringFilter(stringFilter));\n dispatch(searchResponses(qid));\n };\n}\n\nexport const setStringFilter = (stringFilter: string) => {\n return { type: ActionTypes.SET_RESPONSE_STRING_FILTER, stringFilter, };\n}\n\nexport const startResponseEdit = (qid: string, rid: string) => {\n return { type: ActionTypes.START_RESPONSE_EDIT, qid, rid, };\n}\n\nexport const updatePageNumber = (pageNumber: Number) => {\n return (dispatch: Function) => {\n dispatch(setPageNumber(pageNumber));\n };\n}\n\nexport const setPageNumber = (pageNumber: Number) => {\n return { type: ActionTypes.SET_RESPONSE_PAGE_NUMBER, pageNumber, };\n}\n\nexport const clearQuestionState = (qid: string) => {\n return { type: ActionTypes.CLEAR_QUESTION_STATE, qid, };\n}\n\nexport const startChildResponseView = (qid: string, rid: string) => {\n return { type: ActionTypes.START_CHILD_RESPONSE_VIEW, qid, rid, };\n}\n\nexport const cancelChildResponseView = (qid: string, rid: string) => {\n return { type: ActionTypes.CANCEL_CHILD_RESPONSE_VIEW, qid, rid, };\n}\n\nexport const cancelResponseEdit = (qid, rid) => {\n return { type: ActionTypes.FINISH_RESPONSE_EDIT, qid, rid, };\n}\n","import { requestDelete, requestGet, requestPost, requestPut } from '../../../modules/request/index';\nimport { Lesson, LessonQuestion, Lessons } from '../interfaces/lessons';\n\nconst lessonApiBaseUrl = `${window.postbuildEnv.DEFAULT_URL}/api/v1/lessons`;\n\nconst TYPE_CONNECT_LESSON = 'connect_lesson'\nconst TYPE_DIAGNOSTIC_LESSON = 'diagnostic_lesson'\n\nclass LessonApi {\n static getAll(lesson_type: string): Promise {\n return requestGet(`${lessonApiBaseUrl}.json?lesson_type=${lesson_type}`, null, (error) => {throw(error)});\n }\n\n static get(lesson_type: string, uid: string): Promise {\n return requestGet(`${lessonApiBaseUrl}/${uid}.json`, null, (error) => {throw(error)});\n }\n\n static create(lesson_type: string, data: Lesson): Promise {\n return requestPost(`${lessonApiBaseUrl}.json?lesson_type=${lesson_type}`, {lesson: data}, null, (error) => {throw(error)});\n }\n\n static update(lesson_type: string, uid: string, data: Lesson): Promise {\n return requestPut(`${lessonApiBaseUrl}/${uid}.json`, {lesson: data}, null, (error) => {throw(error)});\n }\n\n static remove(lesson_type: string, uid: string): Promise {\n return requestDelete(`${lessonApiBaseUrl}/${uid}.json`, null, null, (error) => {throw(error)});\n }\n\n static addQuestion(lesson_type: string, uid: string, question: LessonQuestion): Promise {\n return requestPut(`${lessonApiBaseUrl}/${uid}/add_question.json`, {lesson_type: lesson_type, question: question}, null, (error) => {throw(error)});\n }\n}\n\nexport {\n LessonApi,\n TYPE_CONNECT_LESSON,\n TYPE_DIAGNOSTIC_LESSON,\n lessonApiBaseUrl\n};\n\n","import { requestDelete, requestGet, requestPost, requestPut } from '../../../modules/request/index';\nimport { FocusPoint, IncorrectSequence, Question } from '../interfaces/questions';\n\nconst SENTENCE_COMBINING_TYPE = 'connect_sentence_combining',\n SENTENCE_FRAGMENTS_TYPE = 'connect_sentence_fragments',\n FILL_IN_BLANKS_TYPE = 'connect_fill_in_blanks'\n\nconst questionApiBaseUrl = `${window.postbuildEnv.DEFAULT_URL}/api/v1/questions`;\nconst activityApiBaseUrl = `${window.postbuildEnv.DEFAULT_URL}/api/v1/activities`;\n\nclass QuestionApi {\n static getAll(questionType: string): Promise> {\n return requestGet(`${questionApiBaseUrl}.json?question_type=${questionType}`, null, (error) => {throw(error)});\n }\n\n static getAllForActivity(activityUID: string, language?: string): Promise> {\n const language_string = language ? `?language=${language}` : ''\n return requestGet(`${activityApiBaseUrl}/${activityUID}/questions.json${language_string}`, null, (error) => { throw (error) });\n }\n\n static get(uid: string): Promise {\n return requestGet(`${questionApiBaseUrl}/${uid}.json`, null, (error) => {throw(error)});\n }\n\n static create(questionType: string, data: Question): Promise> {\n return requestPost(`${questionApiBaseUrl}.json?question_type=${questionType}`, {question: data}, null, (error) => {throw(error)});\n }\n\n static update(uid: string, data: Question): Promise {\n return requestPut(`${questionApiBaseUrl}/${uid}.json`, { question: data }, null, (error) => { throw (error) });\n }\n\n static updateModelConcept(uid: string, modelConceptUid: string): Promise {\n return requestPut(`${questionApiBaseUrl}/${uid}/update_model_concept.json`, {\n question: {\n modelConcept: modelConceptUid\n }\n }, null, (error) => {throw(error)});\n }\n}\n\nclass FocusPointApi {\n static getAll(questionId: string): Promise {\n return requestGet(`${questionApiBaseUrl}/${questionId}/focus_points.json`, null, (error) => {throw(error)});\n }\n\n static get(questionId: string, focusPointId: string): Promise {\n return requestGet(`${questionApiBaseUrl}/${questionId}/focus_points/${focusPointId}.json`, null, (error) => {throw(error)});\n }\n\n static create(questionId: string, data: FocusPoint): Promise {\n return requestPost(`${questionApiBaseUrl}/${questionId}/focus_points.json`, {focus_point: data}, null, (error) => {throw(error)});\n }\n\n static update(questionId: string, focusPointId: string, data: FocusPoint): Promise {\n return requestPut(`${questionApiBaseUrl}/${questionId}/focus_points/${focusPointId}.json`, {focus_point: data}, null, (error) => {throw(error)});\n }\n\n static updateAllForQuestion(questionId: string, data: FocusPointCollection): Promise {\n return requestPut(`${questionApiBaseUrl}/${questionId}/focus_points/update_all.json`, {focus_point: data}, null, (error) => {throw(error)});\n }\n\n static remove(questionId: string, focusPointId: string): Promise {\n return requestDelete(`${questionApiBaseUrl}/${questionId}/focus_points/${focusPointId}.json`, null, null, (error) => {throw(error)});\n }\n}\n\nclass IncorrectSequenceApi {\n static getAll(questionId: string): Promise {\n return requestGet(`${questionApiBaseUrl}/${questionId}/incorrect_sequences.json`, null, (error) => {throw(error)});\n }\n\n static get(questionId: string, incorrectSequenceId: string): Promise {\n return requestGet(`${questionApiBaseUrl}/${questionId}/incorrect_sequences/${incorrectSequenceId}.json`, null, (error) => {throw(error)});\n }\n\n static create(questionId: string, data: IncorrectSequence): Promise {\n return requestPost(`${questionApiBaseUrl}/${questionId}/incorrect_sequences.json`, {incorrect_sequence: data}, null, (error) => {throw(error)});\n }\n\n static update(questionId: string, incorrectSequenceId: string, data: IncorrectSequence): Promise {\n return requestPut(`${questionApiBaseUrl}/${questionId}/incorrect_sequences/${incorrectSequenceId}.json`, {incorrect_sequence: data}, null, (error) => {throw(error)});\n }\n\n static updateAllForQuestion(questionId: string, data: IncorrectSequenceCollection): Promise {\n return requestPut(`${questionApiBaseUrl}/${questionId}/incorrect_sequences/update_all.json`, {incorrect_sequence: data}, null, (error) => {throw(error)});\n }\n\n static remove(questionId: string, incorrectSequenceId: string): Promise {\n return requestDelete(`${questionApiBaseUrl}/${questionId}/incorrect_sequences/${incorrectSequenceId}.json`, null, null, (error) => {throw(error)});\n }\n}\n\nexport {\n FILL_IN_BLANKS_TYPE,\n FocusPointApi,\n IncorrectSequenceApi,\n QuestionApi, questionApiBaseUrl, SENTENCE_COMBINING_TYPE,\n SENTENCE_FRAGMENTS_TYPE\n};\n","import _ from 'underscore';\n\nexport default function (camelObj, convertCR = true) {\n const snakeObj = {};\n for (const camelKey in camelObj) {\n if (camelObj.hasOwnProperty(camelKey)) {\n let snakeKey;\n switch (camelKey) {\n case 'questionUID':\n snakeKey = 'question_uid';\n break;\n case 'gradeIndex':\n snakeKey = 'grade_index';\n break;\n case 'parentID':\n snakeKey = 'parent_id';\n break;\n case 'conceptResults':\n snakeKey = 'concept_results';\n break;\n default:\n snakeKey = camelKey;\n }\n snakeObj[snakeKey] = camelObj[camelKey];\n }\n }\n if (convertCR && snakeObj.concept_results) {\n const crs = _.values(snakeObj.concept_results);\n const newHash = {};\n _.each(crs, (val) => {\n if (val.conceptUID && val.conceptUID.length > 0) {\n newHash[val.conceptUID] = val.correct;\n }\n });\n snakeObj.concept_results = newHash;\n }\n return snakeObj;\n}\n","/* eslint-env browser*/\nimport moment from 'moment';\nimport _ from 'underscore';\n\nimport { requestDelete, requestGet, requestPost, requestPut, } from '../../../modules/request/index';\nimport C from '../constants';\nimport objectWithSnakeKeysFromCamel from '../libs/objectWithSnakeKeysFromCamel';\n\nexport function deleteStatus(questionId) {\n return { type: C.DELETE_RESPONSE_STATUS, data: { questionId, }, };\n}\n\nexport function updateStatus(questionId, status) {\n return { type: C.UPDATE_RESPONSE_STATUS, data: { questionId, status, }, };\n}\n\nexport function updateData(questionId, responses) {\n return { type: C.UPDATE_RESPONSE_DATA, data: { questionId, responses, }, };\n}\n\nfunction groupResponsesByQuestion(snapshot) {\n const groupedResponses = {};\n for (const responseKey in snapshot) {\n if (snapshot.hasOwnProperty(responseKey)) {\n const response = snapshot[responseKey];\n if (response.questionUID) {\n if (groupedResponses[response.questionUID]) {\n groupedResponses[response.questionUID][responseKey] = response;\n } else {\n groupedResponses[response.questionUID] = {};\n groupedResponses[response.questionUID][responseKey] = response;\n }\n }\n }\n }\n return groupedResponses;\n}\n\nexport function submitResponse(content, prid, isFirstAttempt) {\n delete content.gradeIndex;\n const rubyConvertedResponse = objectWithSnakeKeysFromCamel(content);\n rubyConvertedResponse.created_at = moment().format('x');\n rubyConvertedResponse.first_attempt_count = isFirstAttempt ? 1 : 0;\n rubyConvertedResponse.is_first_attempt = isFirstAttempt;\n return (dispatch) => {\n requestPost(\n `${window.postbuildEnv.QUILL_CMS}/responses/create_or_increment`,\n { response: rubyConvertedResponse, },\n (body) => {\n dispatch({ type: C.DISPLAY_MESSAGE, message: 'Submission successfully saved!', });\n },\n (body) => {\n dispatch({ type: C.DISPLAY_ERROR, error: `Submission failed! ${body}`, });\n },\n );\n };\n}\n\nexport function uploadOptimalResponse(content, prid, isFirstAttempt) {\n const rubyConvertedResponse = objectWithSnakeKeysFromCamel(content);\n return (dispatch) => {\n requestPost(\n `${window.postbuildEnv.QUILL_CMS}/responses/create_or_update`,\n { response: rubyConvertedResponse, },\n (body) => {\n dispatch({ type: C.DISPLAY_MESSAGE, message: 'Submission successfully saved!', });\n },\n (body) => {\n dispatch({ type: C.DISPLAY_ERROR, error: `Submission failed! ${body}`, });\n },\n );\n };\n}\n\nexport function submitMassEditFeedback(ids, properties, qid) {\n return (dispatch) => {\n const updated_attribute = properties;\n requestPut(\n `${window.postbuildEnv.QUILL_CMS}/responses/mass_edit/edit_many`,\n { ids, updated_attribute, },\n (body) => {\n dispatch({ type: C.DISPLAY_MESSAGE, message: 'Submission successfully saved!', });\n dispatch({ type: C.SHOULD_RELOAD_RESPONSES, qid, });\n },\n (body) => {\n dispatch({ type: C.DISPLAY_ERROR, error: `Submission failed! ${body}`, });\n },\n );\n };\n}\n\nexport function submitMassEditConceptResults(ids, conceptResults, qid) {\n return (dispatch) => {\n const updated_attribute = {\n concept_results: conceptResults,\n };\n requestPut(\n `${window.postbuildEnv.QUILL_CMS}/responses/mass_edit/edit_many`,\n { ids, updated_attribute, },\n (body) => {\n dispatch({ type: C.DISPLAY_MESSAGE, message: 'Submission successfully saved!', });\n dispatch({ type: C.SHOULD_RELOAD_RESPONSES, qid, });\n },\n (body) => {\n dispatch({ type: C.DISPLAY_ERROR, error: `Submission failed! ${body}`, });\n },\n );\n };\n}\n\nexport function massEditDeleteResponses(ids, qid) {\n return (dispatch) => {\n requestPost(\n `${window.postbuildEnv.QUILL_CMS}/responses/mass_edit/delete_many`,\n { ids, },\n (body) => {\n dispatch({ type: C.DISPLAY_MESSAGE, message: 'Submission successfully saved!', });\n dispatch({ type: C.SHOULD_RELOAD_RESPONSES, qid, });\n },\n (body) => {\n dispatch({ type: C.DISPLAY_ERROR, error: `Submission failed! ${body}`, });\n },\n );\n };\n}\n\nexport function submitResponseEdit(rid, content, qid) {\n const rubyConvertedResponse = objectWithSnakeKeysFromCamel(content, false);\n return (dispatch) => {\n requestPut(\n `${window.postbuildEnv.QUILL_CMS}/responses/${rid}`,\n { response: rubyConvertedResponse, },\n (body) => {\n dispatch({ type: C.DISPLAY_MESSAGE, message: 'Submission successfully saved!', });\n dispatch({ type: C.SHOULD_RELOAD_RESPONSES, qid, });\n },\n (body) => {\n dispatch({ type: C.DISPLAY_ERROR, error: `Submission failed! ${body}`, });\n },\n );\n };\n}\n\nexport function updateConceptResults(rid, content, qid) {\n const rubyConvertedResponse = objectWithSnakeKeysFromCamel(content, false);\n\n return (dispatch) => {\n requestPut(\n `${window.postbuildEnv.QUILL_CMS}/responses/${rid}`,\n { response: rubyConvertedResponse, },\n (body) => {\n dispatch({ type: C.DISPLAY_MESSAGE, message: 'Submission successfully saved!', });\n dispatch({ type: C.SHOULD_RELOAD_RESPONSES, qid, });\n dispatch({ type: C.START_RESPONSE_EDIT, qid, rid, });\n },\n (body) => {\n dispatch({ type: C.DISPLAY_ERROR, error: `Submission failed! ${body}`, });\n },\n );\n };\n}\n\nexport function deleteConceptResult(rid, content, qid) {\n const updatedResponse = objectWithSnakeKeysFromCamel(content, false);\n return (dispatch) => {\n requestPut(\n `${window.postbuildEnv.QUILL_CMS}/responses/${rid}`,\n { response: updatedResponse, },\n (body) => {\n dispatch({ type: C.DISPLAY_MESSAGE, message: 'Submission successfully saved!', });\n dispatch({ type: C.SHOULD_RELOAD_RESPONSES, qid, });\n dispatch({ type: C.START_RESPONSE_EDIT, qid, rid, });\n },\n (body) => {\n dispatch({ type: C.DISPLAY_ERROR, error: `Submission failed! ${body}`, });\n },\n );\n };\n}\n\nexport function deleteResponse(qid, rid) {\n return (dispatch) => {\n requestDelete(\n `${window.postbuildEnv.QUILL_CMS}/responses/${rid}`,\n null,\n (body) => {\n dispatch({ type: C.DISPLAY_MESSAGE, message: 'Submission successfully saved!', });\n dispatch({ type: C.SHOULD_RELOAD_RESPONSES, qid, });\n },\n (body) => {\n dispatch({ type: C.DISPLAY_ERROR, error: `Submission failed! ${body}`, });\n },\n );\n };\n}\n\nfunction makeIterator(array) {\n let nextIndex = 0;\n\n return {\n next: function() {\n let nextVal = null;\n if (nextIndex < array.length) {\n nextVal = {value: array[nextIndex], done: false};\n nextIndex += 1;\n }\n else {\n nextVal = {done: true};\n }\n return nextVal;\n }\n };\n}\n\nexport function getGradedResponsesWithCallback(questionID, callback) {\n requestGet(\n `${window.postbuildEnv.QUILL_CMS}/questions/${questionID}/responses`,\n (body) => {\n const bodyToObj = {};\n body.forEach((resp) => {\n bodyToObj[resp.id] = resp;\n if (typeof resp.concept_results === 'string') {\n resp.concept_results = JSON.parse(resp.concept_results);\n }\n for (const cr in resp.concept_results) {\n const formatted_cr = {};\n formatted_cr.conceptUID = cr;\n formatted_cr.correct = resp.concept_results[cr];\n resp.concept_results[cr] = formatted_cr;\n }\n resp.conceptResults = resp.concept_results;\n delete resp.concept_results;\n });\n callback(bodyToObj);\n }\n );\n}\n\nexport function getMultipleChoiceResponseOptionsWithCallback(questionID, callback) {\n requestGet(`${window.postbuildEnv.QUILL_CMS}/questions/${questionID}/multiple_choice_options`,\n (body) => {\n const bodyToObj = {};\n body.forEach((resp) => {\n bodyToObj[resp.id] = resp;\n if (typeof resp.concept_results === 'string') {\n resp.concept_results = JSON.parse(resp.concept_results);\n }\n for (const cr in resp.concept_results) {\n const formatted_cr = {};\n formatted_cr.conceptUID = cr;\n formatted_cr.correct = resp.concept_results[cr];\n resp.concept_results[cr] = formatted_cr;\n }\n resp.conceptResults = resp.concept_results;\n delete resp.concept_results;\n });\n callback(bodyToObj);\n }\n );\n}\n\nexport function getGradedResponsesWithoutCallback(questionID) {\n requestGet(\n `${window.postbuildEnv.QUILL_CMS}/questions/${questionID}/responses`,\n (body) => {\n const bodyToObj = {};\n body.forEach((resp) => {\n bodyToObj[resp.id] = resp;\n if (typeof resp.concept_results === 'string') {\n resp.concept_results = JSON.parse(resp.concept_results);\n }\n for (const cr in resp.concept_results) {\n const formatted_cr = {};\n formatted_cr.conceptUID = cr;\n formatted_cr.correct = resp.concept_results[cr];\n resp.concept_results[cr] = formatted_cr;\n }\n resp.conceptResults = resp.concept_results;\n delete resp.concept_results;\n });\n return bodyToObj;\n }\n );\n}\n\nexport function convertConceptNamesToIds(responses, concepts) {\n const conceptData = concepts.data[\"0\"];\n const convertedResponses = responses.map((response) => {\n const concepts = response.concepts.map((c) => {\n const concept = conceptData.find((cd) => { return cd.displayName === c })\n if (!concept) {\n alert(`The concept ${c} doesn't exist! Check your spelling.`)\n throw new Error(\"Concept not found.\")\n }\n return { conceptUID: concept.uid, correct: true, }\n })\n return { \"text\": response.text, \"concepts\": concepts }\n })\n return convertedResponses\n}\n\nexport function submitOptimalResponses(qid, conceptUID, responses, concepts) {\n const convertedResponses = convertConceptNamesToIds(responses, concepts)\n return (dispatch) => {\n const defaultConcept = [{ conceptUID, correct: true}]\n convertedResponses.forEach((obj) => {\n const response = {\n text: obj.text,\n feedback: \"That's a strong sentence!\",\n optimal: true,\n questionUID: qid,\n conceptResults: _.isEmpty(obj.concepts) ? defaultConcept : obj.concepts,\n parent_id: null,\n }\n dispatch(uploadOptimalResponse(response))\n })\n }\n}\n","import C from '../constants';\n\n\nimport Pusher from 'pusher-js';\n// Put 'pusher' on global window for TypeScript validation\ndeclare global {\n interface Window { pusher: any }\n}\n\nimport _ from 'underscore';\nimport { requestPost, } from '../../../modules/request/index';\nimport lessonActions from '../actions/lessons';\nimport { Question } from '../interfaces/questions';\nimport { LessonApi, TYPE_CONNECT_LESSON } from '../libs/lessons_api';\nimport {\n FocusPointApi,\n IncorrectSequenceApi,\n QuestionApi,\n SENTENCE_COMBINING_TYPE\n} from '../libs/questions_api';\nimport { submitResponse } from './responses';\n\nfunction startListeningToQuestions() {\n return loadQuestions();\n}\n\nfunction loadQuestions() {\n return (dispatch, getState) => {\n QuestionApi.getAll(SENTENCE_COMBINING_TYPE).then((questions) => {\n dispatch({ type: C.RECEIVE_QUESTIONS_DATA, data: questions, });\n });\n };\n}\n\nfunction loadQuestion(uid) {\n return (dispatch, getState) => {\n QuestionApi.get(uid).then((question: Question) => {\n dispatch({ type: C.RECEIVE_QUESTION_DATA, uid: uid, data: question, });\n });\n }\n}\n\nfunction startQuestionEdit(qid) {\n return { type: C.START_QUESTION_EDIT, qid, };\n}\n\nfunction cancelQuestionEdit(qid) {\n return { type: C.FINISH_QUESTION_EDIT, qid, };\n}\n\nfunction submitQuestionEdit(qid, content) {\n return (dispatch, getState) => {\n dispatch({ type: C.SUBMIT_QUESTION_EDIT, qid, });\n QuestionApi.update(qid, content).then(() => {\n dispatch({ type: C.FINISH_QUESTION_EDIT, qid, });\n dispatch(loadQuestion(qid));\n dispatch({ type: C.DISPLAY_MESSAGE, message: 'Update successfully saved!', });\n }).catch((error) => {\n dispatch({ type: C.FINISH_QUESTION_EDIT, qid, });\n dispatch({ type: C.DISPLAY_ERROR, error: `Update failed! ${error}`, });\n });\n };\n}\n\nfunction toggleNewQuestionModal() {\n return { type: C.TOGGLE_NEW_QUESTION_MODAL, };\n}\n\nfunction submitNewQuestion(content, response, lessonID) {\n return (dispatch, getState) => {\n dispatch({ type: C.AWAIT_NEW_QUESTION_RESPONSE, });\n QuestionApi.create(SENTENCE_COMBINING_TYPE, content).then((question) => {\n dispatch({ type: C.RECEIVE_NEW_QUESTION_RESPONSE, });\n response.questionUID = Object.keys(question)[0];\n response.gradeIndex = `human${response.questionUID}`;\n dispatch(submitResponse(response));\n dispatch(loadQuestion(response.questionUID));\n dispatch({ type: C.DISPLAY_MESSAGE, message: 'Submission successfully saved!', });\n const lessonQuestion = { key: response.questionUID, questionType: C.INTERNAL_SENTENCE_COMBINING_TYPE }\n dispatch({ type: C.SUBMIT_LESSON_EDIT, cid: lessonID, });\n LessonApi.addQuestion(TYPE_CONNECT_LESSON, lessonID, lessonQuestion).then(() => {\n dispatch({ type: C.FINISH_LESSON_EDIT, cid: lessonID, });\n dispatch(lessonActions.loadLesson(lessonID));\n dispatch({ type: C.DISPLAY_MESSAGE, message: 'Question successfully added to lesson!', });\n }).catch((error) => {\n dispatch({ type: C.FINISH_LESSON_EDIT, cid: lessonID, });\n dispatch({ type: C.DISPLAY_ERROR, error: `Add to lesson failed! ${error}`, });\n });\n }, (error) => {\n dispatch({ type: C.RECEIVE_NEW_QUESTION_RESPONSE, });\n dispatch({ type: C.DISPLAY_ERROR, error: `Submission failed! ${error}`, });\n });\n };\n}\n\nfunction submitNewFocusPoint(qid, data) {\n return (dispatch, getState) => {\n FocusPointApi.create(qid, data).then(() => {\n dispatch(loadQuestion(qid));\n }, (error) => {\n alert(`Submission failed! ${error}`);\n });\n }\n}\n\nfunction submitEditedFocusPoint(qid, data, fpid) {\n return (dispatch, getState) => {\n FocusPointApi.update(qid, fpid, data).then(() => {\n dispatch(loadQuestion(qid));\n }).catch((error) => {\n alert(`Submission failed! ${error}`);\n });\n };\n}\n\nfunction submitBatchEditedFocusPoint(qid, data) {\n return (dispatch, getState) => {\n FocusPointApi.updateAllForQuestion(qid, data).then(() => {\n dispatch(loadQuestion(qid));\n }).catch((error) => {\n alert(`Submission failed! ${error}`);\n });\n };\n}\n\nfunction deleteFocusPoint(qid, fpid) {\n return (dispatch, getState) => {\n FocusPointApi.remove(qid, fpid).then(() => {\n dispatch(loadQuestion(qid));\n }, (error) => {\n alert(`Delete failed! ${error}`);\n });\n };\n}\n\n//TODO: fix error handling for updateFlag-- causes many alert messages to flash despite successful update\n\nfunction updateFlag(qid, flag) {\n return dispatch => {\n QuestionApi.updateFlag(qid, flag).then(() => {\n dispatch(loadQuestion(qid));\n }).catch((error) => {\n alert(`Flag update failed! ${error}`);\n });\n }\n}\n\nfunction updateModelConceptUID(qid, modelConceptUID) {\n return dispatch => {\n QuestionApi.get(qid).then((question) => {\n if (!question.modelConceptUID) {\n QuestionApi.updateModelConcept(qid, modelConceptUID).then(() => {\n dispatch(loadQuestion(qid));\n }).catch((error) => {\n alert(`Model concept update failed! ${error}`);\n });\n }\n });\n }\n}\n\nfunction submitNewIncorrectSequence(qid, data, callback) {\n return (dispatch, getState) => {\n IncorrectSequenceApi.create(qid, data).then(() => {\n dispatch(loadQuestion(qid));\n callback();\n }, (error) => {\n alert(`Submission failed! ${error}`);\n });\n };\n}\n\nfunction submitEditedIncorrectSequence(qid, data, seqid) {\n return (dispatch, getState) => {\n IncorrectSequenceApi.update(qid, seqid, data).then(() => {\n dispatch(loadQuestion(qid));\n }).catch((error) => {\n alert(`Submission failed! ${error}`);\n });\n };\n}\n\nfunction deleteIncorrectSequence(qid, seqid) {\n return (dispatch, getState) => {\n IncorrectSequenceApi.remove(qid, seqid).then(() => {\n dispatch(loadQuestion(qid));\n }, (error) => {\n alert(`Delete failed! ${error}`);\n });\n };\n}\n\nfunction updateIncorrectSequences(qid, data, callback) {\n return (dispatch, getState) => {\n IncorrectSequenceApi.updateAllForQuestion(qid, data).then(() => {\n dispatch(loadQuestion(qid));\n callback();\n }).catch((error) => {\n alert(`Order update failed! ${error}`);\n });\n }\n}\n\nfunction getFormattedSearchData(state) {\n const searchData = state.filters.formattedFilterData;\n searchData.text = state.filters.stringFilter;\n searchData.pageNumber = state.filters.responsePageNumber;\n return searchData;\n}\n\nfunction searchResponses(qid, callback) {\n return (dispatch, getState) => {\n const requestNumber = getState().filters.requestCount\n // check for request number in state, save as const\n requestPost(\n `${window.postbuildEnv.QUILL_CMS}/questions/${qid}/responses/search`,\n { search: getFormattedSearchData(getState()), },\n (data) => {\n // check again for number in state\n // if equal to const set earlier, update the state\n // otherwise, do nothing\n if (getState().filters.requestCount === requestNumber) {\n const embeddedOrder = _.map(data.results, (response: any, i: number) => {\n response.sortOrder = i;\n return response;\n });\n const parsedResponses = _.indexBy(embeddedOrder, 'id');\n const responseData = {\n responses: parsedResponses,\n numberOfResponses: data.numberOfResults,\n numberOfPages: data.numberOfPages,\n };\n dispatch(updateResponses(responseData));\n callback();\n }\n }\n );\n };\n}\n\nfunction initializeSubscription(qid) {\n return (dispatch) => {\n if (window.postbuildEnv.NODE_ENV === 'development') {\n Pusher.logToConsole = true;\n }\n if (!window.pusher) {\n window.pusher = new Pusher(window.postbuildEnv.PUSHER_KEY, { cluster: window.postbuildEnv.PUSHER_CLUSTER });\n }\n const channel = window.pusher.subscribe(`admin-${qid}`);\n channel.bind('new-response', (data) => {\n setTimeout(() => dispatch(searchResponses(qid)), 1000);\n });\n channel.bind('rematching-finished', () => {\n window.alert(`Rematching finished for the Connect question with uid ${qid}! Reload the page to see the rematched responses.`)\n })\n };\n}\n\nfunction removeSubscription(qid) {\n return (dispatch) => {\n if (window.pusher) {\n window.pusher.unsubscribe(`admin-${qid}`);\n }\n };\n}\n\nfunction updatePageNumber(pageNumber) {\n return (dispatch) => {\n dispatch(setPageNumber(pageNumber));\n };\n}\n\nfunction updateStringFilter(stringFilter) {\n return (dispatch) => {\n dispatch(setStringFilter(stringFilter));\n };\n}\n\nfunction getUsedSequences(qid) {\n return (dispatch, getState) => {\n const existingIncorrectSeqs = getState().questions.data[qid].incorrectSequences\n const usedSeqs: string[] = []\n if (existingIncorrectSeqs) {\n Object.values(existingIncorrectSeqs).forEach((inSeq: any) => {\n const phrases = inSeq.text.split('|||')\n phrases.forEach((p) => {\n usedSeqs.push(p)\n })\n })\n }\n dispatch(setUsedSequences(qid, usedSeqs));\n }\n}\n\nfunction setUsedSequences(qid, seq) {\n return { type: C.SET_USED_SEQUENCES, qid, seq }\n}\n\nfunction startResponseEdit(qid, rid) {\n return { type: C.START_RESPONSE_EDIT, qid, rid, };\n}\n\nfunction cancelResponseEdit(qid, rid) {\n return { type: C.FINISH_RESPONSE_EDIT, qid, rid, };\n}\n\nfunction startChildResponseView(qid, rid) {\n return { type: C.START_CHILD_RESPONSE_VIEW, qid, rid, };\n}\n\nfunction cancelChildResponseView(qid, rid) {\n return { type: C.CANCEL_CHILD_RESPONSE_VIEW, qid, rid, };\n}\n\nfunction startFromResponseView(qid, rid) {\n return { type: C.START_FROM_RESPONSE_VIEW, qid, rid, };\n}\n\nfunction cancelFromResponseView(qid, rid) {\n return { type: C.CANCEL_FROM_RESPONSE_VIEW, qid, rid, };\n}\n\nfunction startToResponseView(qid, rid) {\n return { type: C.START_TO_RESPONSE_VIEW, qid, rid, };\n}\n\nfunction cancelToResponseView(qid, rid) {\n return { type: C.CANCEL_TO_RESPONSE_VIEW, qid, rid, };\n}\n\nfunction clearQuestionState(qid) {\n return { type: C.CLEAR_QUESTION_STATE, qid, };\n}\n\nfunction updateResponses(data) {\n return { type: C.UPDATE_SEARCHED_RESPONSES, data, };\n}\n\nfunction setPageNumber(pageNumber) {\n return { type: C.SET_RESPONSE_PAGE_NUMBER, pageNumber, };\n}\n\nfunction setStringFilter(stringFilter) {\n return { type: C.SET_RESPONSE_STRING_FILTER, stringFilter, };\n}\n\nfunction incrementRequestCount() {\n return { type: C.INCREMENT_REQUEST_COUNT }\n}\n\nexport default {\n startListeningToQuestions,\n loadQuestions,\n startQuestionEdit,\n cancelQuestionEdit,\n submitQuestionEdit,\n toggleNewQuestionModal,\n submitNewQuestion,\n submitNewFocusPoint,\n submitEditedFocusPoint,\n submitBatchEditedFocusPoint,\n deleteFocusPoint,\n submitNewIncorrectSequence,\n submitEditedIncorrectSequence,\n deleteIncorrectSequence,\n updateIncorrectSequences,\n searchResponses,\n initializeSubscription,\n removeSubscription,\n updatePageNumber,\n updateStringFilter,\n startResponseEdit,\n cancelResponseEdit,\n startChildResponseView,\n cancelChildResponseView,\n startFromResponseView,\n cancelFromResponseView,\n startToResponseView,\n cancelToResponseView,\n clearQuestionState,\n updateResponses,\n setPageNumber,\n setStringFilter,\n incrementRequestCount,\n updateFlag,\n getUsedSequences,\n updateModelConceptUID\n};\n","export default {\n // uI FEEDBACK ACTIONS\n DISPLAY_ERROR: 'DISPLAY_ERROR',\n DISPLAY_MESSAGE: 'DISPLAY_MESSAGE',\n DISMISS_FEEDBACK: 'DISMISS_FEEDBACK',\n CLEAR_DISPLAY_MESSAGE_AND_ERROR: 'CLEAR_DISPLAY_MESSAGE_AND_ERROR',\n\n // aUTH ACTIONS\n ATTEMPTING_LOGIN: 'ATTEMPTING_LOGIN',\n LOGIN_USER: 'LOGIN_USER',\n LOGOUT: 'LOGOUT',\n\n // aUTH STATES\n LOGGED_IN: 'LOGGED_IN',\n ANONYMOUS: 'ANONYMOUS',\n AWAITING_AUTH_RESPONSE: 'AWAITING_AUTH_RESPONSE',\n\n // cONCEPT ACTIONS\n RECEIVE_CONCEPTS_DATA: 'RECEIVE_CONCEPTS_DATA',\n AWAIT_NEW_CONCEPT_RESPONSE: 'AWAIT_NEW_CONCEPT_RESPONSE',\n RECEIVE_NEW_CONCEPT_RESPONSE: 'RECEIVE_NEW_CONCEPT_RESPONSE',\n START_CONCEPT_EDIT: 'START_CONCEPT_EDIT',\n FINISH_CONCEPT_EDIT: 'FINISH_CONCEPT_EDIT',\n SUBMIT_CONCEPT_EDIT: 'SUBMIT_CONCEPT_EDIT',\n TOGGLE_NEW_CONCEPT_MODAL: 'TOGGLE_NEW_CONCEPT_MODAL',\n\n // cONCEPT STATES\n EDITING_CONCEPT: 'EDITING_CONCEPT',\n SUBMITTING_CONCEPT: 'SUBMITTING_CONCEPT',\n\n // lESSON ACTIONS\n RECEIVE_LESSONS_DATA: 'RECEIVE_LESSONS_DATA',\n AWAIT_NEW_LESSON_RESPONSE: 'AWAIT_NEW_LESSON_RESPONSE',\n RECEIVE_NEW_LESSON_RESPONSE: 'RECEIVE_NEW_LESSON_RESPONSE',\n START_LESSON_EDIT: 'START_LESSON_EDIT',\n FINISH_LESSON_EDIT: 'FINISH_LESSON_EDIT',\n SUBMIT_LESSON_EDIT: 'SUBMIT_LESSON_EDIT',\n TOGGLE_NEW_LESSON_MODAL: 'TOGGLE_NEW_LESSON_MODAL',\n\n // CLASSROOM_LESSON ACTIONS\n RECEIVE_CLASSROOM_LESSONS_DATA: 'RECEIVE_CLASSROOM_LESSONS_DATA',\n RECEIVE_CLASSROOM_LESSON_DATA: 'RECEIVE_CLASSROOM_LESSON_DATA',\n RECEIVE_CLASSROOM_LESSONS_REVIEW_DATA: 'RECEIVE_CLASSROOM_LESSONS_REVIEW_DATA',\n NO_LESSON_ID: 'NO_LESSON_ID',\n NO_LESSONS: 'NO_LESSONS',\n SET_LESSON_ID: 'SET_LESSON_ID',\n CLEAR_CLASSROOM_LESSON_DATA: 'CLEAR_CLASSROOM_LESSON_DATA',\n\n // lESSON STATES\n EDITING_LESSON: 'EDITING_LESSON',\n SUBMITTING_LESSON: 'SUBMITTING_LESSON',\n\n // QUESTION ACTIONS\n RECEIVE_QUESTIONS_DATA: 'RECEIVE_QUESTIONS_DATA',\n RECEIVE_QUESTION_DATA: 'RECEIVE_QUESTION_DATA',\n AWAIT_NEW_QUESTION_RESPONSE: 'AWAIT_NEW_QUESTION_RESPONSE',\n RECEIVE_NEW_QUESTION_RESPONSE: 'RECEIVE_NEW_QUESTION_RESPONSE',\n START_QUESTION_EDIT: 'START_QUESTION_EDIT',\n FINISH_QUESTION_EDIT: 'FINISH_QUESTION_EDIT',\n SUBMIT_QUESTION_EDIT: 'SUBMIT_QUESTION_EDIT',\n TOGGLE_NEW_QUESTION_MODAL: 'TOGGLE_NEW_QUESTION_MODAL',\n SHOULD_RELOAD_RESPONSES: 'SHOULD_RELOAD_RESPONSES',\n CLEAR_QUESTION_STATE: 'CLEAR_QUESTION_STATE',\n UPDATE_SEARCHED_RESPONSES: 'UPDATE_SEARCHED_RESPONSES',\n SET_RESPONSE_PAGE_NUMBER: 'SET_RESPONSE_PAGE_NUMBER',\n SET_RESPONSE_STRING_FILTER: 'SET_RESPONSE_STRING_FILTER',\n INCREMENT_REQUEST_COUNT: 'INCREMENT_REQUEST_COUNT',\n SET_USED_SEQUENCES: 'SET_USED_SEQUENCES',\n\n // QUESTION STATES\n EDITING_QUESTION: 'EDITING_QUESTION',\n SUBMITTING_QUESTION: 'SUBMITTING_QUESTION',\n\n // FILL IN BLANK QUESTION ACTIONS\n RECEIVE_FILL_IN_BLANK_QUESTIONS_DATA: 'RECEIVE_FILL_IN_BLANK_QUESTIONS_DATA',\n RECEIVE_FILL_IN_BLANK_QUESTION_DATA: 'RECEIVE_FILL_IN_BLANK_QUESTION_DATA',\n AWAIT_NEW_FILL_IN_BLANK_QUESTION_RESPONSE: 'AWAIT_NEW_FILL_IN_BLANK_QUESTION_RESPONSE',\n RECEIVE_NEW_FILL_IN_BLANK_QUESTION_RESPONSE: 'RECEIVE_NEW_FILL_IN_BLANK_QUESTION_RESPONSE',\n START_FILL_IN_BLANK_QUESTION_EDIT: 'START_FILL_IN_BLANK_QUESTION_EDIT',\n FINISH_FILL_IN_BLANK_QUESTION_EDIT: 'FINISH_FILL_IN_BLANK_QUESTION_EDIT',\n SUBMIT_FILL_IN_BLANK_QUESTION_EDIT: 'SUBMIT_FILL_IN_BLANK_QUESTION_EDIT',\n TOGGLE_NEW_FILL_IN_BLANK_QUESTION_MODAL: 'TOGGLE_NEW_FILL_IN_BLANK_QUESTION_MODAL',\n\n // FILL IN BLANK QUESTION STATES\n EDITING_FILL_IN_BLANK_QUESTION: 'EDITING_FILL_IN_BLANK_QUESTION',\n SUBMITTING_FILL_IN_BLANK_QUESTION: 'SUBMITTING_FILL_IN_BLANK_QUESTION',\n\n // QUESTION RESPONSE STATES\n START_RESPONSE_EDIT: 'START_RESPONSE_EDIT',\n CANCEL_RESPONSE_EDIT: 'CANCEL_RESPONSE_EDIT',\n FINISH_RESPONSE_EDIT: 'FINISH_RESPONSE_EDIT',\n SUBMIT_RESPONSE_EDIT: 'SUBMIT_RESPONSE_EDIT',\n SUBMITTING_RESPONSE: 'SUBMITTING_RESPONSE',\n START_CHILD_RESPONSE_VIEW: 'START_CHILD_RESPONSE_VIEW',\n CANCEL_CHILD_RESPONSE_VIEW: 'CANCEL_CHILD_RESPONSE_VIEW',\n START_FROM_RESPONSE_VIEW: 'START_FROM_RESPONSE_VIEW',\n CANCEL_FROM_RESPONSE_VIEW: 'CANCEL_FROM_RESPONSE_VIEW',\n START_TO_RESPONSE_VIEW: 'START_TO_RESPONSE_VIEW',\n CANCEL_TO_RESPONSE_VIEW: 'CANCEL_TO_RESPONSE_VIEW',\n\n // dIAGNOSTIC QUESTION ACTIONS\n RECEIVE_DIAGNOSTIC_QUESTIONS_DATA: 'RECEIVE_DIAGNOSTIC_QUESTIONS_DATA',\n AWAIT_NEW_DIAGNOSTIC_QUESTION_RESPONSE: 'AWAIT_NEW_DIAGNOSTIC_QUESTION_RESPONSE',\n RECEIVE_NEW_DIAGNOSTIC_QUESTION_RESPONSE: 'RECEIVE_NEW_DIAGNOSTIC_QUESTION_RESPONSE',\n START_DIAGNOSTIC_QUESTION_EDIT: 'START_DIAGNOSTIC_QUESTION_EDIT',\n FINISH_DIAGNOSTIC_QUESTION_EDIT: 'FINISH_DIAGNOSTIC_QUESTION_EDIT',\n SUBMIT_DIAGNOSTIC_QUESTION_EDIT: 'SUBMIT_DIAGNOSTIC_QUESTION_EDIT',\n TOGGLE_NEW_DIAGNOSTIC_QUESTION_MODAL: 'TOGGLE_NEW_DIAGNOSTIC_QUESTION_MODAL',\n\n // dIAGNOSTIC_QUESTION STATES\n EDITING_DIAGNOSTIC_QUESTION: 'EDITING_DIAGNOSTIC_QUESTION',\n SUBMITTING_DIAGNOSTIC_QUESTION: 'SUBMITTING_DIAGNOSTIC_QUESTION',\n\n // dIAGNOSTIC QUESTION RESPONSE STATES\n START_DIAGNOSTIC_RESPONSE_EDIT: 'START_DIAGNOSTIC_RESPONSE_EDIT',\n CANCEL_DIAGNOSTIC_RESPONSE_EDIT: 'CANCEL_DIAGNOSTIC_RESPONSE_EDIT',\n FINISH_DIAGNOSTIC_RESPONSE_EDIT: 'FINISH_DIAGNOSTIC_RESPONSE_EDIT',\n SUBMIT_DIAGNOSTIC_RESPONSE_EDIT: 'SUBMIT_DIAGNOSTIC_RESPONSE_EDIT',\n SUBMITTING_DIAGNOSTIC_RESPONSE: 'SUBMITTING_DIAGNOSTIC_RESPONSE',\n START_CHILD_DIAGNOSTIC_RESPONSE_VIEW: 'START_CHILD_DIAGNOSTIC_RESPONSE_VIEW',\n CANCEL_CHILD_DIAGNOSTIC_RESPONSE_VIEW: 'CANCEL_CHILD_DIAGNOSTIC_RESPONSE_VIEW',\n START_FROM_DIAGNOSTIC_RESPONSE_VIEW: 'START_FROM_DIAGNOSTIC_RESPONSE_VIEW',\n CANCEL_FROM_DIAGNOSTIC_RESPONSE_VIEW: 'CANCEL_FROM_DIAGNOSTIC_RESPONSE_VIEW',\n START_TO_DIAGNOSTIC_RESPONSE_VIEW: 'START_TO_DIAGNOSTIC_RESPONSE_VIEW',\n CANCEL_TO_DIAGNOSTIC_RESPONSE_VIEW: 'CANCEL_TO_DIAGNOSTIC_RESPONSE_VIEW',\n\n // rESPONSE ACTIONS:\n TOGGLE_EXPAND_SINGLE_RESPONSE: 'TOGGLE_EXPAND_SINGLE_RESPONSE',\n COLLAPSE_ALL_RESPONSES: 'COLLAPSE_ALL_RESPONSES',\n EXPAND_ALL_RESPONSES: 'EXPAND_ALL_RESPONSES',\n TOGGLE_STATUS_FIELD: 'TOGGLE_STATUS_FIELD',\n TOGGLE_STATUS_FIELD_AND_RESET_PAGE: 'TOGGLE_STATUS_FIELD_AND_RESET_PAGE',\n TOGGLE_RESPONSE_SORT: 'TOGGLE_RESPONSE_SORT',\n TOGGLE_EXCLUDE_MISSPELLINGS: 'TOGGLE_EXCLUDE_MISSPELLINGS',\n RESET_ALL_FIELDS: 'RESET_ALL_FIELDS',\n TOGGLE_MASS_SELECTION: 'TOGGLE_MASS_SELECTION',\n DESELECT_ALL_FIELDS: 'DESELECT_ALL_FIELDS',\n\n // mASS EDIT RESPONSE ACTIONS\n ADD_RESPONSE_TO_MASS_EDIT_ARRAY: 'ADD_RESPONSE_TO_MASS_EDIT_ARRAY',\n REMOVE_RESPONSE_FROM_MASS_EDIT_ARRAY: 'REMOVE_RESPONSE_FROM_MASS_EDIT_ARRAY',\n CLEAR_RESPONSES_FROM_MASS_EDIT_ARRAY: 'CLEAR_RESPONSES_FROM_MASS_EDIT_ARRAY',\n ADD_RESPONSES_TO_MASS_EDIT_ARRAY: 'ADD_RESPONSES_TO_MASS_EDIT_ARRAY',\n REMOVE_RESPONSES_FROM_MASS_EDIT_ARRAY: 'REMOVE_RESPONSES_FROM_MASS_EDIT_ARRAY',\n\n FEEDBACK_STRINGS: {\n punctuationError: 'There may be an error. How could you update the punctuation?',\n punctuationAndCaseError: 'There may be an error. How could you update the punctuation and capitalization?',\n typingError: 'Try again. There may be a spelling mistake.',\n caseError: 'Proofread your work. There may be a capitalization error.',\n minLengthError: 'Revise your work. Do you have all of the information from the prompt?',\n maxLengthError: 'Revise your work. How could your response be shorter and more concise?',\n modifiedWordError: 'Revise your work. You may have mixed up or misspelled a word.',\n additionalWordError: 'Revise your work. You may have added an extra word.',\n missingWordError: 'Revise your work. You may have left out an important word.',\n whitespaceError: 'There may be an error. You may have forgotten a space between two words.',\n flexibleModifiedWordError: 'Revise your work. You may have mixed up a word.',\n flexibleAdditionalWordError: 'Revise your work. You may have added an extra word.',\n flexibleMissingWordError: 'Revise your work. You may have left out an important word.',\n },\n\n NUMBERS_AS_WORDS: [\n 'zero', 'one', 'two', 'three', 'four', 'five',\n 'six', 'seven', 'eight', 'nine', 'ten',\n 'eleven', 'twelve', 'thirteen', 'fourteen', 'fifteen',\n 'sixteen', 'seventeen', 'eighteen', 'nineteen', 'twenty'\n ],\n\n INSTRUCTIONS: {\n sentenceFragments: 'Add/change as few words as you can to change this fragment into a sentence.',\n },\n\n ERROR_TYPES: [\n 'typingError',\n 'caseError',\n 'punctuationError',\n 'punctuationAndCaseError',\n 'minLengthError',\n 'maxLengthError',\n 'flexibleModifiedWordError',\n 'flexibleAdditionalWordError',\n 'flexibleMissingWordError',\n 'modifiedWordError',\n 'additionalWordError',\n 'missingWordError',\n 'whitespaceError',\n 'requiredWordsError',\n 'tooShortError',\n 'tooLongError'\n ],\n\n ERROR_AUTHORS: [\n 'Focus Point Hint',\n 'Incorrect Sequence Hint',\n 'Capitalization Hint',\n 'Starting Capitalization Hint',\n 'Punctuation Hint',\n 'Punctuation and Case Hint',\n 'Punctuation End Hint',\n 'Modified Word Hint',\n 'Additional Word Hint',\n 'Missing Word Hint',\n 'Flexible Modified Word Hint',\n 'Flexible Additional Word Hint',\n 'Flexible Missing Word Hint',\n 'Whitespace Hint',\n 'Missing Details Hint',\n 'Not Concise Hint',\n 'Required Words Hint',\n 'Too Short Hint',\n 'Too Long Hint',\n 'Parts of Speech',\n 'Spelling Hint',\n ],\n\n // cONCEPTS FEEDBACK ACTIONS\n RECEIVE_CONCEPTS_FEEDBACK_DATA: 'RECEIVE_CONCEPTS_FEEDBACK_DATA',\n AWAIT_NEW_CONCEPTS_FEEDBACK_RESPONSE: 'AWAIT_NEW_CONCEPTS_FEEDBACK_RESPONSE',\n RECEIVE_NEW_CONCEPTS_FEEDBACK_RESPONSE: 'RECEIVE_NEW_CONCEPTS_FEEDBACK_RESPONSE',\n START_CONCEPTS_FEEDBACK_EDIT: 'START_CONCEPTS_FEEDBACK_EDIT',\n FINISH_CONCEPTS_FEEDBACK_EDIT: 'FINISH_CONCEPTS_FEEDBACK_EDIT',\n SUBMIT_CONCEPTS_FEEDBACK_EDIT: 'SUBMIT_CONCEPTS_FEEDBACK_EDIT',\n TOGGLE_NEW_CONCEPTS_FEEDBACK_MODAL: 'TOGGLE_NEW_CONCEPTS_FEEDBACK_MODAL',\n\n // iTEM LEVEL ACTIONS\n RECEIVE_ITEM_LEVELS_DATA: 'RECEIVE_ITEM_LEVELS_DATA',\n AWAIT_NEW_ITEM_LEVEL_RESPONSE: 'AWAIT_NEW_ITEM_LEVEL_RESPONSE',\n RECEIVE_NEW_ITEM_LEVEL_RESPONSE: 'RECEIVE_NEW_ITEM_LEVEL_RESPONSE',\n START_ITEM_LEVEL_EDIT: 'START_ITEM_LEVEL_EDIT',\n FINISH_ITEM_LEVEL_EDIT: 'FINISH_ITEM_LEVEL_EDIT',\n SUBMIT_ITEM_LEVEL_EDIT: 'SUBMIT_ITEM_LEVEL_EDIT',\n TOGGLE_NEW_ITEM_LEVEL_MODAL: 'TOGGLE_NEW_ITEM_LEVEL_MODAL',\n\n // iTEM LEVEL STATES\n EDITING_ITEM_LEVEL: 'EDITING_ITEM_LEVEL',\n SUBMITTING_ITEM_LEVEL: 'SUBMITTING_ITEM_LEVEL',\n\n // sENTENCE_FRAGMENT ACTIONS\n RECEIVE_SENTENCE_FRAGMENTS_DATA: 'RECEIVE_SENTENCE_FRAGMENTS_DATA',\n RECEIVE_SENTENCE_FRAGMENT_DATA: 'RECEIVE_SENTENCE_FRAGMENT_DATA',\n AWAIT_NEW_SENTENCE_FRAGMENT_RESPONSE: 'AWAIT_NEW_SENTENCE_FRAGMENT_RESPONSE',\n RECEIVE_NEW_SENTENCE_FRAGMENT_RESPONSE: 'RECEIVE_NEW_SENTENCE_FRAGMENT_RESPONSE',\n START_SENTENCE_FRAGMENT_EDIT: 'START_SENTENCE_FRAGMENT_EDIT',\n FINISH_SENTENCE_FRAGMENT_EDIT: 'FINISH_SENTENCE_FRAGMENT_EDIT',\n SUBMIT_SENTENCE_FRAGMENT_EDIT: 'SUBMIT_SENTENCE_FRAGMENT_EDIT',\n TOGGLE_NEW_SENTENCE_FRAGMENT_MODAL: 'TOGGLE_NEW_SENTENCE_FRAGMENT_MODAL',\n\n // sENTENCE_FRAGMENT STATES\n EDITING_SENTENCE_FRAGMENT: 'EDITING_SENTENCE_FRAGMENT',\n SUBMITTING_SENTENCE_FRAGMENT: 'SUBMITTING_SENTENCE_FRAGMENT',\n\n // TITLE CARD ACTIONS\n RECEIVE_TITLE_CARDS_DATA: 'RECEIVE_TITLE_CARDS_DATA',\n\n // sESSION ACTIONS\n UPDATE_SESSION_DATA: 'UPDATE_SESSION_DATA',\n DELETE_SESSION_DATA: 'DELETE_SESSION_DATA',\n DELETE_ALL_SESSION_DATA: 'DELETE_ALL_SESSION_DATA',\n\n // rESPONSE ACTIONS\n UPDATE_RESPONSE_STATUS: 'UPDATE_RESPONSE_STATUS',\n UPDATE_RESPONSE_DATA: 'UPDATE_RESPONSE_DATA',\n DELETE_RESPONSE_STATUS: 'DELETE_RESPONSE_STATUS',\n\n // score Analysis ACTIONS\n RECEIVE_SCORE_ANALYSIS_DATA: 'RECEIVE_SCORE_ANALYSIS_DATA',\n\n // CLASSROOM SESSION ACTIONS\n UPDATE_CLASSROOM_SESSION_DATA: 'UPDATE_CLASSROOM_SESSION_DATA',\n UPDATE_SLIDE_IN_STORE: 'UPDATE_SLIDE_IN_STORE',\n TOGGLE_HEADERS: 'TOGGLE_HEADERS',\n NO_CLASSROOM_ACTIVITY: 'NO_CLASSROOM_ACTIVITY',\n NO_STUDENT_ID: 'NO_STUDENT_ID',\n HIDE_SIGNUP_MODAL: 'HIDE_SIGNUP_MODAL',\n SHOW_SIGNUP_MODAL: 'SHOW_SIGNUP_MODAL',\n\n // CUSTOMIZE ACTIONS\n SET_USER_ID: 'SET_USER_ID',\n SET_COTEACHERS: 'SET_COTEACHERS',\n SET_EDITION_METADATA: 'SET_EDITION_METADATA',\n SET_EDITION_QUESTIONS: 'SET_EDITION_QUESTIONS',\n SET_ORIGINAL_EDITION_QUESTIONS: 'SET_ORIGINAL_EDITION_QUESTIONS',\n SET_WORKING_EDITION_QUESTIONS: 'SET_WORKING_EDITION_QUESTIONS',\n SET_WORKING_EDITION_METADATA: 'SET_WORKING_EDITION_METADATA',\n SET_INCOMPLETE_QUESTIONS: 'SET_INCOMPLETE_QUESTIONS',\n\n // CONNECT QUESTION ACTIONS\n RECEIVE_CONNECT_SENTENCE_FRAGMENT_DATA: 'RECEIVE_CONNECT_SENTENCE_FRAGMENT_DATA',\n RECEIVE_CONNECT_FILL_IN_BLANK_DATA: 'RECEIVE_CONNECT_FILL_IN_BLANK_DATA',\n RECEIVE_CONNECT_QUESTIONS_DATA: 'RECEIVE_CONNECT_QUESTIONS_DATA',\n ERROR_CLONING_CONNECT_SENTENCE_COMBINING_QUESTION: 'ERROR_CLONING_CONNECT_SENTENCE_COMBINING_QUESTION',\n SUCCESSFULLY_CLONED_CONNECT_SENTENCE_COMBINING_QUESTION: 'SUCCESSFULLY_CLONED_CONNECT_SENTENCE_COMBINING_QUESTION',\n ERROR_CLONING_CONNECT_FILL_IN_BLANK_QUESTION: 'ERROR_CLONING_CONNECT_FILL_IN_BLANK_QUESTION',\n SUCCESSFULLY_CLONED_CONNECT_FILL_IN_BLANK_QUESTION: 'SUCCESSFULLY_CLONED_CONNECT_FILL_IN_BLANK_QUESTION',\n ERROR_CLONING_CONNECT_SENTENCE_FRAGMENT: 'ERROR_CLONING_CONNECT_SENTENCE_FRAGMENT',\n SUCCESSFULLY_CLONED_CONNECT_SENTENCE_FRAGMENT: 'SUCCESSFULLY_CLONED_CONNECT_SENTENCE_FRAGMENT',\n\n // flags\n PRODUCTION: 'production'\n};\n","export abstract class ApiConstants {\n static readonly questionApiBaseUrl = `${window.postbuildEnv.DEFAULT_URL}/api/v1/questions`;\n};\n","import { requestDelete, requestGet, requestPost, requestPut } from '../../../modules/request/index';\nimport {\n FocusPoint,\n FocusPointCollection,\n IncorrectSequence,\n IncorrectSequenceCollection,\n Question,\n QuestionCollection\n} from '../interfaces/questions';\nimport { ApiConstants } from '../utils/api';\n\nconst SENTENCE_COMBINING_TYPE = 'diagnostic_sentence_combining',\n SENTENCE_FRAGMENTS_TYPE = 'diagnostic_sentence_fragments',\n FILL_IN_BLANKS_TYPE = 'diagnostic_fill_in_blanks'\n\n\nclass QuestionApi {\n static getAll(questionType: string): Promise {\n return requestGet(`${ApiConstants.questionApiBaseUrl}.json?question_type=${questionType}`, null, (error) => {throw(error)});\n }\n\n static get(uid: string): Promise {\n return requestGet(`${ApiConstants.questionApiBaseUrl}/${uid}.json`, null, (error) => {throw(error)});\n }\n\n static create(questionType: string, data: Question): Promise {\n return requestPost(`${ApiConstants.questionApiBaseUrl}.json?question_type=${questionType}`, {question: data}, null, (error) => {throw(error)});\n }\n\n static update(uid: string, data: Question): Promise {\n return requestPut(`${ApiConstants.questionApiBaseUrl}/${uid}.json`, {question: data}, null, (error) => {throw(error)});\n }\n\n static updateModelConcept(uid: string, modelConceptUid: string): Promise {\n return requestPut(`${ApiConstants.questionApiBaseUrl}/${uid}/update_model_concept.json`, {\n question: {\n modelConcept: modelConceptUid\n }\n }, null, (error) => {throw(error)});\n }\n}\n\nclass FocusPointApi {\n static getAll(questionId: string): Promise {\n return requestGet(`${ApiConstants.questionApiBaseUrl}/${questionId}/focus_points.json`, null, (error) => {throw(error)});\n }\n\n static get(questionId: string, focusPointId: string): Promise {\n return requestGet(`${ApiConstants.questionApiBaseUrl}/${questionId}/focus_points/${focusPointId}.json`, null, (error) => {throw(error)});\n }\n\n static create(questionId: string, data: FocusPoint): Promise {\n return requestPost(`${ApiConstants.questionApiBaseUrl}/${questionId}/focus_points.json`, {focus_point: data}, null, (error) => {throw(error)});\n }\n\n static update(questionId: string, focusPointId: string, data: FocusPoint): Promise {\n return requestPut(`${ApiConstants.questionApiBaseUrl}/${questionId}/focus_points/${focusPointId}.json`, {focus_point: data}, null, (error) => {throw(error)});\n }\n\n static updateAllForQuestion(questionId: string, data: FocusPointCollection): Promise {\n return requestPut(`${ApiConstants.questionApiBaseUrl}/${questionId}/focus_points/update_all.json`, {focus_point: data}, null, (error) => {throw(error)});\n }\n\n static remove(questionId: string, focusPointId: string): Promise {\n return requestDelete(`${ApiConstants.questionApiBaseUrl}/${questionId}/focus_points/${focusPointId}.json`, null, null, (error) => {throw(error)});\n }\n}\n\nclass IncorrectSequenceApi {\n static getAll(questionId: string): Promise {\n return requestGet(`${ApiConstants.questionApiBaseUrl}/${questionId}/incorrect_sequences.json`, null, (error) => {throw(error)});\n }\n\n static get(questionId: string, incorrectSequenceId: string): Promise {\n return requestGet(`${ApiConstants.questionApiBaseUrl}/${questionId}/incorrect_sequences/${incorrectSequenceId}.json`, null, (error) => {throw(error)});\n }\n\n static create(questionId: string, data: IncorrectSequence): Promise {\n return requestPost(`${ApiConstants.questionApiBaseUrl}/${questionId}/incorrect_sequences.json`, {incorrect_sequence: data}, null, (error) => {throw(error)});\n }\n\n static update(questionId: string, incorrectSequenceId: string, data: IncorrectSequence): Promise {\n return requestPut(`${ApiConstants.questionApiBaseUrl}/${questionId}/incorrect_sequences/${incorrectSequenceId}.json`, {incorrect_sequence: data}, null, (error) => {throw(error)});\n }\n\n static updateAllForQuestion(questionId: string, data: IncorrectSequenceCollection): Promise {\n return requestPut(`${ApiConstants.questionApiBaseUrl}/${questionId}/incorrect_sequences/update_all.json`, {incorrect_sequence: data}, null, (error) => {throw(error)});\n }\n\n static remove(questionId: string, incorrectSequenceId: string): Promise {\n return requestDelete(`${ApiConstants.questionApiBaseUrl}/${questionId}/incorrect_sequences/${incorrectSequenceId}.json`, null, null, (error) => {throw(error)});\n }\n}\n\nexport {\n QuestionApi,\n FocusPointApi,\n IncorrectSequenceApi,\n SENTENCE_COMBINING_TYPE,\n SENTENCE_FRAGMENTS_TYPE,\n FILL_IN_BLANKS_TYPE\n};\n","import _ from 'underscore';\n\nexport default function (camelObj, convertCR = true) {\n const snakeObj = {};\n for (const camelKey in camelObj) {\n if (camelObj.hasOwnProperty(camelKey)) {\n let snakeKey;\n switch (camelKey) {\n case 'questionUID':\n snakeKey = 'question_uid';\n break;\n case 'gradeIndex':\n snakeKey = 'grade_index';\n break;\n case 'parentID':\n snakeKey = 'parent_id';\n break;\n case 'conceptResults':\n snakeKey = 'concept_results';\n break;\n default:\n snakeKey = camelKey;\n }\n snakeObj[snakeKey] = camelObj[camelKey];\n }\n }\n if (convertCR && snakeObj.concept_results) {\n const crs = _.values(snakeObj.concept_results);\n const newHash = {};\n _.each(crs, (val) => {\n if (val.conceptUID && val.conceptUID.length > 0) {\n newHash[val.conceptUID] = val.correct;\n }\n });\n snakeObj.concept_results = newHash;\n }\n return snakeObj;\n}\n","/* eslint-env browser*/\nimport moment from 'moment';\nimport _ from 'underscore';\n\nimport { requestDelete, requestGet, requestPost, requestPut } from '../../../modules/request/index';\nimport objectWithSnakeKeysFromCamel from '../libs/objectWithSnakeKeysFromCamel';\n\nimport C from '../constants';\n\nexport function deleteStatus(questionId) {\n return { type: C.DELETE_RESPONSE_STATUS, data: { questionId, }, };\n}\n\nexport function updateStatus(questionId, status) {\n return { type: C.UPDATE_RESPONSE_STATUS, data: { questionId, status, }, };\n}\n\nexport function updateData(questionId, responses) {\n return { type: C.UPDATE_RESPONSE_DATA, data: { questionId, responses, }, };\n}\n\nfunction groupResponsesByQuestion(snapshot) {\n const groupedResponses = {};\n for (const responseKey in snapshot) {\n if (snapshot.hasOwnProperty(responseKey)) {\n const response = snapshot[responseKey];\n if (response.questionUID) {\n if (groupedResponses[response.questionUID]) {\n groupedResponses[response.questionUID][responseKey] = response;\n } else {\n groupedResponses[response.questionUID] = {};\n groupedResponses[response.questionUID][responseKey] = response;\n }\n }\n }\n }\n return groupedResponses;\n}\n\nexport function submitResponse(content, prid, isFirstAttempt) {\n delete content.gradeIndex;\n const rubyConvertedResponse = objectWithSnakeKeysFromCamel(content);\n rubyConvertedResponse.created_at = moment().format('x');\n rubyConvertedResponse.first_attempt_count = isFirstAttempt ? 1 : 0;\n rubyConvertedResponse.is_first_attempt = isFirstAttempt;\n return (dispatch) => {\n requestPost(\n `${window.postbuildEnv.QUILL_CMS}/responses/create_or_increment`,\n { response: rubyConvertedResponse, },\n (body) => {\n dispatch({ type: C.DISPLAY_MESSAGE, message: 'Submission successfully saved!', });\n },\n (body) => {\n dispatch({ type: C.DISPLAY_ERROR, error: `Submission failed! ${body}`, });\n },\n );\n };\n}\n\nexport function uploadOptimalResponse(content, prid, isFirstAttempt) {\n const rubyConvertedResponse = objectWithSnakeKeysFromCamel(content);\n return (dispatch) => {\n requestPost(\n `${window.postbuildEnv.QUILL_CMS}/responses/create_or_update`,\n { response: rubyConvertedResponse, },\n (body) => {\n dispatch({ type: C.DISPLAY_MESSAGE, message: 'Submission successfully saved!', });\n },\n (body) => {\n dispatch({ type: C.DISPLAY_ERROR, error: `Submission failed! ${body}`, });\n },\n );\n };\n}\n\nexport function submitMassEditFeedback(ids, properties, qid) {\n return (dispatch) => {\n const updated_attribute = properties;\n requestPut(\n `${window.postbuildEnv.QUILL_CMS}/responses/mass_edit/edit_many`,\n { ids, updated_attribute, },\n (body) => {\n dispatch({ type: C.DISPLAY_MESSAGE, message: 'Submission successfully saved!', });\n dispatch({ type: C.SHOULD_RELOAD_RESPONSES, qid, });\n },\n (body) => {\n dispatch({ type: C.DISPLAY_ERROR, error: `Submission failed! ${body}`, });\n },\n );\n };\n}\n\nexport function submitMassEditConceptResults(ids, conceptResults, qid) {\n return (dispatch) => {\n const updated_attribute = {\n concept_results: conceptResults,\n };\n requestPut(\n `${window.postbuildEnv.QUILL_CMS}/responses/mass_edit/edit_many`,\n { ids, updated_attribute, },\n (body) => {\n dispatch({ type: C.DISPLAY_MESSAGE, message: 'Submission successfully saved!', });\n dispatch({ type: C.SHOULD_RELOAD_RESPONSES, qid, });\n },\n (body) => {\n dispatch({ type: C.DISPLAY_ERROR, error: `Submission failed! ${body}`, });\n },\n );\n };\n}\n\nexport function massEditDeleteResponses(ids, qid) {\n return (dispatch) => {\n requestPost(\n `${window.postbuildEnv.QUILL_CMS}/responses/mass_edit/delete_many`,\n { ids, },\n (body) => {\n dispatch({ type: C.DISPLAY_MESSAGE, message: 'Submission successfully saved!', });\n dispatch({ type: C.SHOULD_RELOAD_RESPONSES, qid, });\n },\n (body) => {\n dispatch({ type: C.DISPLAY_ERROR, error: `Submission failed! ${body}`, });\n },\n );\n };\n}\n\nexport function submitResponseEdit(rid, content, qid, callback) {\n const rubyConvertedResponse = objectWithSnakeKeysFromCamel(content, false);\n return (dispatch) => {\n requestPut(\n `${window.postbuildEnv.QUILL_CMS}/responses/${rid}`,\n { response: rubyConvertedResponse, },\n (body) => {\n callback(body);\n dispatch({ type: C.DISPLAY_MESSAGE, message: 'Submission successfully saved!', });\n dispatch({ type: C.FINISH_QUESTION_EDIT, qid, });\n },\n (body) => {\n dispatch({ type: C.DISPLAY_ERROR, error: `Submission failed! ${body}`, });\n },\n );\n };\n}\n\nexport function updateConceptResults(rid, content, qid) {\n const rubyConvertedResponse = objectWithSnakeKeysFromCamel(content, false);\n return (dispatch) => {\n requestPut(\n `${window.postbuildEnv.QUILL_CMS}/responses/${rid}`,\n { response: rubyConvertedResponse, },\n (body) => {\n dispatch({ type: C.DISPLAY_MESSAGE, message: 'Submission successfully saved!', });\n dispatch({ type: C.SHOULD_RELOAD_RESPONSES, qid, });\n dispatch({ type: C.START_RESPONSE_EDIT, qid, rid, });\n },\n (body) => {\n dispatch({ type: C.DISPLAY_ERROR, error: `Submission failed! ${body}`, });\n },\n );\n };\n}\n\nexport function deleteConceptResult(rid, content, qid) {\n const updatedResponse = objectWithSnakeKeysFromCamel(content, false);\n return (dispatch) => {\n requestPut(\n `${window.postbuildEnv.QUILL_CMS}/responses/${rid}`,\n { response: updatedResponse, },\n (body) => {\n dispatch({ type: C.DISPLAY_MESSAGE, message: 'Submission successfully saved!', });\n dispatch({ type: C.SHOULD_RELOAD_RESPONSES, qid, });\n dispatch({ type: C.START_RESPONSE_EDIT, qid, rid, });\n },\n (body) => {\n dispatch({ type: C.DISPLAY_ERROR, error: `Submission failed! ${body}`, });\n },\n );\n };\n}\n\nexport function deleteResponse(qid, rid) {\n return (dispatch) => {\n requestDelete(\n `${window.postbuildEnv.QUILL_CMS}/responses/${rid}`,\n null,\n (body) => {\n dispatch({ type: C.DISPLAY_MESSAGE, message: 'Submission successfully saved!', });\n dispatch({ type: C.SHOULD_RELOAD_RESPONSES, qid, });\n },\n (body) => {\n dispatch({ type: C.DISPLAY_ERROR, error: `Submission failed! ${body}`, });\n },\n );\n };\n}\n\nfunction makeIterator(array) {\n let nextIndex = 0;\n\n return {\n next: function () {\n let nextVal = null;\n if (nextIndex < array.length) {\n nextVal = { value: array[nextIndex], done: false };\n nextIndex += 1;\n }\n else {\n nextVal = { done: true };\n }\n return nextVal;\n }\n };\n}\n\nexport function getResponsesWithCallback(questionID, callback) {\n responsesForQuestionRef(questionID).once('value', (snapshot) => {\n callback(snapshot.val());\n });\n}\n\nexport function listenToResponsesWithCallback(questionID, callback) {\n responsesForQuestionRef(questionID).on('value', (snapshot) => {\n callback(snapshot.val());\n });\n}\n\nexport function getGradedResponsesWithCallback(questionID, callback) {\n requestGet(`${window.postbuildEnv.QUILL_CMS}/questions/${questionID}/responses`)\n .then((body) => {\n const bodyToObj = {};\n body.forEach((resp) => {\n bodyToObj[resp.id] = resp;\n if (typeof resp.concept_results === 'string') {\n resp.concept_results = JSON.parse(resp.concept_results);\n }\n for (const cr in resp.concept_results) {\n const formatted_cr = {};\n formatted_cr.conceptUID = cr;\n formatted_cr.correct = resp.concept_results[cr];\n resp.concept_results[cr] = formatted_cr;\n }\n resp.conceptResults = resp.concept_results;\n delete resp.concept_results;\n });\n callback(bodyToObj);\n })\n .catch((error) => {\n // to do, use Sentry to capture error\n })\n}\n\nexport function convertConceptNamesToIds(responses, concepts) {\n const conceptData = concepts.data[\"0\"];\n const convertedResponses = responses.map((response) => {\n const concepts = response.concepts.map((c) => {\n const concept = conceptData.find((cd) => { return cd.displayName === c })\n if (!concept) {\n alert(`The concept ${c} doesn't exist! Check your spelling.`)\n throw new Error(\"Concept not found.\")\n }\n return { conceptUID: concept.uid, correct: true, }\n })\n return { \"text\": response.text, \"concepts\": concepts }\n })\n return convertedResponses\n}\n\nexport function submitOptimalResponses(qid, conceptUID, responses, concepts) {\n const convertedResponses = convertConceptNamesToIds(responses, concepts)\n return (dispatch) => {\n convertedResponses.forEach((obj) => {\n const defaultConcept = [{ conceptUID, correct: true }]\n const response = {\n text: obj.text,\n feedback: \"That's a strong sentence!\",\n optimal: true,\n questionUID: qid,\n conceptResults: _.isEmpty(obj.concepts) ? defaultConcept : obj.concepts,\n parent_id: null,\n }\n dispatch(uploadOptimalResponse(response))\n })\n }\n}\n","import { requestGet, requestPut } from '../../../modules/request/index';\n\nconst sessionApiBaseUrl = `${window.postbuildEnv.DEFAULT_URL}/api/v1/active_activity_sessions`;\n\nclass SessionApi {\n static get(uid: string): Promise {\n return requestGet(`${sessionApiBaseUrl}/${uid}.json`, null, (error) => {throw(error)});\n }\n\n static update(uid: string, data: object): Promise {\n return requestPut(`${sessionApiBaseUrl}/${uid}.json`, {active_activity_session: data}, null, (error) => {throw(error)});\n }\n}\n\nexport {\n SessionApi,\n sessionApiBaseUrl\n};\n\n","import _ from 'lodash';\n\nimport { SessionApi } from '../libs/sessions_api';\n\n\nlet allQuestions = {};\nlet questionsInitialized = {};\n\nexport default {\n get(sessionID, callback) {\n SessionApi.get(sessionID).then((session) => {\n const denormalizedSession = denormalizeSession(session)\n const processedSession = processSession(denormalizedSession)\n callback(processedSession)\n }).catch((error) => {\n if (error.status === 404) {\n const processedSession = processSession(null)\n callback(processedSession)\n } else {\n throw error\n }\n })\n },\n\n update(sessionID, session) {\n const cleanSession = _.pickBy(session);\n const cleanedSession = JSON.parse(JSON.stringify(cleanSession));\n delete_null_properties(cleanedSession, true);\n const normalizedSession = normalizeSession(cleanedSession)\n SessionApi.update(sessionID, normalizedSession);\n },\n\n populateQuestions(questionType, questions, forceRefresh) {\n if (questionsInitialized[questionType] && !forceRefresh) return;\n\n Object.keys(questions).forEach((uid) => {\n allQuestions[uid] = {\n data: Object.assign(questions[uid], {key: uid}),\n type: questionType,\n }\n })\n questionsInitialized[questionType] = true;\n }\n};\n\nfunction processSession(session) {\n if (session != null) {\n if (session.currentQuestion) {\n if (session.currentQuestion.question) {\n session.currentQuestion.question.attempts = [];\n } else {\n session.currentQuestion.data.attempts = [];\n }\n }\n session.unansweredQuestions = session.unansweredQuestions || [];\n }\n return session\n}\n\nfunction denormalizeSession(session) {\n // If the session is already in a denormalized form (it has question keys that\n // contain objects instead of just an ID string, just return the session as-is\n if (typeof session.questionSet[0].data == \"object\") return session\n // If someone has answered no questions, this key will be missing\n if (session.answeredQuestions) {\n session.answeredQuestions.forEach((value, index, answeredQuestions) => {\n answeredQuestions[index] = denormalizeQuestion(value);\n });\n }\n session.questionSet.forEach((value, index, questionSet) => {\n questionSet[index] = denormalizeQuestion(value);\n });\n // If all questions are answered, we won't have this key\n if (session.unansweredQuestions) {\n session.unansweredQuestions.forEach((value, index, unansweredQuestions) => {\n unansweredQuestions[index] = denormalizeQuestion(value);\n });\n }\n if (session.currentQuestion) {\n session.currentQuestion = denormalizeQuestion(session.currentQuestion);\n }\n return session\n}\n\nfunction denormalizeQuestion(question) {\n // Questions stored on the session object have a different shape\n // if they have any attempt data attached to them\n // It appears that they also have this shape if the object has ever\n // had attempt data on it. This is only happens with currentQuestion,\n // but we should account for it\n const questionUid = (question.attempts || question.question) ? question.question : question;\n // We need to make sure that the 'question' part of the\n // question object is a clean copy so that we can modify\n // it without changing the cached question object\n const denormalizedQuestion = JSON.parse(JSON.stringify(allQuestions[questionUid]))\n const questionType = allQuestions[questionUid].type;\n if (question.attempts) {\n denormalizedQuestion.data.attempts = question.attempts;\n }\n return denormalizedQuestion\n}\n\nfunction normalizeSession(session) {\n // Deep copy so that we return a clean object\n let sessionCopy = JSON.parse(JSON.stringify(session));\n sessionCopy.questionSet = sessionCopy.questionSet.map(normalizeQuestion)\n // If someone has answered all the questions, key will be missing\n if (sessionCopy.unansweredQuestions) {\n sessionCopy.unansweredQuestions = sessionCopy.unansweredQuestions.map(normalizeQuestion)\n }\n if (sessionCopy.currentQuestion) {\n sessionCopy.currentQuestion = normalizeQuestionWithAttempts(sessionCopy.currentQuestion);\n }\n // If someone has not answered any questions, this key will be missing\n if (sessionCopy.answeredQuestions) {\n sessionCopy.answeredQuestions = sessionCopy.answeredQuestions.map(normalizeQuestionWithAttempts)\n }\n return sessionCopy\n}\n\nfunction normalizeQuestion(question) {\n return question.data.key;\n}\n\nfunction normalizeQuestionWithAttempts(question) {\n return {\n question: question.data.key,\n attempts: question.data.attempts,\n }\n}\n\nfunction delete_null_properties(test, recurse) {\n for (const i in test) {\n if (test[i] === null) {\n delete test[i];\n } else if (recurse && typeof test[i] === 'object') {\n delete_null_properties(test[i], recurse);\n }\n }\n}\n\nexport {\n allQuestions, denormalizeSession,\n normalizeSession\n};\n\n","import C from '../constants';\n\nimport Pusher from 'pusher-js';\n// Put 'pusher' on global window for TypeScript validation\ndeclare global {\n interface Window { pusher: any }\n}\n\nimport { push } from 'react-router-redux';\nimport _ from 'underscore';\nimport { requestPost, } from '../../../modules/request/index';\nimport {\n FocusPointApi,\n IncorrectSequenceApi,\n QuestionApi,\n SENTENCE_COMBINING_TYPE\n} from '../libs/questions_api';\nimport { submitResponse } from './responses';\nimport sessionActions from './sessions';\n\nfunction loadQuestions() {\n return (dispatch, getState) => {\n QuestionApi.getAll(SENTENCE_COMBINING_TYPE).then((questions) => {\n dispatch({ type: C.RECEIVE_QUESTIONS_DATA, data: questions, });\n });\n };\n}\n\n// called when the app starts. this means we immediately download all questions, and\n// then receive all questions again as soon as anyone changes anything.\nfunction startListeningToQuestions() {\n return loadQuestions();\n}\n\nfunction loadQuestion(uid) {\n return (dispatch, getState) => {\n QuestionApi.get(uid).then((question) => {\n dispatch({ type: C.RECEIVE_QUESTION_DATA, uid: uid, data: question, });\n });\n }\n}\n\nfunction loadSpecifiedQuestions(uids) {\n return (dispatch, getState) => {\n const requestPromises: Promise[] = [];\n uids.forEach((uid) => {\n requestPromises.push(QuestionApi.get(uid));\n });\n const allPromises = Promise.all(requestPromises);\n const questionData = {};\n allPromises.then((results) => {\n results.forEach((result, index) => {\n questionData[uids[index]] = result;\n });\n sessionActions.populateQuestions(\"SC\", questionData, true)\n dispatch({ type: C.RECEIVE_QUESTIONS_DATA, data: questionData, });\n }).catch((error) => {\n throw error;\n });\n }\n}\n\nfunction startQuestionEdit(qid) {\n return { type: C.START_QUESTION_EDIT, qid, };\n}\n\nfunction cancelQuestionEdit(qid) {\n return { type: C.FINISH_QUESTION_EDIT, qid, };\n}\n\nfunction submitQuestionEdit(qid, content) {\n return (dispatch, getState) => {\n dispatch({ type: C.SUBMIT_QUESTION_EDIT, qid, });\n QuestionApi.update(qid, content).then(() => {\n dispatch({ type: C.FINISH_QUESTION_EDIT, qid, });\n dispatch(loadQuestion(qid));\n dispatch({ type: C.DISPLAY_MESSAGE, message: 'Update successfully saved!', });\n }).catch((error) => {\n dispatch({ type: C.FINISH_QUESTION_EDIT, qid, });\n dispatch({ type: C.DISPLAY_ERROR, error: `Update failed! ${error}`, });\n });\n };\n}\n\nfunction toggleNewQuestionModal() {\n return { type: C.TOGGLE_NEW_QUESTION_MODAL, };\n}\n\nfunction submitNewQuestion(content, response) {\n return (dispatch, getState) => {\n dispatch({ type: C.AWAIT_NEW_QUESTION_RESPONSE, });\n QuestionApi.create(SENTENCE_COMBINING_TYPE, content).then((question) => {\n dispatch({ type: C.RECEIVE_NEW_QUESTION_RESPONSE, });\n response.questionUID = Object.keys(question)[0];\n response.gradeIndex = `human${response.questionUID}`;\n dispatch(submitResponse(response));\n dispatch(loadQuestion(response.questionUID));\n dispatch({ type: C.DISPLAY_MESSAGE, message: 'Submission successfully saved!', });\n const action = push(`/admin/questions/${response.questionUID}`);\n dispatch(action);\n }, (error) => {\n dispatch({ type: C.RECEIVE_NEW_QUESTION_RESPONSE, });\n dispatch({ type: C.DISPLAY_ERROR, error: `Submission failed! ${error}`, });\n });\n };\n}\n\nfunction submitNewFocusPoint(qid, data) {\n return (dispatch, getState) => {\n FocusPointApi.create(qid, data).then(() => {\n dispatch(loadQuestion(qid));\n }, (error) => {\n alert(`Submission failed! ${error}`);\n });\n }\n}\n\nfunction submitEditedFocusPoint(qid, data, fpid) {\n return (dispatch, getState) => {\n FocusPointApi.update(qid, fpid, data).then(() => {\n dispatch(loadQuestion(qid));\n }).catch((error) => {\n alert(`Submission failed! ${error}`);\n });\n };\n}\n\nfunction submitBatchEditedFocusPoint(qid, data) {\n return (dispatch, getState) => {\n FocusPointApi.updateAllForQuestion(qid, data).then(() => {\n dispatch(loadQuestion(qid));\n }, (error) => {\n alert(`Submission failed! ${error}`);\n });\n };\n}\n\nfunction deleteFocusPoint(qid, fpid) {\n return (dispatch, getState) => {\n FocusPointApi.remove(qid, fpid).then(() => {\n dispatch(loadQuestion(qid));\n }, (error) => {\n alert(`Delete failed! ${error}`);\n });\n };\n}\n\nfunction updateModelConceptUID(qid, modelConceptUID) {\n return dispatch => {\n QuestionApi.get(qid).then((question) => {\n if (!question.modelConceptUID) {\n QuestionApi.updateModelConcept(qid, modelConceptUID).then(() => {\n dispatch(loadQuestion(qid));\n }).catch((error) => {\n alert(`Model concept update failed! ${error}`);\n });\n }\n });\n }\n}\n\nfunction submitNewIncorrectSequence(qid, data, callback) {\n return (dispatch, getState) => {\n IncorrectSequenceApi.create(qid, data).then(() => {\n dispatch(loadQuestion(qid));\n callback();\n }, (error) => {\n alert(`Submission failed! ${error}`);\n });\n };\n}\n\nfunction submitEditedIncorrectSequence(qid, data, seqid) {\n return (dispatch, getState) => {\n IncorrectSequenceApi.update(qid, seqid, data).then(() => {\n dispatch(loadQuestion(qid));\n }).catch((error) => {\n alert(`Submission failed! ${error}`);\n });\n };\n}\n\nfunction deleteIncorrectSequence(qid, seqid) {\n return (dispatch, getState) => {\n IncorrectSequenceApi.remove(qid, seqid).then(() => {\n dispatch(loadQuestion(qid));\n }, (error) => {\n alert(`Delete failed! ${error}`);\n });\n };\n}\n\nfunction updateIncorrectSequences(qid, data, callback) {\n return (dispatch, getState) => {\n IncorrectSequenceApi.updateAllForQuestion(qid, data).then(() => {\n dispatch(loadQuestion(qid));\n callback();\n }).catch((error) => {\n alert(`Order update failed! ${error}`);\n });\n }\n}\n\nfunction getFormattedSearchData(state) {\n const searchData = state.filters.formattedFilterData;\n searchData.text = state.filters.stringFilter;\n searchData.pageNumber = state.filters.responsePageNumber;\n return searchData;\n}\n\nfunction searchResponses(qid, callback) {\n return (dispatch, getState) => {\n const requestNumber = getState().filters.requestCount\n // check for request number in state, save as const\n requestPost(\n `${window.postbuildEnv.QUILL_CMS}/questions/${qid}/responses/search`,\n { search: getFormattedSearchData(getState()), },\n (body) => {\n // check again for number in state\n // if equal to const set earlier, update the state\n // otherwise, do nothing\n if (getState().filters.requestCount === requestNumber && body) {\n const embeddedOrder = _.map(body.results, (response: any, i: number) => {\n response.sortOrder = i;\n return response;\n });\n const parsedResponses = _.indexBy(embeddedOrder, 'id');\n const responseData = {\n responses: parsedResponses,\n numberOfResponses: body.numberOfResults,\n numberOfPages: body.numberOfPages,\n };\n dispatch(updateResponses(responseData));\n callback();\n }\n }\n );\n };\n}\n\nfunction initializeSubscription(qid) {\n return (dispatch) => {\n if (window.postbuildEnv.NODE_ENV === 'development') {\n Pusher.logToConsole = true;\n }\n if (!window.pusher) {\n window.pusher = new Pusher(window.postbuildEnv.PUSHER_KEY, { cluster: window.postbuildEnv.PUSHER_CLUSTER });\n }\n const channel = window.pusher.subscribe(`admin-${qid}`);\n channel.bind('new-response', (data) => {\n setTimeout(() => dispatch(searchResponses(qid)), 1000);\n });\n channel.bind('rematching-finished', () => {\n window.alert(`Rematching finished for the diagnostic question with uid ${qid}! Reload the page to see the rematched responses.`)\n })\n };\n}\n\nfunction removeSubscription(qid) {\n return (dispatch) => {\n if (window.pusher) {\n window.pusher.unsubscribe(`admin-${qid}`);\n }\n };\n}\n\nfunction updatePageNumber(pageNumber) {\n return (dispatch) => {\n dispatch(setPageNumber(pageNumber));\n };\n}\n\nfunction updateStringFilter(stringFilter) {\n return (dispatch) => {\n dispatch(setStringFilter(stringFilter));\n };\n}\n\nfunction getUsedSequences(qid) {\n return (dispatch, getState) => {\n const existingIncorrectSeqs = getState().questions.data[qid].incorrectSequences\n const usedSeqs: string[] = []\n if (existingIncorrectSeqs) {\n Object.values(existingIncorrectSeqs).forEach((inSeq: any) => {\n const phrases = inSeq.text.split('|||')\n phrases.forEach((p) => {\n usedSeqs.push(p)\n })\n })\n }\n dispatch(setUsedSequences(qid, usedSeqs));\n }\n}\n\nfunction setUsedSequences(qid, seq) {\n return { type: C.SET_USED_SEQUENCES, qid, seq }\n}\n\nfunction startResponseEdit(qid, rid) {\n return { type: C.START_RESPONSE_EDIT, qid, rid, };\n}\n\nfunction cancelResponseEdit(qid, rid) {\n return { type: C.FINISH_RESPONSE_EDIT, qid, rid, };\n}\n\nfunction startChildResponseView(qid, rid) {\n return { type: C.START_CHILD_RESPONSE_VIEW, qid, rid, };\n}\n\nfunction cancelChildResponseView(qid, rid) {\n return { type: C.CANCEL_CHILD_RESPONSE_VIEW, qid, rid, };\n}\n\nfunction startFromResponseView(qid, rid) {\n return { type: C.START_FROM_RESPONSE_VIEW, qid, rid, };\n}\n\nfunction cancelFromResponseView(qid, rid) {\n return { type: C.CANCEL_FROM_RESPONSE_VIEW, qid, rid, };\n}\n\nfunction startToResponseView(qid, rid) {\n return { type: C.START_TO_RESPONSE_VIEW, qid, rid, };\n}\n\nfunction cancelToResponseView(qid, rid) {\n return { type: C.CANCEL_TO_RESPONSE_VIEW, qid, rid, };\n}\n\nfunction clearQuestionState(qid) {\n return { type: C.CLEAR_QUESTION_STATE, qid, };\n}\n\nfunction updateResponses(data) {\n return { type: C.UPDATE_SEARCHED_RESPONSES, data, };\n}\n\nfunction setPageNumber(pageNumber) {\n return { type: C.SET_RESPONSE_PAGE_NUMBER, pageNumber, };\n}\n\nfunction setStringFilter(stringFilter) {\n return { type: C.SET_RESPONSE_STRING_FILTER, stringFilter, };\n}\n\nfunction incrementRequestCount() {\n return { type: C.INCREMENT_REQUEST_COUNT }\n}\n\nexport default {\n startListeningToQuestions,\n loadQuestions,\n loadQuestion,\n loadSpecifiedQuestions,\n startQuestionEdit,\n cancelQuestionEdit,\n submitQuestionEdit,\n toggleNewQuestionModal,\n submitNewQuestion,\n submitNewFocusPoint,\n submitEditedFocusPoint,\n submitBatchEditedFocusPoint,\n deleteFocusPoint,\n submitNewIncorrectSequence,\n submitEditedIncorrectSequence,\n deleteIncorrectSequence,\n updateIncorrectSequences,\n searchResponses,\n initializeSubscription,\n removeSubscription,\n updatePageNumber,\n updateStringFilter,\n startResponseEdit,\n cancelResponseEdit,\n startChildResponseView,\n cancelChildResponseView,\n startFromResponseView,\n cancelFromResponseView,\n startToResponseView,\n cancelToResponseView,\n clearQuestionState,\n updateResponses,\n setPageNumber,\n setStringFilter,\n incrementRequestCount,\n getUsedSequences,\n updateModelConceptUID\n};\n","import { PRODUCTION } from \"../../../constants/flagOptions\";\nimport { startListeningToQuestions as grammarListenToQuestions } from \"../../Grammar/actions/questions\";\nimport connect from \"../../Connect/actions/questions\";\nimport diagnostic from \"../../Diagnostic/actions/questions\";\nimport { CONNECT, DIAGNOSTIC, GRAMMAR } from \"../utils/constants\";\n\nexport const reloadQuestionsIfNecessary = (flag: String, activityType: String) => {\n if (flag !== PRODUCTION) { return null; }\n return (dispatch: Function) => {\n switch (activityType) {\n case GRAMMAR:\n dispatch(grammarListenToQuestions());\n break;\n case CONNECT:\n dispatch(connect.loadQuestions());\n break;\n case DIAGNOSTIC:\n dispatch(diagnostic.loadQuestions());\n break;\n }\n }\n}\n","import { requestGet, requestPost, requestPut } from '../../../modules/request/index';\nimport { TitleCard, TitleCards } from '../interfaces/title_cards';\n\nconst titleCardApiBaseUrl = `${window.postbuildEnv.DEFAULT_URL}/api/v1/title_cards`;\nconst CONNECT_TITLE_CARD_TYPE = 'connect_title_card';\nconst DIAGNOSTIC_TITLE_CARD_TYPE = 'diagnostic_title_card';\n\nclass TitleCardApi {\n static getAll(titleCardType: string): Promise {\n return requestGet(`${titleCardApiBaseUrl}.json?title_card_type=${titleCardType}`, null, (error) => {throw(error)});\n }\n\n static get(titleCardType: string, uid: string): Promise {\n return requestGet(`${titleCardApiBaseUrl}/${uid}.json?title_card_type=${titleCardType}`, null, (error) => {throw(error)});\n }\n\n static create(titleCardType: string, data: TitleCard): Promise {\n return requestPost(`${titleCardApiBaseUrl}.json?title_card_type=${titleCardType}`, {title_card: data}, null, (error) => {throw(error)});\n }\n\n static update(titleCardType: string, uid: string, data: TitleCard): Promise {\n return requestPut(`${titleCardApiBaseUrl}/${uid}.json?title_card_type=${titleCardType}`, {title_card: data}, null, (error) => {throw(error)});\n }\n}\n\nexport {\n CONNECT_TITLE_CARD_TYPE,\n DIAGNOSTIC_TITLE_CARD_TYPE,\n TitleCardApi,\n titleCardApiBaseUrl\n};\n\n","import { pickBy } from 'lodash';\nimport { push } from 'react-router-redux';\nimport { CONNECT } from '../../Shared';\nimport { reloadQuestionsIfNecessary } from '../../Shared/actions/questions';\nimport C from '../constants';\nimport { LessonApi, TYPE_CONNECT_LESSON } from '../libs/lessons_api';\nimport { FILL_IN_BLANKS_TYPE, QuestionApi, SENTENCE_COMBINING_TYPE, SENTENCE_FRAGMENTS_TYPE } from '../libs/questions_api';\nimport questionActions from './questions';\nimport { CONNECT_TITLE_CARD_TYPE } from '../libs/title_cards_api';\n\n// called when the app starts. this means we immediately download all quotes, and\n// then receive all quotes again as soon as anyone changes anything.\n\nconst startListeningToLessons = () => {\n return loadLessons()\n}\n\nconst loadLessons = () => {\n return (dispatch, getState) => {\n LessonApi.getAll(TYPE_CONNECT_LESSON).then((data) => {\n dispatch({ type: C.RECEIVE_LESSONS_DATA, data: data, });\n });\n };\n}\n\nconst loadLesson = (uid) => {\n return (dispatch, getState) => {\n return new Promise((resolve, reject) => {\n LessonApi.get(TYPE_CONNECT_LESSON, uid).then((data) => {\n dispatch({ type: C.RECEIVE_LESSONS_DATA, data: { [uid]: data, } });\n resolve();\n });\n })\n }\n}\n\nconst filterQuestionType = (data, key) => {\n return Object.fromEntries(\n Object.entries(data).filter(([_, value]) =>\n value['question_type'] === key\n )\n );\n}\n\nconst loadLessonWithQuestions = (uid) => {\n return (dispatch, getState) => {\n dispatch(loadLesson(uid)).then(() => {\n QuestionApi.getAllForActivity(uid).then((questions) => {\n if (!questions) { return }\n dispatch({\n type: C.RECEIVE_QUESTIONS_DATA,\n data: filterQuestionType(questions, SENTENCE_COMBINING_TYPE)\n })\n dispatch({\n type: C.RECEIVE_FILL_IN_BLANK_QUESTIONS_DATA,\n data: filterQuestionType(questions, FILL_IN_BLANKS_TYPE)\n })\n dispatch({\n type: C.RECEIVE_SENTENCE_FRAGMENTS_DATA,\n data: filterQuestionType(questions, SENTENCE_FRAGMENTS_TYPE)\n })\n dispatch({\n type: C.RECEIVE_TITLE_CARDS_DATA,\n data: filterQuestionType(questions, CONNECT_TITLE_CARD_TYPE)\n })\n })\n })\n }\n}\n\n\nconst loadTranslatedQuestions = (uid, language) => {\n return (dispatch, getState) => {\n dispatch(loadLesson(uid)).then(() => {\n QuestionApi.getAllForActivity(uid, language).then((questions) => {\n if (!questions) { return }\n dispatch({\n type: C.RECEIVE_TRANSLATED_QUESTIONS_DATA,\n data: questions\n })\n })\n })\n }\n}\n\nconst startLessonEdit = (cid) => {\n return { type: C.START_LESSON_EDIT, cid, };\n}\n\nconst cancelLessonEdit = (cid) => {\n return { type: C.FINISH_LESSON_EDIT, cid, };\n}\n\nconst deleteLesson = (cid) => {\n return (dispatch, getState) => {\n dispatch({ type: C.SUBMIT_LESSON_EDIT, cid, });\n LessonApi.remove(TYPE_CONNECT_LESSON, cid).then(() => {\n dispatch({ type: C.FINISH_LESSON_EDIT, cid, });\n dispatch({ type: C.DISPLAY_MESSAGE, message: 'Lesson successfully deleted!', });\n }).catch((error) => {\n dispatch({ type: C.FINISH_LESSON_EDIT, cid, });\n dispatch({ type: C.DISPLAY_ERROR, error: `Deletion failed! ${error}`, });\n });\n };\n}\n\nconst submitLessonEdit = (cid, content, qids) => {\n return (dispatch, getState) => {\n dispatch({ type: C.SUBMIT_LESSON_EDIT, cid, });\n const cleanedContent = pickBy(content)\n if (cleanedContent.questionType != C.INTERNAL_TITLE_CARDS_TYPE) {\n dispatch(updateQuestions(cleanedContent, qids))\n }\n LessonApi.update(TYPE_CONNECT_LESSON, cid, cleanedContent).then((lesson) => {\n dispatch(loadLesson(cid))\n dispatch({ type: C.FINISH_LESSON_EDIT, cid, });\n dispatch(reloadQuestionsIfNecessary(content.flag, CONNECT));\n dispatch({ type: C.DISPLAY_MESSAGE, message: 'Update successfully saved!', });\n }).catch((error) => {\n dispatch({ type: C.FINISH_LESSON_EDIT, cid, });\n dispatch({ type: C.DISPLAY_ERROR, error: `Update failed! ${error}`, });\n })\n };\n}\n\nconst updateQuestions = (content, qids) => {\n return (dispatch) => {\n if (content.modelConceptUID) {\n qids.forEach(qid => {\n dispatch(questionActions.updateModelConceptUID(qid, content.modelConceptUID))\n })\n }\n };\n}\n\nconst toggleNewLessonModal = () => {\n return { type: C.TOGGLE_NEW_LESSON_MODAL, };\n}\n\nconst submitNewLesson = (content) => {\n const cleanedContent = pickBy(content)\n return (dispatch, getState) => {\n dispatch({ type: C.AWAIT_NEW_LESSON_RESPONSE, });\n LessonApi.create(TYPE_CONNECT_LESSON, cleanedContent).then((lesson) => {\n const lessonUid = Object.keys(lesson)[0];\n dispatch(loadLesson(lessonUid))\n dispatch({ type: C.RECEIVE_NEW_LESSON_RESPONSE, });\n const qids = cleanedContent.questions ? cleanedContent.questions.map(q => q.key) : []\n if (cleanedContent.questionType != C.INTERNAL_TITLE_CARDS_TYPE) {\n dispatch(updateQuestions(cleanedContent, qids))\n }\n dispatch({ type: C.DISPLAY_MESSAGE, message: 'Submission successfully saved!', });\n const action = push(`/admin/lessons/${lessonUid}`);\n dispatch(action);\n }).catch((error) => {\n dispatch({ type: C.RECEIVE_NEW_LESSON_RESPONSE, });\n dispatch({ type: C.DISPLAY_ERROR, error: `Submission failed! ${error}`, });\n });\n };\n}\n\nconst setFlag = (flag) => {\n return (dispatch) => {\n dispatch({ type: C.SET_LESSON_FLAG, flag, })\n };\n}\n\nexport default {\n startListeningToLessons,\n loadLesson,\n loadLessonWithQuestions,\n loadTranslatedQuestions,\n loadLessons,\n startLessonEdit,\n cancelLessonEdit,\n deleteLesson,\n submitLessonEdit,\n updateQuestions,\n toggleNewLessonModal,\n submitNewLesson,\n setFlag\n};\n","import _classCallCheck from \"@babel/runtime/helpers/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/createClass\";\nimport _defineProperty from \"@babel/runtime/helpers/defineProperty\";\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nimport React from 'react';\nvar defaultOptions = {\n bindI18n: 'languageChanged',\n bindI18nStore: '',\n transEmptyNodeValue: '',\n transSupportBasicHtmlNodes: true,\n transWrapTextNodes: '',\n transKeepBasicHtmlNodesFor: ['br', 'strong', 'i', 'p'],\n useSuspense: true\n};\nvar i18nInstance;\nexport var I18nContext = React.createContext();\nexport function setDefaults() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n defaultOptions = _objectSpread(_objectSpread({}, defaultOptions), options);\n}\nexport function getDefaults() {\n return defaultOptions;\n}\nexport var ReportNamespaces = function () {\n function ReportNamespaces() {\n _classCallCheck(this, ReportNamespaces);\n\n this.usedNamespaces = {};\n }\n\n _createClass(ReportNamespaces, [{\n key: \"addUsedNamespaces\",\n value: function addUsedNamespaces(namespaces) {\n var _this = this;\n\n namespaces.forEach(function (ns) {\n if (!_this.usedNamespaces[ns]) _this.usedNamespaces[ns] = true;\n });\n }\n }, {\n key: \"getUsedNamespaces\",\n value: function getUsedNamespaces() {\n return Object.keys(this.usedNamespaces);\n }\n }]);\n\n return ReportNamespaces;\n}();\nexport function setI18n(instance) {\n i18nInstance = instance;\n}\nexport function getI18n() {\n return i18nInstance;\n}\nexport var initReactI18next = {\n type: '3rdParty',\n init: function init(instance) {\n setDefaults(instance.options.react);\n setI18n(instance);\n }\n};\nexport function composeInitialProps(ForComponent) {\n return function (ctx) {\n return new Promise(function (resolve) {\n var i18nInitialProps = getInitialProps();\n\n if (ForComponent.getInitialProps) {\n ForComponent.getInitialProps(ctx).then(function (componentsInitialProps) {\n resolve(_objectSpread(_objectSpread({}, componentsInitialProps), i18nInitialProps));\n });\n } else {\n resolve(i18nInitialProps);\n }\n });\n };\n}\nexport function getInitialProps() {\n var i18n = getI18n();\n var namespaces = i18n.reportNamespaces ? i18n.reportNamespaces.getUsedNamespaces() : [];\n var ret = {};\n var initialI18nStore = {};\n i18n.languages.forEach(function (l) {\n initialI18nStore[l] = {};\n namespaces.forEach(function (ns) {\n initialI18nStore[l][ns] = i18n.getResourceBundle(l, ns) || {};\n });\n });\n ret.initialI18nStore = initialI18nStore;\n ret.initialLanguage = i18n.language;\n return ret;\n}","export function warn() {\n if (console && console.warn) {\n var _console;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n if (typeof args[0] === 'string') args[0] = \"react-i18next:: \".concat(args[0]);\n\n (_console = console).warn.apply(_console, args);\n }\n}\nvar alreadyWarned = {};\nexport function warnOnce() {\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n if (typeof args[0] === 'string' && alreadyWarned[args[0]]) return;\n if (typeof args[0] === 'string') alreadyWarned[args[0]] = new Date();\n warn.apply(void 0, args);\n}\nexport function loadNamespaces(i18n, ns, cb) {\n i18n.loadNamespaces(ns, function () {\n if (i18n.isInitialized) {\n cb();\n } else {\n var initialized = function initialized() {\n setTimeout(function () {\n i18n.off('initialized', initialized);\n }, 0);\n cb();\n };\n\n i18n.on('initialized', initialized);\n }\n });\n}\nexport function hasLoadedNamespace(ns, i18n) {\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n\n if (!i18n.languages || !i18n.languages.length) {\n warnOnce('i18n.languages were undefined or empty', i18n.languages);\n return true;\n }\n\n var lng = i18n.languages[0];\n var fallbackLng = i18n.options ? i18n.options.fallbackLng : false;\n var lastLng = i18n.languages[i18n.languages.length - 1];\n if (lng.toLowerCase() === 'cimode') return true;\n\n var loadNotPending = function loadNotPending(l, n) {\n var loadState = i18n.services.backendConnector.state[\"\".concat(l, \"|\").concat(n)];\n return loadState === -1 || loadState === 2;\n };\n\n if (options.bindI18n && options.bindI18n.indexOf('languageChanging') > -1 && i18n.services.backendConnector.backend && i18n.isLanguageChangingTo && !loadNotPending(i18n.isLanguageChangingTo, ns)) return false;\n if (i18n.hasResourceBundle(lng, ns)) return true;\n if (!i18n.services.backendConnector.backend) return true;\n if (loadNotPending(lng, ns) && (!fallbackLng || loadNotPending(lastLng, ns))) return true;\n return false;\n}\nexport function getDisplayName(Component) {\n return Component.displayName || Component.name || (typeof Component === 'string' && Component.length > 0 ? Component : 'Unknown');\n}","import _slicedToArray from \"@babel/runtime/helpers/slicedToArray\";\nimport _defineProperty from \"@babel/runtime/helpers/defineProperty\";\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nimport { useState, useEffect, useContext, useRef } from 'react';\nimport { getI18n, getDefaults, ReportNamespaces, I18nContext } from './context';\nimport { warnOnce, loadNamespaces, hasLoadedNamespace } from './utils';\nexport function useTranslation(ns) {\n var props = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var i18nFromProps = props.i18n;\n\n var _ref = useContext(I18nContext) || {},\n i18nFromContext = _ref.i18n,\n defaultNSFromContext = _ref.defaultNS;\n\n var i18n = i18nFromProps || i18nFromContext || getI18n();\n if (i18n && !i18n.reportNamespaces) i18n.reportNamespaces = new ReportNamespaces();\n\n if (!i18n) {\n warnOnce('You will need to pass in an i18next instance by using initReactI18next');\n\n var notReadyT = function notReadyT(k) {\n return Array.isArray(k) ? k[k.length - 1] : k;\n };\n\n var retNotReady = [notReadyT, {}, false];\n retNotReady.t = notReadyT;\n retNotReady.i18n = {};\n retNotReady.ready = false;\n return retNotReady;\n }\n\n if (i18n.options.react && i18n.options.react.wait !== undefined) warnOnce('It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.');\n\n var i18nOptions = _objectSpread(_objectSpread(_objectSpread({}, getDefaults()), i18n.options.react), props);\n\n var useSuspense = i18nOptions.useSuspense;\n var namespaces = ns || defaultNSFromContext || i18n.options && i18n.options.defaultNS;\n namespaces = typeof namespaces === 'string' ? [namespaces] : namespaces || ['translation'];\n if (i18n.reportNamespaces.addUsedNamespaces) i18n.reportNamespaces.addUsedNamespaces(namespaces);\n var ready = (i18n.isInitialized || i18n.initializedStoreOnce) && namespaces.every(function (n) {\n return hasLoadedNamespace(n, i18n, i18nOptions);\n });\n\n function getT() {\n return i18n.getFixedT(null, i18nOptions.nsMode === 'fallback' ? namespaces : namespaces[0]);\n }\n\n var _useState = useState(getT),\n _useState2 = _slicedToArray(_useState, 2),\n t = _useState2[0],\n setT = _useState2[1];\n\n var isMounted = useRef(true);\n useEffect(function () {\n var bindI18n = i18nOptions.bindI18n,\n bindI18nStore = i18nOptions.bindI18nStore;\n isMounted.current = true;\n\n if (!ready && !useSuspense) {\n loadNamespaces(i18n, namespaces, function () {\n if (isMounted.current) setT(getT);\n });\n }\n\n function boundReset() {\n if (isMounted.current) setT(getT);\n }\n\n if (bindI18n && i18n) i18n.on(bindI18n, boundReset);\n if (bindI18nStore && i18n) i18n.store.on(bindI18nStore, boundReset);\n return function () {\n isMounted.current = false;\n if (bindI18n && i18n) bindI18n.split(' ').forEach(function (e) {\n return i18n.off(e, boundReset);\n });\n if (bindI18nStore && i18n) bindI18nStore.split(' ').forEach(function (e) {\n return i18n.store.off(e, boundReset);\n });\n };\n }, [i18n, namespaces.join()]);\n var isInitial = useRef(true);\n useEffect(function () {\n if (isMounted.current && !isInitial.current) {\n setT(getT);\n }\n\n isInitial.current = false;\n }, [i18n]);\n var ret = [t, i18n, ready];\n ret.t = t;\n ret.i18n = i18n;\n ret.ready = ready;\n if (ready) return ret;\n if (!ready && !useSuspense) return ret;\n throw new Promise(function (resolve) {\n loadNamespaces(i18n, namespaces, function () {\n resolve();\n });\n });\n}","import _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nimport _slicedToArray from \"@babel/runtime/helpers/slicedToArray\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"forwardedRef\"];\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nimport React from 'react';\nimport { useTranslation } from './useTranslation';\nimport { getDisplayName } from './utils';\nexport function withTranslation(ns) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return function Extend(WrappedComponent) {\n function I18nextWithTranslation(_ref) {\n var forwardedRef = _ref.forwardedRef,\n rest = _objectWithoutProperties(_ref, _excluded);\n\n var _useTranslation = useTranslation(ns, rest),\n _useTranslation2 = _slicedToArray(_useTranslation, 3),\n t = _useTranslation2[0],\n i18n = _useTranslation2[1],\n ready = _useTranslation2[2];\n\n var passDownProps = _objectSpread(_objectSpread({}, rest), {}, {\n t: t,\n i18n: i18n,\n tReady: ready\n });\n\n if (options.withRef && forwardedRef) {\n passDownProps.ref = forwardedRef;\n } else if (!options.withRef && forwardedRef) {\n passDownProps.forwardedRef = forwardedRef;\n }\n\n return React.createElement(WrappedComponent, passDownProps);\n }\n\n I18nextWithTranslation.displayName = \"withI18nextTranslation(\".concat(getDisplayName(WrappedComponent), \")\");\n I18nextWithTranslation.WrappedComponent = WrappedComponent;\n\n var forwardRef = function forwardRef(props, ref) {\n return React.createElement(I18nextWithTranslation, Object.assign({}, props, {\n forwardedRef: ref\n }));\n };\n\n return options.withRef ? React.forwardRef(forwardRef) : I18nextWithTranslation;\n };\n}","import * as React from 'react';\n\nexport function addKeyDownListener(handleKeyDown: (e: any) => void) {\n React.useEffect(() => {\n document.addEventListener('keydown', handleKeyDown);\n return () => {\n document.removeEventListener('keydown', handleKeyDown);\n }\n });\n}\n","import defineProperty from \"./defineProperty.js\";\nexport default function _objectSpread(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? Object(arguments[i]) : {};\n var ownKeys = Object.keys(source);\n if (typeof Object.getOwnPropertySymbols === 'function') {\n ownKeys.push.apply(ownKeys, Object.getOwnPropertySymbols(source).filter(function (sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n ownKeys.forEach(function (key) {\n defineProperty(target, key, source[key]);\n });\n }\n return target;\n}","import _typeof from '@babel/runtime/helpers/esm/typeof';\nimport _objectSpread from '@babel/runtime/helpers/esm/objectSpread';\nimport _classCallCheck from '@babel/runtime/helpers/esm/classCallCheck';\nimport _createClass from '@babel/runtime/helpers/esm/createClass';\nimport _possibleConstructorReturn from '@babel/runtime/helpers/esm/possibleConstructorReturn';\nimport _getPrototypeOf from '@babel/runtime/helpers/esm/getPrototypeOf';\nimport _assertThisInitialized from '@babel/runtime/helpers/esm/assertThisInitialized';\nimport _inherits from '@babel/runtime/helpers/esm/inherits';\n\nvar consoleLogger = {\n type: 'logger',\n log: function log(args) {\n this.output('log', args);\n },\n warn: function warn(args) {\n this.output('warn', args);\n },\n error: function error(args) {\n this.output('error', args);\n },\n output: function output(type, args) {\n if (console && console[type]) console[type].apply(console, args);\n }\n};\n\nvar Logger = function () {\n function Logger(concreteLogger) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n _classCallCheck(this, Logger);\n\n this.init(concreteLogger, options);\n }\n\n _createClass(Logger, [{\n key: \"init\",\n value: function init(concreteLogger) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n this.prefix = options.prefix || 'i18next:';\n this.logger = concreteLogger || consoleLogger;\n this.options = options;\n this.debug = options.debug;\n }\n }, {\n key: \"setDebug\",\n value: function setDebug(bool) {\n this.debug = bool;\n }\n }, {\n key: \"log\",\n value: function log() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return this.forward(args, 'log', '', true);\n }\n }, {\n key: \"warn\",\n value: function warn() {\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n return this.forward(args, 'warn', '', true);\n }\n }, {\n key: \"error\",\n value: function error() {\n for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n args[_key3] = arguments[_key3];\n }\n\n return this.forward(args, 'error', '');\n }\n }, {\n key: \"deprecate\",\n value: function deprecate() {\n for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {\n args[_key4] = arguments[_key4];\n }\n\n return this.forward(args, 'warn', 'WARNING DEPRECATED: ', true);\n }\n }, {\n key: \"forward\",\n value: function forward(args, lvl, prefix, debugOnly) {\n if (debugOnly && !this.debug) return null;\n if (typeof args[0] === 'string') args[0] = \"\".concat(prefix).concat(this.prefix, \" \").concat(args[0]);\n return this.logger[lvl](args);\n }\n }, {\n key: \"create\",\n value: function create(moduleName) {\n return new Logger(this.logger, _objectSpread({}, {\n prefix: \"\".concat(this.prefix, \":\").concat(moduleName, \":\")\n }, this.options));\n }\n }]);\n\n return Logger;\n}();\n\nvar baseLogger = new Logger();\n\nvar EventEmitter = function () {\n function EventEmitter() {\n _classCallCheck(this, EventEmitter);\n\n this.observers = {};\n }\n\n _createClass(EventEmitter, [{\n key: \"on\",\n value: function on(events, listener) {\n var _this = this;\n\n events.split(' ').forEach(function (event) {\n _this.observers[event] = _this.observers[event] || [];\n\n _this.observers[event].push(listener);\n });\n return this;\n }\n }, {\n key: \"off\",\n value: function off(event, listener) {\n if (!this.observers[event]) return;\n\n if (!listener) {\n delete this.observers[event];\n return;\n }\n\n this.observers[event] = this.observers[event].filter(function (l) {\n return l !== listener;\n });\n }\n }, {\n key: \"emit\",\n value: function emit(event) {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n if (this.observers[event]) {\n var cloned = [].concat(this.observers[event]);\n cloned.forEach(function (observer) {\n observer.apply(void 0, args);\n });\n }\n\n if (this.observers['*']) {\n var _cloned = [].concat(this.observers['*']);\n\n _cloned.forEach(function (observer) {\n observer.apply(observer, [event].concat(args));\n });\n }\n }\n }]);\n\n return EventEmitter;\n}();\n\nfunction defer() {\n var res;\n var rej;\n var promise = new Promise(function (resolve, reject) {\n res = resolve;\n rej = reject;\n });\n promise.resolve = res;\n promise.reject = rej;\n return promise;\n}\nfunction makeString(object) {\n if (object == null) return '';\n return '' + object;\n}\nfunction copy(a, s, t) {\n a.forEach(function (m) {\n if (s[m]) t[m] = s[m];\n });\n}\n\nfunction getLastOfPath(object, path, Empty) {\n function cleanKey(key) {\n return key && key.indexOf('###') > -1 ? key.replace(/###/g, '.') : key;\n }\n\n function canNotTraverseDeeper() {\n return !object || typeof object === 'string';\n }\n\n var stack = typeof path !== 'string' ? [].concat(path) : path.split('.');\n\n while (stack.length > 1) {\n if (canNotTraverseDeeper()) return {};\n var key = cleanKey(stack.shift());\n if (!object[key] && Empty) object[key] = new Empty();\n\n if (Object.prototype.hasOwnProperty.call(object, key)) {\n object = object[key];\n } else {\n object = {};\n }\n }\n\n if (canNotTraverseDeeper()) return {};\n return {\n obj: object,\n k: cleanKey(stack.shift())\n };\n}\n\nfunction setPath(object, path, newValue) {\n var _getLastOfPath = getLastOfPath(object, path, Object),\n obj = _getLastOfPath.obj,\n k = _getLastOfPath.k;\n\n obj[k] = newValue;\n}\nfunction pushPath(object, path, newValue, concat) {\n var _getLastOfPath2 = getLastOfPath(object, path, Object),\n obj = _getLastOfPath2.obj,\n k = _getLastOfPath2.k;\n\n obj[k] = obj[k] || [];\n if (concat) obj[k] = obj[k].concat(newValue);\n if (!concat) obj[k].push(newValue);\n}\nfunction getPath(object, path) {\n var _getLastOfPath3 = getLastOfPath(object, path),\n obj = _getLastOfPath3.obj,\n k = _getLastOfPath3.k;\n\n if (!obj) return undefined;\n return obj[k];\n}\nfunction getPathWithDefaults(data, defaultData, key) {\n var value = getPath(data, key);\n\n if (value !== undefined) {\n return value;\n }\n\n return getPath(defaultData, key);\n}\nfunction deepExtend(target, source, overwrite) {\n for (var prop in source) {\n if (prop !== '__proto__' && prop !== 'constructor') {\n if (prop in target) {\n if (typeof target[prop] === 'string' || target[prop] instanceof String || typeof source[prop] === 'string' || source[prop] instanceof String) {\n if (overwrite) target[prop] = source[prop];\n } else {\n deepExtend(target[prop], source[prop], overwrite);\n }\n } else {\n target[prop] = source[prop];\n }\n }\n }\n\n return target;\n}\nfunction regexEscape(str) {\n return str.replace(/[\\-\\[\\]\\/\\{\\}\\(\\)\\*\\+\\?\\.\\\\\\^\\$\\|]/g, '\\\\$&');\n}\nvar _entityMap = {\n '&': '&',\n '<': '<',\n '>': '>',\n '\"': '"',\n \"'\": ''',\n '/': '/'\n};\nfunction escape(data) {\n if (typeof data === 'string') {\n return data.replace(/[&<>\"'\\/]/g, function (s) {\n return _entityMap[s];\n });\n }\n\n return data;\n}\nvar isIE10 = typeof window !== 'undefined' && window.navigator && window.navigator.userAgent && window.navigator.userAgent.indexOf('MSIE') > -1;\n\nfunction deepFind(obj, path) {\n var keySeparator = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '.';\n if (!obj) return undefined;\n if (obj[path]) return obj[path];\n var paths = path.split(keySeparator);\n var current = obj;\n\n for (var i = 0; i < paths.length; ++i) {\n if (typeof current[paths[i]] === 'string' && i + 1 < paths.length) {\n return undefined;\n }\n\n if (current[paths[i]] === undefined) {\n var j = 2;\n var p = paths.slice(i, i + j).join(keySeparator);\n var mix = current[p];\n\n while (mix === undefined && paths.length > i + j) {\n j++;\n p = paths.slice(i, i + j).join(keySeparator);\n mix = current[p];\n }\n\n if (mix === undefined) return undefined;\n if (typeof mix === 'string') return mix;\n if (p && typeof mix[p] === 'string') return mix[p];\n var joinedPath = paths.slice(i + j).join(keySeparator);\n if (joinedPath) return deepFind(mix, joinedPath, keySeparator);\n return undefined;\n }\n\n current = current[paths[i]];\n }\n\n return current;\n}\n\nvar ResourceStore = function (_EventEmitter) {\n _inherits(ResourceStore, _EventEmitter);\n\n function ResourceStore(data) {\n var _this;\n\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {\n ns: ['translation'],\n defaultNS: 'translation'\n };\n\n _classCallCheck(this, ResourceStore);\n\n _this = _possibleConstructorReturn(this, _getPrototypeOf(ResourceStore).call(this));\n\n if (isIE10) {\n EventEmitter.call(_assertThisInitialized(_this));\n }\n\n _this.data = data || {};\n _this.options = options;\n\n if (_this.options.keySeparator === undefined) {\n _this.options.keySeparator = '.';\n }\n\n if (_this.options.ignoreJSONStructure === undefined) {\n _this.options.ignoreJSONStructure = true;\n }\n\n return _this;\n }\n\n _createClass(ResourceStore, [{\n key: \"addNamespaces\",\n value: function addNamespaces(ns) {\n if (this.options.ns.indexOf(ns) < 0) {\n this.options.ns.push(ns);\n }\n }\n }, {\n key: \"removeNamespaces\",\n value: function removeNamespaces(ns) {\n var index = this.options.ns.indexOf(ns);\n\n if (index > -1) {\n this.options.ns.splice(index, 1);\n }\n }\n }, {\n key: \"getResource\",\n value: function getResource(lng, ns, key) {\n var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n var keySeparator = options.keySeparator !== undefined ? options.keySeparator : this.options.keySeparator;\n var ignoreJSONStructure = options.ignoreJSONStructure !== undefined ? options.ignoreJSONStructure : this.options.ignoreJSONStructure;\n var path = [lng, ns];\n if (key && typeof key !== 'string') path = path.concat(key);\n if (key && typeof key === 'string') path = path.concat(keySeparator ? key.split(keySeparator) : key);\n\n if (lng.indexOf('.') > -1) {\n path = lng.split('.');\n }\n\n var result = getPath(this.data, path);\n if (result || !ignoreJSONStructure || typeof key !== 'string') return result;\n return deepFind(this.data && this.data[lng] && this.data[lng][ns], key, keySeparator);\n }\n }, {\n key: \"addResource\",\n value: function addResource(lng, ns, key, value) {\n var options = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {\n silent: false\n };\n var keySeparator = this.options.keySeparator;\n if (keySeparator === undefined) keySeparator = '.';\n var path = [lng, ns];\n if (key) path = path.concat(keySeparator ? key.split(keySeparator) : key);\n\n if (lng.indexOf('.') > -1) {\n path = lng.split('.');\n value = ns;\n ns = path[1];\n }\n\n this.addNamespaces(ns);\n setPath(this.data, path, value);\n if (!options.silent) this.emit('added', lng, ns, key, value);\n }\n }, {\n key: \"addResources\",\n value: function addResources(lng, ns, resources) {\n var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {\n silent: false\n };\n\n for (var m in resources) {\n if (typeof resources[m] === 'string' || Object.prototype.toString.apply(resources[m]) === '[object Array]') this.addResource(lng, ns, m, resources[m], {\n silent: true\n });\n }\n\n if (!options.silent) this.emit('added', lng, ns, resources);\n }\n }, {\n key: \"addResourceBundle\",\n value: function addResourceBundle(lng, ns, resources, deep, overwrite) {\n var options = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : {\n silent: false\n };\n var path = [lng, ns];\n\n if (lng.indexOf('.') > -1) {\n path = lng.split('.');\n deep = resources;\n resources = ns;\n ns = path[1];\n }\n\n this.addNamespaces(ns);\n var pack = getPath(this.data, path) || {};\n\n if (deep) {\n deepExtend(pack, resources, overwrite);\n } else {\n pack = _objectSpread({}, pack, resources);\n }\n\n setPath(this.data, path, pack);\n if (!options.silent) this.emit('added', lng, ns, resources);\n }\n }, {\n key: \"removeResourceBundle\",\n value: function removeResourceBundle(lng, ns) {\n if (this.hasResourceBundle(lng, ns)) {\n delete this.data[lng][ns];\n }\n\n this.removeNamespaces(ns);\n this.emit('removed', lng, ns);\n }\n }, {\n key: \"hasResourceBundle\",\n value: function hasResourceBundle(lng, ns) {\n return this.getResource(lng, ns) !== undefined;\n }\n }, {\n key: \"getResourceBundle\",\n value: function getResourceBundle(lng, ns) {\n if (!ns) ns = this.options.defaultNS;\n if (this.options.compatibilityAPI === 'v1') return _objectSpread({}, {}, this.getResource(lng, ns));\n return this.getResource(lng, ns);\n }\n }, {\n key: \"getDataByLanguage\",\n value: function getDataByLanguage(lng) {\n return this.data[lng];\n }\n }, {\n key: \"toJSON\",\n value: function toJSON() {\n return this.data;\n }\n }]);\n\n return ResourceStore;\n}(EventEmitter);\n\nvar postProcessor = {\n processors: {},\n addPostProcessor: function addPostProcessor(module) {\n this.processors[module.name] = module;\n },\n handle: function handle(processors, value, key, options, translator) {\n var _this = this;\n\n processors.forEach(function (processor) {\n if (_this.processors[processor]) value = _this.processors[processor].process(value, key, options, translator);\n });\n return value;\n }\n};\n\nvar checkedLoadedFor = {};\n\nvar Translator = function (_EventEmitter) {\n _inherits(Translator, _EventEmitter);\n\n function Translator(services) {\n var _this;\n\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n _classCallCheck(this, Translator);\n\n _this = _possibleConstructorReturn(this, _getPrototypeOf(Translator).call(this));\n\n if (isIE10) {\n EventEmitter.call(_assertThisInitialized(_this));\n }\n\n copy(['resourceStore', 'languageUtils', 'pluralResolver', 'interpolator', 'backendConnector', 'i18nFormat', 'utils'], services, _assertThisInitialized(_this));\n _this.options = options;\n\n if (_this.options.keySeparator === undefined) {\n _this.options.keySeparator = '.';\n }\n\n _this.logger = baseLogger.create('translator');\n return _this;\n }\n\n _createClass(Translator, [{\n key: \"changeLanguage\",\n value: function changeLanguage(lng) {\n if (lng) this.language = lng;\n }\n }, {\n key: \"exists\",\n value: function exists(key) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {\n interpolation: {}\n };\n\n if (key === undefined || key === null) {\n return false;\n }\n\n var resolved = this.resolve(key, options);\n return resolved && resolved.res !== undefined;\n }\n }, {\n key: \"extractFromKey\",\n value: function extractFromKey(key, options) {\n var nsSeparator = options.nsSeparator !== undefined ? options.nsSeparator : this.options.nsSeparator;\n if (nsSeparator === undefined) nsSeparator = ':';\n var keySeparator = options.keySeparator !== undefined ? options.keySeparator : this.options.keySeparator;\n var namespaces = options.ns || this.options.defaultNS;\n\n if (nsSeparator && key.indexOf(nsSeparator) > -1) {\n var m = key.match(this.interpolator.nestingRegexp);\n\n if (m && m.length > 0) {\n return {\n key: key,\n namespaces: namespaces\n };\n }\n\n var parts = key.split(nsSeparator);\n if (nsSeparator !== keySeparator || nsSeparator === keySeparator && this.options.ns.indexOf(parts[0]) > -1) namespaces = parts.shift();\n key = parts.join(keySeparator);\n }\n\n if (typeof namespaces === 'string') namespaces = [namespaces];\n return {\n key: key,\n namespaces: namespaces\n };\n }\n }, {\n key: \"translate\",\n value: function translate(keys, options, lastKey) {\n var _this2 = this;\n\n if (_typeof(options) !== 'object' && this.options.overloadTranslationOptionHandler) {\n options = this.options.overloadTranslationOptionHandler(arguments);\n }\n\n if (!options) options = {};\n if (keys === undefined || keys === null) return '';\n if (!Array.isArray(keys)) keys = [String(keys)];\n var keySeparator = options.keySeparator !== undefined ? options.keySeparator : this.options.keySeparator;\n\n var _this$extractFromKey = this.extractFromKey(keys[keys.length - 1], options),\n key = _this$extractFromKey.key,\n namespaces = _this$extractFromKey.namespaces;\n\n var namespace = namespaces[namespaces.length - 1];\n var lng = options.lng || this.language;\n var appendNamespaceToCIMode = options.appendNamespaceToCIMode || this.options.appendNamespaceToCIMode;\n\n if (lng && lng.toLowerCase() === 'cimode') {\n if (appendNamespaceToCIMode) {\n var nsSeparator = options.nsSeparator || this.options.nsSeparator;\n return namespace + nsSeparator + key;\n }\n\n return key;\n }\n\n var resolved = this.resolve(keys, options);\n var res = resolved && resolved.res;\n var resUsedKey = resolved && resolved.usedKey || key;\n var resExactUsedKey = resolved && resolved.exactUsedKey || key;\n var resType = Object.prototype.toString.apply(res);\n var noObject = ['[object Number]', '[object Function]', '[object RegExp]'];\n var joinArrays = options.joinArrays !== undefined ? options.joinArrays : this.options.joinArrays;\n var handleAsObjectInI18nFormat = !this.i18nFormat || this.i18nFormat.handleAsObject;\n var handleAsObject = typeof res !== 'string' && typeof res !== 'boolean' && typeof res !== 'number';\n\n if (handleAsObjectInI18nFormat && res && handleAsObject && noObject.indexOf(resType) < 0 && !(typeof joinArrays === 'string' && resType === '[object Array]')) {\n if (!options.returnObjects && !this.options.returnObjects) {\n if (!this.options.returnedObjectHandler) {\n this.logger.warn('accessing an object - but returnObjects options is not enabled!');\n }\n\n return this.options.returnedObjectHandler ? this.options.returnedObjectHandler(resUsedKey, res, _objectSpread({}, options, {\n ns: namespaces\n })) : \"key '\".concat(key, \" (\").concat(this.language, \")' returned an object instead of string.\");\n }\n\n if (keySeparator) {\n var resTypeIsArray = resType === '[object Array]';\n var copy = resTypeIsArray ? [] : {};\n var newKeyToUse = resTypeIsArray ? resExactUsedKey : resUsedKey;\n\n for (var m in res) {\n if (Object.prototype.hasOwnProperty.call(res, m)) {\n var deepKey = \"\".concat(newKeyToUse).concat(keySeparator).concat(m);\n copy[m] = this.translate(deepKey, _objectSpread({}, options, {\n joinArrays: false,\n ns: namespaces\n }));\n if (copy[m] === deepKey) copy[m] = res[m];\n }\n }\n\n res = copy;\n }\n } else if (handleAsObjectInI18nFormat && typeof joinArrays === 'string' && resType === '[object Array]') {\n res = res.join(joinArrays);\n if (res) res = this.extendTranslation(res, keys, options, lastKey);\n } else {\n var usedDefault = false;\n var usedKey = false;\n var needsPluralHandling = options.count !== undefined && typeof options.count !== 'string';\n var hasDefaultValue = Translator.hasDefaultValue(options);\n var defaultValueSuffix = needsPluralHandling ? this.pluralResolver.getSuffix(lng, options.count) : '';\n var defaultValue = options[\"defaultValue\".concat(defaultValueSuffix)] || options.defaultValue;\n\n if (!this.isValidLookup(res) && hasDefaultValue) {\n usedDefault = true;\n res = defaultValue;\n }\n\n if (!this.isValidLookup(res)) {\n usedKey = true;\n res = key;\n }\n\n var updateMissing = hasDefaultValue && defaultValue !== res && this.options.updateMissing;\n\n if (usedKey || usedDefault || updateMissing) {\n this.logger.log(updateMissing ? 'updateKey' : 'missingKey', lng, namespace, key, updateMissing ? defaultValue : res);\n\n if (keySeparator) {\n var fk = this.resolve(key, _objectSpread({}, options, {\n keySeparator: false\n }));\n if (fk && fk.res) this.logger.warn('Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.');\n }\n\n var lngs = [];\n var fallbackLngs = this.languageUtils.getFallbackCodes(this.options.fallbackLng, options.lng || this.language);\n\n if (this.options.saveMissingTo === 'fallback' && fallbackLngs && fallbackLngs[0]) {\n for (var i = 0; i < fallbackLngs.length; i++) {\n lngs.push(fallbackLngs[i]);\n }\n } else if (this.options.saveMissingTo === 'all') {\n lngs = this.languageUtils.toResolveHierarchy(options.lng || this.language);\n } else {\n lngs.push(options.lng || this.language);\n }\n\n var send = function send(l, k, fallbackValue) {\n if (_this2.options.missingKeyHandler) {\n _this2.options.missingKeyHandler(l, namespace, k, updateMissing ? fallbackValue : res, updateMissing, options);\n } else if (_this2.backendConnector && _this2.backendConnector.saveMissing) {\n _this2.backendConnector.saveMissing(l, namespace, k, updateMissing ? fallbackValue : res, updateMissing, options);\n }\n\n _this2.emit('missingKey', l, namespace, k, res);\n };\n\n if (this.options.saveMissing) {\n if (this.options.saveMissingPlurals && needsPluralHandling) {\n lngs.forEach(function (language) {\n _this2.pluralResolver.getSuffixes(language).forEach(function (suffix) {\n send([language], key + suffix, options[\"defaultValue\".concat(suffix)] || defaultValue);\n });\n });\n } else {\n send(lngs, key, defaultValue);\n }\n }\n }\n\n res = this.extendTranslation(res, keys, options, resolved, lastKey);\n if (usedKey && res === key && this.options.appendNamespaceToMissingKey) res = \"\".concat(namespace, \":\").concat(key);\n if ((usedKey || usedDefault) && this.options.parseMissingKeyHandler) res = this.options.parseMissingKeyHandler(res);\n }\n\n return res;\n }\n }, {\n key: \"extendTranslation\",\n value: function extendTranslation(res, key, options, resolved, lastKey) {\n var _this3 = this;\n\n if (this.i18nFormat && this.i18nFormat.parse) {\n res = this.i18nFormat.parse(res, options, resolved.usedLng, resolved.usedNS, resolved.usedKey, {\n resolved: resolved\n });\n } else if (!options.skipInterpolation) {\n if (options.interpolation) this.interpolator.init(_objectSpread({}, options, {\n interpolation: _objectSpread({}, this.options.interpolation, options.interpolation)\n }));\n var skipOnVariables = options.interpolation && options.interpolation.skipOnVariables || this.options.interpolation.skipOnVariables;\n var nestBef;\n\n if (skipOnVariables) {\n var nb = res.match(this.interpolator.nestingRegexp);\n nestBef = nb && nb.length;\n }\n\n var data = options.replace && typeof options.replace !== 'string' ? options.replace : options;\n if (this.options.interpolation.defaultVariables) data = _objectSpread({}, this.options.interpolation.defaultVariables, data);\n res = this.interpolator.interpolate(res, data, options.lng || this.language, options);\n\n if (skipOnVariables) {\n var na = res.match(this.interpolator.nestingRegexp);\n var nestAft = na && na.length;\n if (nestBef < nestAft) options.nest = false;\n }\n\n if (options.nest !== false) res = this.interpolator.nest(res, function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n if (lastKey && lastKey[0] === args[0] && !options.context) {\n _this3.logger.warn(\"It seems you are nesting recursively key: \".concat(args[0], \" in key: \").concat(key[0]));\n\n return null;\n }\n\n return _this3.translate.apply(_this3, args.concat([key]));\n }, options);\n if (options.interpolation) this.interpolator.reset();\n }\n\n var postProcess = options.postProcess || this.options.postProcess;\n var postProcessorNames = typeof postProcess === 'string' ? [postProcess] : postProcess;\n\n if (res !== undefined && res !== null && postProcessorNames && postProcessorNames.length && options.applyPostProcessor !== false) {\n res = postProcessor.handle(postProcessorNames, res, key, this.options && this.options.postProcessPassResolved ? _objectSpread({\n i18nResolved: resolved\n }, options) : options, this);\n }\n\n return res;\n }\n }, {\n key: \"resolve\",\n value: function resolve(keys) {\n var _this4 = this;\n\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var found;\n var usedKey;\n var exactUsedKey;\n var usedLng;\n var usedNS;\n if (typeof keys === 'string') keys = [keys];\n keys.forEach(function (k) {\n if (_this4.isValidLookup(found)) return;\n\n var extracted = _this4.extractFromKey(k, options);\n\n var key = extracted.key;\n usedKey = key;\n var namespaces = extracted.namespaces;\n if (_this4.options.fallbackNS) namespaces = namespaces.concat(_this4.options.fallbackNS);\n var needsPluralHandling = options.count !== undefined && typeof options.count !== 'string';\n var needsContextHandling = options.context !== undefined && (typeof options.context === 'string' || typeof options.context === 'number') && options.context !== '';\n var codes = options.lngs ? options.lngs : _this4.languageUtils.toResolveHierarchy(options.lng || _this4.language, options.fallbackLng);\n namespaces.forEach(function (ns) {\n if (_this4.isValidLookup(found)) return;\n usedNS = ns;\n\n if (!checkedLoadedFor[\"\".concat(codes[0], \"-\").concat(ns)] && _this4.utils && _this4.utils.hasLoadedNamespace && !_this4.utils.hasLoadedNamespace(usedNS)) {\n checkedLoadedFor[\"\".concat(codes[0], \"-\").concat(ns)] = true;\n\n _this4.logger.warn(\"key \\\"\".concat(usedKey, \"\\\" for languages \\\"\").concat(codes.join(', '), \"\\\" won't get resolved as namespace \\\"\").concat(usedNS, \"\\\" was not yet loaded\"), 'This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!');\n }\n\n codes.forEach(function (code) {\n if (_this4.isValidLookup(found)) return;\n usedLng = code;\n var finalKey = key;\n var finalKeys = [finalKey];\n\n if (_this4.i18nFormat && _this4.i18nFormat.addLookupKeys) {\n _this4.i18nFormat.addLookupKeys(finalKeys, key, code, ns, options);\n } else {\n var pluralSuffix;\n if (needsPluralHandling) pluralSuffix = _this4.pluralResolver.getSuffix(code, options.count);\n if (needsPluralHandling && needsContextHandling) finalKeys.push(finalKey + pluralSuffix);\n if (needsContextHandling) finalKeys.push(finalKey += \"\".concat(_this4.options.contextSeparator).concat(options.context));\n if (needsPluralHandling) finalKeys.push(finalKey += pluralSuffix);\n }\n\n var possibleKey;\n\n while (possibleKey = finalKeys.pop()) {\n if (!_this4.isValidLookup(found)) {\n exactUsedKey = possibleKey;\n found = _this4.getResource(code, ns, possibleKey, options);\n }\n }\n });\n });\n });\n return {\n res: found,\n usedKey: usedKey,\n exactUsedKey: exactUsedKey,\n usedLng: usedLng,\n usedNS: usedNS\n };\n }\n }, {\n key: \"isValidLookup\",\n value: function isValidLookup(res) {\n return res !== undefined && !(!this.options.returnNull && res === null) && !(!this.options.returnEmptyString && res === '');\n }\n }, {\n key: \"getResource\",\n value: function getResource(code, ns, key) {\n var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n if (this.i18nFormat && this.i18nFormat.getResource) return this.i18nFormat.getResource(code, ns, key, options);\n return this.resourceStore.getResource(code, ns, key, options);\n }\n }], [{\n key: \"hasDefaultValue\",\n value: function hasDefaultValue(options) {\n var prefix = 'defaultValue';\n\n for (var option in options) {\n if (Object.prototype.hasOwnProperty.call(options, option) && prefix === option.substring(0, prefix.length) && undefined !== options[option]) {\n return true;\n }\n }\n\n return false;\n }\n }]);\n\n return Translator;\n}(EventEmitter);\n\nfunction capitalize(string) {\n return string.charAt(0).toUpperCase() + string.slice(1);\n}\n\nvar LanguageUtil = function () {\n function LanguageUtil(options) {\n _classCallCheck(this, LanguageUtil);\n\n this.options = options;\n this.whitelist = this.options.supportedLngs || false;\n this.supportedLngs = this.options.supportedLngs || false;\n this.logger = baseLogger.create('languageUtils');\n }\n\n _createClass(LanguageUtil, [{\n key: \"getScriptPartFromCode\",\n value: function getScriptPartFromCode(code) {\n if (!code || code.indexOf('-') < 0) return null;\n var p = code.split('-');\n if (p.length === 2) return null;\n p.pop();\n if (p[p.length - 1].toLowerCase() === 'x') return null;\n return this.formatLanguageCode(p.join('-'));\n }\n }, {\n key: \"getLanguagePartFromCode\",\n value: function getLanguagePartFromCode(code) {\n if (!code || code.indexOf('-') < 0) return code;\n var p = code.split('-');\n return this.formatLanguageCode(p[0]);\n }\n }, {\n key: \"formatLanguageCode\",\n value: function formatLanguageCode(code) {\n if (typeof code === 'string' && code.indexOf('-') > -1) {\n var specialCases = ['hans', 'hant', 'latn', 'cyrl', 'cans', 'mong', 'arab'];\n var p = code.split('-');\n\n if (this.options.lowerCaseLng) {\n p = p.map(function (part) {\n return part.toLowerCase();\n });\n } else if (p.length === 2) {\n p[0] = p[0].toLowerCase();\n p[1] = p[1].toUpperCase();\n if (specialCases.indexOf(p[1].toLowerCase()) > -1) p[1] = capitalize(p[1].toLowerCase());\n } else if (p.length === 3) {\n p[0] = p[0].toLowerCase();\n if (p[1].length === 2) p[1] = p[1].toUpperCase();\n if (p[0] !== 'sgn' && p[2].length === 2) p[2] = p[2].toUpperCase();\n if (specialCases.indexOf(p[1].toLowerCase()) > -1) p[1] = capitalize(p[1].toLowerCase());\n if (specialCases.indexOf(p[2].toLowerCase()) > -1) p[2] = capitalize(p[2].toLowerCase());\n }\n\n return p.join('-');\n }\n\n return this.options.cleanCode || this.options.lowerCaseLng ? code.toLowerCase() : code;\n }\n }, {\n key: \"isWhitelisted\",\n value: function isWhitelisted(code) {\n this.logger.deprecate('languageUtils.isWhitelisted', 'function \"isWhitelisted\" will be renamed to \"isSupportedCode\" in the next major - please make sure to rename it\\'s usage asap.');\n return this.isSupportedCode(code);\n }\n }, {\n key: \"isSupportedCode\",\n value: function isSupportedCode(code) {\n if (this.options.load === 'languageOnly' || this.options.nonExplicitSupportedLngs) {\n code = this.getLanguagePartFromCode(code);\n }\n\n return !this.supportedLngs || !this.supportedLngs.length || this.supportedLngs.indexOf(code) > -1;\n }\n }, {\n key: \"getBestMatchFromCodes\",\n value: function getBestMatchFromCodes(codes) {\n var _this = this;\n\n if (!codes) return null;\n var found;\n codes.forEach(function (code) {\n if (found) return;\n\n var cleanedLng = _this.formatLanguageCode(code);\n\n if (!_this.options.supportedLngs || _this.isSupportedCode(cleanedLng)) found = cleanedLng;\n });\n\n if (!found && this.options.supportedLngs) {\n codes.forEach(function (code) {\n if (found) return;\n\n var lngOnly = _this.getLanguagePartFromCode(code);\n\n if (_this.isSupportedCode(lngOnly)) return found = lngOnly;\n found = _this.options.supportedLngs.find(function (supportedLng) {\n if (supportedLng.indexOf(lngOnly) === 0) return supportedLng;\n });\n });\n }\n\n if (!found) found = this.getFallbackCodes(this.options.fallbackLng)[0];\n return found;\n }\n }, {\n key: \"getFallbackCodes\",\n value: function getFallbackCodes(fallbacks, code) {\n if (!fallbacks) return [];\n if (typeof fallbacks === 'function') fallbacks = fallbacks(code);\n if (typeof fallbacks === 'string') fallbacks = [fallbacks];\n if (Object.prototype.toString.apply(fallbacks) === '[object Array]') return fallbacks;\n if (!code) return fallbacks[\"default\"] || [];\n var found = fallbacks[code];\n if (!found) found = fallbacks[this.getScriptPartFromCode(code)];\n if (!found) found = fallbacks[this.formatLanguageCode(code)];\n if (!found) found = fallbacks[this.getLanguagePartFromCode(code)];\n if (!found) found = fallbacks[\"default\"];\n return found || [];\n }\n }, {\n key: \"toResolveHierarchy\",\n value: function toResolveHierarchy(code, fallbackCode) {\n var _this2 = this;\n\n var fallbackCodes = this.getFallbackCodes(fallbackCode || this.options.fallbackLng || [], code);\n var codes = [];\n\n var addCode = function addCode(c) {\n if (!c) return;\n\n if (_this2.isSupportedCode(c)) {\n codes.push(c);\n } else {\n _this2.logger.warn(\"rejecting language code not found in supportedLngs: \".concat(c));\n }\n };\n\n if (typeof code === 'string' && code.indexOf('-') > -1) {\n if (this.options.load !== 'languageOnly') addCode(this.formatLanguageCode(code));\n if (this.options.load !== 'languageOnly' && this.options.load !== 'currentOnly') addCode(this.getScriptPartFromCode(code));\n if (this.options.load !== 'currentOnly') addCode(this.getLanguagePartFromCode(code));\n } else if (typeof code === 'string') {\n addCode(this.formatLanguageCode(code));\n }\n\n fallbackCodes.forEach(function (fc) {\n if (codes.indexOf(fc) < 0) addCode(_this2.formatLanguageCode(fc));\n });\n return codes;\n }\n }]);\n\n return LanguageUtil;\n}();\n\nvar sets = [{\n lngs: ['ach', 'ak', 'am', 'arn', 'br', 'fil', 'gun', 'ln', 'mfe', 'mg', 'mi', 'oc', 'pt', 'pt-BR', 'tg', 'tl', 'ti', 'tr', 'uz', 'wa'],\n nr: [1, 2],\n fc: 1\n}, {\n lngs: ['af', 'an', 'ast', 'az', 'bg', 'bn', 'ca', 'da', 'de', 'dev', 'el', 'en', 'eo', 'es', 'et', 'eu', 'fi', 'fo', 'fur', 'fy', 'gl', 'gu', 'ha', 'hi', 'hu', 'hy', 'ia', 'it', 'kk', 'kn', 'ku', 'lb', 'mai', 'ml', 'mn', 'mr', 'nah', 'nap', 'nb', 'ne', 'nl', 'nn', 'no', 'nso', 'pa', 'pap', 'pms', 'ps', 'pt-PT', 'rm', 'sco', 'se', 'si', 'so', 'son', 'sq', 'sv', 'sw', 'ta', 'te', 'tk', 'ur', 'yo'],\n nr: [1, 2],\n fc: 2\n}, {\n lngs: ['ay', 'bo', 'cgg', 'fa', 'ht', 'id', 'ja', 'jbo', 'ka', 'km', 'ko', 'ky', 'lo', 'ms', 'sah', 'su', 'th', 'tt', 'ug', 'vi', 'wo', 'zh'],\n nr: [1],\n fc: 3\n}, {\n lngs: ['be', 'bs', 'cnr', 'dz', 'hr', 'ru', 'sr', 'uk'],\n nr: [1, 2, 5],\n fc: 4\n}, {\n lngs: ['ar'],\n nr: [0, 1, 2, 3, 11, 100],\n fc: 5\n}, {\n lngs: ['cs', 'sk'],\n nr: [1, 2, 5],\n fc: 6\n}, {\n lngs: ['csb', 'pl'],\n nr: [1, 2, 5],\n fc: 7\n}, {\n lngs: ['cy'],\n nr: [1, 2, 3, 8],\n fc: 8\n}, {\n lngs: ['fr'],\n nr: [1, 2],\n fc: 9\n}, {\n lngs: ['ga'],\n nr: [1, 2, 3, 7, 11],\n fc: 10\n}, {\n lngs: ['gd'],\n nr: [1, 2, 3, 20],\n fc: 11\n}, {\n lngs: ['is'],\n nr: [1, 2],\n fc: 12\n}, {\n lngs: ['jv'],\n nr: [0, 1],\n fc: 13\n}, {\n lngs: ['kw'],\n nr: [1, 2, 3, 4],\n fc: 14\n}, {\n lngs: ['lt'],\n nr: [1, 2, 10],\n fc: 15\n}, {\n lngs: ['lv'],\n nr: [1, 2, 0],\n fc: 16\n}, {\n lngs: ['mk'],\n nr: [1, 2],\n fc: 17\n}, {\n lngs: ['mnk'],\n nr: [0, 1, 2],\n fc: 18\n}, {\n lngs: ['mt'],\n nr: [1, 2, 11, 20],\n fc: 19\n}, {\n lngs: ['or'],\n nr: [2, 1],\n fc: 2\n}, {\n lngs: ['ro'],\n nr: [1, 2, 20],\n fc: 20\n}, {\n lngs: ['sl'],\n nr: [5, 1, 2, 3],\n fc: 21\n}, {\n lngs: ['he', 'iw'],\n nr: [1, 2, 20, 21],\n fc: 22\n}];\nvar _rulesPluralsTypes = {\n 1: function _(n) {\n return Number(n > 1);\n },\n 2: function _(n) {\n return Number(n != 1);\n },\n 3: function _(n) {\n return 0;\n },\n 4: function _(n) {\n return Number(n % 10 == 1 && n % 100 != 11 ? 0 : n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 10 || n % 100 >= 20) ? 1 : 2);\n },\n 5: function _(n) {\n return Number(n == 0 ? 0 : n == 1 ? 1 : n == 2 ? 2 : n % 100 >= 3 && n % 100 <= 10 ? 3 : n % 100 >= 11 ? 4 : 5);\n },\n 6: function _(n) {\n return Number(n == 1 ? 0 : n >= 2 && n <= 4 ? 1 : 2);\n },\n 7: function _(n) {\n return Number(n == 1 ? 0 : n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 10 || n % 100 >= 20) ? 1 : 2);\n },\n 8: function _(n) {\n return Number(n == 1 ? 0 : n == 2 ? 1 : n != 8 && n != 11 ? 2 : 3);\n },\n 9: function _(n) {\n return Number(n >= 2);\n },\n 10: function _(n) {\n return Number(n == 1 ? 0 : n == 2 ? 1 : n < 7 ? 2 : n < 11 ? 3 : 4);\n },\n 11: function _(n) {\n return Number(n == 1 || n == 11 ? 0 : n == 2 || n == 12 ? 1 : n > 2 && n < 20 ? 2 : 3);\n },\n 12: function _(n) {\n return Number(n % 10 != 1 || n % 100 == 11);\n },\n 13: function _(n) {\n return Number(n !== 0);\n },\n 14: function _(n) {\n return Number(n == 1 ? 0 : n == 2 ? 1 : n == 3 ? 2 : 3);\n },\n 15: function _(n) {\n return Number(n % 10 == 1 && n % 100 != 11 ? 0 : n % 10 >= 2 && (n % 100 < 10 || n % 100 >= 20) ? 1 : 2);\n },\n 16: function _(n) {\n return Number(n % 10 == 1 && n % 100 != 11 ? 0 : n !== 0 ? 1 : 2);\n },\n 17: function _(n) {\n return Number(n == 1 || n % 10 == 1 && n % 100 != 11 ? 0 : 1);\n },\n 18: function _(n) {\n return Number(n == 0 ? 0 : n == 1 ? 1 : 2);\n },\n 19: function _(n) {\n return Number(n == 1 ? 0 : n == 0 || n % 100 > 1 && n % 100 < 11 ? 1 : n % 100 > 10 && n % 100 < 20 ? 2 : 3);\n },\n 20: function _(n) {\n return Number(n == 1 ? 0 : n == 0 || n % 100 > 0 && n % 100 < 20 ? 1 : 2);\n },\n 21: function _(n) {\n return Number(n % 100 == 1 ? 1 : n % 100 == 2 ? 2 : n % 100 == 3 || n % 100 == 4 ? 3 : 0);\n },\n 22: function _(n) {\n return Number(n == 1 ? 0 : n == 2 ? 1 : (n < 0 || n > 10) && n % 10 == 0 ? 2 : 3);\n }\n};\n\nfunction createRules() {\n var rules = {};\n sets.forEach(function (set) {\n set.lngs.forEach(function (l) {\n rules[l] = {\n numbers: set.nr,\n plurals: _rulesPluralsTypes[set.fc]\n };\n });\n });\n return rules;\n}\n\nvar PluralResolver = function () {\n function PluralResolver(languageUtils) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n _classCallCheck(this, PluralResolver);\n\n this.languageUtils = languageUtils;\n this.options = options;\n this.logger = baseLogger.create('pluralResolver');\n this.rules = createRules();\n }\n\n _createClass(PluralResolver, [{\n key: \"addRule\",\n value: function addRule(lng, obj) {\n this.rules[lng] = obj;\n }\n }, {\n key: \"getRule\",\n value: function getRule(code) {\n return this.rules[code] || this.rules[this.languageUtils.getLanguagePartFromCode(code)];\n }\n }, {\n key: \"needsPlural\",\n value: function needsPlural(code) {\n var rule = this.getRule(code);\n return rule && rule.numbers.length > 1;\n }\n }, {\n key: \"getPluralFormsOfKey\",\n value: function getPluralFormsOfKey(code, key) {\n return this.getSuffixes(code).map(function (suffix) {\n return key + suffix;\n });\n }\n }, {\n key: \"getSuffixes\",\n value: function getSuffixes(code) {\n var _this = this;\n\n var rule = this.getRule(code);\n\n if (!rule) {\n return [];\n }\n\n return rule.numbers.map(function (number) {\n return _this.getSuffix(code, number);\n });\n }\n }, {\n key: \"getSuffix\",\n value: function getSuffix(code, count) {\n var _this2 = this;\n\n var rule = this.getRule(code);\n\n if (rule) {\n var idx = rule.noAbs ? rule.plurals(count) : rule.plurals(Math.abs(count));\n var suffix = rule.numbers[idx];\n\n if (this.options.simplifyPluralSuffix && rule.numbers.length === 2 && rule.numbers[0] === 1) {\n if (suffix === 2) {\n suffix = 'plural';\n } else if (suffix === 1) {\n suffix = '';\n }\n }\n\n var returnSuffix = function returnSuffix() {\n return _this2.options.prepend && suffix.toString() ? _this2.options.prepend + suffix.toString() : suffix.toString();\n };\n\n if (this.options.compatibilityJSON === 'v1') {\n if (suffix === 1) return '';\n if (typeof suffix === 'number') return \"_plural_\".concat(suffix.toString());\n return returnSuffix();\n } else if (this.options.compatibilityJSON === 'v2') {\n return returnSuffix();\n } else if (this.options.simplifyPluralSuffix && rule.numbers.length === 2 && rule.numbers[0] === 1) {\n return returnSuffix();\n }\n\n return this.options.prepend && idx.toString() ? this.options.prepend + idx.toString() : idx.toString();\n }\n\n this.logger.warn(\"no plural rule found for: \".concat(code));\n return '';\n }\n }]);\n\n return PluralResolver;\n}();\n\nvar Interpolator = function () {\n function Interpolator() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n _classCallCheck(this, Interpolator);\n\n this.logger = baseLogger.create('interpolator');\n this.options = options;\n\n this.format = options.interpolation && options.interpolation.format || function (value) {\n return value;\n };\n\n this.init(options);\n }\n\n _createClass(Interpolator, [{\n key: \"init\",\n value: function init() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n if (!options.interpolation) options.interpolation = {\n escapeValue: true\n };\n var iOpts = options.interpolation;\n this.escape = iOpts.escape !== undefined ? iOpts.escape : escape;\n this.escapeValue = iOpts.escapeValue !== undefined ? iOpts.escapeValue : true;\n this.useRawValueToEscape = iOpts.useRawValueToEscape !== undefined ? iOpts.useRawValueToEscape : false;\n this.prefix = iOpts.prefix ? regexEscape(iOpts.prefix) : iOpts.prefixEscaped || '{{';\n this.suffix = iOpts.suffix ? regexEscape(iOpts.suffix) : iOpts.suffixEscaped || '}}';\n this.formatSeparator = iOpts.formatSeparator ? iOpts.formatSeparator : iOpts.formatSeparator || ',';\n this.unescapePrefix = iOpts.unescapeSuffix ? '' : iOpts.unescapePrefix || '-';\n this.unescapeSuffix = this.unescapePrefix ? '' : iOpts.unescapeSuffix || '';\n this.nestingPrefix = iOpts.nestingPrefix ? regexEscape(iOpts.nestingPrefix) : iOpts.nestingPrefixEscaped || regexEscape('$t(');\n this.nestingSuffix = iOpts.nestingSuffix ? regexEscape(iOpts.nestingSuffix) : iOpts.nestingSuffixEscaped || regexEscape(')');\n this.nestingOptionsSeparator = iOpts.nestingOptionsSeparator ? iOpts.nestingOptionsSeparator : iOpts.nestingOptionsSeparator || ',';\n this.maxReplaces = iOpts.maxReplaces ? iOpts.maxReplaces : 1000;\n this.alwaysFormat = iOpts.alwaysFormat !== undefined ? iOpts.alwaysFormat : false;\n this.resetRegExp();\n }\n }, {\n key: \"reset\",\n value: function reset() {\n if (this.options) this.init(this.options);\n }\n }, {\n key: \"resetRegExp\",\n value: function resetRegExp() {\n var regexpStr = \"\".concat(this.prefix, \"(.+?)\").concat(this.suffix);\n this.regexp = new RegExp(regexpStr, 'g');\n var regexpUnescapeStr = \"\".concat(this.prefix).concat(this.unescapePrefix, \"(.+?)\").concat(this.unescapeSuffix).concat(this.suffix);\n this.regexpUnescape = new RegExp(regexpUnescapeStr, 'g');\n var nestingRegexpStr = \"\".concat(this.nestingPrefix, \"(.+?)\").concat(this.nestingSuffix);\n this.nestingRegexp = new RegExp(nestingRegexpStr, 'g');\n }\n }, {\n key: \"interpolate\",\n value: function interpolate(str, data, lng, options) {\n var _this = this;\n\n var match;\n var value;\n var replaces;\n var defaultData = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {};\n\n function regexSafe(val) {\n return val.replace(/\\$/g, '$$$$');\n }\n\n var handleFormat = function handleFormat(key) {\n if (key.indexOf(_this.formatSeparator) < 0) {\n var path = getPathWithDefaults(data, defaultData, key);\n return _this.alwaysFormat ? _this.format(path, undefined, lng, _objectSpread({}, options, data, {\n interpolationkey: key\n })) : path;\n }\n\n var p = key.split(_this.formatSeparator);\n var k = p.shift().trim();\n var f = p.join(_this.formatSeparator).trim();\n return _this.format(getPathWithDefaults(data, defaultData, k), f, lng, _objectSpread({}, options, data, {\n interpolationkey: k\n }));\n };\n\n this.resetRegExp();\n var missingInterpolationHandler = options && options.missingInterpolationHandler || this.options.missingInterpolationHandler;\n var skipOnVariables = options && options.interpolation && options.interpolation.skipOnVariables || this.options.interpolation.skipOnVariables;\n var todos = [{\n regex: this.regexpUnescape,\n safeValue: function safeValue(val) {\n return regexSafe(val);\n }\n }, {\n regex: this.regexp,\n safeValue: function safeValue(val) {\n return _this.escapeValue ? regexSafe(_this.escape(val)) : regexSafe(val);\n }\n }];\n todos.forEach(function (todo) {\n replaces = 0;\n\n while (match = todo.regex.exec(str)) {\n value = handleFormat(match[1].trim());\n\n if (value === undefined) {\n if (typeof missingInterpolationHandler === 'function') {\n var temp = missingInterpolationHandler(str, match, options);\n value = typeof temp === 'string' ? temp : '';\n } else if (skipOnVariables) {\n value = match[0];\n continue;\n } else {\n _this.logger.warn(\"missed to pass in variable \".concat(match[1], \" for interpolating \").concat(str));\n\n value = '';\n }\n } else if (typeof value !== 'string' && !_this.useRawValueToEscape) {\n value = makeString(value);\n }\n\n var safeValue = todo.safeValue(value);\n str = str.replace(match[0], safeValue);\n\n if (skipOnVariables) {\n todo.regex.lastIndex += safeValue.length;\n todo.regex.lastIndex -= match[0].length;\n } else {\n todo.regex.lastIndex = 0;\n }\n\n replaces++;\n\n if (replaces >= _this.maxReplaces) {\n break;\n }\n }\n });\n return str;\n }\n }, {\n key: \"nest\",\n value: function nest(str, fc) {\n var _this2 = this;\n\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n var match;\n var value;\n\n var clonedOptions = _objectSpread({}, options);\n\n clonedOptions.applyPostProcessor = false;\n delete clonedOptions.defaultValue;\n\n function handleHasOptions(key, inheritedOptions) {\n var sep = this.nestingOptionsSeparator;\n if (key.indexOf(sep) < 0) return key;\n var c = key.split(new RegExp(\"\".concat(sep, \"[ ]*{\")));\n var optionsString = \"{\".concat(c[1]);\n key = c[0];\n optionsString = this.interpolate(optionsString, clonedOptions);\n optionsString = optionsString.replace(/'/g, '\"');\n\n try {\n clonedOptions = JSON.parse(optionsString);\n if (inheritedOptions) clonedOptions = _objectSpread({}, inheritedOptions, clonedOptions);\n } catch (e) {\n this.logger.warn(\"failed parsing options string in nesting for key \".concat(key), e);\n return \"\".concat(key).concat(sep).concat(optionsString);\n }\n\n delete clonedOptions.defaultValue;\n return key;\n }\n\n while (match = this.nestingRegexp.exec(str)) {\n var formatters = [];\n var doReduce = false;\n\n if (match[0].indexOf(this.formatSeparator) !== -1 && !/{.*}/.test(match[1])) {\n var r = match[1].split(this.formatSeparator).map(function (elem) {\n return elem.trim();\n });\n match[1] = r.shift();\n formatters = r;\n doReduce = true;\n }\n\n value = fc(handleHasOptions.call(this, match[1].trim(), clonedOptions), clonedOptions);\n if (value && match[0] === str && typeof value !== 'string') return value;\n if (typeof value !== 'string') value = makeString(value);\n\n if (!value) {\n this.logger.warn(\"missed to resolve \".concat(match[1], \" for nesting \").concat(str));\n value = '';\n }\n\n if (doReduce) {\n value = formatters.reduce(function (v, f) {\n return _this2.format(v, f, options.lng, _objectSpread({}, options, {\n interpolationkey: match[1].trim()\n }));\n }, value.trim());\n }\n\n str = str.replace(match[0], value);\n this.regexp.lastIndex = 0;\n }\n\n return str;\n }\n }]);\n\n return Interpolator;\n}();\n\nfunction remove(arr, what) {\n var found = arr.indexOf(what);\n\n while (found !== -1) {\n arr.splice(found, 1);\n found = arr.indexOf(what);\n }\n}\n\nvar Connector = function (_EventEmitter) {\n _inherits(Connector, _EventEmitter);\n\n function Connector(backend, store, services) {\n var _this;\n\n var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n\n _classCallCheck(this, Connector);\n\n _this = _possibleConstructorReturn(this, _getPrototypeOf(Connector).call(this));\n\n if (isIE10) {\n EventEmitter.call(_assertThisInitialized(_this));\n }\n\n _this.backend = backend;\n _this.store = store;\n _this.services = services;\n _this.languageUtils = services.languageUtils;\n _this.options = options;\n _this.logger = baseLogger.create('backendConnector');\n _this.state = {};\n _this.queue = [];\n\n if (_this.backend && _this.backend.init) {\n _this.backend.init(services, options.backend, options);\n }\n\n return _this;\n }\n\n _createClass(Connector, [{\n key: \"queueLoad\",\n value: function queueLoad(languages, namespaces, options, callback) {\n var _this2 = this;\n\n var toLoad = [];\n var pending = [];\n var toLoadLanguages = [];\n var toLoadNamespaces = [];\n languages.forEach(function (lng) {\n var hasAllNamespaces = true;\n namespaces.forEach(function (ns) {\n var name = \"\".concat(lng, \"|\").concat(ns);\n\n if (!options.reload && _this2.store.hasResourceBundle(lng, ns)) {\n _this2.state[name] = 2;\n } else if (_this2.state[name] < 0) ; else if (_this2.state[name] === 1) {\n if (pending.indexOf(name) < 0) pending.push(name);\n } else {\n _this2.state[name] = 1;\n hasAllNamespaces = false;\n if (pending.indexOf(name) < 0) pending.push(name);\n if (toLoad.indexOf(name) < 0) toLoad.push(name);\n if (toLoadNamespaces.indexOf(ns) < 0) toLoadNamespaces.push(ns);\n }\n });\n if (!hasAllNamespaces) toLoadLanguages.push(lng);\n });\n\n if (toLoad.length || pending.length) {\n this.queue.push({\n pending: pending,\n loaded: {},\n errors: [],\n callback: callback\n });\n }\n\n return {\n toLoad: toLoad,\n pending: pending,\n toLoadLanguages: toLoadLanguages,\n toLoadNamespaces: toLoadNamespaces\n };\n }\n }, {\n key: \"loaded\",\n value: function loaded(name, err, data) {\n var s = name.split('|');\n var lng = s[0];\n var ns = s[1];\n if (err) this.emit('failedLoading', lng, ns, err);\n\n if (data) {\n this.store.addResourceBundle(lng, ns, data);\n }\n\n this.state[name] = err ? -1 : 2;\n var loaded = {};\n this.queue.forEach(function (q) {\n pushPath(q.loaded, [lng], ns);\n remove(q.pending, name);\n if (err) q.errors.push(err);\n\n if (q.pending.length === 0 && !q.done) {\n Object.keys(q.loaded).forEach(function (l) {\n if (!loaded[l]) loaded[l] = [];\n\n if (q.loaded[l].length) {\n q.loaded[l].forEach(function (ns) {\n if (loaded[l].indexOf(ns) < 0) loaded[l].push(ns);\n });\n }\n });\n q.done = true;\n\n if (q.errors.length) {\n q.callback(q.errors);\n } else {\n q.callback();\n }\n }\n });\n this.emit('loaded', loaded);\n this.queue = this.queue.filter(function (q) {\n return !q.done;\n });\n }\n }, {\n key: \"read\",\n value: function read(lng, ns, fcName) {\n var _this3 = this;\n\n var tried = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;\n var wait = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 350;\n var callback = arguments.length > 5 ? arguments[5] : undefined;\n if (!lng.length) return callback(null, {});\n return this.backend[fcName](lng, ns, function (err, data) {\n if (err && data && tried < 5) {\n setTimeout(function () {\n _this3.read.call(_this3, lng, ns, fcName, tried + 1, wait * 2, callback);\n }, wait);\n return;\n }\n\n callback(err, data);\n });\n }\n }, {\n key: \"prepareLoading\",\n value: function prepareLoading(languages, namespaces) {\n var _this4 = this;\n\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n var callback = arguments.length > 3 ? arguments[3] : undefined;\n\n if (!this.backend) {\n this.logger.warn('No backend was added via i18next.use. Will not load resources.');\n return callback && callback();\n }\n\n if (typeof languages === 'string') languages = this.languageUtils.toResolveHierarchy(languages);\n if (typeof namespaces === 'string') namespaces = [namespaces];\n var toLoad = this.queueLoad(languages, namespaces, options, callback);\n\n if (!toLoad.toLoad.length) {\n if (!toLoad.pending.length) callback();\n return null;\n }\n\n toLoad.toLoad.forEach(function (name) {\n _this4.loadOne(name);\n });\n }\n }, {\n key: \"load\",\n value: function load(languages, namespaces, callback) {\n this.prepareLoading(languages, namespaces, {}, callback);\n }\n }, {\n key: \"reload\",\n value: function reload(languages, namespaces, callback) {\n this.prepareLoading(languages, namespaces, {\n reload: true\n }, callback);\n }\n }, {\n key: \"loadOne\",\n value: function loadOne(name) {\n var _this5 = this;\n\n var prefix = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n var s = name.split('|');\n var lng = s[0];\n var ns = s[1];\n this.read(lng, ns, 'read', undefined, undefined, function (err, data) {\n if (err) _this5.logger.warn(\"\".concat(prefix, \"loading namespace \").concat(ns, \" for language \").concat(lng, \" failed\"), err);\n if (!err && data) _this5.logger.log(\"\".concat(prefix, \"loaded namespace \").concat(ns, \" for language \").concat(lng), data);\n\n _this5.loaded(name, err, data);\n });\n }\n }, {\n key: \"saveMissing\",\n value: function saveMissing(languages, namespace, key, fallbackValue, isUpdate) {\n var options = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : {};\n\n if (this.services.utils && this.services.utils.hasLoadedNamespace && !this.services.utils.hasLoadedNamespace(namespace)) {\n this.logger.warn(\"did not save key \\\"\".concat(key, \"\\\" as the namespace \\\"\").concat(namespace, \"\\\" was not yet loaded\"), 'This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!');\n return;\n }\n\n if (key === undefined || key === null || key === '') return;\n\n if (this.backend && this.backend.create) {\n this.backend.create(languages, namespace, key, fallbackValue, null, _objectSpread({}, options, {\n isUpdate: isUpdate\n }));\n }\n\n if (!languages || !languages[0]) return;\n this.store.addResource(languages[0], namespace, key, fallbackValue);\n }\n }]);\n\n return Connector;\n}(EventEmitter);\n\nfunction get() {\n return {\n debug: false,\n initImmediate: true,\n ns: ['translation'],\n defaultNS: ['translation'],\n fallbackLng: ['dev'],\n fallbackNS: false,\n whitelist: false,\n nonExplicitWhitelist: false,\n supportedLngs: false,\n nonExplicitSupportedLngs: false,\n load: 'all',\n preload: false,\n simplifyPluralSuffix: true,\n keySeparator: '.',\n nsSeparator: ':',\n pluralSeparator: '_',\n contextSeparator: '_',\n partialBundledLanguages: false,\n saveMissing: false,\n updateMissing: false,\n saveMissingTo: 'fallback',\n saveMissingPlurals: true,\n missingKeyHandler: false,\n missingInterpolationHandler: false,\n postProcess: false,\n postProcessPassResolved: false,\n returnNull: true,\n returnEmptyString: true,\n returnObjects: false,\n joinArrays: false,\n returnedObjectHandler: false,\n parseMissingKeyHandler: false,\n appendNamespaceToMissingKey: false,\n appendNamespaceToCIMode: false,\n overloadTranslationOptionHandler: function handle(args) {\n var ret = {};\n if (_typeof(args[1]) === 'object') ret = args[1];\n if (typeof args[1] === 'string') ret.defaultValue = args[1];\n if (typeof args[2] === 'string') ret.tDescription = args[2];\n\n if (_typeof(args[2]) === 'object' || _typeof(args[3]) === 'object') {\n var options = args[3] || args[2];\n Object.keys(options).forEach(function (key) {\n ret[key] = options[key];\n });\n }\n\n return ret;\n },\n interpolation: {\n escapeValue: true,\n format: function format(value, _format, lng, options) {\n return value;\n },\n prefix: '{{',\n suffix: '}}',\n formatSeparator: ',',\n unescapePrefix: '-',\n nestingPrefix: '$t(',\n nestingSuffix: ')',\n nestingOptionsSeparator: ',',\n maxReplaces: 1000,\n skipOnVariables: false\n }\n };\n}\nfunction transformOptions(options) {\n if (typeof options.ns === 'string') options.ns = [options.ns];\n if (typeof options.fallbackLng === 'string') options.fallbackLng = [options.fallbackLng];\n if (typeof options.fallbackNS === 'string') options.fallbackNS = [options.fallbackNS];\n\n if (options.whitelist) {\n if (options.whitelist && options.whitelist.indexOf('cimode') < 0) {\n options.whitelist = options.whitelist.concat(['cimode']);\n }\n\n options.supportedLngs = options.whitelist;\n }\n\n if (options.nonExplicitWhitelist) {\n options.nonExplicitSupportedLngs = options.nonExplicitWhitelist;\n }\n\n if (options.supportedLngs && options.supportedLngs.indexOf('cimode') < 0) {\n options.supportedLngs = options.supportedLngs.concat(['cimode']);\n }\n\n return options;\n}\n\nfunction noop() {}\n\nvar I18n = function (_EventEmitter) {\n _inherits(I18n, _EventEmitter);\n\n function I18n() {\n var _this;\n\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var callback = arguments.length > 1 ? arguments[1] : undefined;\n\n _classCallCheck(this, I18n);\n\n _this = _possibleConstructorReturn(this, _getPrototypeOf(I18n).call(this));\n\n if (isIE10) {\n EventEmitter.call(_assertThisInitialized(_this));\n }\n\n _this.options = transformOptions(options);\n _this.services = {};\n _this.logger = baseLogger;\n _this.modules = {\n external: []\n };\n\n if (callback && !_this.isInitialized && !options.isClone) {\n if (!_this.options.initImmediate) {\n _this.init(options, callback);\n\n return _possibleConstructorReturn(_this, _assertThisInitialized(_this));\n }\n\n setTimeout(function () {\n _this.init(options, callback);\n }, 0);\n }\n\n return _this;\n }\n\n _createClass(I18n, [{\n key: \"init\",\n value: function init() {\n var _this2 = this;\n\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var callback = arguments.length > 1 ? arguments[1] : undefined;\n\n if (typeof options === 'function') {\n callback = options;\n options = {};\n }\n\n if (options.whitelist && !options.supportedLngs) {\n this.logger.deprecate('whitelist', 'option \"whitelist\" will be renamed to \"supportedLngs\" in the next major - please make sure to rename this option asap.');\n }\n\n if (options.nonExplicitWhitelist && !options.nonExplicitSupportedLngs) {\n this.logger.deprecate('whitelist', 'options \"nonExplicitWhitelist\" will be renamed to \"nonExplicitSupportedLngs\" in the next major - please make sure to rename this option asap.');\n }\n\n this.options = _objectSpread({}, get(), this.options, transformOptions(options));\n this.format = this.options.interpolation.format;\n if (!callback) callback = noop;\n\n function createClassOnDemand(ClassOrObject) {\n if (!ClassOrObject) return null;\n if (typeof ClassOrObject === 'function') return new ClassOrObject();\n return ClassOrObject;\n }\n\n if (!this.options.isClone) {\n if (this.modules.logger) {\n baseLogger.init(createClassOnDemand(this.modules.logger), this.options);\n } else {\n baseLogger.init(null, this.options);\n }\n\n var lu = new LanguageUtil(this.options);\n this.store = new ResourceStore(this.options.resources, this.options);\n var s = this.services;\n s.logger = baseLogger;\n s.resourceStore = this.store;\n s.languageUtils = lu;\n s.pluralResolver = new PluralResolver(lu, {\n prepend: this.options.pluralSeparator,\n compatibilityJSON: this.options.compatibilityJSON,\n simplifyPluralSuffix: this.options.simplifyPluralSuffix\n });\n s.interpolator = new Interpolator(this.options);\n s.utils = {\n hasLoadedNamespace: this.hasLoadedNamespace.bind(this)\n };\n s.backendConnector = new Connector(createClassOnDemand(this.modules.backend), s.resourceStore, s, this.options);\n s.backendConnector.on('*', function (event) {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n _this2.emit.apply(_this2, [event].concat(args));\n });\n\n if (this.modules.languageDetector) {\n s.languageDetector = createClassOnDemand(this.modules.languageDetector);\n s.languageDetector.init(s, this.options.detection, this.options);\n }\n\n if (this.modules.i18nFormat) {\n s.i18nFormat = createClassOnDemand(this.modules.i18nFormat);\n if (s.i18nFormat.init) s.i18nFormat.init(this);\n }\n\n this.translator = new Translator(this.services, this.options);\n this.translator.on('*', function (event) {\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n\n _this2.emit.apply(_this2, [event].concat(args));\n });\n this.modules.external.forEach(function (m) {\n if (m.init) m.init(_this2);\n });\n }\n\n if (this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) {\n var codes = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);\n if (codes.length > 0 && codes[0] !== 'dev') this.options.lng = codes[0];\n }\n\n if (!this.services.languageDetector && !this.options.lng) {\n this.logger.warn('init: no languageDetector is used and no lng is defined');\n }\n\n var storeApi = ['getResource', 'hasResourceBundle', 'getResourceBundle', 'getDataByLanguage'];\n storeApi.forEach(function (fcName) {\n _this2[fcName] = function () {\n var _this2$store;\n\n return (_this2$store = _this2.store)[fcName].apply(_this2$store, arguments);\n };\n });\n var storeApiChained = ['addResource', 'addResources', 'addResourceBundle', 'removeResourceBundle'];\n storeApiChained.forEach(function (fcName) {\n _this2[fcName] = function () {\n var _this2$store2;\n\n (_this2$store2 = _this2.store)[fcName].apply(_this2$store2, arguments);\n\n return _this2;\n };\n });\n var deferred = defer();\n\n var load = function load() {\n var finish = function finish(err, t) {\n if (_this2.isInitialized && !_this2.initializedStoreOnce) _this2.logger.warn('init: i18next is already initialized. You should call init just once!');\n _this2.isInitialized = true;\n if (!_this2.options.isClone) _this2.logger.log('initialized', _this2.options);\n\n _this2.emit('initialized', _this2.options);\n\n deferred.resolve(t);\n callback(err, t);\n };\n\n if (_this2.languages && _this2.options.compatibilityAPI !== 'v1' && !_this2.isInitialized) return finish(null, _this2.t.bind(_this2));\n\n _this2.changeLanguage(_this2.options.lng, finish);\n };\n\n if (this.options.resources || !this.options.initImmediate) {\n load();\n } else {\n setTimeout(load, 0);\n }\n\n return deferred;\n }\n }, {\n key: \"loadResources\",\n value: function loadResources(language) {\n var _this3 = this;\n\n var callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : noop;\n var usedCallback = callback;\n var usedLng = typeof language === 'string' ? language : this.language;\n if (typeof language === 'function') usedCallback = language;\n\n if (!this.options.resources || this.options.partialBundledLanguages) {\n if (usedLng && usedLng.toLowerCase() === 'cimode') return usedCallback();\n var toLoad = [];\n\n var append = function append(lng) {\n if (!lng) return;\n\n var lngs = _this3.services.languageUtils.toResolveHierarchy(lng);\n\n lngs.forEach(function (l) {\n if (toLoad.indexOf(l) < 0) toLoad.push(l);\n });\n };\n\n if (!usedLng) {\n var fallbacks = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);\n fallbacks.forEach(function (l) {\n return append(l);\n });\n } else {\n append(usedLng);\n }\n\n if (this.options.preload) {\n this.options.preload.forEach(function (l) {\n return append(l);\n });\n }\n\n this.services.backendConnector.load(toLoad, this.options.ns, usedCallback);\n } else {\n usedCallback(null);\n }\n }\n }, {\n key: \"reloadResources\",\n value: function reloadResources(lngs, ns, callback) {\n var deferred = defer();\n if (!lngs) lngs = this.languages;\n if (!ns) ns = this.options.ns;\n if (!callback) callback = noop;\n this.services.backendConnector.reload(lngs, ns, function (err) {\n deferred.resolve();\n callback(err);\n });\n return deferred;\n }\n }, {\n key: \"use\",\n value: function use(module) {\n if (!module) throw new Error('You are passing an undefined module! Please check the object you are passing to i18next.use()');\n if (!module.type) throw new Error('You are passing a wrong module! Please check the object you are passing to i18next.use()');\n\n if (module.type === 'backend') {\n this.modules.backend = module;\n }\n\n if (module.type === 'logger' || module.log && module.warn && module.error) {\n this.modules.logger = module;\n }\n\n if (module.type === 'languageDetector') {\n this.modules.languageDetector = module;\n }\n\n if (module.type === 'i18nFormat') {\n this.modules.i18nFormat = module;\n }\n\n if (module.type === 'postProcessor') {\n postProcessor.addPostProcessor(module);\n }\n\n if (module.type === '3rdParty') {\n this.modules.external.push(module);\n }\n\n return this;\n }\n }, {\n key: \"changeLanguage\",\n value: function changeLanguage(lng, callback) {\n var _this4 = this;\n\n this.isLanguageChangingTo = lng;\n var deferred = defer();\n this.emit('languageChanging', lng);\n\n var done = function done(err, l) {\n if (l) {\n _this4.language = l;\n _this4.languages = _this4.services.languageUtils.toResolveHierarchy(l);\n\n _this4.translator.changeLanguage(l);\n\n _this4.isLanguageChangingTo = undefined;\n\n _this4.emit('languageChanged', l);\n\n _this4.logger.log('languageChanged', l);\n } else {\n _this4.isLanguageChangingTo = undefined;\n }\n\n deferred.resolve(function () {\n return _this4.t.apply(_this4, arguments);\n });\n if (callback) callback(err, function () {\n return _this4.t.apply(_this4, arguments);\n });\n };\n\n var setLng = function setLng(lngs) {\n if (!lng && !lngs && _this4.services.languageDetector) lngs = [];\n var l = typeof lngs === 'string' ? lngs : _this4.services.languageUtils.getBestMatchFromCodes(lngs);\n\n if (l) {\n if (!_this4.language) {\n _this4.language = l;\n _this4.languages = _this4.services.languageUtils.toResolveHierarchy(l);\n }\n\n if (!_this4.translator.language) _this4.translator.changeLanguage(l);\n if (_this4.services.languageDetector) _this4.services.languageDetector.cacheUserLanguage(l);\n }\n\n _this4.loadResources(l, function (err) {\n done(err, l);\n });\n };\n\n if (!lng && this.services.languageDetector && !this.services.languageDetector.async) {\n setLng(this.services.languageDetector.detect());\n } else if (!lng && this.services.languageDetector && this.services.languageDetector.async) {\n this.services.languageDetector.detect(setLng);\n } else {\n setLng(lng);\n }\n\n return deferred;\n }\n }, {\n key: \"getFixedT\",\n value: function getFixedT(lng, ns) {\n var _this5 = this;\n\n var fixedT = function fixedT(key, opts) {\n var options;\n\n if (_typeof(opts) !== 'object') {\n for (var _len3 = arguments.length, rest = new Array(_len3 > 2 ? _len3 - 2 : 0), _key3 = 2; _key3 < _len3; _key3++) {\n rest[_key3 - 2] = arguments[_key3];\n }\n\n options = _this5.options.overloadTranslationOptionHandler([key, opts].concat(rest));\n } else {\n options = _objectSpread({}, opts);\n }\n\n options.lng = options.lng || fixedT.lng;\n options.lngs = options.lngs || fixedT.lngs;\n options.ns = options.ns || fixedT.ns;\n return _this5.t(key, options);\n };\n\n if (typeof lng === 'string') {\n fixedT.lng = lng;\n } else {\n fixedT.lngs = lng;\n }\n\n fixedT.ns = ns;\n return fixedT;\n }\n }, {\n key: \"t\",\n value: function t() {\n var _this$translator;\n\n return this.translator && (_this$translator = this.translator).translate.apply(_this$translator, arguments);\n }\n }, {\n key: \"exists\",\n value: function exists() {\n var _this$translator2;\n\n return this.translator && (_this$translator2 = this.translator).exists.apply(_this$translator2, arguments);\n }\n }, {\n key: \"setDefaultNamespace\",\n value: function setDefaultNamespace(ns) {\n this.options.defaultNS = ns;\n }\n }, {\n key: \"hasLoadedNamespace\",\n value: function hasLoadedNamespace(ns) {\n var _this6 = this;\n\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n if (!this.isInitialized) {\n this.logger.warn('hasLoadedNamespace: i18next was not initialized', this.languages);\n return false;\n }\n\n if (!this.languages || !this.languages.length) {\n this.logger.warn('hasLoadedNamespace: i18n.languages were undefined or empty', this.languages);\n return false;\n }\n\n var lng = this.languages[0];\n var fallbackLng = this.options ? this.options.fallbackLng : false;\n var lastLng = this.languages[this.languages.length - 1];\n if (lng.toLowerCase() === 'cimode') return true;\n\n var loadNotPending = function loadNotPending(l, n) {\n var loadState = _this6.services.backendConnector.state[\"\".concat(l, \"|\").concat(n)];\n\n return loadState === -1 || loadState === 2;\n };\n\n if (options.precheck) {\n var preResult = options.precheck(this, loadNotPending);\n if (preResult !== undefined) return preResult;\n }\n\n if (this.hasResourceBundle(lng, ns)) return true;\n if (!this.services.backendConnector.backend) return true;\n if (loadNotPending(lng, ns) && (!fallbackLng || loadNotPending(lastLng, ns))) return true;\n return false;\n }\n }, {\n key: \"loadNamespaces\",\n value: function loadNamespaces(ns, callback) {\n var _this7 = this;\n\n var deferred = defer();\n\n if (!this.options.ns) {\n callback && callback();\n return Promise.resolve();\n }\n\n if (typeof ns === 'string') ns = [ns];\n ns.forEach(function (n) {\n if (_this7.options.ns.indexOf(n) < 0) _this7.options.ns.push(n);\n });\n this.loadResources(function (err) {\n deferred.resolve();\n if (callback) callback(err);\n });\n return deferred;\n }\n }, {\n key: \"loadLanguages\",\n value: function loadLanguages(lngs, callback) {\n var deferred = defer();\n if (typeof lngs === 'string') lngs = [lngs];\n var preloaded = this.options.preload || [];\n var newLngs = lngs.filter(function (lng) {\n return preloaded.indexOf(lng) < 0;\n });\n\n if (!newLngs.length) {\n if (callback) callback();\n return Promise.resolve();\n }\n\n this.options.preload = preloaded.concat(newLngs);\n this.loadResources(function (err) {\n deferred.resolve();\n if (callback) callback(err);\n });\n return deferred;\n }\n }, {\n key: \"dir\",\n value: function dir(lng) {\n if (!lng) lng = this.languages && this.languages.length > 0 ? this.languages[0] : this.language;\n if (!lng) return 'rtl';\n var rtlLngs = ['ar', 'shu', 'sqr', 'ssh', 'xaa', 'yhd', 'yud', 'aao', 'abh', 'abv', 'acm', 'acq', 'acw', 'acx', 'acy', 'adf', 'ads', 'aeb', 'aec', 'afb', 'ajp', 'apc', 'apd', 'arb', 'arq', 'ars', 'ary', 'arz', 'auz', 'avl', 'ayh', 'ayl', 'ayn', 'ayp', 'bbz', 'pga', 'he', 'iw', 'ps', 'pbt', 'pbu', 'pst', 'prp', 'prd', 'ug', 'ur', 'ydd', 'yds', 'yih', 'ji', 'yi', 'hbo', 'men', 'xmn', 'fa', 'jpr', 'peo', 'pes', 'prs', 'dv', 'sam'];\n return rtlLngs.indexOf(this.services.languageUtils.getLanguagePartFromCode(lng)) >= 0 ? 'rtl' : 'ltr';\n }\n }, {\n key: \"createInstance\",\n value: function createInstance() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var callback = arguments.length > 1 ? arguments[1] : undefined;\n return new I18n(options, callback);\n }\n }, {\n key: \"cloneInstance\",\n value: function cloneInstance() {\n var _this8 = this;\n\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : noop;\n\n var mergedOptions = _objectSpread({}, this.options, options, {\n isClone: true\n });\n\n var clone = new I18n(mergedOptions);\n var membersToCopy = ['store', 'services', 'language'];\n membersToCopy.forEach(function (m) {\n clone[m] = _this8[m];\n });\n clone.services = _objectSpread({}, this.services);\n clone.services.utils = {\n hasLoadedNamespace: clone.hasLoadedNamespace.bind(clone)\n };\n clone.translator = new Translator(clone.services, clone.options);\n clone.translator.on('*', function (event) {\n for (var _len4 = arguments.length, args = new Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) {\n args[_key4 - 1] = arguments[_key4];\n }\n\n clone.emit.apply(clone, [event].concat(args));\n });\n clone.init(mergedOptions, callback);\n clone.translator.options = clone.options;\n clone.translator.backendConnector.services.utils = {\n hasLoadedNamespace: clone.hasLoadedNamespace.bind(clone)\n };\n return clone;\n }\n }, {\n key: \"toJSON\",\n value: function toJSON() {\n return {\n options: this.options,\n store: this.store,\n language: this.language,\n languages: this.languages\n };\n }\n }]);\n\n return I18n;\n}(EventEmitter);\n\nvar i18next = new I18n();\n\nexport default i18next;\n","import i18n from \"i18next\";\nimport { initReactI18next } from \"react-i18next\";\n\nimport translationAR from './modules/arabic/translation.json';\nimport translationCN from './modules/chinese/translation.json';\nimport translationDR from './modules/dari/translation.json';\nimport translationEN from './modules/english/translation.json';\nimport translationFR from './modules/french/translation.json';\nimport translationDE from './modules/german/translation.json';\nimport translationHI from './modules/hindi/translation.json';\nimport translationJP from './modules/japanese/translation.json';\nimport translationKR from './modules/korean/translation.json';\nimport translationPT from './modules/portuguese/translation.json';\nimport translationRU from './modules/russian/translation.json';\nimport translationES from './modules/spanish/translation.json';\nimport translationTG from './modules/tagalog/translation.json';\nimport translationTH from './modules/thai/translation.json';\nimport translationUK from './modules/ukrainian/translation.json';\nimport translationUR from './modules/urdu/translation.json';\nimport translationVT from './modules/vietnamese/translation.json';\n\n// the translations\nconst resources = {\n arabic: { translation: translationAR },\n chinese: { translation: translationCN },\n dari: { translation: translationDR },\n english: { translation: translationEN },\n french: { translation: translationFR },\n german: { translation: translationDE },\n hindi: { translation: translationHI },\n japanese: { translation: translationJP},\n korean: { translation: translationKR},\n portuguese: { translation: translationPT},\n russian: { translation: translationRU},\n spanish: { translation: translationES },\n tagalog: { translation: translationTG },\n thai: { translation: translationTH },\n ukrainian: { translation: translationUK },\n urdu: { translation: translationUR },\n vietnamese: { translation: translationVT }\n};\n\n//i18n configurations\n\ni18n\n .use(initReactI18next)\n .init({\n resources,\n lng: \"english\",\n defaultTransParent: 'div',\n // we use the ^ and | as separators because many label strings contain a period or colon,\n // which will cause the translation to fail\n keySeparator: '^',\n nsSeparator: '|',\n interpolation: {\n escapeValue: false\n }\n });\n\nexport default i18n;\n","/**\n * @license React\n * react-jsx-runtime.development.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nif (process.env.NODE_ENV !== \"production\") {\n (function() {\n'use strict';\n\nvar React = require('react');\n\n// ATTENTION\n// When adding new symbols to this file,\n// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'\n// The Symbol used to tag the ReactElement-like types.\nvar REACT_ELEMENT_TYPE = Symbol.for('react.element');\nvar REACT_PORTAL_TYPE = Symbol.for('react.portal');\nvar REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');\nvar REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');\nvar REACT_PROFILER_TYPE = Symbol.for('react.profiler');\nvar REACT_PROVIDER_TYPE = Symbol.for('react.provider');\nvar REACT_CONTEXT_TYPE = Symbol.for('react.context');\nvar REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');\nvar REACT_SUSPENSE_TYPE = Symbol.for('react.suspense');\nvar REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list');\nvar REACT_MEMO_TYPE = Symbol.for('react.memo');\nvar REACT_LAZY_TYPE = Symbol.for('react.lazy');\nvar REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen');\nvar MAYBE_ITERATOR_SYMBOL = Symbol.iterator;\nvar FAUX_ITERATOR_SYMBOL = '@@iterator';\nfunction getIteratorFn(maybeIterable) {\n if (maybeIterable === null || typeof maybeIterable !== 'object') {\n return null;\n }\n\n var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];\n\n if (typeof maybeIterator === 'function') {\n return maybeIterator;\n }\n\n return null;\n}\n\nvar ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;\n\nfunction error(format) {\n {\n {\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n\n printWarning('error', format, args);\n }\n }\n}\n\nfunction printWarning(level, format, args) {\n // When changing this logic, you might want to also\n // update consoleWithStackDev.www.js as well.\n {\n var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\n var stack = ReactDebugCurrentFrame.getStackAddendum();\n\n if (stack !== '') {\n format += '%s';\n args = args.concat([stack]);\n } // eslint-disable-next-line react-internal/safe-string-coercion\n\n\n var argsWithFormat = args.map(function (item) {\n return String(item);\n }); // Careful: RN currently depends on this prefix\n\n argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it\n // breaks IE9: https://github.com/facebook/react/issues/13610\n // eslint-disable-next-line react-internal/no-production-logging\n\n Function.prototype.apply.call(console[level], console, argsWithFormat);\n }\n}\n\n// -----------------------------------------------------------------------------\n\nvar enableScopeAPI = false; // Experimental Create Event Handle API.\nvar enableCacheElement = false;\nvar enableTransitionTracing = false; // No known bugs, but needs performance testing\n\nvar enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber\n// stuff. Intended to enable React core members to more easily debug scheduling\n// issues in DEV builds.\n\nvar enableDebugTracing = false; // Track which Fiber(s) schedule render work.\n\nvar REACT_MODULE_REFERENCE;\n\n{\n REACT_MODULE_REFERENCE = Symbol.for('react.module.reference');\n}\n\nfunction isValidElementType(type) {\n if (typeof type === 'string' || typeof type === 'function') {\n return true;\n } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).\n\n\n if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing ) {\n return true;\n }\n\n if (typeof type === 'object' && type !== null) {\n if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object\n // types supported by any Flight configuration anywhere since\n // we don't know which Flight build this will end up being used\n // with.\n type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== undefined) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction getWrappedName(outerType, innerType, wrapperName) {\n var displayName = outerType.displayName;\n\n if (displayName) {\n return displayName;\n }\n\n var functionName = innerType.displayName || innerType.name || '';\n return functionName !== '' ? wrapperName + \"(\" + functionName + \")\" : wrapperName;\n} // Keep in sync with react-reconciler/getComponentNameFromFiber\n\n\nfunction getContextName(type) {\n return type.displayName || 'Context';\n} // Note that the reconciler package should generally prefer to use getComponentNameFromFiber() instead.\n\n\nfunction getComponentNameFromType(type) {\n if (type == null) {\n // Host root, text node or just invalid type.\n return null;\n }\n\n {\n if (typeof type.tag === 'number') {\n error('Received an unexpected object in getComponentNameFromType(). ' + 'This is likely a bug in React. Please file an issue.');\n }\n }\n\n if (typeof type === 'function') {\n return type.displayName || type.name || null;\n }\n\n if (typeof type === 'string') {\n return type;\n }\n\n switch (type) {\n case REACT_FRAGMENT_TYPE:\n return 'Fragment';\n\n case REACT_PORTAL_TYPE:\n return 'Portal';\n\n case REACT_PROFILER_TYPE:\n return 'Profiler';\n\n case REACT_STRICT_MODE_TYPE:\n return 'StrictMode';\n\n case REACT_SUSPENSE_TYPE:\n return 'Suspense';\n\n case REACT_SUSPENSE_LIST_TYPE:\n return 'SuspenseList';\n\n }\n\n if (typeof type === 'object') {\n switch (type.$$typeof) {\n case REACT_CONTEXT_TYPE:\n var context = type;\n return getContextName(context) + '.Consumer';\n\n case REACT_PROVIDER_TYPE:\n var provider = type;\n return getContextName(provider._context) + '.Provider';\n\n case REACT_FORWARD_REF_TYPE:\n return getWrappedName(type, type.render, 'ForwardRef');\n\n case REACT_MEMO_TYPE:\n var outerName = type.displayName || null;\n\n if (outerName !== null) {\n return outerName;\n }\n\n return getComponentNameFromType(type.type) || 'Memo';\n\n case REACT_LAZY_TYPE:\n {\n var lazyComponent = type;\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n\n try {\n return getComponentNameFromType(init(payload));\n } catch (x) {\n return null;\n }\n }\n\n // eslint-disable-next-line no-fallthrough\n }\n }\n\n return null;\n}\n\nvar assign = Object.assign;\n\n// Helpers to patch console.logs to avoid logging during side-effect free\n// replaying on render function. This currently only patches the object\n// lazily which won't cover if the log function was extracted eagerly.\n// We could also eagerly patch the method.\nvar disabledDepth = 0;\nvar prevLog;\nvar prevInfo;\nvar prevWarn;\nvar prevError;\nvar prevGroup;\nvar prevGroupCollapsed;\nvar prevGroupEnd;\n\nfunction disabledLog() {}\n\ndisabledLog.__reactDisabledLog = true;\nfunction disableLogs() {\n {\n if (disabledDepth === 0) {\n /* eslint-disable react-internal/no-production-logging */\n prevLog = console.log;\n prevInfo = console.info;\n prevWarn = console.warn;\n prevError = console.error;\n prevGroup = console.group;\n prevGroupCollapsed = console.groupCollapsed;\n prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099\n\n var props = {\n configurable: true,\n enumerable: true,\n value: disabledLog,\n writable: true\n }; // $FlowFixMe Flow thinks console is immutable.\n\n Object.defineProperties(console, {\n info: props,\n log: props,\n warn: props,\n error: props,\n group: props,\n groupCollapsed: props,\n groupEnd: props\n });\n /* eslint-enable react-internal/no-production-logging */\n }\n\n disabledDepth++;\n }\n}\nfunction reenableLogs() {\n {\n disabledDepth--;\n\n if (disabledDepth === 0) {\n /* eslint-disable react-internal/no-production-logging */\n var props = {\n configurable: true,\n enumerable: true,\n writable: true\n }; // $FlowFixMe Flow thinks console is immutable.\n\n Object.defineProperties(console, {\n log: assign({}, props, {\n value: prevLog\n }),\n info: assign({}, props, {\n value: prevInfo\n }),\n warn: assign({}, props, {\n value: prevWarn\n }),\n error: assign({}, props, {\n value: prevError\n }),\n group: assign({}, props, {\n value: prevGroup\n }),\n groupCollapsed: assign({}, props, {\n value: prevGroupCollapsed\n }),\n groupEnd: assign({}, props, {\n value: prevGroupEnd\n })\n });\n /* eslint-enable react-internal/no-production-logging */\n }\n\n if (disabledDepth < 0) {\n error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');\n }\n }\n}\n\nvar ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;\nvar prefix;\nfunction describeBuiltInComponentFrame(name, source, ownerFn) {\n {\n if (prefix === undefined) {\n // Extract the VM specific prefix used by each line.\n try {\n throw Error();\n } catch (x) {\n var match = x.stack.trim().match(/\\n( *(at )?)/);\n prefix = match && match[1] || '';\n }\n } // We use the prefix to ensure our stacks line up with native stack frames.\n\n\n return '\\n' + prefix + name;\n }\n}\nvar reentry = false;\nvar componentFrameCache;\n\n{\n var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;\n componentFrameCache = new PossiblyWeakMap();\n}\n\nfunction describeNativeComponentFrame(fn, construct) {\n // If something asked for a stack inside a fake render, it should get ignored.\n if ( !fn || reentry) {\n return '';\n }\n\n {\n var frame = componentFrameCache.get(fn);\n\n if (frame !== undefined) {\n return frame;\n }\n }\n\n var control;\n reentry = true;\n var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.\n\n Error.prepareStackTrace = undefined;\n var previousDispatcher;\n\n {\n previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function\n // for warnings.\n\n ReactCurrentDispatcher.current = null;\n disableLogs();\n }\n\n try {\n // This should throw.\n if (construct) {\n // Something should be setting the props in the constructor.\n var Fake = function () {\n throw Error();\n }; // $FlowFixMe\n\n\n Object.defineProperty(Fake.prototype, 'props', {\n set: function () {\n // We use a throwing setter instead of frozen or non-writable props\n // because that won't throw in a non-strict mode function.\n throw Error();\n }\n });\n\n if (typeof Reflect === 'object' && Reflect.construct) {\n // We construct a different control for this case to include any extra\n // frames added by the construct call.\n try {\n Reflect.construct(Fake, []);\n } catch (x) {\n control = x;\n }\n\n Reflect.construct(fn, [], Fake);\n } else {\n try {\n Fake.call();\n } catch (x) {\n control = x;\n }\n\n fn.call(Fake.prototype);\n }\n } else {\n try {\n throw Error();\n } catch (x) {\n control = x;\n }\n\n fn();\n }\n } catch (sample) {\n // This is inlined manually because closure doesn't do it for us.\n if (sample && control && typeof sample.stack === 'string') {\n // This extracts the first frame from the sample that isn't also in the control.\n // Skipping one frame that we assume is the frame that calls the two.\n var sampleLines = sample.stack.split('\\n');\n var controlLines = control.stack.split('\\n');\n var s = sampleLines.length - 1;\n var c = controlLines.length - 1;\n\n while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {\n // We expect at least one stack frame to be shared.\n // Typically this will be the root most one. However, stack frames may be\n // cut off due to maximum stack limits. In this case, one maybe cut off\n // earlier than the other. We assume that the sample is longer or the same\n // and there for cut off earlier. So we should find the root most frame in\n // the sample somewhere in the control.\n c--;\n }\n\n for (; s >= 1 && c >= 0; s--, c--) {\n // Next we find the first one that isn't the same which should be the\n // frame that called our sample function and the control.\n if (sampleLines[s] !== controlLines[c]) {\n // In V8, the first line is describing the message but other VMs don't.\n // If we're about to return the first line, and the control is also on the same\n // line, that's a pretty good indicator that our sample threw at same line as\n // the control. I.e. before we entered the sample frame. So we ignore this result.\n // This can happen if you passed a class to function component, or non-function.\n if (s !== 1 || c !== 1) {\n do {\n s--;\n c--; // We may still have similar intermediate frames from the construct call.\n // The next one that isn't the same should be our match though.\n\n if (c < 0 || sampleLines[s] !== controlLines[c]) {\n // V8 adds a \"new\" prefix for native classes. Let's remove it to make it prettier.\n var _frame = '\\n' + sampleLines[s].replace(' at new ', ' at '); // If our component frame is labeled \"\"\n // but we have a user-provided \"displayName\"\n // splice it in to make the stack more readable.\n\n\n if (fn.displayName && _frame.includes('')) {\n _frame = _frame.replace('', fn.displayName);\n }\n\n {\n if (typeof fn === 'function') {\n componentFrameCache.set(fn, _frame);\n }\n } // Return the line we found.\n\n\n return _frame;\n }\n } while (s >= 1 && c >= 0);\n }\n\n break;\n }\n }\n }\n } finally {\n reentry = false;\n\n {\n ReactCurrentDispatcher.current = previousDispatcher;\n reenableLogs();\n }\n\n Error.prepareStackTrace = previousPrepareStackTrace;\n } // Fallback to just using the name if we couldn't make it throw.\n\n\n var name = fn ? fn.displayName || fn.name : '';\n var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';\n\n {\n if (typeof fn === 'function') {\n componentFrameCache.set(fn, syntheticFrame);\n }\n }\n\n return syntheticFrame;\n}\nfunction describeFunctionComponentFrame(fn, source, ownerFn) {\n {\n return describeNativeComponentFrame(fn, false);\n }\n}\n\nfunction shouldConstruct(Component) {\n var prototype = Component.prototype;\n return !!(prototype && prototype.isReactComponent);\n}\n\nfunction describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {\n\n if (type == null) {\n return '';\n }\n\n if (typeof type === 'function') {\n {\n return describeNativeComponentFrame(type, shouldConstruct(type));\n }\n }\n\n if (typeof type === 'string') {\n return describeBuiltInComponentFrame(type);\n }\n\n switch (type) {\n case REACT_SUSPENSE_TYPE:\n return describeBuiltInComponentFrame('Suspense');\n\n case REACT_SUSPENSE_LIST_TYPE:\n return describeBuiltInComponentFrame('SuspenseList');\n }\n\n if (typeof type === 'object') {\n switch (type.$$typeof) {\n case REACT_FORWARD_REF_TYPE:\n return describeFunctionComponentFrame(type.render);\n\n case REACT_MEMO_TYPE:\n // Memo may contain any component type so we recursively resolve it.\n return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);\n\n case REACT_LAZY_TYPE:\n {\n var lazyComponent = type;\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n\n try {\n // Lazy may contain any component type so we recursively resolve it.\n return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);\n } catch (x) {}\n }\n }\n }\n\n return '';\n}\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\nvar loggedTypeFailures = {};\nvar ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\n\nfunction setCurrentlyValidatingElement(element) {\n {\n if (element) {\n var owner = element._owner;\n var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);\n ReactDebugCurrentFrame.setExtraStackFrame(stack);\n } else {\n ReactDebugCurrentFrame.setExtraStackFrame(null);\n }\n }\n}\n\nfunction checkPropTypes(typeSpecs, values, location, componentName, element) {\n {\n // $FlowFixMe This is okay but Flow doesn't know it.\n var has = Function.call.bind(hasOwnProperty);\n\n for (var typeSpecName in typeSpecs) {\n if (has(typeSpecs, typeSpecName)) {\n var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to\n // fail the render phase where it didn't fail before. So we log it.\n // After these have been cleaned up, we'll let them throw.\n\n try {\n // This is intentionally an invariant that gets caught. It's the same\n // behavior as without this statement except with a better message.\n if (typeof typeSpecs[typeSpecName] !== 'function') {\n // eslint-disable-next-line react-internal/prod-error-codes\n var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.');\n err.name = 'Invariant Violation';\n throw err;\n }\n\n error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');\n } catch (ex) {\n error$1 = ex;\n }\n\n if (error$1 && !(error$1 instanceof Error)) {\n setCurrentlyValidatingElement(element);\n\n error('%s: type specification of %s' + ' `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error$1);\n\n setCurrentlyValidatingElement(null);\n }\n\n if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {\n // Only monitor this failure once because there tends to be a lot of the\n // same error.\n loggedTypeFailures[error$1.message] = true;\n setCurrentlyValidatingElement(element);\n\n error('Failed %s type: %s', location, error$1.message);\n\n setCurrentlyValidatingElement(null);\n }\n }\n }\n }\n}\n\nvar isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare\n\nfunction isArray(a) {\n return isArrayImpl(a);\n}\n\n/*\n * The `'' + value` pattern (used in in perf-sensitive code) throws for Symbol\n * and Temporal.* types. See https://github.com/facebook/react/pull/22064.\n *\n * The functions in this module will throw an easier-to-understand,\n * easier-to-debug exception with a clear errors message message explaining the\n * problem. (Instead of a confusing exception thrown inside the implementation\n * of the `value` object).\n */\n// $FlowFixMe only called in DEV, so void return is not possible.\nfunction typeName(value) {\n {\n // toStringTag is needed for namespaced types like Temporal.Instant\n var hasToStringTag = typeof Symbol === 'function' && Symbol.toStringTag;\n var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || 'Object';\n return type;\n }\n} // $FlowFixMe only called in DEV, so void return is not possible.\n\n\nfunction willCoercionThrow(value) {\n {\n try {\n testStringCoercion(value);\n return false;\n } catch (e) {\n return true;\n }\n }\n}\n\nfunction testStringCoercion(value) {\n // If you ended up here by following an exception call stack, here's what's\n // happened: you supplied an object or symbol value to React (as a prop, key,\n // DOM attribute, CSS property, string ref, etc.) and when React tried to\n // coerce it to a string using `'' + value`, an exception was thrown.\n //\n // The most common types that will cause this exception are `Symbol` instances\n // and Temporal objects like `Temporal.Instant`. But any object that has a\n // `valueOf` or `[Symbol.toPrimitive]` method that throws will also cause this\n // exception. (Library authors do this to prevent users from using built-in\n // numeric operators like `+` or comparison operators like `>=` because custom\n // methods are needed to perform accurate arithmetic or comparison.)\n //\n // To fix the problem, coerce this object or symbol value to a string before\n // passing it to React. The most reliable way is usually `String(value)`.\n //\n // To find which value is throwing, check the browser or debugger console.\n // Before this exception was thrown, there should be `console.error` output\n // that shows the type (Symbol, Temporal.PlainDate, etc.) that caused the\n // problem and how that type was used: key, atrribute, input value prop, etc.\n // In most cases, this console output also shows the component and its\n // ancestor components where the exception happened.\n //\n // eslint-disable-next-line react-internal/safe-string-coercion\n return '' + value;\n}\nfunction checkKeyStringCoercion(value) {\n {\n if (willCoercionThrow(value)) {\n error('The provided key is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', typeName(value));\n\n return testStringCoercion(value); // throw (to help callers find troubleshooting comments)\n }\n }\n}\n\nvar ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;\nvar RESERVED_PROPS = {\n key: true,\n ref: true,\n __self: true,\n __source: true\n};\nvar specialPropKeyWarningShown;\nvar specialPropRefWarningShown;\nvar didWarnAboutStringRefs;\n\n{\n didWarnAboutStringRefs = {};\n}\n\nfunction hasValidRef(config) {\n {\n if (hasOwnProperty.call(config, 'ref')) {\n var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;\n\n if (getter && getter.isReactWarning) {\n return false;\n }\n }\n }\n\n return config.ref !== undefined;\n}\n\nfunction hasValidKey(config) {\n {\n if (hasOwnProperty.call(config, 'key')) {\n var getter = Object.getOwnPropertyDescriptor(config, 'key').get;\n\n if (getter && getter.isReactWarning) {\n return false;\n }\n }\n }\n\n return config.key !== undefined;\n}\n\nfunction warnIfStringRefCannotBeAutoConverted(config, self) {\n {\n if (typeof config.ref === 'string' && ReactCurrentOwner.current && self && ReactCurrentOwner.current.stateNode !== self) {\n var componentName = getComponentNameFromType(ReactCurrentOwner.current.type);\n\n if (!didWarnAboutStringRefs[componentName]) {\n error('Component \"%s\" contains the string ref \"%s\". ' + 'Support for string refs will be removed in a future major release. ' + 'This case cannot be automatically converted to an arrow function. ' + 'We ask you to manually fix this case by using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-string-ref', getComponentNameFromType(ReactCurrentOwner.current.type), config.ref);\n\n didWarnAboutStringRefs[componentName] = true;\n }\n }\n }\n}\n\nfunction defineKeyPropWarningGetter(props, displayName) {\n {\n var warnAboutAccessingKey = function () {\n if (!specialPropKeyWarningShown) {\n specialPropKeyWarningShown = true;\n\n error('%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);\n }\n };\n\n warnAboutAccessingKey.isReactWarning = true;\n Object.defineProperty(props, 'key', {\n get: warnAboutAccessingKey,\n configurable: true\n });\n }\n}\n\nfunction defineRefPropWarningGetter(props, displayName) {\n {\n var warnAboutAccessingRef = function () {\n if (!specialPropRefWarningShown) {\n specialPropRefWarningShown = true;\n\n error('%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);\n }\n };\n\n warnAboutAccessingRef.isReactWarning = true;\n Object.defineProperty(props, 'ref', {\n get: warnAboutAccessingRef,\n configurable: true\n });\n }\n}\n/**\n * Factory method to create a new React element. This no longer adheres to\n * the class pattern, so do not use new to call it. Also, instanceof check\n * will not work. Instead test $$typeof field against Symbol.for('react.element') to check\n * if something is a React Element.\n *\n * @param {*} type\n * @param {*} props\n * @param {*} key\n * @param {string|object} ref\n * @param {*} owner\n * @param {*} self A *temporary* helper to detect places where `this` is\n * different from the `owner` when React.createElement is called, so that we\n * can warn. We want to get rid of owner and replace string `ref`s with arrow\n * functions, and as long as `this` and owner are the same, there will be no\n * change in behavior.\n * @param {*} source An annotation object (added by a transpiler or otherwise)\n * indicating filename, line number, and/or other information.\n * @internal\n */\n\n\nvar ReactElement = function (type, key, ref, self, source, owner, props) {\n var element = {\n // This tag allows us to uniquely identify this as a React Element\n $$typeof: REACT_ELEMENT_TYPE,\n // Built-in properties that belong on the element\n type: type,\n key: key,\n ref: ref,\n props: props,\n // Record the component responsible for creating this element.\n _owner: owner\n };\n\n {\n // The validation flag is currently mutative. We put it on\n // an external backing store so that we can freeze the whole object.\n // This can be replaced with a WeakMap once they are implemented in\n // commonly used development environments.\n element._store = {}; // To make comparing ReactElements easier for testing purposes, we make\n // the validation flag non-enumerable (where possible, which should\n // include every environment we run tests in), so the test framework\n // ignores it.\n\n Object.defineProperty(element._store, 'validated', {\n configurable: false,\n enumerable: false,\n writable: true,\n value: false\n }); // self and source are DEV only properties.\n\n Object.defineProperty(element, '_self', {\n configurable: false,\n enumerable: false,\n writable: false,\n value: self\n }); // Two elements created in two different places should be considered\n // equal for testing purposes and therefore we hide it from enumeration.\n\n Object.defineProperty(element, '_source', {\n configurable: false,\n enumerable: false,\n writable: false,\n value: source\n });\n\n if (Object.freeze) {\n Object.freeze(element.props);\n Object.freeze(element);\n }\n }\n\n return element;\n};\n/**\n * https://github.com/reactjs/rfcs/pull/107\n * @param {*} type\n * @param {object} props\n * @param {string} key\n */\n\nfunction jsxDEV(type, config, maybeKey, source, self) {\n {\n var propName; // Reserved names are extracted\n\n var props = {};\n var key = null;\n var ref = null; // Currently, key can be spread in as a prop. This causes a potential\n // issue if key is also explicitly declared (ie.
    \n // or
    ). We want to deprecate key spread,\n // but as an intermediary step, we will use jsxDEV for everything except\n //
    , because we aren't currently able to tell if\n // key is explicitly declared to be undefined or not.\n\n if (maybeKey !== undefined) {\n {\n checkKeyStringCoercion(maybeKey);\n }\n\n key = '' + maybeKey;\n }\n\n if (hasValidKey(config)) {\n {\n checkKeyStringCoercion(config.key);\n }\n\n key = '' + config.key;\n }\n\n if (hasValidRef(config)) {\n ref = config.ref;\n warnIfStringRefCannotBeAutoConverted(config, self);\n } // Remaining properties are added to a new props object\n\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n } // Resolve default props\n\n\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n\n if (key || ref) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n }\n}\n\nvar ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;\nvar ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;\n\nfunction setCurrentlyValidatingElement$1(element) {\n {\n if (element) {\n var owner = element._owner;\n var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);\n ReactDebugCurrentFrame$1.setExtraStackFrame(stack);\n } else {\n ReactDebugCurrentFrame$1.setExtraStackFrame(null);\n }\n }\n}\n\nvar propTypesMisspellWarningShown;\n\n{\n propTypesMisspellWarningShown = false;\n}\n/**\n * Verifies the object is a ReactElement.\n * See https://reactjs.org/docs/react-api.html#isvalidelement\n * @param {?object} object\n * @return {boolean} True if `object` is a ReactElement.\n * @final\n */\n\n\nfunction isValidElement(object) {\n {\n return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;\n }\n}\n\nfunction getDeclarationErrorAddendum() {\n {\n if (ReactCurrentOwner$1.current) {\n var name = getComponentNameFromType(ReactCurrentOwner$1.current.type);\n\n if (name) {\n return '\\n\\nCheck the render method of `' + name + '`.';\n }\n }\n\n return '';\n }\n}\n\nfunction getSourceInfoErrorAddendum(source) {\n {\n if (source !== undefined) {\n var fileName = source.fileName.replace(/^.*[\\\\\\/]/, '');\n var lineNumber = source.lineNumber;\n return '\\n\\nCheck your code at ' + fileName + ':' + lineNumber + '.';\n }\n\n return '';\n }\n}\n/**\n * Warn if there's no key explicitly set on dynamic arrays of children or\n * object keys are not valid. This allows us to keep track of children between\n * updates.\n */\n\n\nvar ownerHasKeyUseWarning = {};\n\nfunction getCurrentComponentErrorInfo(parentType) {\n {\n var info = getDeclarationErrorAddendum();\n\n if (!info) {\n var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;\n\n if (parentName) {\n info = \"\\n\\nCheck the top-level render call using <\" + parentName + \">.\";\n }\n }\n\n return info;\n }\n}\n/**\n * Warn if the element doesn't have an explicit key assigned to it.\n * This element is in an array. The array could grow and shrink or be\n * reordered. All children that haven't already been validated are required to\n * have a \"key\" property assigned to it. Error statuses are cached so a warning\n * will only be shown once.\n *\n * @internal\n * @param {ReactElement} element Element that requires a key.\n * @param {*} parentType element's parent's type.\n */\n\n\nfunction validateExplicitKey(element, parentType) {\n {\n if (!element._store || element._store.validated || element.key != null) {\n return;\n }\n\n element._store.validated = true;\n var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);\n\n if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {\n return;\n }\n\n ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a\n // property, it may be the creator of the child that's responsible for\n // assigning it a key.\n\n var childOwner = '';\n\n if (element && element._owner && element._owner !== ReactCurrentOwner$1.current) {\n // Give the component that originally created this child.\n childOwner = \" It was passed a child from \" + getComponentNameFromType(element._owner.type) + \".\";\n }\n\n setCurrentlyValidatingElement$1(element);\n\n error('Each child in a list should have a unique \"key\" prop.' + '%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner);\n\n setCurrentlyValidatingElement$1(null);\n }\n}\n/**\n * Ensure that every element either is passed in a static location, in an\n * array with an explicit keys property defined, or in an object literal\n * with valid key property.\n *\n * @internal\n * @param {ReactNode} node Statically passed child of any type.\n * @param {*} parentType node's parent's type.\n */\n\n\nfunction validateChildKeys(node, parentType) {\n {\n if (typeof node !== 'object') {\n return;\n }\n\n if (isArray(node)) {\n for (var i = 0; i < node.length; i++) {\n var child = node[i];\n\n if (isValidElement(child)) {\n validateExplicitKey(child, parentType);\n }\n }\n } else if (isValidElement(node)) {\n // This element was passed in a valid location.\n if (node._store) {\n node._store.validated = true;\n }\n } else if (node) {\n var iteratorFn = getIteratorFn(node);\n\n if (typeof iteratorFn === 'function') {\n // Entry iterators used to provide implicit keys,\n // but now we print a separate warning for them later.\n if (iteratorFn !== node.entries) {\n var iterator = iteratorFn.call(node);\n var step;\n\n while (!(step = iterator.next()).done) {\n if (isValidElement(step.value)) {\n validateExplicitKey(step.value, parentType);\n }\n }\n }\n }\n }\n }\n}\n/**\n * Given an element, validate that its props follow the propTypes definition,\n * provided by the type.\n *\n * @param {ReactElement} element\n */\n\n\nfunction validatePropTypes(element) {\n {\n var type = element.type;\n\n if (type === null || type === undefined || typeof type === 'string') {\n return;\n }\n\n var propTypes;\n\n if (typeof type === 'function') {\n propTypes = type.propTypes;\n } else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.\n // Inner props are checked in the reconciler.\n type.$$typeof === REACT_MEMO_TYPE)) {\n propTypes = type.propTypes;\n } else {\n return;\n }\n\n if (propTypes) {\n // Intentionally inside to avoid triggering lazy initializers:\n var name = getComponentNameFromType(type);\n checkPropTypes(propTypes, element.props, 'prop', name, element);\n } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {\n propTypesMisspellWarningShown = true; // Intentionally inside to avoid triggering lazy initializers:\n\n var _name = getComponentNameFromType(type);\n\n error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', _name || 'Unknown');\n }\n\n if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) {\n error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');\n }\n }\n}\n/**\n * Given a fragment, validate that it can only be provided with fragment props\n * @param {ReactElement} fragment\n */\n\n\nfunction validateFragmentProps(fragment) {\n {\n var keys = Object.keys(fragment.props);\n\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n\n if (key !== 'children' && key !== 'key') {\n setCurrentlyValidatingElement$1(fragment);\n\n error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);\n\n setCurrentlyValidatingElement$1(null);\n break;\n }\n }\n\n if (fragment.ref !== null) {\n setCurrentlyValidatingElement$1(fragment);\n\n error('Invalid attribute `ref` supplied to `React.Fragment`.');\n\n setCurrentlyValidatingElement$1(null);\n }\n }\n}\n\nfunction jsxWithValidation(type, props, key, isStaticChildren, source, self) {\n {\n var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to\n // succeed and there will likely be errors in render.\n\n if (!validType) {\n var info = '';\n\n if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {\n info += ' You likely forgot to export your component from the file ' + \"it's defined in, or you might have mixed up default and named imports.\";\n }\n\n var sourceInfo = getSourceInfoErrorAddendum(source);\n\n if (sourceInfo) {\n info += sourceInfo;\n } else {\n info += getDeclarationErrorAddendum();\n }\n\n var typeString;\n\n if (type === null) {\n typeString = 'null';\n } else if (isArray(type)) {\n typeString = 'array';\n } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {\n typeString = \"<\" + (getComponentNameFromType(type.type) || 'Unknown') + \" />\";\n info = ' Did you accidentally export a JSX literal instead of a component?';\n } else {\n typeString = typeof type;\n }\n\n error('React.jsx: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info);\n }\n\n var element = jsxDEV(type, props, key, source, self); // The result can be nullish if a mock or a custom function is used.\n // TODO: Drop this when these are no longer allowed as the type argument.\n\n if (element == null) {\n return element;\n } // Skip key warning if the type isn't valid since our key validation logic\n // doesn't expect a non-string/function type and can throw confusing errors.\n // We don't want exception behavior to differ between dev and prod.\n // (Rendering will throw with a helpful message and as soon as the type is\n // fixed, the key warnings will appear.)\n\n\n if (validType) {\n var children = props.children;\n\n if (children !== undefined) {\n if (isStaticChildren) {\n if (isArray(children)) {\n for (var i = 0; i < children.length; i++) {\n validateChildKeys(children[i], type);\n }\n\n if (Object.freeze) {\n Object.freeze(children);\n }\n } else {\n error('React.jsx: Static children should always be an array. ' + 'You are likely explicitly calling React.jsxs or React.jsxDEV. ' + 'Use the Babel transform instead.');\n }\n } else {\n validateChildKeys(children, type);\n }\n }\n }\n\n if (type === REACT_FRAGMENT_TYPE) {\n validateFragmentProps(element);\n } else {\n validatePropTypes(element);\n }\n\n return element;\n }\n} // These two functions exist to still get child warnings in dev\n// even with the prod transform. This means that jsxDEV is purely\n// opt-in behavior for better messages but that we won't stop\n// giving you warnings if you use production apis.\n\nfunction jsxWithValidationStatic(type, props, key) {\n {\n return jsxWithValidation(type, props, key, true);\n }\n}\nfunction jsxWithValidationDynamic(type, props, key) {\n {\n return jsxWithValidation(type, props, key, false);\n }\n}\n\nvar jsx = jsxWithValidationDynamic ; // we may want to special case jsxs internally to take advantage of static children.\n// for now we can ship identical prod functions\n\nvar jsxs = jsxWithValidationStatic ;\n\nexports.Fragment = REACT_FRAGMENT_TYPE;\nexports.jsx = jsx;\nexports.jsxs = jsxs;\n })();\n}\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-jsx-runtime.production.min.js');\n} else {\n module.exports = require('./cjs/react-jsx-runtime.development.js');\n}\n","import {jsxs as $6XpKT$jsxs, jsx as $6XpKT$jsx} from \"react/jsx-runtime\";\nimport {forwardRef as $6XpKT$forwardRef, useRef as $6XpKT$useRef, useState as $6XpKT$useState, useEffect as $6XpKT$useEffect, memo as $6XpKT$memo} from \"react\";\nimport \"prop-types\";\n\n\n\n\n\nfunction $f63eea9d7c5f466f$export$2e2bcd8739ae039(v1, v2) {\n return String(v1) === String(v2);\n}\n\n\nfunction $f7a118348608ef0e$export$2e2bcd8739ae039(value, options) {\n if (Array.isArray(value)) return value.map((v)=>options.find((o)=>(0, $f63eea9d7c5f466f$export$2e2bcd8739ae039)(o.value, v))).filter((o)=>o);\n return options.find((o)=>(0, $f63eea9d7c5f466f$export$2e2bcd8739ae039)(o.value, value)) || null;\n}\n\n\n\nfunction $ab17a5af9c7227da$export$2e2bcd8739ae039(value) {\n return Array.isArray(value) ? value : [\n value\n ];\n}\n\n\nfunction $fcc1d8b4a4fe77ec$export$2e2bcd8739ae039(newOption, oldOption, multiple) {\n if (!newOption) return oldOption;\n if (!multiple) return newOption;\n if (!oldOption) return (0, $ab17a5af9c7227da$export$2e2bcd8739ae039)(newOption);\n const nextOption = (0, $ab17a5af9c7227da$export$2e2bcd8739ae039)(oldOption);\n const newOptionIndex = nextOption.findIndex((o)=>(0, $f63eea9d7c5f466f$export$2e2bcd8739ae039)(o.value, newOption.value));\n if (newOptionIndex >= 0) nextOption.splice(newOptionIndex, 1);\n else nextOption.push(newOption);\n return nextOption;\n}\n\n\nfunction $29242e7c542b89e5$export$2e2bcd8739ae039(option, options, placeholder) {\n if (!option && !placeholder) return options && options.length ? options[0].name || \"\" : \"\";\n const isMultiple = Array.isArray(option);\n if (!option && !isMultiple) return \"\";\n return isMultiple ? option.map((o)=>o.name).filter(Boolean).join(\", \") : option.name || \"\";\n}\n\n\nfunction $8f7d71ac34985a60$export$2e2bcd8739ae039(option) {\n if (!option) return null;\n if (Array.isArray(option)) return option.filter(Boolean).map((o)=>o.value);\n return option.value || null;\n}\n\n\nfunction $559302edb229d5e8$export$2e2bcd8739ae039(options) {\n const nextOptions = [];\n options.forEach((option)=>{\n if (option.group) {\n const group = nextOptions.findIndex((o)=>o.type === \"group\" && o.name === option.group);\n if (group >= 0) nextOptions[group].items.push(option);\n else nextOptions.push({\n items: [\n option\n ],\n type: \"group\",\n name: option.group\n });\n } else nextOptions.push(option);\n });\n return nextOptions;\n}\n\n\nfunction $e2eb089248fa8007$var$search(q, text) {\n const searchLength = q.length;\n const textLength = text.length;\n if (searchLength > textLength) return false;\n if (text.indexOf(q) >= 0) return true;\n mainLoop: for(let i = 0, j = 0; i < searchLength; i += 1){\n const ch = q.charCodeAt(i);\n while(j < textLength){\n if (text.charCodeAt(j++) === ch) continue mainLoop;\n }\n return false;\n }\n return true;\n}\nfunction $e2eb089248fa8007$export$2e2bcd8739ae039(options, query) {\n return !query.length ? options : options.filter((o)=>$e2eb089248fa8007$var$search(query.toLowerCase(), `${o.name} ${o.group || \"\"}`.trim().toLowerCase()));\n}\n\n\nfunction $5b742793c6607960$export$2e2bcd8739ae039(middleware, items, query) {\n return middleware.filter(Boolean).reduce((data, cb)=>cb(data, query), items).map((item, i)=>({\n ...item,\n index: i\n }));\n}\n\n\n\nfunction $ab7b6b8f43adf325$export$2e2bcd8739ae039(options) {\n let index = 0;\n return options.map((option)=>{\n if (option.type === \"group\") return option.items.map((o)=>({\n ...o,\n group: option.name,\n index: index++\n }));\n return {\n ...option,\n index: index++\n };\n }).flat();\n}\n\n\nfunction $21775510bb0d6713$export$2e2bcd8739ae039(defaultOptions, getOptions, debounceTime, search) {\n const [options, setOptions] = (0, $6XpKT$useState)(()=>(0, $ab7b6b8f43adf325$export$2e2bcd8739ae039)(defaultOptions));\n const [fetching, setFetching] = (0, $6XpKT$useState)(false);\n (0, $6XpKT$useEffect)(()=>{\n let timeout;\n if (!getOptions) return;\n timeout = setTimeout(()=>{\n const optionsReq = getOptions(search, options);\n setFetching(true);\n Promise.resolve(optionsReq).then((newOptions)=>setOptions((0, $ab7b6b8f43adf325$export$2e2bcd8739ae039)(newOptions))).finally(()=>setFetching(false));\n }, debounceTime);\n return ()=>{\n clearTimeout(timeout);\n };\n }, [\n search\n ]);\n (0, $6XpKT$useEffect)(()=>{\n setOptions((0, $ab7b6b8f43adf325$export$2e2bcd8739ae039)(defaultOptions));\n }, [\n defaultOptions\n ]);\n return [\n options,\n fetching\n ];\n}\n\n\n\nfunction $e86f7a275d5b9934$export$2e2bcd8739ae039(current, dir, options) {\n const max = options.length - 1;\n let option = null;\n let i = -1;\n let newHighlighted = current;\n while((i++) <= max && (!option || option.disabled)){\n newHighlighted = dir === \"down\" ? newHighlighted + 1 : newHighlighted - 1;\n if (newHighlighted < 0) newHighlighted = max;\n else if (newHighlighted > max) newHighlighted = 0;\n option = options[newHighlighted];\n }\n return newHighlighted;\n}\n\n\nfunction $8c63ada902e0d18e$export$2e2bcd8739ae039(options, onSelect, ref) {\n const [highlighted, setHighlighted] = (0, $6XpKT$useState)(-1);\n return [\n {\n onKeyDown: (e)=>{\n const key = e.key.replace(\"Arrow\", \"\").toLowerCase();\n if (key === \"down\" || key === \"up\") {\n e.preventDefault();\n setHighlighted((0, $e86f7a275d5b9934$export$2e2bcd8739ae039)(highlighted, key, options));\n }\n },\n onKeyUp: (e)=>{\n if (e.key === \"Escape\") {\n e.preventDefault();\n ref.current.blur();\n } else if (e.key === \"Enter\") {\n e.preventDefault();\n if (options[highlighted]) onSelect(options[highlighted].value);\n }\n }\n },\n highlighted,\n setHighlighted\n ];\n}\n\n\nconst $0d0f732c1d5a71da$var$nullCb = ()=>{};\nfunction $0d0f732c1d5a71da$export$2e2bcd8739ae039({ options: defaultOptions , defaultValue: defaultValue , value: value , multiple: multiple , search: search , onChange: onChange = $0d0f732c1d5a71da$var$nullCb , onFocus: onFocus = $0d0f732c1d5a71da$var$nullCb , onBlur: onBlur = $0d0f732c1d5a71da$var$nullCb , closeOnSelect: closeOnSelect = true , placeholder: placeholder , getOptions: getOptions , filterOptions: filterOptions , useFuzzySearch: useFuzzySearch = true , debounce: debounce }) {\n const ref = (0, $6XpKT$useRef)();\n const [option, setOption] = (0, $6XpKT$useState)(null);\n const [q, setSearch] = (0, $6XpKT$useState)(\"\");\n const [focus, setFocus] = (0, $6XpKT$useState)(false);\n const [options, fetching] = (0, $21775510bb0d6713$export$2e2bcd8739ae039)(defaultOptions, getOptions, debounce, q);\n const onSelect = (v)=>{\n const newOption = (0, $fcc1d8b4a4fe77ec$export$2e2bcd8739ae039)((0, $f7a118348608ef0e$export$2e2bcd8739ae039)(decodeURIComponent(v), options), option, multiple);\n if (value === undefined) setOption(newOption);\n onChange((0, $8f7d71ac34985a60$export$2e2bcd8739ae039)(newOption), newOption);\n setTimeout(()=>{\n if (ref.current && closeOnSelect) ref.current.blur();\n }, 0);\n };\n const [keyHandlers, highlighted, setHighlighted] = (0, $8c63ada902e0d18e$export$2e2bcd8739ae039)(options, onSelect, ref);\n const middleware = [\n useFuzzySearch ? (0, $e2eb089248fa8007$export$2e2bcd8739ae039) : null,\n ...filterOptions ? filterOptions : []\n ];\n const snapshot = {\n search: q,\n focus: focus,\n option: option,\n value: (0, $8f7d71ac34985a60$export$2e2bcd8739ae039)(option),\n fetching: fetching,\n highlighted: highlighted,\n options: (0, $559302edb229d5e8$export$2e2bcd8739ae039)((0, $5b742793c6607960$export$2e2bcd8739ae039)(middleware, options, q)),\n displayValue: (0, $29242e7c542b89e5$export$2e2bcd8739ae039)(option, options, placeholder)\n };\n const valueProps = {\n tabIndex: \"0\",\n readOnly: !search,\n placeholder: placeholder,\n value: focus && search ? q : snapshot.displayValue,\n ref: ref,\n ...keyHandlers,\n onFocus: (e)=>{\n setFocus(true);\n onFocus(e);\n },\n onBlur: (e)=>{\n setFocus(false);\n setSearch(\"\");\n setHighlighted(-1);\n onBlur(e);\n },\n onMouseDown: (e)=>{\n if (focus) {\n e.preventDefault();\n ref.current.blur();\n }\n },\n onChange: search ? ({ target: target })=>setSearch(target.value) : null\n };\n const optionProps = {\n tabIndex: \"-1\",\n onMouseDown (e) {\n e.preventDefault();\n onSelect(e.currentTarget.value);\n }\n };\n (0, $6XpKT$useEffect)(()=>{\n setOption((0, $f7a118348608ef0e$export$2e2bcd8739ae039)(value === undefined ? defaultValue : value, options));\n }, [\n value,\n options\n ]);\n return [\n snapshot,\n valueProps,\n optionProps\n ];\n}\n\n\nconst $461fda4bde208857$var$isString = (str)=>typeof str === \"string\";\nconst $461fda4bde208857$var$getClassName = (str, className)=>$461fda4bde208857$var$isString(className) ? `${className}-${str}` : className[str];\nfunction $461fda4bde208857$export$2e2bcd8739ae039(classNames, className) {\n if ($461fda4bde208857$var$isString(classNames)) return $461fda4bde208857$var$getClassName(classNames, className);\n return Object.entries(classNames).filter(([cls, display])=>cls && display).map(([cls])=>$461fda4bde208857$var$getClassName(cls, className)).join(\" \");\n}\n\n\n\n\n\n\nfunction $9b55b4f5631730e8$var$Option({ optionProps: optionProps , highlighted: highlighted , selected: selected , option: option , cls: cls , renderOption: renderOption , disabled: disabled }) {\n const props = {\n ...optionProps,\n value: encodeURIComponent(option.value),\n disabled: disabled\n };\n const className = cls({\n option: true,\n \"is-selected\": selected,\n \"is-highlighted\": highlighted\n });\n return /*#__PURE__*/ (0, $6XpKT$jsxs)(\"li\", {\n className: cls(\"row\"),\n role: \"menuitem\",\n \"data-index\": option.index,\n children: [\n renderOption && renderOption(props, option, {\n selected: selected,\n highlighted: highlighted\n }, className),\n !renderOption && /*#__PURE__*/ (0, $6XpKT$jsx)(\"button\", {\n type: \"button\",\n className: className,\n ...props,\n children: option.name\n })\n ]\n });\n}\nvar $9b55b4f5631730e8$export$2e2bcd8739ae039 = /*#__PURE__*/ (0, $6XpKT$memo)($9b55b4f5631730e8$var$Option);\n\n\nfunction $b5eecf9f88e2d7ae$export$2e2bcd8739ae039(option, selectedOption) {\n if (!selectedOption) return false;\n return Array.isArray(selectedOption) ? selectedOption.findIndex((o)=>o.value === option.value) >= 0 : selectedOption.value === option.value;\n}\n\n\nfunction $1b5fcad01c07e709$var$Options(props) {\n const { options: options , cls: cls , renderOption: renderOption , renderGroupHeader: renderGroupHeader , optionProps: optionProps , snapshot: snapshot , disabled: disabled } = props;\n return /*#__PURE__*/ (0, $6XpKT$jsx)(\"ul\", {\n className: cls(\"options\"),\n children: options.map((o)=>{\n if (o.type === \"group\") return /*#__PURE__*/ (0, $6XpKT$jsx)(\"li\", {\n role: \"none\",\n className: cls(\"row\"),\n children: /*#__PURE__*/ (0, $6XpKT$jsxs)(\"div\", {\n className: cls(\"group\"),\n children: [\n /*#__PURE__*/ (0, $6XpKT$jsx)(\"div\", {\n className: cls(\"group-header\"),\n children: renderGroupHeader ? renderGroupHeader(o.name) : o.name\n }),\n /*#__PURE__*/ (0, $6XpKT$jsx)($1b5fcad01c07e709$var$Options, {\n ...props,\n options: o.items\n })\n ]\n })\n }, o.name);\n return /*#__PURE__*/ (0, $6XpKT$jsx)((0, $9b55b4f5631730e8$export$2e2bcd8739ae039), {\n option: o,\n optionProps: optionProps,\n cls: cls,\n renderOption: renderOption,\n selected: (0, $b5eecf9f88e2d7ae$export$2e2bcd8739ae039)(o, snapshot.option),\n highlighted: snapshot.highlighted === o.index,\n disabled: o.disabled || disabled\n }, o.value);\n })\n });\n}\nvar $1b5fcad01c07e709$export$2e2bcd8739ae039 = /*#__PURE__*/ (0, $6XpKT$memo)($1b5fcad01c07e709$var$Options);\n\n\nconst $00d3317695af813e$var$SelectSearch = /*#__PURE__*/ (0, $6XpKT$forwardRef)(({ disabled: disabled , placeholder: placeholder , multiple: multiple , search: search , autoFocus: autoFocus , autoComplete: autoComplete , id: id , closeOnSelect: closeOnSelect , className: className , renderValue: renderValue , renderOption: renderOption , renderGroupHeader: renderGroupHeader , fuzzySearch: fuzzySearch , emptyMessage: emptyMessage , value: value , ...hookProps }, ref)=>{\n const selectRef = (0, $6XpKT$useRef)(null);\n const cls = (classNames)=>(0, $461fda4bde208857$export$2e2bcd8739ae039)(classNames, className);\n const [controlledValue, setControlledValue] = (0, $6XpKT$useState)(value);\n const [snapshot, valueProps, optionProps] = (0, $0d0f732c1d5a71da$export$2e2bcd8739ae039)({\n value: controlledValue,\n placeholder: placeholder,\n multiple: multiple,\n search: search,\n closeOnSelect: closeOnSelect && !multiple,\n useFuzzySearch: fuzzySearch,\n ...hookProps\n });\n const { highlighted: highlighted , value: snapValue , fetching: fetching , focus: focus } = snapshot;\n const props = {\n ...valueProps,\n autoFocus: autoFocus,\n autoComplete: autoComplete,\n disabled: disabled\n };\n (0, $6XpKT$useEffect)(()=>{\n const { current: current } = selectRef;\n if (current) {\n const val = Array.isArray(snapValue) ? snapValue[0] : snapValue;\n const selected = current.querySelector(highlighted > -1 ? `[data-index=\"${highlighted}\"]` : `[value=\"${encodeURIComponent(val)}\"]`);\n if (selected) {\n const rect = current.getBoundingClientRect();\n const selectedRect = selected.getBoundingClientRect();\n current.scrollTop = selected.offsetTop - rect.height / 2 + selectedRect.height / 2;\n }\n }\n }, [\n snapValue,\n highlighted,\n selectRef.current\n ]);\n (0, $6XpKT$useEffect)(()=>setControlledValue(value), [\n value\n ]);\n return /*#__PURE__*/ (0, $6XpKT$jsxs)(\"div\", {\n ref: ref,\n id: id,\n className: cls({\n container: true,\n \"is-multiple\": multiple,\n \"is-disabled\": disabled,\n \"is-loading\": fetching,\n \"has-focus\": focus\n }),\n children: [\n (!multiple || placeholder || search) && /*#__PURE__*/ (0, $6XpKT$jsxs)(\"div\", {\n className: cls(\"value\"),\n children: [\n renderValue && renderValue(props, snapshot, cls(\"input\")),\n !renderValue && /*#__PURE__*/ (0, $6XpKT$jsx)(\"input\", {\n ...props,\n className: cls(\"input\")\n })\n ]\n }),\n /*#__PURE__*/ (0, $6XpKT$jsxs)(\"div\", {\n className: cls(\"select\"),\n ref: selectRef,\n onMouseDown: (e)=>e.preventDefault(),\n children: [\n snapshot.options.length > 0 && /*#__PURE__*/ (0, $6XpKT$jsx)((0, $1b5fcad01c07e709$export$2e2bcd8739ae039), {\n options: snapshot.options,\n optionProps: optionProps,\n renderOption: renderOption,\n renderGroupHeader: renderGroupHeader,\n disabled: disabled,\n snapshot: snapshot,\n cls: cls\n }),\n !snapshot.options.length && /*#__PURE__*/ (0, $6XpKT$jsx)(\"ul\", {\n className: cls(\"options\"),\n children: !snapshot.options.length && emptyMessage && /*#__PURE__*/ (0, $6XpKT$jsx)(\"li\", {\n className: cls(\"not-found\"),\n children: emptyMessage\n })\n })\n ]\n })\n ]\n });\n});\n$00d3317695af813e$var$SelectSearch.defaultProps = {\n // Data\n options: [],\n fuzzySearch: true,\n // Interaction´\n printOptions: \"auto\",\n closeOnSelect: true,\n debounce: 250,\n // Attributes\n autoComplete: \"on\",\n // Design\n className: \"select-search\"\n};\n$00d3317695af813e$var$SelectSearch.displayName = \"SelectSearch\";\nvar $00d3317695af813e$export$2e2bcd8739ae039 = /*#__PURE__*/ (0, $6XpKT$memo)($00d3317695af813e$var$SelectSearch);\n\n\n\nvar $cf838c15c8b009ba$export$2e2bcd8739ae039 = (0, $00d3317695af813e$export$2e2bcd8739ae039);\n\n\nexport {$cf838c15c8b009ba$export$2e2bcd8739ae039 as default, $0d0f732c1d5a71da$export$2e2bcd8739ae039 as useSelect};\n//# sourceMappingURL=index.js.map\n"],"names":["ArchivedButton","props","tagClass","text","React.createElement","ProgressBar","percent","answeredQuestionCount","questionCount","label","getStatusForResponse","response","responsesWithStatus","responses","_","value","key","statusCode","extractConceptResultsFromResponse","concept_results","ENGLISH","CHINESE","HINDI","SPANISH","FRENCH","ARABIC","RUSSIAN","PORTUGUESE","URDU","GERMAN","JAPANESE","KOREAN","VIETNAMESE","THAI","UKRAINIAN","TAGALOG","DARI","languageConstants","defaultLanguages","rightToLeftLanguages","defaultLanguageOptions","languageToLocale","ALPHA_TRANSLATED_ACTIVITY_UIDS","getlanguageOptions","translations","language","renderSaveAndExitButton","isELLDiagnostic","languageOptions","translate","languages","option","buttonText","showTranslations","permittedLanguages","getTranslatedConceptsFeedbackData","conceptsFeedback","showTranslation","renderExplanation","data","translatedData","ConceptExplanation","AffectedResponse","QuestionBar","d","i","ResponseSortFields","React.Component","stateName","displayName","ResponseToggleFields","status","index","addColorToTag","LanguagePicker","updateLanguage","capitalizedLanguageOptions","titleCase","options","onChange","opt","DropdownInput","getParameterByName","name","url","regex","results","SegmentAnalytics","event","params","sessionID","idData","fetchUserIdsForSession","isTrackableStudentEvent","teacherId","studentId","customProperties","e","eventProperties","properties","passedEventProperties","p","accumulator","customKeyName","segmentInstance","TrackAnalyticsEvent","dispatch","LanguageSelectionPage","setLanguage","previewMode","beginActivity","handlePageLoaded","isDiagnosticActivity","handleClickLanguage","Events","React","isPermittedLanguage","IncorrectSequencesInputAndConceptSelectorForm","RegexInputAndConceptSelectorForm","INCORRECT_SEQUENCE","FocusPointsInputAndConceptSelectorForm","FOCUS_POINT","SessionStatus","Severity","fromString","level","Status","fromHttpCode","code","isError","wat","isInstanceOf","isErrorEvent","isDOMError","isDOMException","isString","isPrimitive","isPlainObject","isEvent","isElement","isRegExp","isThenable","isSyntheticEvent","base","htmlTreeAsString","elem","currentElem","MAX_TRAVERSE_HEIGHT","MAX_OUTPUT_LEN","out","height","len","separator","sepLength","nextStr","_htmlElementAsString","el","className","classes","attr","allowedAttrs","setPrototypeOf","setProtoOf","mixinProperties","obj","proto","prop","SentryError","_super","__extends","message","_newTarget","_this","DSN_REGEX","ERROR_MESSAGE","Dsn","from","withPassword","_a","host","path","pass","port","projectId","protocol","user","str","match","__read","_b","_c","lastPath","split","projectMatch","components","component","Memo","defaultFunctionName","getFunctionName","fn","truncate","max","safeJoin","input","delimiter","output","isMatchingPattern","pattern","fill","source","replacementFactory","original","wrapped","urlEncode","object","getWalkSource","error","err","event_1","utf8Length","jsonSize","normalizeToSize","depth","maxSize","serialized","normalize","serializeValue","type","normalized","normalizeValue","walk","memo","acc","innerKey","extractExceptionKeysForMessage","exception","maxLength","keys","includedKeys","dropUndefinedKeys","val","e_1","rv","__values","e_1_1","isNodeEnv","dynamicRequire","mod","request","fallbackGlobalObject","getGlobalObject","uuid4","global","crypto","arr","pad","num","v","c","parseUrl","query","fragment","getEventDescription","consoleSandbox","callback","levels","originalConsole","wrappedLevels","result","addExceptionTypeValue","addExceptionMechanism","mechanism","getLocationHref","defaultRetryAfter","parseRetryAfterHeader","now","header","headerDelay","headerDate","PREFIX","Logger","args","_i","logger","supportsFetch","isNativeFetch","func","supportsNativeFetch","doc","sandbox","supportsReferrerPolicy","supportsHistory","chrome","isChromePackagedApp","hasHistoryApi","handlers","instrumented","instrument","instrumentConsole","instrumentDOM","instrumentXHR","instrumentFetch","instrumentHistory","instrumentError","instrumentUnhandledRejection","addInstrumentationHandler","handler","triggerHandlers","originalConsoleLevel","originalFetch","handlerData","getFetchMethod","getFetchUrl","__assign","fetchArgs","requestKeys","requestValues","xhrproto","originalOpen","xhr","onreadystatechangeHandler","requestPos","args_1","readyStateArgs","originalSend","lastHref","oldOnPopState","to","historyReplacementFunction","originalHistoryFunction","domEventHandler","keypressEventHandler","target","eventName","innerOriginal","debounceDuration","debounceTimer","keypressTimeout","lastCapturedEvent","debounce","tagName","_oldOnErrorHandler","msg","line","column","_oldOnUnhandledRejectionHandler","States","SyncPromise","executor","reason","state","cachedHandlers","resolve","reject","collection","counter","resolvedCollection","item","onfulfilled","onrejected","onfinally","isRejected","PromiseBuffer","_limit","task","removedTask","timeout","capturedSetTimeout","dateTimestampSource","getBrowserPerformance","performance","timeOrigin","getNodePerformance","perfHooks","platformPerformance","timestampSource","dateTimestampInSeconds","Scope","scope","newScope","__spread","tags","extras","extra","fingerprint","context","span","_d","session","captureContext","updatedScope","breadcrumb","maxBreadcrumbs","mergedBreadcrumb","hint","transactionName","getGlobalEventProcessors","processors","processor","final","addGlobalEventProcessor","Session","API_VERSION","DEFAULT_BREADCRUMBS","MAX_BREADCRUMBS","Hub","client","_version","version","top","eventId","finalHint","syntheticException","beforeBreadcrumb","timestamp","finalBreadcrumb","oldHub","makeMain","integration","customSamplingContext","release","environment","method","carrier","getMainCarrier","sentry","hub","registry","getHubFromCarrier","setHubOnCarrier","getCurrentHub","hasHubOnCarrier","getHubFromActiveDomain","getActiveDomain","activeDomain","registryHubTopStack","callOnHub","captureException","withScope","SENTRY_API_VERSION","API","dsn","clientName","clientVersion","dialogOptions","endpoint","encodedOptions","auth","installedIntegrations","getIntegrationsToSetup","defaultIntegrations","userIntegrations","integrations","userIntegrationsNames_1","pickedIntegrationsNames_1","defaultIntegration","userIntegration","integrationsNames","alwaysLastToRun","setupIntegration","setupIntegrations","BaseClient","backendClass","promisedEvent","ready","transportFlushed","crashed","errored","userAgent","exceptions","exceptions_1","exceptions_1_1","ex","headers","ticked","tick","interval","normalizeDepth","prepared","finalScope","evt","b","dist","maxValueLength","sdkInfo","integrationsArray","finalEvent","beforeSend","sampleRate","isTransaction","isInternalException","beforeSendResult","processedEvent","promise","NoopTransport","BaseBackend","_exception","_hint","_message","_level","sessionToSentryRequest","api","envelopeHeaders","itemHeaders","eventToSentryRequest","samplingMethod","otherTags","__rest","useEnvelope","req","envelope","initAndBind","clientClass","originalFunctionToString","FunctionToString","DEFAULT_IGNORE_ERRORS","InboundFilters","_options","self","clientOptions","frames_1","frames_2","UNKNOWN_FUNCTION","gecko","winjs","geckoEval","chromeEval","reactMinifiedRegexp","computeStackTrace","stack","popSize","computeStackTraceFromStacktraceProp","popFrames","computeStackTraceFromStackProp","extractMessage","lines","isEval","submatch","parts","element","isNative","stacktrace","opera10Regex","opera11Regex","STACKTRACE_LIMIT","exceptionFromStacktrace","frames","prepareFramesForEvent","eventFromPlainObject","rejection","eventFromStacktrace","localStack","firstFrameFunction","lastFrameFunction","frame","eventFromException","eventFromUnknownInput","eventFromMessage","eventFromString","errorEvent","domException","name_1","objectException","BaseTransport","requestType","limited","category","e_2","rlHeader","raHeader","limit","parameters","delay","_e","_f","e_2_1","FetchTransport","sentryRequest","originalPayload","XHRTransport","BrowserBackend","transportOptions","ignoreOnError","shouldIgnoreOnError","ignoreNextOnError","wrap","before","sentryWrapped","wrappedArguments","arg","property","descriptor","injectReportDialog","script","GlobalHandlers","currentHub","hasIntegration","isFailedOwnDelivery","ERROR_TYPES_RE","groups","colno","lineno","filename","DEFAULT_EVENT_TARGET","TryCatch","eventTarget","originalCallback","originalRemoveEventListener","wrappedEventHandler","originalEventHandler","xmlHttpRequestProps","wrapOptions","Breadcrumbs","status_code","body","parsedLoc","parsedFrom","parsedTo","DEFAULT_KEY","DEFAULT_LIMIT","LinkedErrors","linkedErrors","UserAgent","referrer","SDK_NAME","SDK_VERSION","BrowserClient","document","CoreIntegrations.InboundFilters","CoreIntegrations.FunctionToString","init","window_1","startSessionTracking","window","loadResolved","fcpResolved","possiblyEndSession","resolveWindowLoaded","po","entryList","entry","firstHiddenTime_1","startListeningToQuestions","activityUID","QuestionApi","GRAMMAR_QUESTION_TYPE","questions","populateQuestions","setSessionReducerToSavedSession","ActionTypes","getQuestion","questionID","question","getGradedResponsesWithCallback","requestGet","bodyToObj","resp","cr","formattedCr","incrementRequestCount","searchResponses","qid","getState","requestNumber","requestPost","getFormattedSearchData","embeddedOrder","responseData","updateResponses","searchData","initializeSubscription","Pusher","channel","removeSubscription","submitNewQuestion","content","question_uid","action","push","a","saveOptimalResponse","startQuestionEdit","cancelQuestionEdit","submitQuestionEdit","formContent","unmodifiedContent","updatedContent","conceptUid","answer","conceptResults","formattedResponse","responseActions.submitResponse","submitNewIncorrectSequence","IncorrectSequenceApi","submitEditedIncorrectSequence","seqid","deleteIncorrectSequence","updateIncorrectSequences","submitNewFocusPoint","FocusPointApi","submitEditedFocusPoint","fpid","submitBatchEditedFocusPoint","deleteFocusPoint","getUsedSequences","existingIncorrectSeqs","usedSeqs","inSeq","setUsedSequences","seq","updateStringFilter","stringFilter","setStringFilter","startResponseEdit","rid","updatePageNumber","pageNumber","setPageNumber","clearQuestionState","startChildResponseView","cancelChildResponseView","cancelResponseEdit","lessonApiBaseUrl","TYPE_CONNECT_LESSON","LessonApi","lesson_type","uid","requestPut","requestDelete","SENTENCE_COMBINING_TYPE","SENTENCE_FRAGMENTS_TYPE","FILL_IN_BLANKS_TYPE","questionApiBaseUrl","activityApiBaseUrl","QuestionApi$1","questionType","language_string","modelConceptUid","FocusPointApi$1","questionId","focusPointId","IncorrectSequenceApi$1","incorrectSequenceId","objectWithSnakeKeysFromCamel$1","camelObj","convertCR","snakeObj","camelKey","snakeKey","crs","newHash","submitResponse","prid","isFirstAttempt","rubyConvertedResponse","objectWithSnakeKeysFromCamel","moment","C","uploadOptimalResponse","submitMassEditFeedback","ids","updated_attribute","submitMassEditConceptResults","submitResponseEdit","deleteResponse","formatted_cr","getMultipleChoiceResponseOptionsWithCallback","convertConceptNamesToIds","concepts","conceptData","concept","cd","submitOptimalResponses","conceptUID","convertedResponses","defaultConcept","loadQuestions","loadQuestion","toggleNewQuestionModal","lessonID","lessonQuestion","lessonActions","updateFlag","flag","updateModelConceptUID","modelConceptUID","startFromResponseView","cancelFromResponseView","startToResponseView","cancelToResponseView","questionActions$1","_ApiConstants","ApiConstants","listenToResponsesWithCallback","snapshot","sessionApiBaseUrl","SessionApi","allQuestions","questionsInitialized","SessionActions","denormalizedSession","denormalizeSession","processedSession","processSession","cleanSession","cleanedSession","delete_null_properties","normalizedSession","normalizeSession","forceRefresh","answeredQuestions","denormalizeQuestion","questionSet","unansweredQuestions","questionUid","denormalizedQuestion","sessionCopy","normalizeQuestion","normalizeQuestionWithAttempts","test","recurse","loadSpecifiedQuestions","uids","requestPromises","allPromises","questionData","sessionActions","questionActions","reloadQuestionsIfNecessary","activityType","PRODUCTION","GRAMMAR","grammarListenToQuestions","CONNECT","connect","DIAGNOSTIC","diagnostic","titleCardApiBaseUrl","CONNECT_TITLE_CARD_TYPE","TitleCardApi","titleCardType","startListeningToLessons","loadLessons","loadLesson","filterQuestionType","loadLessonWithQuestions","loadTranslatedQuestions","startLessonEdit","cid","cancelLessonEdit","deleteLesson","submitLessonEdit","qids","cleanedContent","pickBy","updateQuestions","lesson","toggleNewLessonModal","submitNewLesson","lessonUid","q","setFlag","ownKeys","enumerableOnly","symbols","sym","_objectSpread","_defineProperty","defaultOptions","i18nInstance","I18nContext","setDefaults","getDefaults","ReportNamespaces","_classCallCheck","_createClass","namespaces","ns","setI18n","instance","getI18n","initReactI18next","warn","_console","_len","_key","alreadyWarned","warnOnce","_len2","_key2","loadNamespaces","i18n","cb","initialized","hasLoadedNamespace","lng","fallbackLng","lastLng","loadNotPending","l","n","loadState","getDisplayName","Component","useTranslation","i18nFromProps","_ref","useContext","i18nFromContext","defaultNSFromContext","notReadyT","k","retNotReady","i18nOptions","useSuspense","getT","_useState","useState","_useState2","_slicedToArray","t","setT","isMounted","useRef","useEffect","bindI18n","bindI18nStore","boundReset","isInitial","ret","_excluded","withTranslation","WrappedComponent","I18nextWithTranslation","forwardedRef","rest","_objectWithoutProperties","_useTranslation","_useTranslation2","passDownProps","forwardRef","ref","addKeyDownListener","handleKeyDown","React.useEffect","defineProperty","consoleLogger","concreteLogger","bool","_len3","_key3","_len4","_key4","lvl","prefix","debugOnly","moduleName","baseLogger","EventEmitter","events","listener","cloned","observer","_cloned","defer","res","rej","makeString","copy","s","m","getLastOfPath","Empty","cleanKey","canNotTraverseDeeper","setPath","newValue","_getLastOfPath","pushPath","concat","_getLastOfPath2","getPath","_getLastOfPath3","getPathWithDefaults","defaultData","deepExtend","overwrite","regexEscape","_entityMap","escape","isIE10","deepFind","keySeparator","paths","current","j","mix","joinedPath","ResourceStore","_EventEmitter","_inherits","_possibleConstructorReturn","_getPrototypeOf","_assertThisInitialized","ignoreJSONStructure","resources","deep","pack","postProcessor","module","translator","checkedLoadedFor","Translator","services","resolved","nsSeparator","lastKey","_this2","_typeof","_this$extractFromKey","namespace","appendNamespaceToCIMode","resUsedKey","resExactUsedKey","resType","noObject","joinArrays","handleAsObjectInI18nFormat","handleAsObject","resTypeIsArray","newKeyToUse","deepKey","usedDefault","usedKey","needsPluralHandling","hasDefaultValue","defaultValueSuffix","defaultValue","updateMissing","fk","lngs","fallbackLngs","send","fallbackValue","suffix","_this3","skipOnVariables","nestBef","nb","na","nestAft","postProcess","postProcessorNames","_this4","found","exactUsedKey","usedLng","usedNS","extracted","needsContextHandling","codes","finalKey","finalKeys","pluralSuffix","possibleKey","capitalize","string","LanguageUtil","specialCases","part","cleanedLng","lngOnly","supportedLng","fallbacks","fallbackCode","fallbackCodes","addCode","fc","sets","_rulesPluralsTypes","createRules","rules","set","PluralResolver","languageUtils","rule","number","count","idx","returnSuffix","Interpolator","iOpts","regexpStr","regexpUnescapeStr","nestingRegexpStr","replaces","regexSafe","handleFormat","f","missingInterpolationHandler","todos","todo","temp","safeValue","clonedOptions","handleHasOptions","inheritedOptions","sep","optionsString","formatters","doReduce","r","remove","what","Connector","backend","store","toLoad","pending","toLoadLanguages","toLoadNamespaces","hasAllNamespaces","loaded","fcName","tried","wait","_this5","isUpdate","get","_format","transformOptions","noop","I18n","createClassOnDemand","ClassOrObject","lu","storeApi","_this2$store","storeApiChained","_this2$store2","deferred","load","finish","usedCallback","append","done","setLng","fixedT","opts","_this$translator","_this$translator2","_this6","preResult","_this7","preloaded","newLngs","rtlLngs","_this8","mergedOptions","clone","membersToCopy","i18next","translationAR","translationCN","translationDR","translationEN","translationFR","translationDE","translationHI","translationJP","translationKR","translationPT","translationRU","translationES","translationTG","translationTH","translationUK","translationUR","translationVT","require$$0","REACT_ELEMENT_TYPE","REACT_PORTAL_TYPE","REACT_FRAGMENT_TYPE","REACT_STRICT_MODE_TYPE","REACT_PROFILER_TYPE","REACT_PROVIDER_TYPE","REACT_CONTEXT_TYPE","REACT_FORWARD_REF_TYPE","REACT_SUSPENSE_TYPE","REACT_SUSPENSE_LIST_TYPE","REACT_MEMO_TYPE","REACT_LAZY_TYPE","REACT_OFFSCREEN_TYPE","MAYBE_ITERATOR_SYMBOL","FAUX_ITERATOR_SYMBOL","getIteratorFn","maybeIterable","maybeIterator","ReactSharedInternals","format","printWarning","ReactDebugCurrentFrame","argsWithFormat","enableScopeAPI","enableCacheElement","enableTransitionTracing","enableLegacyHidden","enableDebugTracing","REACT_MODULE_REFERENCE","isValidElementType","getWrappedName","outerType","innerType","wrapperName","functionName","getContextName","getComponentNameFromType","provider","outerName","lazyComponent","payload","assign","disabledDepth","prevLog","prevInfo","prevWarn","prevError","prevGroup","prevGroupCollapsed","prevGroupEnd","disabledLog","disableLogs","reenableLogs","ReactCurrentDispatcher","describeBuiltInComponentFrame","ownerFn","x","reentry","componentFrameCache","PossiblyWeakMap","describeNativeComponentFrame","construct","control","previousPrepareStackTrace","previousDispatcher","Fake","sample","sampleLines","controlLines","_frame","syntheticFrame","describeFunctionComponentFrame","shouldConstruct","prototype","describeUnknownElementTypeFrameInDEV","hasOwnProperty","loggedTypeFailures","setCurrentlyValidatingElement","owner","checkPropTypes","typeSpecs","values","location","componentName","has","typeSpecName","error$1","isArrayImpl","isArray","typeName","hasToStringTag","willCoercionThrow","testStringCoercion","checkKeyStringCoercion","ReactCurrentOwner","RESERVED_PROPS","specialPropKeyWarningShown","specialPropRefWarningShown","didWarnAboutStringRefs","hasValidRef","config","getter","hasValidKey","warnIfStringRefCannotBeAutoConverted","defineKeyPropWarningGetter","warnAboutAccessingKey","defineRefPropWarningGetter","warnAboutAccessingRef","ReactElement","jsxDEV","maybeKey","propName","defaultProps","ReactCurrentOwner$1","ReactDebugCurrentFrame$1","setCurrentlyValidatingElement$1","propTypesMisspellWarningShown","isValidElement","getDeclarationErrorAddendum","getSourceInfoErrorAddendum","ownerHasKeyUseWarning","getCurrentComponentErrorInfo","parentType","info","parentName","validateExplicitKey","currentComponentErrorInfo","childOwner","validateChildKeys","node","child","iteratorFn","iterator","step","validatePropTypes","propTypes","_name","validateFragmentProps","jsxWithValidation","isStaticChildren","validType","sourceInfo","typeString","children","jsxWithValidationStatic","jsxWithValidationDynamic","jsx","jsxs","reactJsxRuntime_development","jsxRuntimeModule","$f63eea9d7c5f466f$export$2e2bcd8739ae039","v1","v2","$f7a118348608ef0e$export$2e2bcd8739ae039","o","$ab17a5af9c7227da$export$2e2bcd8739ae039","$fcc1d8b4a4fe77ec$export$2e2bcd8739ae039","newOption","oldOption","multiple","nextOption","newOptionIndex","$29242e7c542b89e5$export$2e2bcd8739ae039","placeholder","isMultiple","$8f7d71ac34985a60$export$2e2bcd8739ae039","$559302edb229d5e8$export$2e2bcd8739ae039","nextOptions","group","$e2eb089248fa8007$var$search","searchLength","textLength","mainLoop","ch","$e2eb089248fa8007$export$2e2bcd8739ae039","$5b742793c6607960$export$2e2bcd8739ae039","middleware","items","$ab7b6b8f43adf325$export$2e2bcd8739ae039","$21775510bb0d6713$export$2e2bcd8739ae039","getOptions","debounceTime","search","setOptions","$6XpKT$useState","fetching","setFetching","$6XpKT$useEffect","optionsReq","newOptions","$e86f7a275d5b9934$export$2e2bcd8739ae039","dir","newHighlighted","$8c63ada902e0d18e$export$2e2bcd8739ae039","onSelect","highlighted","setHighlighted","$0d0f732c1d5a71da$var$nullCb","$0d0f732c1d5a71da$export$2e2bcd8739ae039","onFocus","onBlur","closeOnSelect","filterOptions","useFuzzySearch","$6XpKT$useRef","setOption","setSearch","focus","setFocus","keyHandlers","valueProps","optionProps","$461fda4bde208857$var$isString","$461fda4bde208857$var$getClassName","$461fda4bde208857$export$2e2bcd8739ae039","classNames","cls","display","$9b55b4f5631730e8$var$Option","selected","renderOption","disabled","$6XpKT$jsxs","$6XpKT$jsx","$9b55b4f5631730e8$export$2e2bcd8739ae039","$6XpKT$memo","$b5eecf9f88e2d7ae$export$2e2bcd8739ae039","selectedOption","$1b5fcad01c07e709$var$Options","renderGroupHeader","$1b5fcad01c07e709$export$2e2bcd8739ae039","$00d3317695af813e$var$SelectSearch","$6XpKT$forwardRef","autoFocus","autoComplete","id","renderValue","fuzzySearch","emptyMessage","hookProps","selectRef","controlledValue","setControlledValue","snapValue","rect","selectedRect","$00d3317695af813e$export$2e2bcd8739ae039","$cf838c15c8b009ba$export$2e2bcd8739ae039"],"mappings":"goBAEM,MAAAA,GAAkBC,GAAU,CAChC,IAAIC,EAAW,MACXD,EAAM,mBACIC,GAAA,YAGR,MAAAC,EAAOF,EAAM,QAAU,qCAAuC,qBAGlE,OAAAG,gBAAC,OAAI,MAAO,CAAC,QAAS,cAAc,mBACjC,QAAM,CAAA,UAAU,yBACdA,gBAAA,OAAA,CAAK,UAAWF,EAAU,QAASD,EAAM,kBAAqB,EAAAE,CAAK,CACtE,CACF,CAEJ,ECRME,GAAc,CAAC,CAAE,QAAAC,EAAS,sBAAAC,EAAuB,cAAAC,EAAe,MAAAC,CAAO,IAC1EL,gBAAA,MAAA,CAAI,UAAU,wBAAA,EACZA,EAAAA,cAAA,WAAA,CAAS,UAAU,6BAA6B,IAAI,MAAM,MAAOE,CAAS,CAAA,EAC3EF,EAAAA,cAAC,IAAG,KAAAG,EAAsB,OAAKC,EAAc,IAAEC,CAAM,CACvD,ECVc,SAAAC,GAAqBC,EAAW,GAAI,CAC9C,OAAAA,EAAS,UAAY,MAAQ,CAAC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4BimB,GAAAA,IAAY,KAAM,CAC5D,UAAWP,EAAI,SAAS,EACxB,SAAU,CAAC1lB,EAAS,QAAQ,QAAUgnB,GAAkCf,OAAY,KAAM,CACtF,UAAWP,EAAI,WAAW,EAC1B,SAAUsB,CAAA,CACb,CAAA,CACJ,CACL,CAAA,CACH,CACL,CAAA,CACH,CACL,CAAC,EACDP,GAAmC,aAAe,CAE9C,QAAS,CAAC,EACV,YAAa,GAEb,aAAc,OACd,cAAe,GACf,SAAU,IAEV,aAAc,KAEd,UAAW,eACf,EACAA,GAAmC,YAAc,eACjD,IAAIe,GAA6DrB,OAAaM,EAAkC,EAI5GgB,GAA+CD","x_google_ignoreList":[16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,82,83,84,85,87,88,90,91,92]}