{"version":3,"file":"proofreader-rkKQDkG1.js","sources":["../../../client/app/bundles/Proofreader/helpers/getParameterByName.ts","../../../client/app/bundles/Proofreader/actions/actionTypes.ts","../../../client/app/bundles/Proofreader/lib/sessions_api.ts","../../../client/app/bundles/Proofreader/actions/session.ts","../../../client/app/bundles/Proofreader/components/Header.tsx","../../../client/app/bundles/Proofreader/components/PageLayout.tsx","../../../client/app/bundles/Proofreader/lib/proofreader_activities_api.ts","../../../client/app/bundles/Proofreader/actions/proofreaderActivities.ts","../../../client/app/bundles/Proofreader/components/admin/tabLink.tsx","../../../client/app/bundles/Proofreader/actions/concepts.ts","../../../client/app/bundles/Proofreader/components/concepts/concepts.tsx","../../../client/app/bundles/Proofreader/components/lessons/editGenerator.tsx","../../../client/app/bundles/Proofreader/components/lessons/lessonForm.tsx","../../../client/node_modules/sbd/lib/sanitize-html-browser.js","../../../client/node_modules/sbd/lib/stringHelper.js","../../../client/node_modules/sbd/lib/Match.js","../../../client/node_modules/sbd/lib/tokenizer.js","../../../client/app/bundles/Proofreader/components/proofreaderActivities/earlySubmitModal.tsx","../../../client/app/bundles/Proofreader/components/proofreaderActivities/followupModal.tsx","../../../client/app/bundles/Proofreader/components/proofreaderActivities/formatInitialPassage.ts","../../../client/app/bundles/Proofreader/components/proofreaderActivities/editInput.tsx","../../../client/app/bundles/Proofreader/components/proofreaderActivities/paragraph.tsx","../../../client/app/bundles/Proofreader/helpers/determineUnnecessaryEditType.ts","../../../client/app/bundles/Proofreader/components/proofreaderActivities/editTooltip.tsx","../../../client/app/bundles/Proofreader/components/proofreaderActivities/edit.tsx","../../../client/app/bundles/Proofreader/components/proofreaderActivities/sharedRegexes.ts","../../../client/app/bundles/Proofreader/components/proofreaderActivities/passageReviewer.tsx","../../../client/app/bundles/Proofreader/components/proofreaderActivities/progressBar.tsx","../../../client/app/bundles/Proofreader/components/proofreaderActivities/resetModal.tsx","../../../client/app/bundles/Proofreader/components/proofreaderActivities/reviewModal.tsx","../../../client/app/bundles/Proofreader/components/proofreaderActivities/welcomePage.tsx","../../../client/app/bundles/Proofreader/helpers/EditCaretPositioning.ts","../../../client/app/bundles/Proofreader/components/shared/loading_spinner.tsx","../../../client/app/bundles/Proofreader/components/proofreaderActivities/container.tsx","../../../client/app/bundles/Proofreader/components/lessons/lesson.tsx","../../../client/app/bundles/Proofreader/components/shared/linkListItem.tsx","../../../client/app/bundles/Proofreader/components/lessons/lessons.tsx","../../../client/app/bundles/Proofreader/components/admin/admin.tsx","../../../client/app/bundles/Proofreader/routes.tsx","../../../client/app/bundles/Proofreader/actions/actions.ts","../../../client/app/bundles/Proofreader/reducers/conceptsReducer.ts","../../../client/app/bundles/Proofreader/reducers/proofreaderActivitiesReducer.ts","../../../client/app/bundles/Proofreader/reducers/sessionReducer.ts","../../../client/app/bundles/Proofreader/reducers/rootReducer.ts","../../../client/app/bundles/Proofreader/store/configStore.ts","../../../client/app/bundles/Proofreader/App.tsx","../../../client/app/bundles/Proofreader/clientRegistration.js"],"sourcesContent":["export default function getParameterByName(name: string, url: string) {\n if (!url) { url = window.location.href; }\n name = name.replace(/[\\[\\]]/g, '\\\\$&');\n const 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","export const ActionTypes = {\n // INIT STORE\n INIT_STORE: 'INIT_STORE',\n\n // PROOFREADER ACTIVITIES\n RECEIVE_PROOFREADER_ACTIVITY_DATA: 'RECEIVE_PROOFREADER_ACTIVITY_DATA',\n NO_PROOFREADER_ACTIVITY_FOUND: 'NO_PROOFREADER_ACTIVITY_FOUND',\n RECEIVE_PROOFREADER_ACTIVITIES_DATA: 'RECEIVE_PROOFREADER_ACTIVITIES_DATA',\n NO_PROOFREADER_ACTIVITIES_FOUND: 'NO_PROOFREADER_ACTIVITIES_FOUND',\n TOGGLE_LESSON_FORM: 'TOGGLE_LESSON_FORM',\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 SUBMIT_LESSON_EDIT: 'SUBMIT_LESSON_EDIT',\n FINISH_LESSON_EDIT: 'FINISH_LESSON_EDIT',\n EDITING_LESSON: 'EDITING_LESSON',\n SUBMITTING_LESSON: 'SUBMITTING_LESSON',\n\n // QUESTIONS\n SUBMIT_EDIT: 'SUBMIT_RESPONSE',\n\n // SESSIONS\n SET_FIREBASE_PASSAGE: 'SET_FIREBASE_PASSAGE',\n SET_PASSAGE: 'SET_PASSAGE',\n SET_TIMETRACKING: 'SET_TIMETRACKING',\n\n // CONCEPTS,\n RECEIVE_CONCEPTS_DATA: 'RECEIVE_CONCEPTS_DATA',\n\n // DISPLAY\n DISPLAY_ERROR: 'DISPLAY_ERROR',\n DISPLAY_MESSAGE: 'DISPLAY_MESSAGE',\n CLEAR_DISPLAY_MESSAGE_AND_ERROR: 'CLEAR_DISPLAY_MESSAGE_AND_ERROR',\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
', '
').replace(/
|<\\/p>/g, '').split(' Explanation {correctAnswers} Correct {explanation} The correct text was {displayText}. {incorrectText && `You submitted ${incorrectText === ' ' ? 'An empty space.' : incorrectText}.`}
')\n let necessaryEditCounter = 0\n let paragraphIndex = 0\n const passageArray = paragraphs.map((paragraph: string) => {\n if (paragraph.length === 0) {\n return null\n }\n let i = 0\n const paragraphArray = paragraph.split(/{|}/).map((text) => {\n let wordObj, wordArray\n if (necessaryEditRegex.test(text)) {\n wordObj = {\n originalText: text.match(originalTextRegex) ? text.match(originalTextRegex)[1] : '',\n currentText: text.match(originalTextRegex) ? text.match(originalTextRegex)[1] : '',\n necessaryEditIndex: necessaryEditCounter,\n conceptUID: text.match(conceptUIDRegex) ? text.match(conceptUIDRegex)[1] : '',\n correctText: text.match(correctEditRegex) ? text.match(correctEditRegex)[1] : '',\n underlined: true,\n wordIndex: i,\n paragraphIndex\n }\n wordArray = [wordObj]\n necessaryEditCounter+=1\n i+=1\n } else {\n wordArray = text.split(/\\s+/).map(word => {\n if (word.length === 0) {\n return null\n }\n wordObj = {\n originalText: word,\n currentText: word,\n correctText: word,\n underlined: false,\n wordIndex: i,\n paragraphIndex\n }\n i+=1\n return wordObj\n })\n }\n return wordArray.filter(Boolean)\n })\n paragraphIndex+=1\n return _.flatten(paragraphArray)\n })\n return {passage: passageArray.filter(Boolean), necessaryEdits}\n}\n\nexport default formatInitialPassage\n","import * as React from 'react';\nimport ContentEditable from 'react-contenteditable';\n\nimport { WordObject } from '../../interfaces/proofreaderActivities';\n\ntype EditInputProps = WordObject & { onWordChange: Function, numberOfResets: number, underlineErrors: boolean }\n\nexport default class EditInput extends React.Component\n
{headerText}
\n
')\n const { activeIndex, numberOfEdits } = this.state\n let index = 0\n return paragraphs.map((paragraph: string, paragraphIndex: number) => {\n const parts: Array |<\\/p>/g, '').split(/{|}/g)\n for (let i = 0; i < parts.length; i +=1) {\n if (typeof parts[i] === \"string\" && parts[i][0] === '+') {\n const plusMatch = parts[i].match(/\\+([^-]+)-/m)\n const plus = plusMatch ? plusMatch[1] : ''\n const conceptUIDMatch = parts[i].match(/\\|(.+)/m)\n const conceptUID = conceptUIDMatch ? conceptUIDMatch[1] : ''\n const negativeMatch = parts[i].match(negativeMatchRegex)\n const negative = negativeMatch ? negativeMatch[1] : null\n const concept = concepts.find(c => c.uid === conceptUID)\n const indexToPass = index\n let state = 'correct'\n if (unnecessaryArray.includes(conceptUID)) {\n state = conceptUID\n } else if (negative) {\n state = 'incorrect'\n }\n index+=1\n parts[i] = ( {parts} No passage {answeredQuestionCount} of {questionCount} edits made This will undo all the edits you made and reset the passage to its original state. Read the passage and correct the grammar and punctuation errors you find. Get feedback on each correction you made. Work on a follow-up activity that focuses on one of the errors from the passage. ').concat(joinWords(words.filter(word => word.length))).concat(' Screenreader users: once you have finished reading the passage, use the tab keys to navigate between words and make changes to ones that have errors. {currentActivity.underlineErrorsInProofreader && 'Words that contain errors will be described as underlined.'} Words that you have already changed will be described as bolded. There are {necessaryEditsLength} errors to find and fix. When you are done, navigate to the "Get Feedback" button after the passage and select it. Loading... \n \n \n Note: the activity below functions exactly like the real activity, except that you will not be directed to a results page or to a Grammar activity upon finishing the review. Instead, the activity will reset. 404: No Concept FoundReset the passage?
\n {highScoreMessage} You found {numberOfCorrectChanges} of {numberOfErrors} errors. Let's review your edits.
\n \n Welcome to Quill Proofreader!
\n Read
\n \n
Review
\n \n
Improve
\n \n
\n
{currentActivity.title}
\n \n \n
\n {data[lessonID].title}
\n Flag: {data[lessonID].flag}
\n Play Proofreader Activity
\n